< OpenSCAD User Manual
With the import() and extrusion modules it is possible to convert 2D objects read from DXF files to 3D objects. See also 2D to 3D Extrusion.
Linear Extrude
Example of linear extrusion of a 2D object imported from a DXF file.
linear_extrude(height = fanwidth, center = true, convexity = 10) import (file = "example009.dxf", layer = "fan_top");
Rotate Extrude
Example of rotational extrusion of a 2D object imported from a DXF file.
rotate_extrude(convexity = 10) import (file = "example009.dxf", layer = "fan_side", origin = fan_side_center);
Getting Inkscape to work
Inkscape is an open source drawing program. Tutorials for transferring 2d DXF drawings from Inkscape to OpenSCAD are available here:
- http://repraprip.blogspot.com/2011/05/inkscape-to-openscad-dxf-tutorial.html (Very simple, needs path segments to be straight lines)
- http://tonybuser.com/?tag=inkscape (More complicated, involves conversion to Postscript)
- http://bobcookdev.com/inkscape/inkscape-dxf.html (Better DXF Export, native support for bezier curves)
- http://www.bigbluesaw.com/saw/big-blue-saw-blog/general-updates/big-blue-saws-dxf-export-for-inkscape.html (even better support, works as of 10/29/2014, see link below registration window. Note: As of 6/17/15 only works with version 0.48.5 or earlier of inkscape, due to a breaking change made in 0.91.)
- http://www.instructables.com/id/Convert-any-2D-image-to-a-3D-object-using-OpenSCAD/ (Convert any 2D image to a 3D object using OpenSCAD)
- http://carrefour-numerique.cite-sciences.fr/fablab/wiki/doku.php?id=projets:de_inkscape_a_openscad (French, directly exports OpenSCAD file)
Previous
Next
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.