View Full Version : G-Code to DXF
WayneHill 03-01-2005, 11:09 AM This program will convert a standard line-arc gcode file to a DXF file.
It is written in PowerBASIC and is released to the public doman.
http://www.cnczone.com/modules/Downloads/userfile.php?id=22
#PBFORMS CREATED V1.50
'------------------------------------------------------------------------------
' The first line in this file is a PB/Forms metastatement.
' It should ALWAYS be the first line of the file. Other
' PB/Forms metastatements are placed at the beginning and
' end of "Named Blocks" of code that should be edited
' with PBForms only. Do not manually edit or delete these
' metastatements or PB/Forms will not be able to reread
' the file correctly. See the PB/Forms documentation for
' more information.
' Named blocks begin like this: #PBFORMS BEGIN ...
' Named blocks end like this: #PBFORMS END ...
' Other PB/Forms metastatements such as:
' #PBFORMS DECLARATIONS
' are used by PB/Forms to insert additional code.
' Feel free to make changes anywhere else in the file.
'------------------------------------------------------------------------------
#COMPILE EXE "G-Code to DXF"
#DIM ALL
'------------------------------------------------------------------------------
' ** Includes **
'------------------------------------------------------------------------------
#PBFORMS BEGIN INCLUDES
#IF NOT %DEF(%WINAPI)
#INCLUDE "WIN32API.INC"
#ENDIF
#PBFORMS END INCLUDES
'------------------------------------------------------------------------------
#INCLUDE "COMDLG32.INC"
#INCLUDE "C:\QVCS LIB\Workfile\PowerBasic\Common\URL\url.inc" ' Add Urls
'------------------------------------------------------------------------------
' ** Constants **
'------------------------------------------------------------------------------
#PBFORMS BEGIN CONSTANTS
%IDD_DIALOG1 = 101
%IDC_BUTTON1 = 1001
%IDC_BUTTON2 = 1002
%IDC_LABEL1 = 1003
%IDC_LABEL2 = 1004 '*
%IDC_LABEL3 = 1005
%IDC_LABEL4 = 1006
%IDC_BUTTON3 = 1007
%IDC_LABEL5 = 1008
#PBFORMS END CONSTANTS
'------------------------------------------------------------------------------
MACRO Pi = 3.141592653589793##
TYPE TypPoints
X AS SINGLE ' Center of first circle or first point of intersection
Y AS SINGLE
Z AS SINGLE
I AS SINGLE
J AS SINGLE
X1 AS SINGLE ' Center of first circle or first point of intersection
Y1 AS SINGLE
X2 AS SINGLE ' Point on diameter of circle or second point of intersection
Y2 AS SINGLE
R AS SINGLE ' Common Radius
Ang AS SINGLE ' Angle of Radius Point on Circomference.
END TYPE
GLOBAL TypOld AS TypPoints ' Hold Values of Geometry
DECLARE SUB CalcCenters( BYREF Centers AS TypPoints )
DECLARE SUB CalcAngle( BYREF tPoints AS TypPoints )
DECLARE SUB PARSEFILE( hWnd AS LONG,SMYSOURCEFILE AS STRING )
$ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
$DP = "#.0###" ' FORMAT OF XYZ - CODE
'------------------------------------------------------------------------------
' ** Declarations **
'------------------------------------------------------------------------------
DECLARE CALLBACK FUNCTION ShowDIALOG1Proc()
DECLARE FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG
#PBFORMS DECLARATIONS
'------------------------------------------------------------------------------
DECLARE FUNCTION ExeName(Op AS LONG) AS STRING
'------------------------------------------------------------------------------
' ** Main Application Entry Point **
'------------------------------------------------------------------------------
FUNCTION PBMAIN()
ShowDIALOG1 %HWND_DESKTOP
END FUNCTION
'------------------------------------------------------------------------------
'------------------------------------------------------------------------------
' ** CallBacks **
'------------------------------------------------------------------------------
CALLBACK FUNCTION ShowDIALOG1Proc()
SELECT CASE AS LONG CBMSG
CASE %WM_INITDIALOG
' Initialization handler
CASE %WM_NCACTIVATE
STATIC hWndSaveFocus AS DWORD
IF ISFALSE CBWPARAM THEN
' Save control focus
hWndSaveFocus = GetFocus()
ELSEIF hWndSaveFocus THEN
' Restore control focus
SetFocus(hWndSaveFocus)
hWndSaveFocus = 0
END IF
CASE %WM_COMMAND
' Process control notifications
SELECT CASE AS LONG CBCTL
' /* Inserted by PB/Forms 10-11-2004 00:36:51
CASE %IDC_LABEL5
' */
' /* Inserted by PB/Forms 09-11-2004 15:16:59
CASE %IDC_BUTTON3
IF CBCTLMSG = %BN_CLICKED OR CBCTLMSG = 1 THEN
DIALOG END CBHNDL 'Exit
END IF
' */
CASE %IDC_BUTTON1
IF CBCTLMSG = %BN_CLICKED OR CBCTLMSG = 1 THEN
DIM InputFile AS STRING
Inputfile = "*.cnc;*.txt;*.dnc"
IF OpenFileDialog(0, _
"Open PowerBasic Source File", _
InputFile, _
CURDIR$, _
"CNC Files (*.cnc;*.txt;*.dnc)|*.cnc,*.txt,*.dnc", _
"cnc", _
%OFN_FILEMUSTEXIST OR %OFN_HIDEREADONLY) THEN
END IF
IF Inputfile = "*.cnc;*.txt;*.dnc" THEN Inputfile = "None"
CONTROL SET TEXT CBHNDL , %IDC_LABEL1, InputFile
END IF
CASE %IDC_BUTTON2
IF CBCTLMSG = %BN_CLICKED OR CBCTLMSG = 1 THEN
CONTROL GET TEXT CBHNDL , %IDC_LABEL1 TO InputFile
IF Inputfile = "None" THEN EXIT FUNCTION
' Disable system menu's close item
MENU SET STATE GetSystemMenu(CBHNDL, 0), %SC_CLOSE, %MF_GRAYED
' Disable other controls
CONTROL DISABLE CBHNDL, %IDC_BUTTON1
CONTROL DISABLE CBHNDL, %IDC_BUTTON2
CONTROL DISABLE CBHNDL, %IDC_BUTTON3
PARSEFILE(CBHNDL,InputFile)
MSGBOX "Finished"
CONTROL ENABLE CBHNDL, %IDC_BUTTON1
CONTROL ENABLE CBHNDL, %IDC_BUTTON2
CONTROL ENABLE CBHNDL, %IDC_BUTTON3
END IF
CASE %IDC_LABEL1
CASE %IDC_LABEL3
CASE %IDC_LABEL4
END SELECT
END SELECT
END FUNCTION
'------------------------------------------------------------------------------
'------------------------------------------------------------------------------
' ** Dialogs **
'------------------------------------------------------------------------------
FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG
LOCAL lRslt AS LONG
#PBFORMS BEGIN DIALOG %IDD_DIALOG1->->
LOCAL hDlg AS DWORD
DIALOG NEW hParent, "G-Code to DXF", 73, 156, 274, 94, %WS_POPUP OR _
%WS_BORDER OR %WS_DLGFRAME OR %WS_CLIPSIBLINGS OR %WS_VISIBLE OR _
%DS_MODALFRAME OR %DS_CENTER OR %DS_3DLOOK OR %DS_NOFAILCREATE OR _
%DS_SETFONT, %WS_EX_WINDOWEDGE OR %WS_EX_CONTROLPARENT OR _
%WS_EX_LEFT OR %WS_EX_LTRREADING OR %WS_EX_RIGHTSCROLLBAR, TO hDlg
CONTROL ADD BUTTON, hDlg, %IDC_BUTTON1, "Import G-Code", 5, 10, 65, 15
CONTROL ADD BUTTON, hDlg, %IDC_BUTTON2, "Convert to DXF", 5, 45, 65, 15
CONTROL ADD LABEL, hDlg, %IDC_LABEL1, "None", 10, 30, 255, 10
CONTROL ADD LABEL, hDlg, %IDC_LABEL3, "Line : ", 80, 50, 25, 10
CONTROL ADD LABEL, hDlg, %IDC_LABEL4, "", 110, 50, 155, 10
CONTROL ADD BUTTON, hDlg, %IDC_BUTTON3, "Exit", 205, 70, 50, 15
#PBFORMS END DIALOG
InitUrlCtrl ' INI for URL's
CONTROL ADD "PBURL32", hDlg, 106, "By Wayne Hill;mailto:wayne_j_hill@yahoo.com", _
10, 70, 80, 14, %WS_VISIBLE OR %WS_CHILD
DIALOG SHOW MODAL hDlg, CALL ShowDIALOG1Proc TO lRslt
#PBFORMS BEGIN CLEANUP %IDD_DIALOG1
#PBFORMS END CLEANUP
FUNCTION = lRslt
END FUNCTION
'------------------------------------------------------------------------------
FUNCTION ExeName(Op AS LONG) AS STRING
LOCAL TmpAsciiz AS ASCIIZ * 256
GetModuleFileName GetModuleHandle(BYVAL 0&), TmpAsciiz, 255
IF Op = 1 THEN
FUNCTION = TmpAsciiz
ELSE
LOCAL i AS LONG, j AS LONG
DO
j = INSTR(i + 1, TmpAsciiz, "\")
IF j = 0 THEN EXIT DO ELSE i = j
LOOP
IF Op = 2 THEN FUNCTION = LEFT$(TmpAsciiz$, i) ELSE _ ' With final \
FUNCTION = MID$(TmpAsciiz$, i + 1)
END IF
END FUNCTION
SUB PARSEFILE( hWnd AS LONG,SMYSOURCEFILE AS STRING )
DIM TypNew AS TypPoints
DIM MyResults AS TypPoints
DIM lNumberOfLines AS LONG
DIM lNumberofAlpha_Codes AS LONG
DIM lLineCount AS LONG
DIM lAlphaCode_Count AS LONG
DIM lAlphaCodePos AS LONG
DIM lAlphaValue AS LONG
DIM sLine AS STRING
DIM sLineParsed AS STRING
DIM sAlphaCode AS STRING
DIM sGMode AS STRING
LOCAL ArcCenterX AS SINGLE
LOCAL ArcCenterY AS SINGLE
LOCAL SideXs AS SINGLE
LOCAL SideYs AS SINGLE
LOCAL Radius AS SINGLE
LOCAL AngleEnd AS SINGLE
LOCAL AngleStart AS SINGLE
LOCAL LineCounter AS LONG
LineCounter = 48 ' Start at 48 for AutoCAD Line Number Entity
DIM HFILE AS LONG
DIM sBUFFER AS STRING
DIM sTemp AS STRING
TypOld = TypNew ' Clear
HFILE = FREEFILE
OPEN SMYSOURCEFILE FOR INPUT AS HFILE
WHILE ISFALSE EOF( HFILE )
LINE INPUT# HFILE, sTemp
CONTROL SET TEXT hWnd , %IDC_LABEL4, sTemp
sBUFFER = sBUFFER + sTemp + $CRLF
DIALOG DOEVENTS
WEND
CLOSE HFILE
HFILE = FREEFILE
OPEN "Data.DXF" FOR OUTPUT AS HFILE 'DXF FILE.
PRINT #HFILE, " 0"
PRINT #HFILE, "SECTION"
PRINT #HFILE, " 2"
PRINT #HFILE, "ENTITIES"
lNumberOfLines = TALLY( sBUFFER, $CRLF )
FOR lLineCount = 1 TO lNumberOfLines
DIALOG DOEVENTS
CONTROL SET TEXT hWnd , %IDC_LABEL4, STR$(lLineCount)
sLine = PARSE$( sBUFFER, $CRLF, lLineCount )
sLine = PARSE$( sLine, "(", 1 ) ' REMOVE COMMENT LINE
sLine = UCASE$( sLine ) ' CHANGE TO UPPERCASE
sLine = REMOVE$( sLine, " " ) ' REMOVE SPACES
lNumberofAlpha_Codes = TALLY( sLine, ANY $ALPHA )
FOR lAlphaCode_Count = 1 TO lNumberofAlpha_Codes
lAlphaCodePos = INSTR( - 1, sLine, ANY $ALPHA ) ' FIND THE RIGHTMOST LETTER
sLineParsed = MID$( sLine, lAlphaCodePos, LEN( sLine )) ' GET THE CODE AND THE VALUE
sLine = EXTRACT$( sLine, sLineParsed ) ' REMOVE IT FROM THE MAIN STRING
sAlphaCode = LEFT$( sLineParsed, 1 )
SELECT CASE sAlphaCode
CASE "X"
TypNew.X = VAL( FORMAT$( VAL( PARSE$( sLineParsed, ANY $ALPHA, 2 )), $DP ))
CASE "Y"
TypNew.Y = VAL( FORMAT$( VAL( PARSE$( sLineParsed, ANY $ALPHA, 2 )), $DP ))
CASE "Z"
TypNew.Z = VAL( FORMAT$( VAL( PARSE$( sLineParsed, ANY $ALPHA, 2 )), $DP ))
CASE "R"
TypNew.R = VAL( FORMAT$( VAL( PARSE$( sLineParsed, ANY $ALPHA, 2 )), $DP ))
CASE "I"
TypNew.I = VAL( FORMAT$( VAL( PARSE$( sLineParsed, ANY $ALPHA, 2 )), $DP ))
CASE "J"
TypNew.J = VAL( FORMAT$( VAL( PARSE$( sLineParsed, ANY $ALPHA, 2 )), $DP ))
CASE "G"
lAlphaValue = VAL( PARSE$( sLineParsed, ANY $ALPHA, 2 ))
SELECT CASE lAlphaValue
CASE 0
sGMode = "0" ' Group 1 G Codes
CASE 1
sGMode = "1"
CASE 2
sGMode = "2"
CASE 3
sGMode = "3"
END SELECT
END SELECT
NEXT ALPHACODECOUNT
IF sGMode = "3" OR sGMode = "2" THEN
IF TypNew.R <> 0 THEN
MyResults.X1 = TypOld.X
MyResults.Y1 = TypOld.Y
MyResults.X2 = TypNew.X
MyResults.Y2 = TypNew.Y
Radius = TypNew.R
MyResults.R = ABS( Radius )
CalcCenters MyResults
IF ( sGMode = "2" ) AND ( SGN( Radius ) = - 1 ) THEN
ArcCenterX = MyResults.X2
ArcCenterY = MyResults.Y2
END IF
IF ( sGMode = "2" ) AND ( SGN( Radius ) = 1 ) THEN
ArcCenterX = MyResults.X1
ArcCenterY = MyResults.Y1
END IF
IF ( sGMode = "3" ) AND ( SGN( Radius ) = - 1 ) THEN
ArcCenterX = MyResults.X1
ArcCenterY = MyResults.Y1
END IF
IF ( sGMode = "3" ) AND ( SGN( Radius ) = 1 ) THEN
ArcCenterX = MyResults.X2
ArcCenterY = MyResults.Y2
END IF
GOTO PlotPoint
END IF
IF ( TypNew.I <> 0 ) OR ( TypNew.J <> 0 ) THEN
ArcCenterX = TypOld.X + TypNew.I
ArcCenterY = TypOld.Y + TypNew.J
END IF
PlotPoint:
MyResults.X1 = ArcCenterX ' Center of Circle
MyResults.Y1 = ArcCenterY
MyResults.X2 = TypOld.X ' Point in Radius
MyResults.Y2 = TypOld.Y
CalcAngle MyResults
AngleStart = MyResults.ang
MyResults.X1 = ArcCenterX ' Center of Circle
MyResults.Y1 = ArcCenterY
MyResults.X2 = TypNew.X ' Point in Radius
MyResults.Y2 = TypNew.Y
CalcAngle MyResults
AngleEnd = MyResults.ang
TypNew.R = MyResults.r
IF sGMode = "3" THEN
IF AngleStart = > AngleEnd THEN AngleEnd = AngleEnd + 360
END IF
IF sGMode = "2" THEN
IF AngleStart < = AngleEnd THEN AngleEnd = AngleEnd - 360
END IF
PRINT #HFILE, " 0"
PRINT #HFILE, "ARC"
PRINT #HFILE, " 5"
PRINT #HFILE, HEX$( LineCounter )
PRINT #HFILE, "100"
PRINT #HFILE, "AcDbEntity"
PRINT #HFILE, " 8"
PRINT #HFILE, "0"
PRINT #HFILE, " 62" ' Line Color Format
PRINT #HFILE, " " + STR$( 45 ) ' Line Color
PRINT #HFILE, "100"
PRINT #HFILE, "AcDbCircle"
PRINT #HFILE, " 10"
PRINT #HFILE, ArcCenterX
PRINT #HFILE, " 20"
PRINT #HFILE, ArcCenterY
PRINT #HFILE, " 30"
PRINT #HFILE, TypOld.Z
PRINT #HFILE, " 40"
PRINT #HFILE, TypNew.R
PRINT #HFILE, "100"
PRINT #HFILE, "AcDbArc"
PRINT #HFILE, " 50"
IF sGMode = "2" THEN PRINT #HFILE, AngleEnd
IF sGMode = "3" THEN PRINT #HFILE, AngleStart
PRINT #HFILE, " 51"
IF sGMode = "2" THEN PRINT #HFILE, AngleStart
IF sGMode = "3" THEN PRINT #HFILE, AngleEnd
INCR LineCounter
TypOld.X = TypNew.X
TypOld.Y = TypNew.Y
TypOld.Z = TypNew.Z
TypNew.R=0
TypNew.I=0
TypNew.J=0
ITERATE FOR
END IF
PRINT #HFILE, " 0"
PRINT #HFILE, "LINE"
PRINT #HFILE, " 5"
PRINT #HFILE, HEX$( LineCounter )
PRINT #HFILE, "100"
PRINT #HFILE, "AcDbEntity"
PRINT #HFILE, " 8"
PRINT #HFILE, "0"
PRINT #HFILE, " 62" ' Line Color Format
PRINT #HFILE, " " + STR$( 45 ) ' Line Color
PRINT #HFILE, "100"
PRINT #HFILE, "AcDbLine"
PRINT #HFILE, " 10"
PRINT #HFILE, TypOld.X
PRINT #HFILE, " 20"
PRINT #HFILE, TypOld.Y
PRINT #HFILE, " 30"
PRINT #HFILE, TypOld.Z
PRINT #HFILE, " 11"
PRINT #HFILE, TypNew.X
PRINT #HFILE, " 21"
PRINT #HFILE, TypNew.Y
PRINT #HFILE, " 31"
PRINT #HFILE, TypNew.Z
INCR LineCounter
TypOld.X = TypNew.X
TypOld.Y = TypNew.Y
TypOld.Z = TypNew.Z
NEXT lLineCount
PRINT #HFILE, " 0"
PRINT #HFILE, "ENDSEC"
PRINT #HFILE, " 0"
PRINT #HFILE, "EOF"
CLOSE HFILE
END SUB
' ================================================================================
'
' CalcCenters calculates the centers of two circles given their points
' of intersection and common radius.
'
' ================================================================================
'
SUB CalcCenters( BYREF Centers AS TypPoints )
LOCAL c AS TypPoints ' Points of intersection
LOCAL H1!, H2!, K1!, K2!, X!, Y!, D!, D2!
c = Centers
X = c.x1 - c.x2
Y = c.y1 - c.y2
D2 = X^2 + Y^2
D = SQR( D2 )
IF 2 * c.r < D, THEN ' values of H and K are not real
c.x1 = 0! ' and there is no solution.
c.x2 = 0!
c.y1 = 0!
c.y2 = 0!
c.r = 0!
Centers = c
EXIT SUB
END IF
K1 = ( Y + X * SQR( 4 * c.r^2 / D^2 - 1 )) / 2
K2 = ( Y - X * SQR( 4 * c.r^2 / D^2 - 1 )) / 2
H1 = ( X^2 - Y * ( 2 * K1 - Y )) / ( 2 * X )
H2 = ( X^2 - Y * ( 2 * K2 - Y )) / ( 2 * X )
h1 = H1 + c.x2
h2 = H2 + c.x2
k1 = K1 + c.y2
k2 = K2 + c.y2
c.x1 = h1
c.x2 = h2
c.y1 = k1
c.y2 = k2
c.r = c.r
Centers = c
END SUB
'
' ================================================================================
'
' CalcAngle calculates the angle of radius given
' center of circle to point on circomeference.
'
' ================================================================================
'
SUB CalcAngle( BYREF tPoints AS TypPoints )
LOCAL c AS TypPoints ' Radius and Angle of circle
LOCAL X!, Y!, R!
c = tPoints
X = c.x2 - c.x1
Y = c.y2 - c.y1
c.r = SQR( X^2 + Y^2 ) ' Hyp of angle (Radius)
IF c.r = 0 THEN ' values are not real
c.x1 = 0! ' and there is no solution.
c.x2 = 0!
c.y1 = 0!
c.y2 = 0!
c.r = 0!
c.ang = 0!
tPoints = c
EXIT SUB
END IF
' Find quadrant of angle in radians
IF x = 0 THEN
IF y > = 0 THEN
c.ang = PI / 2
ELSE ' Y
c.ang = 3 * PI / 2
END IF 'Y
ELSE ' X
c.ang = ATN( Y / X )
END IF 'X
IF X < 0 THEN
c.ang = c.ang + PI
ELSE
IF ( x > 0 ) AND ( y < 0 ) THEN
c.ang = c.ang + 2 * PI
END IF
END IF
c.ang = c.ang * 180 / pi ' Convert to Decimal Degrees
tPoints = c
END SUB
joecnc2006 03-01-2005, 11:27 AM I tried your prog. out with the cnczone gcode file and it worked good.
here is a pic of the gcode in DXF after the conversion.
Joe
WayneHill 03-02-2005, 12:12 PM I tried your prog. out with the cnczone gcode file and it worked good.
here is a pic of the gcode in DXF after the conversion.
Joe
Thanks Joe. Now you can rotate or scale the code as you like. :banana:
Wayne
smoregrava 04-04-2006, 02:57 AM Waynehill you're the king!!
This was just a perfect program have been searching the nett for a program like this. thank you
CLaNZeR 04-04-2006, 01:16 PM Excellent Waynehill
Works a treat this end!
Regards
Sean.
WayneHill 04-04-2006, 01:58 PM CLaNZeR (Sean) and Smoregrava,
Thank you for your kind replys.
I could not find a program that would convert G-Code to DXF, so I wrote one :)
Wayne
CJL5585 04-04-2006, 06:11 PM I could not find a program that would convert G-Code to DXF, so I wrote one :)
Wayne
Wayne,
Is this a new version Upgrade?
I have had a version of G-code to DXF that you wrote over a year ago and love it. I have only used it for code that I knew was not 2 1/2 D. I highly recommend you for the programming, the time, the effort, and releasing it to the Public Domain. Also, one of the best functions of the program is that I have found it to be useful and BUGFREE. Keep up the good work.
Glad to see this though. I downloaded a copy.
Jerry
WayneHill 04-04-2006, 07:09 PM Wayne,
Is this a new version Upgrade?
Jerry,
Thank you,
No changes have been made to it. It was "rediscovered" while sitting in the CNCZone archive.
Wayne
tekno 04-05-2006, 12:17 AM never heard of power basic.. that a mac program?
WayneHill 04-05-2006, 12:59 AM never heard of power basic.. that a mac program?
It's a Windows basic compiler.
www.powerbasic.com
I also program in Delphi.
cheeky 04-09-2006, 01:52 AM Hi Wayne,
This is what I need but I am 51 old and 2 stupid to use this code.
Now what?
Regards, Peter
cheeky@acenet.co.za
WayneHill 04-09-2006, 11:59 AM Hi Wayne,
This is what I need but I am 51 old and 2 stupid to use this code.
Now what?
Regards, Peter
cheeky@acenet.co.za
Hi Cheeky,
The source code is used to create the EXE file. You don't need to know how the source code works. It is posted for the geeky ones here.
What you do need is the EXE file. It is located at:
http://www.cnczone.com/modules/Downloads/userfile.php?id=22
It is zipped up using winzip.
www.winzip.com
After you unzip the EXE program, it is ready to use.
Start the program and press the "Import G-Code" button.
Search for the G-Code program you want to convert.
Then press the "Convert to DXF" button.
The program will create a file named "Data.dxf" in the same directory as the source G-code program.
If need any more help, Let me know by posting another message here.
Thanks,
Wayne
cheeky 04-09-2006, 01:17 PM Wayne, Thanx COOL! :~)
I just now have to save my .tap files as .txt?
Thank you for responding.
Peter Bosch South Africa.
http://www.ulm.co.za
WayneHill 04-09-2006, 01:44 PM Wayne, Thanx COOL! :~)
I just now have to save my .tap files as .txt?
Thank you for responding.
Peter Bosch South Africa.
http://www.ulm.co.za
It defaults to file extensions *.cnc, *.txt, and *.dnc
I can easily add *.tap files to the defaults.
WayneHill 04-09-2006, 02:03 PM Wayne, Thanx COOL! :~)
I just now have to save my .tap files as .txt?
Thank you for responding.
Peter Bosch South Africa.
http://www.ulm.co.za
Updated program.
Added '*.tap' file extension to the default files.
mikkojay 08-03-2006, 09:07 PM Hey Wayne,
I hope ya don't mind, but I hijacked your code and ported it to VB6 so I could watch it run in debug. (also to see how you parsed the gcode). Attached is a zip file that contains the VB6 source and the resulting executable.
I had to shoehorn a few replacement functions in there, but my first test, with linear moves only, seemed to work just fine! I would not be shocked at all if it has a port-induced bug or 2, but it is something for people who have VB6 debuggers to mess around with. Maybe next we can port it to .NET.
I looked around on the web today and found some really cool DXF code written for .NET and C#. I'll post if I assemble anything worth mentioning.
Thanks for the original version- I appreciate when people share cool source like that.
Thanks, Mike
WayneHill 08-05-2006, 01:06 AM Good going Mike. I put the source code out there for all to use.
Wayne
edavidtucker 10-26-2006, 08:05 PM I would like to covert g-code files, (made for punching sheet metal), to DXF for import into AutoCAD.
I used both "G-Code to DXF.exe" and "G2DXF.exe". G-Code to DXF.exe runs with out errors and creates a DXF file, but when I open it with AutoCAD, it appears to be a set of random brown lines.
When I use G2DXF.exe, I get several "unrecognized g-code on line..." errors. I continued anyway just to see what happened, and I get the same results as before, random brown lines.
Am I doing something wrong? Any comments would be appreciated.
MetLHead 10-26-2006, 08:40 PM Can you post a sample G-Code file?
Regards,
Scott
WayneHill 10-26-2006, 09:59 PM Scott,
Email me a copy of the G-code that you are trying to convert and will look for the problem.
wayne_j_hill at yahoo dot com
Wayne
MetLHead 10-26-2006, 10:12 PM Scott,
Email me a copy of the G-code that you are trying to convert and will look for the problem.
wayne_j_hill at yahoo dot com
Wayne
Wayne,
Sorry, I was responding to edavidtucker.
Scott
WayneHill 10-27-2006, 03:29 AM edavidtucker,
Email me a copy of the G-code that you are trying to convert and will look for the problem.
wayne_j_hill at yahoo dot com
Scott - What type of software do you mangle?
MetLHead 10-27-2006, 07:01 AM Wayne,
I work on a lot of CNC related stuff, NCPlot is my baby.
Scott
edavidtucker 10-27-2006, 12:15 PM O0009
(1681-31C-55996-9-O0009)
G92X72.000Y50.000
G72X11.883Y13.964
G66I10.802J180.00P-1.984Q-0.200T228 (.200 X 1.984 RT #0)
G72X3.482Y12.232
G66I6.500J360.00P-1.984Q-0.200
X3.582Y10.232T201 (.200 X 4.000 RT #90)
X0.650Y11.732
X4.857Y12.523T219 (CRITICAL ENVIRONMENT LOGO #0)
X4.857Y12.958T255 (TERRA UNIVERSAL LOGO #0)
X2.618Y8.732T107 (.107 RD)
X1.618
Y7.732
X2.618
X11.170Y4.111T208 (.156 RD)
Y5.061
Y11.282
Y12.232
X12.059Y13.888T313 (.312 SQ #0)
X0.905
Y2.576
X12.059
G72X12.214Y13.782
G66I11.100J-90.00P4.000Q0.200T201 (.200 X 4.000 RT #0)
G72X9.982Y4.232
G66I8.000J90.00P4.000Q0.200
X3.582Y6.232
X0.650Y7.732
Y4.682
G72X3.712Y4.232
G66I6.040J-0.00P1.984Q0.200T228 (.200 X 1.984 RT #0)
G72X11.883Y2.500
G66I10.802J180.00P1.984Q0.200
G50
SET-UP SHEET
CUSTOMER NAME : TERRA UNIVERSAL
NC FILE NAME : C:\FabriWIN\NCFiles\1681-31C-55996\1681-31C-55996-09-O0009.gcd
SHEET FILE NAME : 1681-31C-55996-09
PART FILE NAME : 1681-31C-55996-09
PART SIZE : 11.464 X 11.464
OFFSET : 0.750 X 2.500
SPACE BETWEEN : 0 X 0
YIELD PER BLANK : 1 PART
MATERIAL : 18GA 304 SS 2PVC
THICKNESS : 0.048
BLANK SIZE : 13.000 X 15.000
SHEET USAGE : 0.61%
TOOL LIST
STATION TYPE ANGLE SIZE HITS
T107 ROUND 0.125 4
T208 ROUND 0.156 4
T313 SQUARE 0.00 0.312 4
T219 RECTANGLE 0.00 0.125 X 2.750 1
T228 RECTANGLE 0.00 0.200 X 1.984 20
T201 RECTANGLE 90.00 0.200 X 4.000 11
T255 RECTANGLE 0.00 0.625 X 2.750 1
CLAMPS : 3.50 9.13
ESTIMATED TIME : 0 MIN. 27 SEC.
PROGRAMMED BY : ERIC R
DATE : 10-13-2006
TIME : 13:04
COMMENTS
GRAIN IN X DIRECTION
WayneHill 10-27-2006, 01:34 PM David - G-Code to DXF program was made to convert simple CNC mill code profiles to DXF. There are many G-code applications this program will not handle. Unfortunately a turret press code is one of them. Lathe G-Code is another. You never know until you try. Sorry.
Scott - Your are perty good at that code mangling. I visited your web site. Lots of good things going on there.
Wayne Hill
Exprice 11-11-2006, 06:23 PM Can anyone port this to a mac program or at least a perl script? (if it's possible...)
WayneHill 11-12-2006, 08:53 PM Can anyone port this to a mac program or at least a perl script? (if it's possible...)
Exprice.
I know nothing about Mac or Perl , but I am willing to guide you on the logic on how it is comverted.
Wayne
bumper 11-20-2006, 03:39 PM edavidtucker,
Email me a copy of the G-code that you are trying to convert and will look for the problem.
Scott - What type of software do you mangle?
Wayne your program is what i have been trying to find for a long time, but when i run it and bring the dxf file into autocad it just consist of some circles, and extreme amount of line usually converging into one point, i will email you a sample of the work ok. glenn
WayneHill 11-20-2006, 04:26 PM bumper (Glenn)
I will take a look at it. My email address:
wayne_j_hill at yahoo dot com
Wayne
WayneHill 11-21-2006, 10:57 AM Glenn,
The program you sent has I and J values the program was having trouble converting. My program works with I and J values that are the incremental distance from the start point of the circle to the center of the circle. It will also convert G02 and G03 with R values.
Attached are two G02/G03 G-Code programs that work fine with the Gcode2DXF program.
%
N0010 G40 G17 G90 G20
N0020 G43 T02 H02 M06
N0030 G01 X.0037 Y.1633 Z.1 F20. S0 M03
N0040 G01 X0.0 Y.1696 Z.0981 F10.
N0050 G01 X-.0241 Y.128 Z.0852 F10.
N0060 G01 X-.0888 Y.0366 Z.0552 F10.
N0070 G01 X-.12 Y0.0 Z.0423 F10.
N0080 G01 X-.0888 Y-.0366 Z.0294 F10.
N0090 G01 X-.0241 Y-.128 Z-.0006 F10.
N0100 G01 X0.0 Y-.1696 Z-.0135 F10.
N0110 G01 X.0241 Y-.128 Z-.0264 F10.
N0120 G01 X.0888 Y-.0366 Z-.0563 F10.
N0130 G01 X.12 Y0.0 Z-.0692 F10.
N0140 G01 X.0888 Y.0366 Z-.0821 F10.
N0150 G01 X.0241 Y.128 Z-.1121 F10.
N0160 G01 X0.0 Y.1696 Z-.125 F10.
N0170 G17 G02 X-.12 Y0.0 Z-.125 I-1. J.5804 K0.0 F10.
N0180 G17 G02 X0.0 Y-.1696 Z-.125 I-.88 J-.75 K0.0 F10.
N0190 G17 G02 X.12 Y0.0 Z-.125 I1. J-.5804 K0.0 F10.
N0200 G17 G02 X0.0 Y.1696 Z-.125 I.88 J.75 K0.0 F10.
N0210 G01 X.0811 Y.2166 Z-.125 F10.
N0220 G17 G02 X0.0 Y.391 Z-.125 I.9189 J.5334 K0.0 F10.
N0230 G17 G02 X-.2474 Y0.0 Z-.125 I-1. J.359 K0.0 F10.
N0240 G17 G02 X0.0 Y-.391 Z-.125 I-.7526 J-.75 K0.0 F10.
N0250 G17 G02 X.2474 Y0.0 Z-.125 I1. J-.359 K0.0 F10.
N0260 G17 G02 X.0811 Y.2166 Z-.125 I.7526 J.75 K0.0 F10.
N0270 G01 X.1622 Y.2637 Z-.125 F10.
N0280 G17 G02 X.0563 Y.5312 Z-.125 I.8378 J.4863 K0.0 F10.
N0290 G01 X-.0563 Y.5312 Z-.125 F10.
N0300 G17 G02 X-.3868 Y0.0 Z-.125 I-.9437 J.2188 K0.0 F10.
N0310 G17 G02 X-.0882 Y-.4226 Z-.125 I-.6132 J-.75 K0.0 F10.
N0320 G17 G02 X-.0563 Y-.5312 Z-.125 I-.9118 J-.3274 K0.0 F10.
N0330 G01 X.0563 Y-.5312 Z-.125 F10.
N0340 G17 G02 X.0882 Y-.4226 Z-.125 I.9437 J-.2188 K0.0 F10.
N0350 G17 G02 X.3868 Y0.0 Z-.125 I.9118 J-.3274 K0.0 F10.
N0360 G17 G02 X.1622 Y.2637 Z-.125 I.6132 J.75 K0.0 F10.
N0370 G01 X.2432 Y.3107 Z-.125 F10.
N0380 G17 G02 X.134 Y.625 Z-.125 I.7568 J.4393 K0.0 F10.
N0390 G01 X-.134 Y.625 Z-.125 F10.
N0400 G17 G02 X-.5493 Y0.0 Z-.125 I-.866 J.125 K0.0 F10.
N0410 G17 G02 X-.134 Y-.625 Z-.125 I-.4507 J-.75 K0.0 F10.
N0420 G01 X.134 Y-.625 Z-.125 F10.
N0430 G17 G02 X.5493 Y0.0 Z-.125 I.866 J-.125 K0.0 F10.
N0440 G17 G02 X.2432 Y.3107 Z-.125 I.4507 J.75 K0.0 F10.
N0450 G01 X.3243 Y.3578 Z-.125 F10.
N0460 G17 G02 X.2194 Y.7187 Z-.125 I.6757 J.3922 K0.0 F10.
N0470 G01 X-.2194 Y.7187 Z-.125 F10.
N0480 G17 G02 X-.7187 Y.0211 Z-.125 I-.7806 J.0313 K0.0 F10.
N0490 G01 X-.7187 Y-.0211 Z-.125 F10.
N0500 G17 G02 X-.2194 Y-.7187 Z-.125 I-.2813 J-.7289 K0.0 F10.
N0510 G01 X.2194 Y-.7187 Z-.125 F10.
N0520 G17 G02 X.7187 Y-.0211 Z-.125 I.7806 J-.0313 K0.0 F10.
N0530 G01 X.7187 Y.0211 Z-.125 F10.
N0540 G17 G02 X.3243 Y.3578 Z-.125 I.2813 J.7289 K0.0 F10.
N0550 G01 X.4054 Y.4049 Z-.125 F10.
N0560 G17 G02 X.3125 Y.75 Z-.125 I.5946 J.3451 K0.0 F10.
N0570 G01 X.3125 Y.8125 Z-.125 F10.
N0580 G01 X-.3125 Y.8125 Z-.125 F10.
N0590 G01 X-.3125 Y.75 Z-.125 F10.
N0600 G17 G02 X-.8125 Y.0886 Z-.125 I-.6875 J0.0 K0.0 F10.
N0610 G01 X-.8125 Y-.0886 Z-.125 F10.
N0620 G17 G02 X-.3125 Y-.75 Z-.125 I-.1875 J-.6614 K0.0 F10.
N0630 G01 X-.3125 Y-.8125 Z-.125 F10.
N0640 G01 X.3125 Y-.8125 Z-.125 F10.
N0650 G01 X.3125 Y-.75 Z-.125 F10.
N0660 G17 G02 X.8125 Y-.0886 Z-.125 I.6875 J0.0 K0.0 F10.
N0670 G01 X.8125 Y.0886 Z-.125 F10.
N0680 G17 G02 X.4054 Y.4049 Z-.125 I.1875 J.6614 K0.0 F10.
N0690 G01 X.4865 Y.4519 Z-.125 F10.
N0700 G17 G02 X.4062 Y.75 Z-.125 I.5135 J.2981 K0.0 F10.
N0710 G01 X.4062 Y.9062 Z-.125 F10.
N0720 G01 X-.4062 Y.9062 Z-.125 F10.
N0730 G01 X-.4062 Y.75 Z-.125 F10.
N0740 G17 G02 X-.9062 Y.1637 Z-.125 I-.5938 J0.0 K0.0 F10.
N0750 G01 X-.9062 Y-.1637 Z-.125 F10.
N0760 G17 G02 X-.4062 Y-.75 Z-.125 I-.0938 J-.5863 K0.0 F10.
N0770 G01 X-.4062 Y-.9062 Z-.125 F10.
N0780 G01 X.4062 Y-.9062 Z-.125 F10.
N0790 G01 X.4062 Y-.75 Z-.125 F10.
N0800 G17 G02 X.9062 Y-.1637 Z-.125 I.5938 J0.0 K0.0 F10.
N0810 G01 X.9062 Y.1637 Z-.125 F10.
N0820 G17 G02 X.4865 Y.4519 Z-.125 I.0938 J.5863 K0.0 F10.
N0830 G01 X.5676 Y.499 Z-.125 F10.
N0840 G17 G02 X.5 Y.75 Z-.125 I.4324 J.251 K0.0 F10.
N0850 G01 X.5 Y1. Z-.125 F10.
N0860 G01 X-.5 Y1. Z-.125 F10.
N0870 G01 X-.5 Y.75 Z-.125 F10.
N0880 G17 G02 X-1. Y.25 Z-.125 I-.5 J0.0 K0.0 F10.
N0890 G01 X-1. Y-.25 Z-.125 F10.
N0900 G17 G02 X-.5 Y-.75 Z-.125 I0.0 J-.5 K0.0 F10.
N0910 G01 X-.5 Y-1. Z-.125 F10.
N0920 G01 X.5 Y-1. Z-.125 F10.
N0930 G01 X.5 Y-.75 Z-.125 F10.
N0940 G17 G02 X1. Y-.25 Z-.125 I.5 J0.0 K0.0 F10.
N0950 G01 X1. Y.25 Z-.125 F10.
N0960 G17 G02 X.5676 Y.499 Z-.125 I0.0 J.5 K0.0 F10.
N0970 G01 X.6486 Y.5461 Z-.125 F10.
N0980 G17 G02 X.5937 Y.75 Z-.125 I.3514 J.2039 K0.0 F10.
N0990 G01 X.5937 Y1.0937 Z-.125 F10.
N1000 G01 X-.5937 Y1.0937 Z-.125 F10.
N1010 G01 X-.5937 Y.75 Z-.125 F10.
N1020 G17 G02 X-1. Y.3437 Z-.125 I-.4063 J0.0 K0.0 F10.
N1030 G01 X-1.0937 Y.3437 Z-.125 F10.
N1040 G01 X-1.0937 Y-.3437 Z-.125 F10.
N1050 G01 X-1. Y-.3437 Z-.125 F10.
N1060 G17 G02 X-.5937 Y-.75 Z-.125 I0.0 J-.4063 K0.0 F10.
N1070 G01 X-.5937 Y-1.0937 Z-.125 F10.
N1080 G01 X.5937 Y-1.0937 Z-.125 F10.
N1090 G01 X.5937 Y-.75 Z-.125 F10.
N1100 G17 G02 X1. Y-.3437 Z-.125 I.4063 J0.0 K0.0 F10.
N1110 G01 X1.0937 Y-.3437 Z-.125 F10.
N1120 G01 X1.0937 Y.3437 Z-.125 F10.
N1130 G01 X1. Y.3437 Z-.125 F10.
N1140 G17 G02 X.6486 Y.5461 Z-.125 I0.0 J.4063 K0.0 F10.
N1150 G01 X.7297 Y.5931 Z-.125 F10.
N1160 G17 G02 X.6875 Y.75 Z-.125 I.2703 J.1569 K0.0 F10.
N1170 G01 X.6875 Y1.1875 Z-.125 F10.
N1180 G01 X-.6875 Y1.1875 Z-.125 F10.
N1190 G01 X-.6875 Y.75 Z-.125 F10.
N1200 G17 G02 X-1. Y.4375 Z-.125 I-.3125 J0.0 K0.0 F10.
N1210 G01 X-1.1875 Y.4375 Z-.125 F10.
N1220 G01 X-1.1875 Y-.4375 Z-.125 F10.
N1230 G01 X-1. Y-.4375 Z-.125 F10.
N1240 G17 G02 X-.6875 Y-.75 Z-.125 I0.0 J-.3125 K0.0 F10.
N1250 G01 X-.6875 Y-1.1875 Z-.125 F10.
N1260 G01 X.6875 Y-1.1875 Z-.125 F10.
N1270 G01 X.6875 Y-.75 Z-.125 F10.
N1280 G17 G02 X1. Y-.4375 Z-.125 I.3125 J0.0 K0.0 F10.
N1290 G01 X1.1875 Y-.4375 Z-.125 F10.
N1300 G01 X1.1875 Y.4375 Z-.125 F10.
N1310 G01 X1. Y.4375 Z-.125 F10.
N1320 G17 G02 X.7297 Y.5931 Z-.125 I0.0 J.3125 K0.0 F10.
N1330 G01 X.9196 Y.2777 Z-.125 F10.
N1340 G17 G03 X.8587 Y.583 Z-.125 I-.2223 J.1144 K0.0 F10.
N1350 G17 G02 X.8108 Y.6402 Z-.125 I.1413 J.167 K0.0 F10.
N1360 G17 G02 X.7812 Y.75 Z-.125 I.1892 J.1098 K0.0 F10.
N1370 G01 X.7812 Y1.2812 Z-.125 F10.
N1380 G01 X-.7812 Y1.2812 Z-.125 F10.
N1390 G01 X-.7812 Y.75 Z-.125 F10.
N1400 G17 G02 X-1. Y.5312 Z-.125 I-.2188 J0.0 K0.0 F10.
N1410 G01 X-1.2812 Y.5312 Z-.125 F10.
N1420 G01 X-1.2812 Y-.5312 Z-.125 F10.
N1430 G01 X-1. Y-.5312 Z-.125 F10.
N1440 G17 G02 X-.7812 Y-.75 Z-.125 I0.0 J-.2188 K0.0 F10.
N1450 G01 X-.7812 Y-1.2812 Z-.125 F10.
N1460 G01 X.7812 Y-1.2812 Z-.125 F10.
N1470 G01 X.7812 Y-.75 Z-.125 F10.
N1480 G17 G02 X1. Y-.5312 Z-.125 I.2188 J0.0 K0.0 F10.
N1490 G01 X1.2812 Y-.5312 Z-.125 F10.
N1500 G01 X1.2812 Y.5312 Z-.125 F10.
N1510 G01 X1. Y.5312 Z-.125 F10.
N1520 G17 G02 X.7849 Y.7102 Z-.125 I0.0 J.2188 K0.0 F10.
N1530 G17 G03 X.6502 Y.8886 Z-.125 I-.2458 J-.0455 K0.0 F10.
N1540 G01 X1.0827 Y.3574 Z-.125 F10.
N1550 G17 G03 X.9462 Y.6372 Z-.125 I-.2441 J.0541 K0.0 F10.
N1560 G17 G02 X.8919 Y.6872 Z-.125 I.0538 J.1128 K0.0 F10.
N1570 G17 G02 X.875 Y.75 Z-.125 I.1081 J.0628 K0.0 F10.
N1580 G01 X.875 Y1.375 Z-.125 F10.
N1590 G01 X-.875 Y1.375 Z-.125 F10.
N1600 G01 X-.875 Y.75 Z-.125 F10.
N1610 G17 G02 X-1. Y.625 Z-.125 I-.125 J0.0 K0.0 F10.
N1620 G01 X-1.375 Y.625 Z-.125 F10.
N1630 G01 X-1.375 Y-.625 Z-.125 F10.
N1640 G01 X-1. Y-.625 Z-.125 F10.
N1650 G17 G02 X-.875 Y-.75 Z-.125 I0.0 J-.125 K0.0 F10.
N1660 G01 X-.875 Y-1.375 Z-.125 F10.
N1670 G01 X.875 Y-1.375 Z-.125 F10.
N1680 G01 X.875 Y-.75 Z-.125 F10.
N1690 G17 G02 X1. Y-.625 Z-.125 I.125 J0.0 K0.0 F10.
N1700 G01 X1.375 Y-.625 Z-.125 F10.
N1710 G01 X1.375 Y.625 Z-.125 F10.
N1720 G01 X1. Y.625 Z-.125 F10.
N1730 G17 G02 X.875 Y.75 Z-.125 I0.0 J.125 K0.0 F10.
N1740 G01 X.875 Y.7593 Z-.125 F10.
N1750 G17 G03 X.775 Y.9593 Z-.125 I-.25 J0.0 K0.0 F10.
N1760 G01 X.775 Y.9593 Z-.025 F20.
N1770 G01 X.775 Y.9593 Z.2 F20.
N1780 G01 X.0037 Y.1633 Z.2 F20.
N1790 G01 X.0037 Y.1633 Z-.025 F20.
N1800 G01 X0.0 Y.1696 Z-.0269 F10.
N1810 G01 X-.0241 Y.128 Z-.0398 F10.
N1820 G01 X-.0888 Y.0366 Z-.0698 F10.
N1830 G01 X-.12 Y0.0 Z-.0827 F10.
N1840 G01 X-.0888 Y-.0366 Z-.0956 F10.
N1850 G01 X-.0241 Y-.128 Z-.1256 F10.
N1860 G01 X0.0 Y-.1696 Z-.1385 F10.
N1870 G01 X.0241 Y-.128 Z-.1514 F10.
N1880 G01 X.0888 Y-.0366 Z-.1813 F10.
N1890 G01 X.12 Y0.0 Z-.1942 F10.
N1900 G01 X.0888 Y.0366 Z-.2071 F10.
N1910 G01 X.0241 Y.128 Z-.2371 F10.
N1920 G01 X0.0 Y.1696 Z-.25 F10.
N1930 G17 G02 X-.12 Y0.0 Z-.25 I-1. J.5804 K0.0 F10.
N1940 G17 G02 X0.0 Y-.1696 Z-.25 I-.88 J-.75 K0.0 F10.
N1950 G17 G02 X.12 Y0.0 Z-.25 I1. J-.5804 K0.0 F10.
N1960 G17 G02 X0.0 Y.1696 Z-.25 I.88 J.75 K0.0 F10.
N1970 G01 X.0811 Y.2166 Z-.25 F10.
N1980 G17 G02 X0.0 Y.391 Z-.25 I.9189 J.5334 K0.0 F10.
N1990 G17 G02 X-.2474 Y0.0 Z-.25 I-1. J.359 K0.0 F10.
N2000 G17 G02 X0.0 Y-.391 Z-.25 I-.7526 J-.75 K0.0 F10.
N2010 G17 G02 X.2474 Y0.0 Z-.25 I1. J-.359 K0.0 F10.
N2020 G17 G02 X.0811 Y.2166 Z-.25 I.7526 J.75 K0.0 F10.
N2030 G01 X.1622 Y.2637 Z-.25 F10.
N2040 G17 G02 X.0563 Y.5312 Z-.25 I.8378 J.4863 K0.0 F10.
N2050 G01 X-.0563 Y.5312 Z-.25 F10.
N2060 G17 G02 X-.3868 Y0.0 Z-.25 I-.9437 J.2188 K0.0 F10.
N2070 G17 G02 X-.0882 Y-.4226 Z-.25 I-.6132 J-.75 K0.0 F10.
N2080 G17 G02 X-.0563 Y-.5312 Z-.25 I-.9118 J-.3274 K0.0 F10.
N2090 G01 X.0563 Y-.5312 Z-.25 F10.
N2100 G17 G02 X.0882 Y-.4226 Z-.25 I.9437 J-.2188 K0.0 F10.
N2110 G17 G02 X.3868 Y0.0 Z-.25 I.9118 J-.3274 K0.0 F10.
N2120 G17 G02 X.1622 Y.2637 Z-.25 I.6132 J.75 K0.0 F10.
N2130 G01 X.2432 Y.3107 Z-.25 F10.
N2140 G17 G02 X.134 Y.625 Z-.25 I.7568 J.4393 K0.0 F10.
N2150 G01 X-.134 Y.625 Z-.25 F10.
N2160 G17 G02 X-.5493 Y0.0 Z-.25 I-.866 J.125 K0.0 F10.
N2170 G17 G02 X-.134 Y-.625 Z-.25 I-.4507 J-.75 K0.0 F10.
N2180 G01 X.134 Y-.625 Z-.25 F10.
N2190 G17 G02 X.5493 Y0.0 Z-.25 I.866 J-.125 K0.0 F10.
N2200 G17 G02 X.2432 Y.3107 Z-.25 I.4507 J.75 K0.0 F10.
N2210 G01 X.3243 Y.3578 Z-.25 F10.
N2220 G17 G02 X.2194 Y.7187 Z-.25 I.6757 J.3922 K0.0 F10.
N2230 G01 X-.2194 Y.7187 Z-.25 F10.
N2240 G17 G02 X-.7187 Y.0211 Z-.25 I-.7806 J.0313 K0.0 F10.
N2250 G01 X-.7187 Y-.0211 Z-.25 F10.
N2260 G17 G02 X-.2194 Y-.7187 Z-.25 I-.2813 J-.7289 K0.0 F10.
N2270 G01 X.2194 Y-.7187 Z-.25 F10.
N2280 G17 G02 X.7187 Y-.0211 Z-.25 I.7806 J-.0313 K0.0 F10.
N2290 G01 X.7187 Y.0211 Z-.25 F10.
N2300 G17 G02 X.3243 Y.3578 Z-.25 I.2813 J.7289 K0.0 F10.
N2310 G01 X.4054 Y.4049 Z-.25 F10.
N2320 G17 G02 X.3125 Y.75 Z-.25 I.5946 J.3451 K0.0 F10.
N2330 G01 X.3125 Y.8125 Z-.25 F10.
N2340 G01 X-.3125 Y.8125 Z-.25 F10.
N2350 G01 X-.3125 Y.75 Z-.25 F10.
N2360 G17 G02 X-.8125 Y.0886 Z-.25 I-.6875 J0.0 K0.0 F10.
N2370 G01 X-.8125 Y-.0886 Z-.25 F10.
N2380 G17 G02 X-.3125 Y-.75 Z-.25 I-.1875 J-.6614 K0.0 F10.
N2390 G01 X-.3125 Y-.8125 Z-.25 F10.
N2400 G01 X.3125 Y-.8125 Z-.25 F10.
N2410 G01 X.3125 Y-.75 Z-.25 F10.
N2420 G17 G02 X.8125 Y-.0886 Z-.25 I.6875 J0.0 K0.0 F10.
N2430 G01 X.8125 Y.0886 Z-.25 F10.
N2440 G17 G02 X.4054 Y.4049 Z-.25 I.1875 J.6614 K0.0 F10.
N2450 G01 X.4865 Y.4519 Z-.25 F10.
N2460 G17 G02 X.4062 Y.75 Z-.25 I.5135 J.2981 K0.0 F10.
N2470 G01 X.4062 Y.9062 Z-.25 F10.
N2480 G01 X-.4062 Y.9062 Z-.25 F10.
N2490 G01 X-.4062 Y.75 Z-.25 F10.
N2500 G17 G02 X-.9062 Y.1637 Z-.25 I-.5938 J0.0 K0.0 F10.
N2510 G01 X-.9062 Y-.1637 Z-.25 F10.
N2520 G17 G02 X-.4062 Y-.75 Z-.25 I-.0938 J-.5863 K0.0 F10.
N2530 G01 X-.4062 Y-.9062 Z-.25 F10.
N2540 G01 X.4062 Y-.9062 Z-.25 F10.
N2550 G01 X.4062 Y-.75 Z-.25 F10.
N2560 G17 G02 X.9062 Y-.1637 Z-.25 I.5938 J0.0 K0.0 F10.
N2570 G01 X.9062 Y.1637 Z-.25 F10.
N2580 G17 G02 X.4865 Y.4519 Z-.25 I.0938 J.5863 K0.0 F10.
N2590 G01 X.5676 Y.499 Z-.25 F10.
N2600 G17 G02 X.5 Y.75 Z-.25 I.4324 J.251 K0.0 F10.
N2610 G01 X.5 Y1. Z-.25 F10.
N2620 G01 X-.5 Y1. Z-.25 F10.
N2630 G01 X-.5 Y.75 Z-.25 F10.
N2640 G17 G02 X-1. Y.25 Z-.25 I-.5 J0.0 K0.0 F10.
N2650 G01 X-1. Y-.25 Z-.25 F10.
N2660 G17 G02 X-.5 Y-.75 Z-.25 I0.0 J-.5 K0.0 F10.
N2670 G01 X-.5 Y-1. Z-.25 F10.
N2680 G01 X.5 Y-1. Z-.25 F10.
N2690 G01 X.5 Y-.75 Z-.25 F10.
N2700 G17 G02 X1. Y-.25 Z-.25 I.5 J0.0 K0.0 F10.
N2710 G01 X1. Y.25 Z-.25 F10.
N2720 G17 G02 X.5676 Y.499 Z-.25 I0.0 J.5 K0.0 F10.
N2730 G01 X.6486 Y.5461 Z-.25 F10.
N2740 G17 G02 X.5937 Y.75 Z-.25 I.3514 J.2039 K0.0 F10.
N2750 G01 X.5937 Y1.0937 Z-.25 F10.
N2760 G01 X-.5937 Y1.0937 Z-.25 F10.
N2770 G01 X-.5937 Y.75 Z-.25 F10.
N2780 G17 G02 X-1. Y.3437 Z-.25 I-.4063 J0.0 K0.0 F10.
N2790 G01 X-1.0937 Y.3437 Z-.25 F10.
N2800 G01 X-1.0937 Y-.3437 Z-.25 F10.
N2810 G01 X-1. Y-.3437 Z-.25 F10.
N2820 G17 G02 X-.5937 Y-.75 Z-.25 I0.0 J-.4063 K0.0 F10.
N2830 G01 X-.5937 Y-1.0937 Z-.25 F10.
N2840 G01 X.5937 Y-1.0937 Z-.25 F10.
N2850 G01 X.5937 Y-.75 Z-.25 F10.
N2860 G17 G02 X1. Y-.3437 Z-.25 I.4063 J0.0 K0.0 F10.
N2870 G01 X1.0937 Y-.3437 Z-.25 F10.
N2880 G01 X1.0937 Y.3437 Z-.25 F10.
N2890 G01 X1. Y.3437 Z-.25 F10.
N2900 G17 G02 X.6486 Y.5461 Z-.25 I0.0 J.4063 K0.0 F10.
N2910 G01 X.7297 Y.5931 Z-.25 F10.
N2920 G17 G02 X.6875 Y.75 Z-.25 I.2703 J.1569 K0.0 F10.
N2930 G01 X.6875 Y1.1875 Z-.25 F10.
N2940 G01 X-.6875 Y1.1875 Z-.25 F10.
N2950 G01 X-.6875 Y.75 Z-.25 F10.
N2960 G17 G02 X-1. Y.4375 Z-.25 I-.3125 J0.0 K0.0 F10.
N2970 G01 X-1.1875 Y.4375 Z-.25 F10.
N2980 G01 X-1.1875 Y-.4375 Z-.25 F10.
N2990 G01 X-1. Y-.4375 Z-.25 F10.
N3000 G17 G02 X-.6875 Y-.75 Z-.25 I0.0 J-.3125 K0.0 F10.
N3010 G01 X-.6875 Y-1.1875 Z-.25 F10.
N3020 G01 X.6875 Y-1.1875 Z-.25 F10.
N3030 G01 X.6875 Y-.75 Z-.25 F10.
N3040 G17 G02 X1. Y-.4375 Z-.25 I.3125 J0.0 K0.0 F10.
N3050 G01 X1.1875 Y-.4375 Z-.25 F10.
N3060 G01 X1.1875 Y.4375 Z-.25 F10.
N3070 G01 X1. Y.4375 Z-.25 F10.
N3080 G17 G02 X.7297 Y.5931 Z-.25 I0.0 J.3125 K0.0 F10.
N3090 G01 X.9196 Y.2777 Z-.25 F10.
N3100 G17 G03 X.8587 Y.583 Z-.25 I-.2223 J.1144 K0.0 F10.
N3110 G17 G02 X.8108 Y.6402 Z-.25 I.1413 J.167 K0.0 F10.
N3120 G17 G02 X.7812 Y.75 Z-.25 I.1892 J.1098 K0.0 F10.
N3130 G01 X.7812 Y1.2812 Z-.25 F10.
N3140 G01 X-.7812 Y1.2812 Z-.25 F10.
N3150 G01 X-.7812 Y.75 Z-.25 F10.
N3160 G17 G02 X-1. Y.5312 Z-.25 I-.2188 J0.0 K0.0 F10.
N3170 G01 X-1.2812 Y.5312 Z-.25 F10.
N3180 G01 X-1.2812 Y-.5312 Z-.25 F10.
N3190 G01 X-1. Y-.5312 Z-.25 F10.
N3200 G17 G02 X-.7812 Y-.75 Z-.25 I0.0 J-.2188 K0.0 F10.
N3210 G01 X-.7812 Y-1.2812 Z-.25 F10.
N3220 G01 X.7812 Y-1.2812 Z-.25 F10.
N3230 G01 X.7812 Y-.75 Z-.25 F10.
N3240 G17 G02 X1. Y-.5312 Z-.25 I.2188 J0.0 K0.0 F10.
N3250 G01 X1.2812 Y-.5312 Z-.25 F10.
N3260 G01 X1.2812 Y.5312 Z-.25 F10.
N3270 G01 X1. Y.5312 Z-.25 F10.
N3280 G17 G02 X.7849 Y.7102 Z-.25 I0.0 J.2188 K0.0 F10.
N3290 G17 G03 X.6502 Y.8886 Z-.25 I-.2458 J-.0455 K0.0 F10.
N3300 G01 X1.0827 Y.3574 Z-.25 F10.
N3310 G17 G03 X.9462 Y.6372 Z-.25 I-.2441 J.0541 K0.0 F10.
N3320 G17 G02 X.8919 Y.6872 Z-.25 I.0538 J.1128 K0.0 F10.
N3330 G17 G02 X.875 Y.75 Z-.25 I.1081 J.0628 K0.0 F10.
N3340 G01 X.875 Y1.375 Z-.25 F10.
N3350 G01 X-.875 Y1.375 Z-.25 F10.
N3360 G01 X-.875 Y.75 Z-.25 F10.
N3370 G17 G02 X-1. Y.625 Z-.25 I-.125 J0.0 K0.0 F10.
N3380 G01 X-1.375 Y.625 Z-.25 F10.
N3390 G01 X-1.375 Y-.625 Z-.25 F10.
N3400 G01 X-1. Y-.625 Z-.25 F10.
N3410 G17 G02 X-.875 Y-.75 Z-.25 I0.0 J-.125 K0.0 F10.
N3420 G01 X-.875 Y-1.375 Z-.25 F10.
N3430 G01 X.875 Y-1.375 Z-.25 F10.
N3440 G01 X.875 Y-.75 Z-.25 F10.
N3450 G17 G02 X1. Y-.625 Z-.25 I.125 J0.0 K0.0 F10.
N3460 G01 X1.375 Y-.625 Z-.25 F10.
N3470 G01 X1.375 Y.625 Z-.25 F10.
N3480 G01 X1. Y.625 Z-.25 F10.
N3490 G17 G02 X.875 Y.75 Z-.25 I0.0 J.125 K0.0 F10.
N3500 G01 X.875 Y.7593 Z-.25 F10.
N3510 G17 G03 X.775 Y.9593 Z-.25 I-.25 J0.0 K0.0 F10.
N3520 G01 X.775 Y.9593 Z-.15 F20.
N3530 G01 X.775 Y.9593 Z.2 F20.
N3540 G01 X.0037 Y.1633 Z.2 F20.
N3550 G01 X.0037 Y.1633 Z-.15 F20.
N3560 G01 X0.0 Y.1696 Z-.1519 F10.
N3570 G01 X-.0241 Y.128 Z-.1648 F10.
N3580 G01 X-.0888 Y.0366 Z-.1948 F10.
N3590 G01 X-.12 Y0.0 Z-.2077 F10.
N3600 G01 X-.0888 Y-.0366 Z-.2206 F10.
N3610 G01 X-.0241 Y-.128 Z-.2506 F10.
N3620 G01 X0.0 Y-.1696 Z-.2635 F10.
N3630 G01 X.0241 Y-.128 Z-.2764 F10.
N3640 G01 X.0888 Y-.0366 Z-.3063 F10.
N3650 G01 X.12 Y0.0 Z-.3192 F10.
N3660 G01 X.0888 Y.0366 Z-.3321 F10.
N3670 G01 X.0241 Y.128 Z-.3621 F10.
N3680 G01 X0.0 Y.1696 Z-.375 F10.
N3690 G17 G02 X-.12 Y0.0 Z-.375 I-1. J.5804 K0.0 F10.
N3700 G17 G02 X0.0 Y-.1696 Z-.375 I-.88 J-.75 K0.0 F10.
N3710 G17 G02 X.12 Y0.0 Z-.375 I1. J-.5804 K0.0 F10.
N3720 G17 G02 X0.0 Y.1696 Z-.375 I.88 J.75 K0.0 F10.
N3730 G01 X.0811 Y.2166 Z-.375 F10.
N3740 G17 G02 X0.0 Y.391 Z-.375 I.9189 J.5334 K0.0 F10.
N3750 G17 G02 X-.2474 Y0.0 Z-.375 I-1. J.359 K0.0 F10.
N3760 G17 G02 X0.0 Y-.391 Z-.375 I-.7526 J-.75 K0.0 F10.
N3770 G17 G02 X.2474 Y0.0 Z-.375 I1. J-.359 K0.0 F10.
N3780 G17 G02 X.0811 Y.2166 Z-.375 I.7526 J.75 K0.0 F10.
N3790 G01 X.1622 Y.2637 Z-.375 F10.
N3800 G17 G02 X.0563 Y.5312 Z-.375 I.8378 J.4863 K0.0 F10.
N3810 G01 X-.0563 Y.5312 Z-.375 F10.
N3820 G17 G02 X-.3868 Y0.0 Z-.375 I-.9437 J.2188 K0.0 F10.
N3830 G17 G02 X-.0882 Y-.4226 Z-.375 I-.6132 J-.75 K0.0 F10.
N3840 G17 G02 X-.0563 Y-.5312 Z-.375 I-.9118 J-.3274 K0.0 F10.
N3850 G01 X.0563 Y-.5312 Z-.375 F10.
N3860 G17 G02 X.0882 Y-.4226 Z-.375 I.9437 J-.2188 K0.0 F10.
N3870 G17 G02 X.3868 Y0.0 Z-.375 I.9118 J-.3274 K0.0 F10.
N3880 G17 G02 X.1622 Y.2637 Z-.375 I.6132 J.75 K0.0 F10.
N3890 G01 X.2432 Y.3107 Z-.375 F10.
N3900 G17 G02 X.134 Y.625 Z-.375 I.7568 J.4393 K0.0 F10.
N3910 G01 X-.134 Y.625 Z-.375 F10.
N3920 G17 G02 X-.5493 Y0.0 Z-.375 I-.866 J.125 K0.0 F10.
N3930 G17 G02 X-.134 Y-.625 Z-.375 I-.4507 J-.75 K0.0 F10.
N3940 G01 X.134 Y-.625 Z-.375 F10.
N3950 G17 G02 X.5493 Y0.0 Z-.375 I.866 J-.125 K0.0 F10.
N3960 G17 G02 X.2432 Y.3107 Z-.375 I.4507 J.75 K0.0 F10.
N3970 G01 X.3243 Y.3578 Z-.375 F10.
N3980 G17 G02 X.2194 Y.7187 Z-.375 I.6757 J.3922 K0.0 F10.
N3990 G01 X-.2194 Y.7187 Z-.375 F10.
N4000 G17 G02 X-.7187 Y.0211 Z-.375 I-.7806 J.0313 K0.0 F10.
N4010 G01 X-.7187 Y-.0211 Z-.375 F10.
N4020 G17 G02 X-.2194 Y-.7187 Z-.375 I-.2813 J-.7289 K0.0 F10.
N4030 G01 X.2194 Y-.7187 Z-.375 F10.
N4040 G17 G02 X.7187 Y-.0211 Z-.375 I.7806 J-.0313 K0.0 F10.
N4050 G01 X.7187 Y.0211 Z-.375 F10.
N4060 G17 G02 X.3243 Y.3578 Z-.375 I.2813 J.7289 K0.0 F10.
N4070 G01 X.4054 Y.4049 Z-.375 F10.
N4080 G17 G02 X.3125 Y.75 Z-.375 I.5946 J.3451 K0.0 F10.
N4090 G01 X.3125 Y.8125 Z-.375 F10.
N4100 G01 X-.3125 Y.8125 Z-.375 F10.
N4110 G01 X-.3125 Y.75 Z-.375 F10.
N4120 G17 G02 X-.8125 Y.0886 Z-.375 I-.6875 J0.0 K0.0 F10.
N4130 G01 X-.8125 Y-.0886 Z-.375 F10.
N4140 G17 G02 X-.3125 Y-.75 Z-.375 I-.1875 J-.6614 K0.0 F10.
N4150 G01 X-.3125 Y-.8125 Z-.375 F10.
N4160 G01 X.3125 Y-.8125 Z-.375 F10.
N4170 G01 X.3125 Y-.75 Z-.375 F10.
N4180 G17 G02 X.8125 Y-.0886 Z-.375 I.6875 J0.0 K0.0 F10.
N4190 G01 X.8125 Y.0886 Z-.375 F10.
N4200 G17 G02 X.4054 Y.4049 Z-.375 I.1875 J.6614 K0.0 F10.
N4210 G01 X.4865 Y.4519 Z-.375 F10.
N4220 G17 G02 X.4062 Y.75 Z-.375 I.5135 J.2981 K0.0 F10.
N4230 G01 X.4062 Y.9062 Z-.375 F10.
N4240 G01 X-.4062 Y.9062 Z-.375 F10.
N4250 G01 X-.4062 Y.75 Z-.375 F10.
N4260 G17 G02 X-.9062 Y.1637 Z-.375 I-.5938 J0.0 K0.0 F10.
N4270 G01 X-.9062 Y-.1637 Z-.375 F10.
N4280 G17 G02 X-.4062 Y-.75 Z-.375 I-.0938 J-.5863 K0.0 F10.
N4290 G01 X-.4062 Y-.9062 Z-.375 F10.
N4300 G01 X.4062 Y-.9062 Z-.375 F10.
N4310 G01 X.4062 Y-.75 Z-.375 F10.
N4320 G17 G02 X.9062 Y-.1637 Z-.375 I.5938 J0.0 K0.0 F10.
N4330 G01 X.9062 Y.1637 Z-.375 F10.
N4340 G17 G02 X.4865 Y.4519 Z-.375 I.0938 J.5863 K0.0 F10.
N4350 G01 X.5676 Y.499 Z-.375 F10.
N4360 G17 G02 X.5 Y.75 Z-.375 I.4324 J.251 K0.0 F10.
N4370 G01 X.5 Y1. Z-.375 F10.
N4380 G01 X-.5 Y1. Z-.375 F10.
N4390 G01 X-.5 Y.75 Z-.375 F10.
N4400 G17 G02 X-1. Y.25 Z-.375 I-.5 J0.0 K0.0 F10.
N4410 G01 X-1. Y-.25 Z-.375 F10.
N4420 G17 G02 X-.5 Y-.75 Z-.375 I0.0 J-.5 K0.0 F10.
N4430 G01 X-.5 Y-1. Z-.375 F10.
N4440 G01 X.5 Y-1. Z-.375 F10.
N4450 G01 X.5 Y-.75 Z-.375 F10.
N4460 G17 G02 X1. Y-.25 Z-.375 I.5 J0.0 K0.0 F10.
N4470 G01 X1. Y.25 Z-.375 F10.
N4480 G17 G02 X.5676 Y.499 Z-.375 I0.0 J.5 K0.0 F10.
N4490 G01 X.6486 Y.5461 Z-.375 F10.
N4500 G17 G02 X.5937 Y.75 Z-.375 I.3514 J.2039 K0.0 F10.
N4510 G01 X.5937 Y1.0937 Z-.375 F10.
N4520 G01 X-.5937 Y1.0937 Z-.375 F10.
N4530 G01 X-.5937 Y.75 Z-.375 F10.
N4540 G17 G02 X-1. Y.3437 Z-.375 I-.4063 J0.0 K0.0 F10.
N4550 G01 X-1.0937 Y.3437 Z-.375 F10.
N4560 G01 X-1.0937 Y-.3437 Z-.375 F10.
N4570 G01 X-1. Y-.3437 Z-.375 F10.
N4580 G17 G02 X-.5937 Y-.75 Z-.375 I0.0 J-.4063 K0.0 F10.
N4590 G01 X-.5937 Y-1.0937 Z-.375 F10.
N4600 G01 X.5937 Y-1.0937 Z-.375 F10.
N4610 G01 X.5937 Y-.75 Z-.375 F10.
N4620 G17 G02 X1. Y-.3437 Z-.375 I.4063 J0.0 K0.0 F10.
N4630 G01 X1.0937 Y-.3437 Z-.375 F10.
N4640 G01 X1.0937 Y.3437 Z-.375 F10.
N4650 G01 X1. Y.3437 Z-.375 F10.
N4660 G17 G02 X.6486 Y.5461 Z-.375 I0.0 J.4063 K0.0 F10.
N4670 G01 X.7297 Y.5931 Z-.375 F10.
N4680 G17 G02 X.6875 Y.75 Z-.375 I.2703 J.1569 K0.0 F10.
N4690 G01 X.6875 Y1.1875 Z-.375 F10.
N4700 G01 X-.6875 Y1.1875 Z-.375 F10.
N4710 G01 X-.6875 Y.75 Z-.375 F10.
N4720 G17 G02 X-1. Y.4375 Z-.375 I-.3125 J0.0 K0.0 F10.
N4730 G01 X-1.1875 Y.4375 Z-.375 F10.
N4740 G01 X-1.1875 Y-.4375 Z-.375 F10.
N4750 G01 X-1. Y-.4375 Z-.375 F10.
N4760 G17 G02 X-.6875 Y-.75 Z-.375 I0.0 J-.3125 K0.0 F10.
N4770 G01 X-.6875 Y-1.1875 Z-.375 F10.
N4780 G01 X.6875 Y-1.1875 Z-.375 F10.
N4790 G01 X.6875 Y-.75 Z-.375 F10.
N4800 G17 G02 X1. Y-.4375 Z-.375 I.3125 J0.0 K0.0 F10.
N4810 G01 X1.1875 Y-.4375 Z-.375 F10.
N4820 G01 X1.1875 Y.4375 Z-.375 F10.
N4830 G01 X1. Y.4375 Z-.375 F10.
N4840 G17 G02 X.7297 Y.5931 Z-.375 I0.0 J.3125 K0.0 F10.
N4850 G01 X.9196 Y.2777 Z-.375 F10.
N4860 G17 G03 X.8587 Y.583 Z-.375 I-.2223 J.1144 K0.0 F10.
N4870 G17 G02 X.8108 Y.6402 Z-.375 I.1413 J.167 K0.0 F10.
N4880 G17 G02 X.7812 Y.75 Z-.375 I.1892 J.1098 K0.0 F10.
N4890 G01 X.7812 Y1.2812 Z-.375 F10.
N4900 G01 X-.7812 Y1.2812 Z-.375 F10.
N4910 G01 X-.7812 Y.75 Z-.375 F10.
N4920 G17 G02 X-1. Y.5312 Z-.375 I-.2188 J0.0 K0.0 F10.
N4930 G01 X-1.2812 Y.5312 Z-.375 F10.
N4940 G01 X-1.2812 Y-.5312 Z-.375 F10.
N4950 G01 X-1. Y-.5312 Z-.375 F10.
N4960 G17 G02 X-.7812 Y-.75 Z-.375 I0.0 J-.2188 K0.0 F10.
N4970 G01 X-.7812 Y-1.2812 Z-.375 F10.
N4980 G01 X.7812 Y-1.2812 Z-.375 F10.
N4990 G01 X.7812 Y-.75 Z-.375 F10.
N5000 G17 G02 X1. Y-.5312 Z-.375 I.2188 J0.0 K0.0 F10.
N5010 G01 X1.2812 Y-.5312 Z-.375 F10.
N5020 G01 X1.2812 Y.5312 Z-.375 F10.
N5030 G01 X1. Y.5312 Z-.375 F10.
N5040 G17 G02 X.7849 Y.7102 Z-.375 I0.0 J.2188 K0.0 F10.
N5050 G17 G03 X.6502 Y.8886 Z-.375 I-.2458 J-.0455 K0.0 F10.
N5060 G01 X1.0827 Y.3574 Z-.375 F10.
N5070 G17 G03 X.9462 Y.6372 Z-.375 I-.2441 J.0541 K0.0 F10.
N5080 G17 G02 X.8919 Y.6872 Z-.375 I.0538 J.1128 K0.0 F10.
N5090 G17 G02 X.875 Y.75 Z-.375 I.1081 J.0628 K0.0 F10.
N5100 G01 X.875 Y1.375 Z-.375 F10.
N5110 G01 X-.875 Y1.375 Z-.375 F10.
N5120 G01 X-.875 Y.75 Z-.375 F10.
N5130 G17 G02 X-1. Y.625 Z-.375 I-.125 J0.0 K0.0 F10.
N5140 G01 X-1.375 Y.625 Z-.375 F10.
N5150 G01 X-1.375 Y-.625 Z-.375 F10.
N5160 G01 X-1. Y-.625 Z-.375 F10.
N5170 G17 G02 X-.875 Y-.75 Z-.375 I0.0 J-.125 K0.0 F10.
N5180 G01 X-.875 Y-1.375 Z-.375 F10.
N5190 G01 X.875 Y-1.375 Z-.375 F10.
N5200 G01 X.875 Y-.75 Z-.375 F10.
N5210 G17 G02 X1. Y-.625 Z-.375 I.125 J0.0 K0.0 F10.
N5220 G01 X1.375 Y-.625 Z-.375 F10.
N5230 G01 X1.375 Y.625 Z-.375 F10.
N5240 G01 X1. Y.625 Z-.375 F10.
N5250 G17 G02 X.875 Y.75 Z-.375 I0.0 J.125 K0.0 F10.
N5260 G01 X.875 Y.7593 Z-.375 F10.
N5270 G17 G03 X.775 Y.9593 Z-.375 I-.25 J0.0 K0.0 F10.
N5280 G43 T01 H01 M06
N5290 G01 X.3422 Y-3.8348 Z.25 F20. S0 M03
N5300 G01 X.3422 Y-3.8348 Z.1 F20.
N5310 G01 X.3422 Y-3.8348 Z-.025 F20.
N5320 G01 X.3422 Y-3.8348 Z-.125 F10.
N5330 G17 G03 X.1426 Y-3.7473 Z-.125 I-.1901 J-.1623 K0.0 F10.
N5340 G17 G02 X.0676 Y-3.7494 Z-.125 I-.1426 J3.7473 K0.0 F10.
N5350 G17 G02 X-3.2143 Y-1.9315 Z-.125 I-.0676 J3.7494 K0.0 F10.
N5360 G17 G02 X-3.25 Y-1.8028 Z-.125 I.2143 J.1287 K0.0 F10.
N5370 G01 X-3.25 Y1.8028 Z-.125 F10.
N5380 G17 G02 X-3.2143 Y1.9315 Z-.125 I.25 J0.0 K0.0 F10.
N5390 G17 G02 X3.2143 Y1.9315 Z-.125 I3.2143 J-1.9315 K0.0 F10.
N5400 G17 G02 X3.25 Y1.8028 Z-.125 I-.2143 J-.1287 K0.0 F10.
N5410 G01 X3.25 Y-1.8028 Z-.125 F10.
N5420 G17 G02 X3.2143 Y-1.9315 Z-.125 I-.25 J0.0 K0.0 F10.
N5430 G17 G02 X-.0074 Y-3.75 Z-.125 I-3.2143 J1.9315 K0.0 F10.
N5440 G17 G03 X-.2076 Y-3.8496 Z-.125 I-.0005 J-.25 K0.0 F10.
N5450 G01 X-.2076 Y-3.8496 Z-.025 F20.
N5460 G01 X-.2076 Y-3.8496 Z.25 F20.
N5470 G01 X.3422 Y-3.8348 Z.25 F20.
N5480 G01 X.3422 Y-3.8348 Z-.025 F20.
N5490 G01 X.3422 Y-3.8348 Z-.15 F20.
N5500 G01 X.3422 Y-3.8348 Z-.25 F10.
N5510 G17 G03 X.1426 Y-3.7473 Z-.25 I-.1901 J-.1623 K0.0 F10.
N5520 G17 G02 X.0676 Y-3.7494 Z-.25 I-.1426 J3.7473 K0.0 F10.
N5530 G17 G02 X-3.2143 Y-1.9315 Z-.25 I-.0676 J3.7494 K0.0 F10.
N5540 G17 G02 X-3.25 Y-1.8028 Z-.25 I.2143 J.1287 K0.0 F10.
N5550 G01 X-3.25 Y1.8028 Z-.25 F10.
N5560 G17 G02 X-3.2143 Y1.9315 Z-.25 I.25 J0.0 K0.0 F10.
N5570 G17 G02 X3.2143 Y1.9315 Z-.25 I3.2143 J-1.9315 K0.0 F10.
N5580 G17 G02 X3.25 Y1.8028 Z-.25 I-.2143 J-.1287 K0.0 F10.
N5590 G01 X3.25 Y-1.8028 Z-.25 F10.
N5600 G17 G02 X3.2143 Y-1.9315 Z-.25 I-.25 J0.0 K0.0 F10.
N5610 G17 G02 X-.0074 Y-3.75 Z-.25 I-3.2143 J1.9315 K0.0 F10.
N5620 G17 G03 X-.2076 Y-3.8496 Z-.25 I-.0005 J-.25 K0.0 F10.
N5630 G01 X-.2076 Y-3.8496 Z-.15 F20.
N5640 G01 X-.2076 Y-3.8496 Z.25 F20.
N5650 G01 X.3422 Y-3.8348 Z.25 F20.
N5660 G01 X.3422 Y-3.8348 Z-.15 F20.
N5670 G01 X.3422 Y-3.8348 Z-.275 F20.
N5680 G01 X.3422 Y-3.8348 Z-.375 F10.
N5690 G17 G03 X.1426 Y-3.7473 Z-.375 I-.1901 J-.1623 K0.0 F10.
N5700 G17 G02 X.0676 Y-3.7494 Z-.375 I-.1426 J3.7473 K0.0 F10.
N5710 G17 G02 X-3.2143 Y-1.9315 Z-.375 I-.0676 J3.7494 K0.0 F10.
N5720 G17 G02 X-3.25 Y-1.8028 Z-.375 I.2143 J.1287 K0.0 F10.
N5730 G01 X-3.25 Y1.8028 Z-.375 F10.
N5740 G17 G02 X-3.2143 Y1.9315 Z-.375 I.25 J0.0 K0.0 F10.
N5750 G17 G02 X3.2143 Y1.9315 Z-.375 I3.2143 J-1.9315 K0.0 F10.
N5760 G17 G02 X3.25 Y1.8028 Z-.375 I-.2143 J-.1287 K0.0 F10.
N5770 G01 X3.25 Y-1.8028 Z-.375 F10.
N5780 G17 G02 X3.2143 Y-1.9315 Z-.375 I-.25 J0.0 K0.0 F10.
N5790 G17 G02 X-.0074 Y-3.75 Z-.375 I-3.2143 J1.9315 K0.0 F10.
N5800 G17 G03 X-.2076 Y-3.8496 Z-.375 I-.0005 J-.25 K0.0 F10.
N5810 G01 X-.2076 Y-3.8496 Z-.275 F20.
N5820 G01 X-.2076 Y-3.8496 Z.25 F20.
N5830 G01 X.3422 Y-3.8348 Z.25 F20.
N5840 G01 X.3422 Y-3.8348 Z-.275 F20.
N5850 G01 X.3422 Y-3.8348 Z-.4 F20.
N5860 G01 X.3422 Y-3.8348 Z-.5 F10.
N5870 G17 G03 X.1426 Y-3.7473 Z-.5 I-.1901 J-.1623 K0.0 F10.
N5880 G17 G02 X.0676 Y-3.7494 Z-.5 I-.1426 J3.7473 K0.0 F10.
N5890 G17 G02 X-3.2143 Y-1.9315 Z-.5 I-.0676 J3.7494 K0.0 F10.
N5900 G17 G02 X-3.25 Y-1.8028 Z-.5 I.2143 J.1287 K0.0 F10.
N5910 G01 X-3.25 Y1.8028 Z-.5 F10.
N5920 G17 G02 X-3.2143 Y1.9315 Z-.5 I.25 J0.0 K0.0 F10.
N5930 G17 G02 X3.2143 Y1.9315 Z-.5 I3.2143 J-1.9315 K0.0 F10.
N5940 G17 G02 X3.25 Y1.8028 Z-.5 I-.2143 J-.1287 K0.0 F10.
N5950 G01 X3.25 Y-1.8028 Z-.5 F10.
N5960 G17 G02 X3.2143 Y-1.9315 Z-.5 I-.25 J0.0 K0.0 F10.
N5970 G17 G02 X-.0074 Y-3.75 Z-.5 I-3.2143 J1.9315 K0.0 F10.
N5980 G17 G03 X-.2076 Y-3.8496 Z-.5 I-.0005 J-.25 K0.0 F10.
N5990 G01 X-.2076 Y-3.8496 Z-.4 F20.
N6000 G01 X-.2076 Y-3.8496 Z.25 F20.
N6010 G01 X.3422 Y-3.8348 Z.25 F20.
N6020 G01 X.3422 Y-3.8348 Z-.4 F20.
N6030 G01 X.3422 Y-3.8348 Z-.525 F20.
N6040 G01 X.3422 Y-3.8348 Z-.625 F10.
N6050 G17 G03 X.1426 Y-3.7473 Z-.625 I-.1901 J-.1623 K0.0 F10.
N6060 G17 G02 X.0676 Y-3.7494 Z-.625 I-.1426 J3.7473 K0.0 F10.
N6070 G17 G02 X-3.2143 Y-1.9315 Z-.625 I-.0676 J3.7494 K0.0 F10.
N6080 G17 G02 X-3.25 Y-1.8028 Z-.625 I.2143 J.1287 K0.0 F10.
N6090 G01 X-3.25 Y1.8028 Z-.625 F10.
N6100 G17 G02 X-3.2143 Y1.9315 Z-.625 I.25 J0.0 K0.0 F10.
N6110 G17 G02 X3.2143 Y1.9315 Z-.625 I3.2143 J-1.9315 K0.0 F10.
N6120 G17 G02 X3.25 Y1.8028 Z-.625 I-.2143 J-.1287 K0.0 F10.
N6130 G01 X3.25 Y-1.8028 Z-.625 F10.
N6140 G17 G02 X3.2143 Y-1.9315 Z-.625 I-.25 J0.0 K0.0 F10.
N6150 G17 G02 X-.0074 Y-3.75 Z-.625 I-3.2143 J1.9315 K0.0 F10.
N6160 G17 G03 X-.2076 Y-3.8496 Z-.625 I-.0005 J-.25 K0.0 F10.
N6170 G01 X-.2076 Y-3.8496 Z-.525 F20.
N6180 G01 X-.2076 Y-3.8496 Z.25 F20.
N6190 G01 X.3422 Y-3.8348 Z.25 F20.
N6200 G01 X.3422 Y-3.8348 Z-.525 F20.
N6210 G01 X.3422 Y-3.8348 Z-.65 F20.
N6220 G01 X.3422 Y-3.8348 Z-.75 F10.
N6230 G17 G03 X.1426 Y-3.7473 Z-.75 I-.1901 J-.1623 K0.0 F10.
N6240 G17 G02 X.0676 Y-3.7494 Z-.75 I-.1426 J3.7473 K0.0 F10.
N6250 G17 G02 X-3.2143 Y-1.9315 Z-.75 I-.0676 J3.7494 K0.0 F10.
N6260 G17 G02 X-3.25 Y-1.8028 Z-.75 I.2143 J.1287 K0.0 F10.
N6270 G01 X-3.25 Y1.8028 Z-.75 F10.
N6280 G17 G02 X-3.2143 Y1.9315 Z-.75 I.25 J0.0 K0.0 F10.
N6290 G17 G02 X3.2143 Y1.9315 Z-.75 I3.2143 J-1.9315 K0.0 F10.
N6300 G17 G02 X3.25 Y1.8028 Z-.75 I-.2143 J-.1287 K0.0 F10.
N6310 G01 X3.25 Y-1.8028 Z-.75 F10.
N6320 G17 G02 X3.2143 Y-1.9315 Z-.75 I-.25 J0.0 K0.0 F10.
N6330 G17 G02 X-.0074 Y-3.75 Z-.75 I-3.2143 J1.9315 K0.0 F10.
N6340 G17 G03 X-.2076 Y-3.8496 Z-.75 I-.0005 J-.25 K0.0 F10.
N6350 G01 X-.2076 Y-3.8496 Z.25 F20.
N6360 M02
%
N100 G20
N102 G0 G17 G40 G49 G80 G90
N106 G54 X0. Y0. Z0.5 ( Z value is clearance over part ( initial Plane))
N108 Z.5 (it can be placed on seperate line)
N112 G0 G90 X-.3164 Y1.9337 (G90 is not needed it has already been established in N102)
N116 Z.1 (Establish clearance plane)
N118 G1 Z0. F5. (Since top of part has been established as Z0, Z value will be negative number for depth of cut Ex: Z-0.125)
N120 Y1.5587 F10.
N122 G3 X.0586 Y1.1837 R.375 (counterclockwise radius .375)
N124 G1 X.3021 (linear (straight line) move)
N126 G2 X.4356 Y1.1403 R.2269 (clockwise radius .2269)
N128 G1 X1.2751 Y.5297
N130 G2 X1.3686 Y.3462 R.2269
N132 G1 Y-.148
N134 G2 X1.287 Y-.3223 R.2269
N136 X-.0031 Y-.7661 R1.9182
N138 G1 X-1.8504
N140 G2 X-2.2348 Y-.3818 R.3843
N142 G1 Y-.2756
N144 G2 X-1.9685 Y-.0094 R.2663
N146 G1 X0.
N148 G3 Y.0094 R.0094
N150 G1 X-1.9685
N152 G2 X-2.2348 Y.2756 R.2662
N154 G1 Y.4056
N156 G2 X-1.8504 Y.7899 R.3844
N158 G1 X-1.4255
N160 G3 X-.3102 Y1.146 R2.1525
N162 G2 X-.185 Y1.1837 R.2269
N164 G1 X.0586
N166 G3 X.4336 Y1.5587 R.375
N168 G1 Y1.9337
N170 Z.1 F6.42 ( Usually G00 move G00 Z.1)
N182 G0 G90 X.2253 Y.7087
N186 G99 G81 Z0. R.1 F5.76 (This is a drill cycle will feed to z depth at a feed of 5.76 and retract to R.1 clearance or initial clearance .1 depending on using G99 or G98 here your initial plane(N170) and retract (R value) are the same)
N188 X.9027 Y.2107 (will repeat G81 at this location)
N190 G80 (cancels G81)
N194 X0. Y0. (back to part zero)
N196 Z0. (should be a positive number)
N198 M30 ( ends program and rewinds to top)
bumper 11-21-2006, 11:00 AM Ok wayne i will keep trying to see what i can come up with, thanks
davidflana 01-04-2007, 04:17 PM Wayne, if this works, you are a GOD SEND!
I have some gcode files that do not seem to convert right using your software. Can you look at them?
Here's one:
H DX1219.20 DY273.05 DZ19.05 -AB R1 /DEF
*R99P0001
O Y=350
F1
C2
G0 X=711.20 Y=-21.33 Z=-6.35 V2 S18 T201
G1 X=711.20 Y=-9.14 Z=19.25 V2
G1 X=711.20 Y=127.00 Z=19.25 V3
G1 X=863.60 Y=127.00 Z=19.25 V3
G1 X=863.60 Y=-9.14 Z=19.25 V3
G1 X=863.60 Y=-21.34 Z=-6.35 V3
G0 X=138.23 Y=42.83 Z=-6.35 V3 S18 T201
G3 X=88.15 Y=69.10 Z=20.52 I=155.32 J=136.27 V3
G3 X=60.32 Y=136.27 I=155.32 J=136.27 V3
G1 X=60.32 Y=136.78 Z=20.52 V3
G3 X=155.32 Y=231.77 I=155.32 J=136.78 V3
G1 X=155.83 Y=231.77 Z=20.52 V3
G3 X=250.82 Y=136.78 I=155.83 J=136.78 V3
G1 X=250.82 Y=136.27 Z=20.52 V3
G3 X=155.83 Y=41.27 I=155.83 J=136.27 V3
G1 X=155.32 Y=41.27 Z=20.52 V3
G3 X=88.15 Y=69.10 I=155.32 J=136.27 V3
G3 X=79.60 Y=78.91 I=155.32 J=136.27 V3
G0 X=1046.28 Y=42.83 Z=-6.35 V3 S18 T201
G3 X=996.20 Y=69.10 Z=20.52 I=1063.37 J=136.27 V3
G3 X=968.37 Y=136.27 I=1063.37 J=136.27 V3
G1 X=968.37 Y=136.78 Z=20.52 V3
G3 X=1063.37 Y=231.77 I=1063.37 J=136.78 V3
G1 X=1063.88 Y=231.77 Z=20.52 V3
G3 X=1158.87 Y=136.78 I=1063.88 J=136.78 V3
G1 X=1158.87 Y=136.27 Z=20.52 V3
G3 X=1063.88 Y=41.27 I=1063.88 J=136.27 V3
G1 X=1063.37 Y=41.27 Z=20.52 V3
G3 X=996.20 Y=69.10 I=1063.37 J=136.27 V3
G3 X=987.65 Y=78.91 I=1063.37 J=136.27 V3
And another:
G70X34.5Y23.875Z0.75T00D48N27L26
G150(left side, a=toe height, b=toe depth, c=top drawer) A4.5B3.5C6.125
!D=37/25.4 E=261/25.4 F=357/25.4 G=453/25.4 I=517/25.4
* T1=2 R0=0.9 R1=16 R2=24
* T2=14 R0=0.9 R1=16.0519 R2=24
* T3=26.9621 R0=4.4001 R1=16.1391 R2=24.3741
G88G90G54P5T01c2G41X=l-a Y-1Z0.875
G1G90X=l-a Y=b Z0.875
G1G90X=l Y=b Z0.875
G1G90X=l Y=h+1 Z0.875
G88G90G54P5T01c2G42X-1Y=h-0.875 Z0.375
G1G90X=l+1 Y=h-0.875 Z0.375
G185G54P5R54=8/25.4 X=l-(a-1) Y=b+0.375 Z0.375I=l K=64/25.4
G186G54P5R54=8/25.4 X=l-(a+0.375) Y1Z0.5J=h-1 K=64/25.4
G186G54P5R54=5/25.4 X=l-(a+1.4375) Y=d Z0.5J=d+32/25.4 K=32/25.4
G186G54P5R54=5/25.4 X=l-(a+1.4375) Y=i Z0.5J=i-32/25.4 K=32/25.4
G0G90G54P5L004/X=l-(a+3.0625) A0
G186G54P5R54=8/25.4 X0.375Y1Z0.5J5K=64/25.4
G186G54P5R54=8/25.4 X0.375Y=h-1.875 Z0.5J=h-5.875 K=64/25.4
G186G54P5R54=8/25.4 X=c Y1Z0.5J5K=64/25.4
G81G90G54P5R54=5/25.4 X=c-1.875 Y=37/25.4 Z0.5
G81G90G54P5R54=5/25.4 X=c-1.875 Y=e Z0.5
G81G90G54P5R54=5/25.4 X=c-1.875 Y=i Z0.5
G0G90G54P5L004/X=c+3 A0
G185G54P5R54=5/25.4 X=l-(a+6) Y=i Z0.5I=c+6 K=32/25.4
G185G54P5R54=5/25.4 X=l-(a+6) Y=d Z0.5I=c+6 K=32/25.4
M2
They are taken from two completely different systems.
If you can make sense of either, that would be great!
Thanks!
Dave
ger21 01-04-2007, 06:51 PM This program will convert a standard line-arc gcode file to a DXF file.
Those are not "standard" g-code.
WayneHill 01-07-2007, 12:32 AM Wayne, if this works, you are a GOD SEND!
I have some gcode files that do not seem to convert right using your software. Can you look at them?
....
Thanks!
Dave
"It's against my programming to impersonate a deity." -C3PO, Return of the Jedi
"I'm sorry Dave, I'm afraid I can't do that." -HAL, 2001: A Space Odyssey
ger21 01-07-2007, 07:18 AM That second one is an interesting way to convert mm to inches :eek:
I have taken WayneHill's source code and ported it to C#. I also added a couple of features that I found useful, mainly the ability to not create lines that represented rapid movement (G00) and/or when the Z axis is above the surface of the work piece. These cleaned up the resulting drawing significantly for me in a couple of cases and saved a bunch of manual cleanup.
Like Wayne's original application, this one really only handles basic g-code functions G00/G01/G02/G03. Two things I know I want to add are the ability to handle RS-274/NGC style in-line comments and a help file, but I think most people will figure out how to use it.
If you want to eliminate lines that represent non-cutting movement and you don't know the Z coordinate surface, selecting the option not to draw rapid positioning movements generally does a pretty good job. If you know the Z coordinate of the surface, selecting the option not to draw movements above the work surface provides better results. There is probably no need to use both of these options together, but it shouldn't hurt anything.
If you try it, I'd love to know whether or not it worked for you. I'm also open to any ideas for additional features (no promises). I'd like to make this as useful as possible.
WayneHill 02-12-2007, 12:47 PM Hi Jonk,
Your program looks good. Are you using Borland C#? Is there a hint of a TMS custom component menu? Borland Delphi is my main program format. I dropped the Powerbasic language due to it's limitations.
Welcome to this forum. What other projects are you working on or plan to work on?
Wayne
Wayne,
I put this together with Microsoft Visual Studio 2005 using built-in components.
In the other projects catagory, I've CNCed my Grizzly G0463 Mill/Drill and have been playing with it using eMachineShop to generate DXF files, CamBam (a wonderful piece of free software!) to generate g-code, CncSimulator to check out the g-code before I ruin any hardware, and EMCII to drive the stepper controller. Not sure exactly where I'm headed with this, but it's been a fun journey so far!
alilou 02-24-2007, 11:39 AM hello!
can any one give AP100US ?
it's a soft for punch cnc machine
thanks
Switcher 08-06-2007, 09:13 AM Wayne, I ported your code to "VB.Net 2005", thanks for the source. :)
mikkojay, your VB6 code helped to, thanks both.
I didn't change much, I might add a file splitter later, maybe split large g-code files.
.
WayneHill 08-06-2007, 10:12 AM Hi Switcher,
Looks good.
What's with all those source file's? My program only had one source file :)
Wayne
Switcher 08-06-2007, 04:52 PM Hi Switcher,
Looks good.
What's with all those source file's? My program only had one source file :)
Wayne
I guess it's a vb.net thing. :)
.
Bubba 08-06-2007, 07:40 PM Wayne,
I have to thank you for the original program!
today, I attempted to open a dxf to make some changes and the darn thing was corrupted. fortunately, I had posted it to a g-code file and was able recover my original stuff!
Thanks!
WayneHill 08-06-2007, 08:02 PM Switcher: Yes it is VB.NET thing. That's why we need bigger hardrives...
I stopped using PowerBASIC and moved to Delphi. More toys to play with and lots more source files to compile an EXE.
Bubba: Thank you. Glad to hear I did something right.
Wayne
Hi all
I am fairly new to this forum. I have made some changes and additions to your source code Switcher. I started to add functions to use this program for Mill or Lathe.
How do you upload the files to this thread?
Switcher 08-14-2007, 02:37 AM Hi all
I am fairly new to this forum. I have made some changes and additions to your source code Switcher. I started to add functions to use this program for Mill or Lathe.
How do you upload the files to this thread?
1) First, Zip all the source code up.
2) You need to use the "Go Advanced" option (instead of the quick reply).
3) Scroll down & click the "Manage Attachments" button (a pop-up window appears).
4) Click the "Browse" button (in the pop-up window), select your zipped file.
5) Then click the "Upload" button, make sure you wait until the "Current Attachments" appears & shows your zipped file name (in the pop-up window).
6) Close the pop-up window & click the "Submit Reply" button, when your ready to post your message/file.
.
Switcher 08-14-2007, 02:46 AM Switcher: Yes it is VB.NET thing. That's why we need bigger hardrives...
I stopped using PowerBASIC and moved to Delphi. More toys to play with and lots more source files to compile an EXE.
Bubba: Thank you. Glad to hear I did something right.
Wayne
Remember back in the day, when a 10gig hard drive was huge. :)
I found a 1.5 terabyte hard drive at CompUSA, the other day, you can never have enough room for all that clutter...
.
Switcher 08-14-2007, 07:32 AM I added a small (cheapo) plotter, & another form to be able to swap axis for the RTB on the left (g-code only).
Not much error handling. (chair)
.
Thanks Switcher
I have made some changes to the source as well as added in some functions. There is a small problem with converting some mill files. It will crash if the arcs are real small. I will look into this. I am going to rewrite this so that it is use's more of the .net functions and make it more faster for lager files. Over all it seems to work on most files. There is still alot more to add to it. You will see that I added a function to be able to use the AutoCad colour cababilities. I have made it that the lines, arcs are in different colours. I will automate this process later.
Switcher 08-14-2007, 08:38 AM KWW, nice work.
Do you have a site showing your work?
.
Switcher
Thanks for the compliment. As I said before it needs to be rewritten so that it is much easier to try and understand whats happening.
I am a freelance software developer. I have been developing software for the CNC industry for some 25 years. Every thing from Editors, plotting, serial and usb communications, drill applications, code optimzation cam/cad etc for various company that I am not allowed to mention because of non discloser agreements etc. I program in several different languages.
I am not a machinest, but have learned what it's all about from fellows like yourself who are in the industry over the years
I also do alot of RFID programming for the CNC industry as well.
I plan on putting together some other code snippets and uploading them for others to play with who are interested programming
KWW
WayneHill 08-15-2007, 05:26 PM KWW,
Nice. The G-Code to DXF program has been revised and improved beyond my expectations. I just slapped together the original source code and set it free. It is really taking shape.
Wayne
Wayne
Thanks
I will have a new version up shortly. It will go DXF to G and G to DXF as well as plot the DXF file
Hi Guys
Just to let you know that I did not get lost. I have been on some well deserved vaction time. We also had a death in the family which was a travel out of the country. We hope to have an update on the Gcode2DXF for you all to try out in about a week.
Cheers
Anils 01-04-2008, 06:03 AM Hi All ,
I am Anil from INDIA .
I require the .exe file for the Gcode2DXF software.
I have some old NC files generated from FANUC wireEDM software.
I want it all of them to be converted back to DXF or DWG.
Please anyone who has such a software please help me.
( I do not have VB to create the EXE from the Source Code file )
Please reply back to mr.anils@gmail.com
Thanks in Advance,
Anil.S
Switcher 01-04-2008, 09:16 AM You don't need Vb.net to run the program, you will need "Microsoft .NET Framework Version 2.0 (http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en)" (Download & install this If it's not already on your PC before you run the Gcode2DXF).
After you download the .Net Framework 2.0, then download the .Zip file here (http://www.cnczone.com/forums/attachment.php?attachmentid=42062&d=1187093911) (latest version post #49).
After you have the 2 downloads on your PC, unzip the "Gcode2DXF .zip file" & follow the path below to the program (assuming you downloaded the "Gcode2DXF .zip file" to the desktop).
...\Desktop\Convert DXF SourceCode\Convert DXF SourceCode\Convert_DXF\bin\Release\Convert_DXF
:cheers:
.
drape 04-20-2008, 02:51 AM your app works very well. i'm exporting .nc files from mastercam. no problems on the conversion. they look sweet in Rhino when i'm looking at them.
this will be a good tool in my architecture school. thanks!
whptehnika 05-21-2008, 10:10 AM Hi there,
have some problems with conversion. Could I send you a test file?
Thank you and regards
Ivan
WayneHill 05-21-2008, 10:53 AM Hi Ivan,
Welcome to the CNCZone. Send a sample text file.
Thank you,
Wayne
WayneHill 05-21-2008, 01:02 PM Ivan,
Your file is in a rich text format. Use Wordpad to convert it to a plain text file.
Then run the GCode2DXF conversion.
Thank you,
Wayne
whptehnika 05-25-2008, 02:51 PM Hi there,
are you still working on your program?
Regards, Ivan
whptehnika 05-25-2008, 02:55 PM Hi Switcher,
did you add a plot feature?
Regards, Ivan
eatanimals 07-25-2008, 11:31 PM Hi,
Will your g-code to .dxf conversion program run in Vista?
Chris:cheers:
mattpatt 03-09-2009, 01:04 AM Been a while since anyone posted on this thread, but just thought I'd say that the very first, original program seems fine, and I get a DXF file output with just a few extra lines for the rapid above job movement, but the newer versions either don't work for me, or I don't understand what Im supposed to do.:confused:
Still, it's very very useful as I lost the file model for an engraving job that I had done for the last four or five years. The guy doing the job also lost the file, but he has the g-code in his machine so we'll be able to save it (I hope), without me having to do the model again.
Fantastic. Thanks to all you guys cleverer than me. Which is probably most of you :)
smoregrava 03-10-2009, 04:09 AM I agree the newer version's is a better user interface. But when I use it I get some strange result on the arcs.
I Have attached two pictures to illustrate the problem. Original G code is a picture from My Cam software It is a slot opperation (engraving). And I have done this on my CNC and it looks exactly like this
"The dxf created from the g code" picture is the result after using "convert DXF". Very strange really
If anyone wants to look into the problem I could upload my G code file
smoregrava 03-10-2009, 04:14 AM "The dxf created from the g code" picture was a little hard to see so I marked the lines so they are a little easier to see.
smoregrava 03-10-2009, 04:29 AM And If anyone wonder here is the result form the first/old program on the same G code
nice:-) Program migth not look so fancy but it does the work :-)
mattpatt 03-10-2009, 04:42 AM Program migth not look so fancy but it does the work :-)
Exactly what I found. It worked perfectly for me.
As I said, I just had to delete the extra lines generated from the rapid above job movements, but that's not a problem.
I'm sure thre's just something I'm either doing wrong, or something a little 'strange' in the g-code, that not being accepted.
But Hey! It's all a massive help, and big thanks to everyone taking the time and trouble in not only building these programs, but then sharing them with us.
Matt.
LONGLEG 06-06-2009, 07:20 AM I AM A CHINESE.I CANNOT READ A TO Z. BUT I NEED HELP. HOW TO EXCHANG THE G-CODE TO HPGL?
LONGLEG 06-14-2009, 07:30 AM THANKS! ALL OF YOU. I FIND THE WAY TO to convert THE G-CODE TO HPLT WITH VBA-PROGRAMMING IN THE CORELDRAW12 AND ACAD2000.
WayneHill 06-14-2009, 10:49 PM smoregrava,
The old program is a bare bones example just to get the code out in the public domain. The newer versions must have introduced a precision error when it calculates the center arc position.
Wayne
caddjunky 07-02-2009, 10:23 PM Hey where do i go to download and try this thanks
Dean
jschmitt 07-04-2009, 05:59 AM post # 49 has the latest zip file. Installation instructions are in post #56.
mrbroms 08-05-2009, 11:54 PM Wayne..
All I can say is thank you. I have been making some designs in vcarve and cut3d but I can't save them as models. your app really helps. But... now what? Do you have any links on good tutorials to get the dfx to be a solid for booleans or meshs so I can re-create the model in autocad or 3ds max(RHINO)? thanks again for your program!!
Broms
WayneHill 08-06-2009, 02:02 AM Broms,
Thank you. Check out Moi Solid modeler. It is written by the author of Rhino.
moi3d.com
mrbroms 08-10-2009, 02:23 PM wayne-
I went in MOI. I didn't know what to look for so I tried to make the cuves into a network but it didn't do anything. I know that Rhino looks at each segment as its own curve but I don't know what rhino can do with them. Do you have a workflow to get all of the separate curve into a mesh or solid? the curves look like the shape of my cnc cut but I don't know how to connect them and create a surface for trimming or boolean. I feel I'm close but can't wrap my head around it. Can I email you the file and get your ideas? If yes, what format?
By the way, thanks for getting back to me so quickly!!!
Thanks again,
broms
Wayne,
Thanks for the useful program for conversion. I tried using it and I am unable to find the converted file. It is not in the source directory as stated above. Where else would it go??
Thanks again,
Tom in PA
mrbroms 08-11-2009, 01:27 AM WAYNE-
Here is what the dxf looks like from gcode to autocad to rhino. The dxf can be seen but it is a series of 1448 curve segments. I tried to join them but had no luck. Take a look and let me know what you think.
Thanks,
chris
http://www.flickr.com/photos/34396447@N06/
mrbroms 08-11-2009, 01:28 AM here is the link to conversion image
http://www.flickr.com/photos/34396447@N06/
WayneHill 08-17-2009, 12:45 AM It's like making a cow out of hamburger. All the parts are there. Just don't know how to put it together.
smoregrava 08-17-2009, 03:32 AM It's like making a cow out of hamburger. All the parts are there. Just don't know how to put it together.
Nice comment and I have to agree. Inverse ingeneering is not easy
I have dreamt of making 3D parts from scans and paths. At my work we have a highend 3D scanner (100K $) this creates very nice STL files but what happens is even with a good scan you want some changes and then you find out that its very hard to work with the files. Almoust every time I end up modelling the part up in 3D from scratch. Faster and much more flexible to changes.
WayneHill 08-19-2009, 10:54 AM It is possible to create a point cloud from a G-Code to a DXF file. Have the CAD software generate a surface from the points. A lot of the surface texture would be missing. It would be possible to generate an XYZ vector points from the DXF line and circles. This could be handy to someone working on a reverse 3D model.
|
|