GcodeOut - Export gcode to Turbocnc


Results 1 to 19 of 19

Thread: GcodeOut - Export gcode to Turbocnc

  1. #1
    Member wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    416
    Downloads
    0
    Uploads
    0

    Default GcodeOut - Export gcode to Turbocnc

    I just finished my first version of GcodeOut.fas.

    A compiled lisp program to generate CNC gcode files from Autocad (2000 or later). It is set up to post for Turbocnc.

    You can modify GcodeOutPost.lsp to generate gcode to other controllers. At least that is my intent.

    I also have a lathe version near completion.

    I appreciate any feedback.

    Bill

    Here is the link.
    http://www.intergate.com/~wjb1/wjbzo...d/gcodeout.zip

    Similar Threads:


  2. #2
    Registered balsaman's Avatar
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    2139
    Downloads
    0
    Uploads
    0

    Default

    What types of Autocad geometry does it recognize? Ploylines, splines, or just lines and arcs?

    Eric

    I wish it wouldn't crash.


  3. #3
    Member wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    416
    Downloads
    0
    Uploads
    0

    Default

    Eric,
    It recognizes polylines and processes each one as you select them. LWpolylines or 3dpolylines.

    You select the polyline you want to process, then you have the option of selecting additional polylines. You can also specify a tool change between each selection.

    Bill



  4. #4
    Registered balsaman's Avatar
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    2139
    Downloads
    0
    Uploads
    0

    Default

    Cool, I will try it.

    Eric

    I wish it wouldn't crash.


  5. #5
    Member wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    416
    Downloads
    0
    Uploads
    0

    Default

    I updated GcodeOut.

    When you select a LWpolyline or 3dpolyline, it highlights and labels the start and end.

    You are given the option to reverse the direction of the toolpath on each polyline.

    The selected polylines remain highlighted. This allows you to see what you have already selected.

    (click link on first post in this thread)
    Bill



  6. #6
    Member wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    416
    Downloads
    0
    Uploads
    0

    Default

    GcodeOut link above has been updated.

    1.
    I fixed a problem with the toolpath when a polyline was reversed.

    2.
    It now uses the UCS as the origin for your gcode output. (prev version used WCS only).

    Bill.



  7. #7
    Gold Member
    Join Date
    Jun 2003
    Location
    United States
    Posts
    1365
    Downloads
    0
    Uploads
    0

    Default

    wow I like that program a lot, is it possible to make a multiple line select and a zdepth thing like this below so it plunges, side cuts, plunges, side cuts back, back and forth etc.

    what I got when I tried to post that toolpath was this:

    M3
    G0 X0.8568 Y0.0000
    G1Z-0.6875F10.0
    G1 X0.8568 Y-0.0100 Z-0.6875
    G1 X1.1875 Y-0.0100 Z-0.6875
    G1 X1.1875 Y-0.0200 Z-0.6875
    G1 X0.8568 Y-0.0200 Z-0.6875
    G1 X0.8568 Y-0.0300 Z-0.6875
    G1 X1.1875 Y-0.0300 Z-0.6875
    G1 X1.1875 Y-0.0400 Z-0.6875
    G1 X0.8568 Y-0.0400 Z-0.6875
    G1 X0.8568 Y-0.0500 Z-0.6875
    G1 X1.1875 Y-0.0500 Z-0.6875
    G1 X1.1875 Y-0.0600 Z-0.6875
    G1 X0.8568 Y-0.0600 Z-0.6875
    G1 X0.8568 Y-0.0700 Z-0.6875
    G1 X1.1875 Y-0.0700 Z-0.6875
    G1 X1.1875 Y-0.0750 Z-0.6875
    G1 X0.8568 Y-0.0750 Z-0.6875
    G0 Z0.3125
    M5

    looks like the Y and Z arent correct, and it would have to plunge the z instead of making banked cuts(like if it was switched)

    This is the kind of program I have been looking for!


    Thankyou
    Jon

    Attached Thumbnails Attached Thumbnails GcodeOut - Export gcode to Turbocnc-zaxis-jpg  


  8. #8
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default

    try drawing your toolpath as 1 continuos 3d polyline.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  9. #9
    Gold Member
    Join Date
    Jun 2003
    Location
    United States
    Posts
    1365
    Downloads
    0
    Uploads
    0

    Default

    It is 1 polyline, I drew it in the xy axis and rotatalized it down.

    Jon



  10. #10
    Member wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    416
    Downloads
    0
    Uploads
    0

    Default

    Jon,
    Is that a 2d polyine? If you 3D rotate regular (2D) polyline, that can cause some problems. (ie a curve that is not in the xy plane). I would use a 3d polyline, with a lot of short straight line segments, to replace the vertical curve.
    Bill



  11. #11
    Gold Member
    Join Date
    Jun 2003
    Location
    United States
    Posts
    1365
    Downloads
    0
    Uploads
    0

    Default

    Alright, Ill have to give it a go, yes its a 2d polyline rotated, I have never used 3dpolyline command so Ill have to experiment. so this will work, thats great, is there a way I can use what I have already and offset them down and connect them without re-drawing them?


    Jon



  12. #12
    Member wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    416
    Downloads
    0
    Uploads
    0

    Default

    Jon,
    You can copy the 2d polyline down (in Z direction) multiple times. You will not be able to connect a 2d polyline at different elevations because Autocad requires it to be in one plane. The 3dpoly is best used for that.

    If you copy, you can select each one in sequence and it will post one after the other. Note that you can set your return height after each polyline by changing the GcodeoutPost.lsp file. (you have to re-load it after you load gcodeout)

    Bill



  13. #13
    Gold Member
    Join Date
    Jun 2003
    Location
    United States
    Posts
    1365
    Downloads
    0
    Uploads
    0

    Default

    The main reason I want to do this is so I dont have to lift the head everytime I plunge deeper for the same slot. what about doing what you said above, and then tracing over with a 3d polyline? Ill have to give that a shot.


    Jon



  14. #14
    Member wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    416
    Downloads
    0
    Uploads
    0

    Default

    That's the way I like to do it.
    Bill



  15. #15
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default

    The only problem with the 3dpolyline is it can't have arcs in it. Bill, is there an easy way to convert a arc into a 3dpolyline made up of short segments? lisp? I'd trace it too, btw.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  16. #16
    Member wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    416
    Downloads
    0
    Uploads
    0

    Default

    Gerry,
    I use Toolpac from Dotsoft. There are a lot of polyline manipulation functions in it. It will convert an arc to a 3dpoly with the number of points you specify.


    Bill



  17. #17
    Member wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    416
    Downloads
    0
    Uploads
    0

    Default

    An easy way to trace the arc would be to use the "divide" command and specify the number of points. Then just connect the points.
    Bill



  18. #18
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default

    Originally posted by wjbzone
    An easy way to trace the arc would be to use the "divide" command and specify the number of points. Then just connect the points.
    Bill
    Didn't think of that. And I use DIVIDE all the time, too.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  19. #19
    Member wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    416
    Downloads
    0
    Uploads
    0

    Default

    This might be handy for converting an arc:

    (defun C:arcdivide ()
    ;converts arc to lines
    (setq E (ENTSEL "\nSELECT ARC TO CONVERT TO LINES: "))
    (setq numpts (getreal "\nENTER NUMBER OF LINES "))
    (setq el (entget (car e)))
    (setq arcctr (cdr (assoc 10 el)))
    (setq ang1 (cdr (assoc 50 el)))
    (setq ang2 (cdr (assoc 51 el)))
    (setq arcrad (cdr (assoc 40 el)))
    (setq ptstart (polar arcctr ang1 arcrad))
    (setq arcang (- ang2 ang1))
    (if (< ang2 ang1)
    (setq arcang (+ (* 2 pi) arcang))
    )
    (setq anginc (/ arcang numpts))
    (setq nang ang1)
    (setq ncount 0)
    (while (< ncount numpts)
    (setq nang (+ nang anginc))
    (setq ptend (polar arcctr nang arcrad))
    (command "line" ptstart ptend "")
    (setq ptstart ptend)
    (setq ncount (+ ncount 1))
    )
    )



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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

GcodeOut - Export gcode to Turbocnc

GcodeOut - Export gcode to Turbocnc