584,805 active members*
4,994 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Visual Basic > writing a program to offset from stick font to do inlay using qb64
Results 1 to 8 of 8
  1. #1
    Join Date
    May 2012
    Posts
    39

    writing a program to offset from stick font to do inlay using qb64

    Many years ago, (maybe Win95 and before) I wrote programs to do many things using qbasic or gwbasic...i forget.
    I recently found an open source clone that utilizes 64 bit architecture (qb64) and am back at it again.
    I'm using open source and some low end purchased cad/cam software to do inlay work. On some projects, I'd like to make the pocket larger than the male boss so I can seat the inlay in acrylic, epoxy...for contrast between the background and the inlay material.
    The software I'm using is F-engrave on the free side, NCPlot and Draftsight on the paid for side. I can use NCPlot to break any G2, G3 codes into G1 line segments and I want to write a qb64 program that offsets those line segments a given distance then lengthen or shorten (depending on whether it's an inside or outside curve) the line segments until they intersect with the two segments in front and behind.
    Of course, I can do it by hand in Draftsight but in some cases that's weeks of work for one blueprint. I'd rather spend those weeks coming back up to speed programming in qb64 and be done with that task.
    Has anyone done something similar? If I had code that did that in a similar language, I might be able to mull through it and convert it to basic.

  2. #2
    Join Date
    Dec 2013
    Posts
    5717

    Re: writing a program to offset from stick font to do inlay using qb64

    I think the ATAN2 function will do what you want. Just change the I,J offsets.

    The easier way if you want to make the entire pocket larger than the mail part, plug in a slightly smaller tool size than the actual tool size into the CAM program and the pocket will come out oversize. For instance, if you have a 1 inch diameter pocket and you are using a 0.250 cutter, then tell the CAM program that the tool is 0.245 and the pocket should come out 1.010 dia. If the CAM program has something like a stock to leave (might be labeled roughing clearance, or something like that), then try plugging in a negative value of the amount of oversize you want.

  3. #3
    Join Date
    May 2012
    Posts
    39

    Re: writing a program to offset from stick font to do inlay using qb64

    I've done that with F-Engrave but it doesn't correctly collision detect. With your example, if I had a .245 slot in the part, the program would march down the slot thinking it's perfect while it's really shaving an extra .0025 off each side. It does the same on internal radius's that are smaller than actual end mill size.
    I've also exported an undersized cut path to dxf and edited it in Draftsight, walking down the cut path generating a circle until it touches the adjacent cut before truncating the cut path but that takes me back into lengthy editing for a task that can be automated with the right program.
    I've even approximated the desired path by copy/pasting offsets in +- XY directions (in Draftsight) with different colored layers for each offset, then using trim to erase the internal lines...talking about time consuming.

  4. #4
    Join Date
    May 2012
    Posts
    39

    Re: writing a program to offset from stick font to do inlay using qb64

    On further thought, that might actually work Jim. I remember trying it and running into a problem but can't remember what it was right now. Might have been when I oversized an em.
    When I want to leave a finish cut thickness, I typically input end mill size +.020 diameter then set it back to actual size for the finish pass. In that instance, I know it will never gouge an adjacent cut because it just won't go into those tight places. It does make for interesting finish passes when there's channels that were under the +.020 clearance yet over the actual em size and the sudden load on the spindle makes you think something has blown up, lol.

  5. #5
    Join Date
    Dec 2013
    Posts
    5717

    Re: writing a program to offset from stick font to do inlay using qb64

    Quote Originally Posted by Goosey View Post
    I've done that with F-Engrave but it doesn't correctly collision detect. With your example, if I had a .245 slot in the part, the program would march down the slot thinking it's perfect while it's really shaving an extra .0025 off each side. It does the same on internal radius's that are smaller than actual end mill size.
    Normally you would use a cutter with a radius that is a bit smaller than the smallest radius on the work. For efficiency, you might want to use a larger cutter for roughing, then go in with a smaller cutter for a finishing pass.

    I have never used F-Engrave, so I can't help you there. I might suggest that you take a look at CamBam, it's low cost ($149) and has great collision detection.

    Back to your question about writing code to do what you want, it's possible if you have enough time to spend on it. All of the input data you need is in the G-code. You can convert the arcs to lines and do the offsets in the loop. Just need to add another variable to do the X,Y offset

    Something like this code snippet from my CNC program written in VB.net. This breaks the arc into line segments, and stuffs the new values into an array which is later converted to G1 moves to profile the arc

    For kk = 1 To Math.Round(vArcLength * 100) 'Step vArcLength

    If dd <= RadiansSweepG2 Then
    newX = vRadius * Math.Cos(RadiansStart - dd) + absX
    LICircle(kk, 0) = newX
    newY = vRadius * Math.Sin(RadiansStart - dd) + absY
    LICircle(kk, 1) = newY
    End If

    dd = dd + arcStep / 100
    Next

  6. #6
    Join Date
    May 2012
    Posts
    39

    Re: writing a program to offset from stick font to do inlay using qb64

    " Quote Originally Posted by Goosey View Post
    I've done that with F-Engrave but it doesn't correctly collision detect. "

    I should have said... I've done that with F-Engrave but it doesn't correctly collision detect when "input" end mill size isn't "actual" size. F-Engrave works very well for a free prg.

  7. #7
    Join Date
    Nov 2008
    Posts
    412

    Re: writing a program to offset from stick font to do inlay using qb64

    Has anyone done something similar?

    CamBam has wonderfull plugin do just that. Maybe reading the post would help you. Good Luck.

    Inlay using V-Engrave
    Forget about global warming...Visualize using your turn signal!

  8. #8
    Join Date
    Jun 2005
    Posts
    1723

    Re: writing a program to offset from stick font to do inlay using qb64

    lancut,
    I watched someone on the forum building a Martin Guitar copy use the v-engrave to put is signature up on the head stock. I had really not seen that done before, most of the time people use a tiny endmill and cut a flat bottom opening and drop in the insert. I was really amazing the approach on the guitar turned out very nice indeed.
    Russ

Similar Threads

  1. Cyrillic stick font now available at OneLineFonts.com
    By onelinefonts in forum News Announcements
    Replies: 0
    Last Post: 08-19-2014, 08:34 PM
  2. stick font
    By helpmeout in forum CamBam
    Replies: 1
    Last Post: 01-29-2012, 06:12 AM
  3. Stick Font to GCode Converter
    By MetLHead in forum NCPlot G-Code editor / backplotter
    Replies: 25
    Last Post: 07-29-2011, 04:58 AM
  4. CHR Stick font display & transform
    By adunor in forum NCPlot G-Code editor / backplotter
    Replies: 0
    Last Post: 11-17-2010, 01:50 AM
  5. Stick Font
    By V8 BUG in forum Solidworks
    Replies: 1
    Last Post: 11-22-2008, 06:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •