Jump to content

Convert a G-Code into geometry


Son of Aslan

Recommended Posts

15 years ago, I worked at a furniture company that ran their repair department with a AutoCAD R12 computer with lisp routines for converting geometry into G-Code that was recognizable by Gerber cutting machines. They also had lisp routines that would work the other way around, in that they would convert G-Code text files BACK into geometry, while also showing tool paths and the like. These particular routines were seldom needed or used.

 

The reason I mention this is to show that I know such a thing exists, for I have used it in the past.

 

Does anyone know where I could find a autolisp routine that would convert modern G-Code back into AutoCAD as geometry? I have looked online, and I cannot find anything lisp oriented. I found a few installable programs, but I would rather do it with a lisp routine right in AutoCAD. Such a routine would come in handy where I work and in checking G-Code files before actually running them, to ensure it cuts correctly.

 

The G-Code I wish to convert was programmed for a Komo Router VR 510 that cuts 4' x 8' boards with a wood bit and drills.

 

A sample of the code I wish to convert into geometry is...

 

%
:(3159-STLD 5/8 OSB)
N1G00G17G20G28G40G80G91Z0M5
N2G90
N3M08
N4G52X0Y0Z0
N5G08P1
N6(DRILL .34375 DIA.)
N7G28G91Z0M05
N8G90T2006M06
N9T102
N10G00G17G55X12.397Y41.4811M03S6500
N11G00G43H6Z1.6
N12G01Z-.06F400.
N13G00Z1.6
N14G00X17.2965Y14.1266
N15G01Z-.06F400.
N16G00Z1.6
N17G00Y16.6266
N18G01Z-.06F400.
N19G00Z1.6
N20G00Y32.7377
N21G01Z-.06F400.
N22G00Z1.6
N23G00Y35.2377
N24G01Z-.06F400.
N25G00Z1.6
N26G00X30.897Y41.4811
N27G01Z-.06F400.
N28G00Z1.6
N29G00X33.4083
N30G01Z-.06F400.
N31G00Z1.6
N32G00X51.9083
N33G01Z-.06F400.
N34G00Z1.6
N35G00X55.2499
N36G01Z-.06F400.
N37G00Z1.6
N38G00X73.7499
N39G01Z-.06F400.
N40G00Z1.6
N41G00X76.2611
N42G01Z-.06F400.
N43G00Z1.6
N44G00X94.7611
N45G01Z-.06F400.
N46G00Z1.6
N47G00X85.9215Y35.2377
N48G01Z-.06F400.
N49G00Z1.6
N50G00Y32.7377
N51G01Z-.06F400.
N52G00Z1.6
N53G00Y16.6266
N54G01Z-.06F400.
N55G00Z1.6
N56G00Y14.1266
N57G01Z-.06F400.
N58G00Z1.6
N59(DRILL .5 DIA.)
N60G28G91Z0M05
N61G90T2009M06
N62T102
N63G00G17G55X80.6091Y3.8266M03S6000
N64G00G43H9Z2.
N65Z1.6
N66G01Z-.04F500.
N67G00Z2.
N68G00Y14.4516
N69Z1.6
N70G01Z-.04F500.
N71G00Z2.
N72G00X62.6091
N73Z1.6
N74G01Z-.04F500.
N75G00Z2.
N76G00Y3.8266
N77Z1.6
N78G01Z-.04F500.
N79G00Z2.
N80G00X40.6091
N81Z1.6
N82G01Z-.04F500.
N83G00Z2.
N84G00Y14.4516
N85Z1.6
N86G01Z-.04F500.
N87G00Z2.
N88G00X22.6091
N89Z1.6
N90G01Z-.04F500.
N91G00Z2.
N92G00Y3.8266
N93Z1.6
N94G01Z-.04F500.
N95G00Z2.
N96G00Y22.4377
N97Z1.6
N98G01Z-.04F500.
N99G00Z2.
N100G00Y33.0627
N101Z1.6
N102G01Z-.04F500.
N103G00Z2.
N104G00X40.6091
N105Z1.6
N106G01Z-.04F500.
N107G00Z2.
N108G00Y22.4377
N109Z1.6
N110G01Z-.04F500.
N111G00Z2.
N112G00X62.6091
N113Z1.6
N114G01Z-.04F500.
N115G00Z2.
N116G00Y33.0627
N117Z1.6
N118G01Z-.04F500.
N119G00Z2.
N120G00X80.6091
N121Z1.6
N122G01Z-.04F500.
N123G00Z2.
N124G00Y22.4377
N125Z1.6
N126G01Z-.04F500.
N127G00Z2.
N128(ROUTER-BIT .5 DIA.)
N129G28G91Z0M05
N130G90T2001M06
N131T102
N132G00G17G55X78.0006Y18.3759M03S21000
N133G00G43H1Z2.
N134Z1.6
N135G41D01G01X78.2756F450.
N136X81.4856Y18.3758Z-.005
N137X94.0602Y18.3755F900.
N138G02X94.7532Y17.6286I-.056J-.7469
N139G01Y15.3484
N140G02X94.9823Y15.0036I-.1448J-.3448
N141G01Y4.5015
N142G02X90.7114Y-.2234I-4.749
N143G01X12.5282
N144G02X8.2358Y4.5036I.4566J4.727
N145G01Y15.0036
N146G02X8.4858Y15.3564I.374
N147G01Y17.6286
N148G02X9.2348Y18.3776I.749
N149G01X81.4856Y18.3758
N150X81.9856F900.
N151X85.1956Y18.3757Z1.6
N152G00Z2.
N153G40G00X85.4706
N154X78.0006Y36.987
N155Z1.6
N156G41D01G01X78.2756F450.
N157X81.4856Y36.9869Z-.005
N158X94.0602Y36.9866F900.
N159G02X94.7532Y36.2397I-.056J-.7469
N160G01Y33.9595
N161G02X94.9823Y33.6147I-.1448J-.3448
N162G01Y23.1126
N163G02X90.7114Y18.3877I-4.749
N164G01X12.5282
N165G02X8.2358Y23.1147I.4566J4.727
N166G01Y33.6147
N167G02X8.4858Y33.9675I.374
N168G01Y36.2397
N169G02X9.2348Y36.9887I.749
N170G01X81.4856Y36.9869
N171X81.9856F900.
N172X85.1956Y36.9868Z1.6
N173G00Z2.
N174G40G00X85.4706
N175X75.0746Y43.268
N176Z1.6
N177G41D01G01Y43.543F450.
N178Y46.753Z-.005
N179Y47.8551F900.
N180X95.9476
N181Y36.9821
N182X75.0746
N183Y46.753
N184Y47.253F900.
N185Y47.8551Z.296
N186X77.6826Z1.6
N187G00Z2.
N188G40G00X77.9576
N189X54.0634Y43.268
N190Z1.6
N191G41D01G01Y43.543F450.
N192Y46.753Z-.005
N193Y47.8551F900.
N194X74.9364
N195Y36.9821
N196X54.0634
N197Y46.753
N198Y47.253F900.
N199Y47.8551Z.296
N200X56.6713Z1.6
N201G00Z2.
N202G40G00X56.9463
N203X32.2218Y43.268
N204Z1.6
N205G41D01G01Y43.543F450.
N206Y46.753Z-.005
N207Y47.8551F900.
N208X53.0948
N209Y36.9821
N210X32.2218
N211Y46.753
N212Y47.253F900.
N213Y47.8551Z.296
N214X34.8297Z1.6
N215G00Z2.
N216G40G00X35.1047
N217X11.2105Y43.268
N218Z1.6
N219G41D01G01Y43.543F450.
N220Y46.753Z-.005
N221Y47.8551F900.
N222X32.0835
N223Y36.9821
N224X11.2105
N225Y46.753
N226Y47.253F900.
N227Y47.8551Z.296
N228X13.8185Z1.6
N229G00Z2.
N230G40G00X14.0935
N231G28G91Z0M5
N232G28G91X0
N233M09
N234G90
N235G52X0Y0Z0
N236G08P0
N237M30
%

 

Thanks in advance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...