Package-level declarations

Types

Link copied to clipboard

Arranges any number of Shape3d in a roughly square pattern (X and Y), with no shapes touching each other. Primarily designed to arrange multiple independent pieces on a single build-plate.

Link copied to clipboard

Currently the one and only heuristic used by AutoArrange.

Link copied to clipboard
Link copied to clipboard
class Cavity

Sometimes it is useful for the holes to be 1st class objects, instead of only modelling the solid parts. For example, we could define a pipe by modelling just the solid part (an extruded ring), or we could define it as a solid cylinder with a cylindrical cavity through it.

Link copied to clipboard
Link copied to clipboard
abstract class CompoundShape2d(dependencies2d: List<Shape2d?>) : Multi2dDependent

The base class for Union2d, Intersection2d and Difference2d.

Link copied to clipboard
abstract class CompoundShape3d(dependencies3d: List<Shape3d?>) : Multi3dDependent

The base class for Union3d, Intersection3d and Difference3d.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class Extrusion(val shape2d: Shape2d, val height: Double, val scale: Vector2, val convexity: Int?) : Shape3d, Shape2dDependent

An extrusion takes a Shape2d, and stretches (extrudes) it upwards (the Z direction). Created via Shape2d.extrude. OpenSCAD calls this linear_extrude.

Link copied to clipboard

Creates a 3D shape from a 2D shape (or many 2D shapes).

Link copied to clipboard

A heuristic, which makes a "best effort" to join the two shapes in a "pleasing" manner, avoiding twists, and broken extrusions where possible.

Link copied to clipboard
class Hull2d(dependencies2d: List<Shape2d>) : Multi2dDependent

See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#hull

Link copied to clipboard
class Hull3d(dependencies3d: List<Shape3d>) : Multi3dDependent
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface JoinStrategy
Link copied to clipboard
class ManualPairing(val pairs: List<Pair<Int, Int>>) : VertexPairing

Pair up the points manually.

Link copied to clipboard

See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#minkowski

Link copied to clipboard

See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#minkowski

Link copied to clipboard
Link copied to clipboard

Similar to OneToOnePairing, except the pairs are offset. So point 0 of shapeA is paired to point offset of shapeB, and point 1 of shapeA is paired to offset + 1 of shapeB etc.

Link copied to clipboard

Assuming shapeA and shapeB are have the same number of points, this pairs the first point of A with the first point of B and so on, in a 1 to 1 fashion.

Link copied to clipboard
Link copied to clipboard
interface PathPairing

Determines how the paths from one Shape2d are mapped to the paths in another Shape2d. Used by Worm to guess how to join to complex shapes (i.e. shapes with holes, or with more than one simple shape)

Link copied to clipboard
Link copied to clipboard
class Projection(val shape3d: Shape3d, val cut: Boolean) : Shape2d, Shape3dDependent

Creates a 2d projection of a 3d shape. If cut is false, then we end up with a "shadow", as if the light source were directly above (to infinity). If cut is true (the default), then the result is the slice through the z=0 plane.

Link copied to clipboard

A solid of revolution built from a 2D shape shape2d. Created via Shape2d.revolve.

Link copied to clipboard
Link copied to clipboard
class STLParser

Parses STL files, and returns a Polyhedron. Note, STL comes in two flavours, binary and text. To distinguish between the two, we check the first 5 bytes, and if it reads solid, then it is assumed to be an ascii file. However, I have seen binary STL files with an (erroneous?) header. In this case, use parseBinaryFile, instead of the more usual parseFile (which attempts to guess the flavour).

Link copied to clipboard

Parses an SVG file (Use the program Inkscape to edit SVG files) This is a Union2d of all shapes within the SVG file.

Link copied to clipboard
class SVGHandler(val scale: Vector2) : DefaultHandler
Link copied to clipboard
class SVGParser
Link copied to clipboard
interface TubeBuilder

Helps Worm determine how points in pairs of paths are joined to form a tube between the two shapes.

Link copied to clipboard
open class Union2d(children: List<Shape2d?>) : CompoundShape2d
Link copied to clipboard
open class Union3d(children: List<Shape3d?>) : CompoundShape3d
Link copied to clipboard
interface VertexPairing

Determines how the vertices of two 2D shapes are to be paired up when making 3d shapes from 2d shapes.

Link copied to clipboard
interface Worm : Shape3d

A Worm is a 3d shape made up of sections, where each section has a 2d shape at each end joined by a tube. The simplest worm is an extrusion, were both ends are the same shape, parallel to the Z=0 plane (the floor), separated by the length of the extrusion.

Link copied to clipboard

Static methods which are automatically imported within FooCAD scripts, which start making Worms from Shape2d.