I have some DXFs which have bolt holes etc. For this forum I could give example as stepper motor which has four smaller holes in the corners and one bigger in center.
So far I have done my .scad files by hand but I'm wondering if I could extrude from dxf drawing the part. And can I just somehow tell openscad to take from layer this and center it and extrude it? The manual is rather brief about import().
I am trying to turn a 2D scalable vector image from inkscape into an OpenSCAD file. Unfortunately, bringing the file into OpenSCAD as a DXF file looked terrible and using the inkscape extension didn't work either. Any ideas on getting this to work?
1 - Draw object in Inkscape
2 - Move object to lower left corner of page, align left/right center marker to left page border, align top/bottom center marker with the bottom page border (it may help to turn off the page shadow in Document Properties)
3 - Select Objects you want to export
4 - Convert to Path: Path --> Object to Path (Ctrl+Shift+C)
5 - Flatten Beziers: Extensions --> Modify Path --> Flatten Beziers (adjust the value based on granularity you need; I use 0.3 or 0.1 for most things)
6 - Save as Desktop Cutting Plotter (Autocad DXF R14) .DXF file
7 - Make sure the ROBO-Master spline option is unchecked, LWPOLYLINE option is checked. I keep the base units in mm to be consistent with OpenSCAD.
8 - import the file in OpenSCAD (e.g. import ("drawing.dxf"); ) dragging and dropping the file will insert the command - then say preview