move lib to sub-directory
Signed-off-by: John Thornton <bjt128@gmail.com>
This commit is contained in:
@ -1,2 +1,16 @@
|
|||||||
|
LINE 10, 20, 30 (start point), 11, 21, 31 (end point).
|
||||||
|
|
||||||
|
POINT 10, 20, 30 (point), 50 (angle of X axis for the UCS in effect
|
||||||
|
when the Point was drawn -optional 0, for use when PDMODE is
|
||||||
|
nonzero).
|
||||||
|
|
||||||
|
CIRCLE 10, 20, 30 (center), 40 (radius).
|
||||||
|
|
||||||
|
ARC 10, 20, 30 (center), 40 (radius), 50 (start angle), 51 (end
|
||||||
|
angle)
|
||||||
|
|
||||||
|
0 start of an entitiy
|
||||||
|
8 layer name
|
||||||
|
|
||||||
$ANGBASE is set to 0.0, meaning 0 degrees is to the east or right.
|
$ANGBASE is set to 0.0, meaning 0 degrees is to the east or right.
|
||||||
$ANGDIR is set to 0, meaning drawing is counter-clockwise.
|
$ANGDIR is set to 0, meaning drawing is counter-clockwise.
|
||||||
|
3408
dxf/#5inchknife.dxf
Normal file
3408
dxf/#5inchknife.dxf
Normal file
File diff suppressed because it is too large
Load Diff
18
dxf2gcode.go
18
dxf2gcode.go
@ -3,7 +3,7 @@ package main
|
|||||||
// DXF to G code converter
|
// DXF to G code converter
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/jethornton/dxfutil"
|
"github.com/jethornton/dxf2gcode/dxfutil"
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
"os/user"
|
||||||
)
|
)
|
||||||
@ -31,20 +31,24 @@ func main() {
|
|||||||
dxfutil.Readini(iniMap, cwd)
|
dxfutil.Readini(iniMap, cwd)
|
||||||
lines := dxfutil.GetLines(inFile)
|
lines := dxfutil.GetLines(inFile)
|
||||||
entities := dxfutil.GetEntities(lines)
|
entities := dxfutil.GetEntities(lines)
|
||||||
|
for _, e := range entities {
|
||||||
|
fmt.Printf("%2d %4s G10 %8s G11 %8s G20 %8s G21 %8s G50 %9s G51 %9s\n",
|
||||||
|
e.N, e.G0, e.G10, e.G11, e.G20, e.G21, e.G50, e.G51)
|
||||||
|
}
|
||||||
entities = dxfutil.GetEndPoints(entities)
|
entities = dxfutil.GetEndPoints(entities)
|
||||||
|
|
||||||
for _, e := range entities {
|
for _, e := range entities {
|
||||||
fmt.Printf("%2d %2s %4s Xs %f Ys %f Xe %f Ye %f\n",
|
fmt.Printf("%2d %4s Xs %9f Xe %9f Ys %9f Ye %9f\n",
|
||||||
e.Index, e.G, e.G0, e.Xs, e.Ys, e.Xe, e.Ye)
|
e.N, e.G0, e.Xs, e.Xe, e.Ys, e.Ye)
|
||||||
}
|
}
|
||||||
|
|
||||||
entities = dxfutil.GetIndex(entities)
|
entities = dxfutil.GetIndex(entities)
|
||||||
/*
|
|
||||||
for _, e := range entities {
|
for _, e := range entities {
|
||||||
fmt.Printf("%2d %2s %4s Xs %f Ys %f Xe %f Ye %f\n",
|
fmt.Printf("%2d %2d %4s Xs %9f Xe %9f Ys %9f Ye %9f\n",
|
||||||
e.Index, e.G, e.G0, e.Xs, e.Ys, e.Xe, e.Ye)
|
e.N, e.Index, e.G0, e.Xs, e.Xe, e.Ys, e.Ye)
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
dxfutil.GenGcode(entities, iniMap["SAVEAS"])
|
dxfutil.GenGcode(entities, iniMap["SAVEAS"])
|
||||||
|
|
||||||
}
|
}
|
||||||
|
1
dxfutil
Submodule
1
dxfutil
Submodule
Submodule dxfutil added at c12fa185d2
Reference in New Issue
Block a user