Check out my first novel, midnight's simulacra!

OpenSCAD

From dankwiki
Revision as of 05:25, 29 September 2024 by Dank (talk | contribs) (Created page with "OpenSCAD is a declarative 3d modeling program. Objects are defined in terms of basic 2D and 3D shapes, and a set of operators is provided to manipulate these objects. It can generate STL files from the command line. ==Basic shapes== * Square (rectangle), circle, polygon * Cube (rectangular prism), sphere, cylinder, polyhedron <tt>circle</tt> and <tt>cylinder</tt> are approximated using the <tt>fn</tt> system variable. Low values of <tt>fn</tt> can be used to generate r...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

OpenSCAD is a declarative 3d modeling program. Objects are defined in terms of basic 2D and 3D shapes, and a set of operators is provided to manipulate these objects. It can generate STL files from the command line.

Basic shapes

  • Square (rectangle), circle, polygon
  • Cube (rectangular prism), sphere, cylinder, polyhedron

circle and cylinder are approximated using the fn system variable. Low values of fn can be used to generate regular polygons. A cylinder can have different radii at its top and bottom. A right pentagonal frustrum, for instance, can be generated with cylinder using fn=5.

A 2D shape can be converted into a 3D one using linear_extrude or rotate_extrude().