TorchTableToolChainTesting: Difference between revisions
Line 65: | Line 65: | ||
= Alibre -> DXF toolchain = | = Alibre -> DXF toolchain = | ||
[[File:Alibre_part.png|thumb|Make part]] [[File:Alibre_pop-ups.png|thumb|importing part to drawing]] [[File:Alibre_export.png|thumb|Export dxf]] [[File: | [[File:Alibre_part.png|thumb|Make part]] [[File:Alibre_pop-ups.png|thumb|importing part to drawing]] [[File:Alibre_export.png|thumb|Export dxf]] [[File:CAM-dxf.png|thumb|CAM file]] | ||
[[OSE_Christmas_Gift_to_the_World_2012#Hopper_CAD_drawings]] | [[OSE_Christmas_Gift_to_the_World_2012#Hopper_CAD_drawings]] | ||
Revision as of 00:14, 9 December 2012
Tool chain experiments for Torch Table programming
Initial tests ChuckH 22:52, 2 December 2012 (CET)
- environment: Windows XP SP3 laptop
- software installation
- inkscape download inkscape 0.48.2, standard Windows exe installer to Program Files/Inkscape
- gcodetools download gcodetools v1.7 here and unpack into Inkscape subdirectory per instructions.
- implicitCAD
- Haskell Platform download installer here. Some Haskell packages are not too happy with Windows path name conventions, particularly spaces inside filenames. I installed at C:\Haskell_Platform instead of the default C:\Program Files\Haskell_Platform. However, this may not be necessary.
- download implicitCAD using cabal (see [instructions]), but it does not build properly. (Unfortunately I did not record exactly my sequence of steps here. Among other things I think I needed to copy mingw's gawk program and rename it awk for cabal to build.)
- patch implicitCAD files to enable Windows install. File:ImplicitCADWindowsPatch0.docThis patch made it compile for me, at the cost of disabling PNG output (not necessary for our toolchain) and disabling file includes (probably painful; need workaround).
simple test part
implicitCAD
/* 164_plate.escad, units=inch */ p164_wd = 13.5; p164_ln = 30.32; holedia = 0.81; inset_x = 1.75; inset_y = 1.5; difference() { square([p164_wd, p164_ln]); union() { translate([inset_x, inset_y]) circle(holedia/2); translate([p164_wd-inset_x, inset_y]) circle(holedia/2); translate([inset_x, p164_ln-inset_y]) circle(holedia/2); translate([p164_wd-inset_x, p164_ln-inset_y]) circle(holedia/2); } }
run implicitCAD's extopenscad program
extopenscad 164_plate.escad out.svg
convert svg scale
Unfortunately, the out.svg file does not contain any clues that the units are inches, and if we open this file with inkscape it will assume user units are pixels. Based on this posting I found that user units can be forced to inches by substituting a few lines near the beginning of the svg file. Here is a diff
4c4,9 < <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"><g stroke="rgb(0,0,255)" stroke-width="1" fill="none"> --- > <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" > width="100in" > height="100in" > viewBox="0 0 100 100" > > > <g stroke="rgb(0,0,255)" stroke-width="0.01" fill="none">
inkscape
Full file at [1].
Inkscape svg to gcode
It is apparent that implicitCAD generates lots of short straight line segments, subdividing longer lines and approximating the pure circles. This can confuse the plasma lead-in generator in gcodetools:
Chris Colah fixed this here but I haven't successfully re-built on my platform since. (I don't think Chris is too enthusiastic about supporting Windows installs. Probably easier to run this toolchain on linux.) ChuckH 22:43, 8 December 2012 (CET)
Alibre -> DXF toolchain
OSE_Christmas_Gift_to_the_World_2012#Hopper_CAD_drawings
Verified in Alibre v12.
The below is adapted from http://www.cnczone.com/forums/alibre_design/157372-alibre_dxf.html (re: Need Help!- Alibre to dxf? )
- Open Alibre to make a new Part.
- Make a 2D sketch in part modeling
- Now give the part some thickness "Extrude Boss", say maybe .125 inches
- Now save as: The name you give it. say, "TestPartOne"
- Close out of "Part Modeling"
- Now in Alibre create a new drawing
- File - New - Drawing
- A window should pop up that says "New Sheet Properties"
- Check - Blank Sheet - Custom 8.5 by 11 is OK - set default scale view at 1 to 1 - enter sheet name, say "TestPartOneDrawing" click OK
- Click on "TestPartOne"
- A window should pop up "Standard Views Creation"
- View selections - click on "Front" and uncheck all other views
- Set scale at - 1:1 click OK
- Now click on the open work space and your drawing should appear
- Drop down menu click "Export"
- Give it a file name, say "TestPartOne_CAM"
- Save as type - drop down menu on the right hand side "AutoCAD 2000 file dxf"
- Click "Save"
- Close all your Alibre files
Note that using 1:1 scale the part probably doesn't fit on the sheet. That's okay, what's important is that the numbers that go into the dxf file are un-scaled inches.
Verified that dxf file exported from Alibre will import into Torchmate CNC software.
Alternate path Alibre->pdf->inkscape
- Print scale drawing (e.g. 1:4 scale) from Alibre using PDFCreator.
- Note: although both Alibre and PDFCreator allow custom sheet sizes large enough to accommodate a 1:1 part, I get an incorrect pdf (e.g. printing Hopper_151_CAM.AD_PRT on an 80-inch x 20-inch sheet)
- Open pdf file with inkscape
- Use inkscape Transform - Scale to restore to full scale
- Ungroup drawing in inkscape
- Select and delete undesired parts of image
- Group the part geometry elements
So far it is not clear whether or not the resulting path is good for gcodetools. To be continued.
DXF to Inkscape
Inkscape can open a dxf file. However, as of version 0.48, there is only partial support for dxf features; for example Inkscape does not handle dimensions, text formatting or line types very well, and it assumes the dxf file units are mm. Nonetheless, we can successfully import the important elements of part geometry in order to create a tool path.
- Start Inkscape
- Open the dxf file
- use File Open rather than File Import .. this will bring in dxf layers as Inkscape layers
- on the DXF input pop-up, uncheck "Use automatic scaling to size A4" and set the manual scale factor to 25.4 (mm per inch)
- Clean up to taste
- Make the object lines into a group (select them, then menu Object Group) so they will stay together
- Choose an appropriate page size (menu File DocumentProperties)
- Move the object to a more convenient place on the sheet
- Select any unnecessary parts of the drawing (text, title block, etc.) and delete them
- Save file