CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > OpenSource CNC Design Center > OpenSource Software


OpenSource Software For the Discussion of Opensource CAD/CAM and NC shareware software etc)


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 03-01-2005, 11:09 AM
WayneHill's Avatar  
Join Date: Mar 2004
Location: Michigan
Posts: 769
Blog Entries: 5
WayneHill is on a distinguished road
G-Code to DXF

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/Downl...file.php?id=22


Code:
#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
Tweet this Post!Share on Facebook
Reply With Quote

  #2  
Old 03-01-2005, 11:27 AM
joecnc2006's Avatar
www.joescnc.com
 
Join Date: Aug 2004
Location: usa
Posts: 3,055
joecnc2006 is on a distinguished road
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
Attached Images
File Type: jpg cnc in dxf.jpg‎ (46.5 KB, 1171 views)
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 03-02-2005, 12:12 PM
WayneHill's Avatar  
Join Date: Mar 2004
Location: Michigan
Posts: 769
Blog Entries: 5
WayneHill is on a distinguished road
Cool

Originally Posted by joe2000che
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.

Wayne
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 04-04-2006, 02:57 AM
smoregrava's Avatar  
Join Date: Sep 2005
Location: Norway
Posts: 194
smoregrava is on a distinguished road
Waynehill you're the king!!
This was just a perfect program have been searching the nett for a program like this. thank you
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 04-04-2006, 01:16 PM
CLaNZeR's Avatar  
Join Date: Jul 2005
Location: UK
Posts: 101
CLaNZeR is on a distinguished road
Excellent Waynehill

Works a treat this end!

Regards

Sean.
__________________
********************
http://www.cncdudez.co.uk
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 04-04-2006, 01:58 PM
WayneHill's Avatar  
Join Date: Mar 2004
Location: Michigan
Posts: 769
Blog Entries: 5
WayneHill is on a distinguished road
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
__________________
Wayne Hill
www.codemangler.com
Tweet this Post!Share on Facebook
Reply With Quote

  #7  
Old 04-04-2006, 06:11 PM
Gold Member
 
Join Date: Oct 2004
Location: USA
Posts: 742
CJL5585 is on a distinguished road
Originally Posted by WayneHill

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
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 04-04-2006, 07:09 PM
WayneHill's Avatar  
Join Date: Mar 2004
Location: Michigan
Posts: 769
Blog Entries: 5
WayneHill is on a distinguished road
Originally Posted by CJL5585
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
__________________
Wayne Hill
www.codemangler.com
Tweet this Post!Share on Facebook
Reply With Quote

  #9   Ban this user!
Old 04-05-2006, 12:17 AM
 
Join Date: May 2004
Location: United States
Posts: 174
tekno is on a distinguished road
never heard of power basic.. that a mac program?
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 04-05-2006, 12:59 AM
WayneHill's Avatar  
Join Date: Mar 2004
Location: Michigan
Posts: 769
Blog Entries: 5
WayneHill is on a distinguished road
Originally Posted by tekno
never heard of power basic.. that a mac program?
It's a Windows basic compiler.

www.powerbasic.com

I also program in Delphi.
__________________
Wayne Hill
www.codemangler.com
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 04-09-2006, 01:52 AM
 
Join Date: Dec 2005
Location: South Africa
Posts: 4
cheeky is on a distinguished road
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
Tweet this Post!Share on Facebook
Reply With Quote

  #12   Ban this user!
Old 04-09-2006, 11:59 AM
WayneHill's Avatar  
Join Date: Mar 2004
Location: Michigan
Posts: 769
Blog Entries: 5
WayneHill is on a distinguished road
Originally Posted by cheeky
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/Downl...file.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
__________________
Wayne Hill
www.codemangler.com
Tweet this Post!Share on Facebook
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 2 (1 members and 1 guests)
Holley
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for Mandolin g code or dxf mredican Musical Instrument Design & Construction 73 11-17-2011 12:40 PM
parametric programming Karl_T CamSoft Products 21 05-24-2005 03:58 PM
G Code to DXF sanders50 G-Code Programing 2 02-16-2005 04:09 PM
DXF Catalog CNCdude Product Announcements & Manufacturer News 2 08-26-2004 10:07 PM




All times are GMT -5. The time now is 11:04 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353