OpenSCAD: Difference between revisions

No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
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.
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. Note that OpenSCAD approximates arcs with polygons, and emits meshes; it cannot emit e.g. true circles. As a result, there might be fewer G2/G3 arcs in the sliced gcode.


==Basic shapes==
==Basic shapes==
Line 15: Line 15:


Generally, in each project I'll have a common file in which my base objects (and their geometry) are declared. Then I build up structures from these objects, relating them using the declared geometries. Be sure to declare the geometries of these structures as their own variables (composed from substructure properties). Then, for each print job, I have a file which <tt>include</tt>s this common file, and calls those <tt>module</tt>s to be printed. There shouldn't be any composition in these files, just any <tt>translate</tt>s, <tt>rotate</tt>s, and <tt>mirror</tt>s necessary to distribute the objects optimally on a print tray. Ensure they're distinct, so that slicing software can treat them as different objects (necessary for e.g. multimaterial printing). Finally, I have a file which assembles all the pieces together as they're expected to be assembled, serving as a check on the objects; neither this file nor the common file are exported to STL.
Generally, in each project I'll have a common file in which my base objects (and their geometry) are declared. Then I build up structures from these objects, relating them using the declared geometries. Be sure to declare the geometries of these structures as their own variables (composed from substructure properties). Then, for each print job, I have a file which <tt>include</tt>s this common file, and calls those <tt>module</tt>s to be printed. There shouldn't be any composition in these files, just any <tt>translate</tt>s, <tt>rotate</tt>s, and <tt>mirror</tt>s necessary to distribute the objects optimally on a print tray. Ensure they're distinct, so that slicing software can treat them as different objects (necessary for e.g. multimaterial printing). Finally, I have a file which assembles all the pieces together as they're expected to be assembled, serving as a check on the objects; neither this file nor the common file are exported to STL.
[[CATEGORY: 3D Printing]]