OpenSCAD v0.1.0 OpenSCAD View Source

Documentation for OpenSCAD.

Link to this section Summary

Functions

Alternate syntax for difference

Displays the convex hull of child nodes

Displays the minkowski sum of child nodes

Mirrors the child element on a plane through the origin. The arguments to mirror() is the x,y,z vector of a plane intersecting the origin through which to mirror the object

Rotates its child x, y and z degrees about the respective axis

Returns a string of the object in OpenSCAD

Translates (moves) its child elements along the specified vector, x,y,z

Creates a union of all its child nodes. This is the sum of all children (logical or). May be used with either 2D or 3D objects, but don’t mix them

Link to this section Functions

Cube

Examples

iex> OpenSCAD.cube(size: 2)
%OpenSCAD.Action{children: [], modifier: nil, element: %OpenSCAD.Cube{width: 2, depth: 2, height: 2, center: false}}
Link to this function difference(obj, things_to_remove) View Source

Alternate syntax for difference

Examples:

iex> OpenSCAD.cube(size: 2) …> |> difference(OpenSCAD.cube(size: 1)) …> |> OpenSCAD.to_scad “difference() {\n cube([2, 2, 2], center=false);\n cube([1, 1, 1], center=false);\n}\n”

iex> OpenSCAD.cube(size: 3) …> |> difference([OpenSCAD.cube(size: 2), OpenSCAD.cube(size: 1)]) …> |> OpenSCAD.to_scad “difference() {\n cube([3, 3, 3], center=false);\n cube([2, 2, 2], center=false);\n cube([1, 1, 1], center=false);\n}\n”

Displays the convex hull of child nodes.

See OpenSCAD hull

Displays the minkowski sum of child nodes.

See OpenSCAD minkowski

Link to this function mirror(children, params \\ []) View Source

Mirrors the child element on a plane through the origin. The arguments to mirror() is the x,y,z vector of a plane intersecting the origin through which to mirror the object.

See OpenSCAD mirror()

Link to this function polyhedron(params \\ []) View Source
Link to this function rotate(children, params \\ []) View Source

Rotates its child x, y and z degrees about the respective axis.

See OpenSCAD rotate([deg_x, deg_y, deg_z])

Returns a string of the object in OpenSCAD

Examples:

iex> OpenSCAD.to_scad OpenSCAD.cube(size: 2) “cube([2, 2, 2], center=false);\n”

Link to this function translate(children, params \\ []) View Source

Translates (moves) its child elements along the specified vector, x,y,z.

See OpenSCAD translate()

Creates a union of all its child nodes. This is the sum of all children (logical or). May be used with either 2D or 3D objects, but don’t mix them.

See OpenSCAD union()