Last modified on 5 June 2014, at 23:53

OpenSCAD User Manual/DXF Extrusion


With the import() and extrusion statements it is possible to convert 2D objects read from DXF files to 3D objects.

Linear ExtrudeEdit

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 ExtrudeEdit

Example of rotational extrusion of a 2D object imported from a DXF file.

rotate_extrude(convexity = 10, twist = -fanrot)
   import (file = "example009.dxf", layer = "fan_side", origin = fan_side_center);

Getting Inkscape to workEdit

Inkscape is an open source drawing program. Tutorials for transferring 2d DXF drawings from Inkscape to OpenSCAD are available here:

Description of extrude parametersEdit

Extrude parameters for all extrusion modesEdit

scale FIXME
convexity See 2D to 3D Extrusion
file The name of the DXF file to extrude [DEPRECATED]
layer The name of the DXF layer to extrude [DEPRECATED]
origin [x,y] coordinates to use as the drawing's center, in the units specified in the DXF file [DEPRECATED]

Extrude parameters for linear extrusion onlyEdit

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