OpenSCAD User Manual/DXF Extrusion
From Wikibooks, open books for an open world
|
|
The text in its current form is incomplete. |
With the DXF Extrusion statements it is possible to convert 2D DXF files directly to 3D Objects.
Linear Extrude[edit]
With the DXF Extrusion statements it is possible to convert 2D objects to 3D objects.
linear_extrude(file = "example009.dxf", layer = "fan_top", height = fanwidth, center = true, convexity = 10);
Rotate Extrude[edit]
A rotational extrusion is a Linear Extrusion with a twist, literally.
rotate_extrude(file = "example009.dxf", layer = "fan_side", origin = fan_side_center, convexity = 10, twist = -fanrot);
Getting Inkscape to work[edit]
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)
- http://tonybuser.com/?tag=inkscape (More complicated, involves conversion to Postscript)
- http://www.damonkohler.com/2010/11/inkscape-dxf-openscad-makerbot.html (Better Better DXF Plugin for Inkscape)
Description of extrude parameters[edit]
Extrude parameters for all extrusion modes[edit]
| file | The name of the DXF file to extrude |
| layer | The name of the DXF layer to extrude |
| convexity | See 2D to 3D Extrusion |
| origin | [x,y] coordinates to use as the drawing's center, in the units specified in the DXF file |
| scale | FIXME |
Extrude parameters for linear extrusion only[edit]
| height | The extrusion height |
| center | If true, extrusion is half up and half down. If false, the section is extruded up. |
| twist | The extrusion twist in degrees |
| slices | FIXME |