Companion

object Companion

Functions

Link copied to clipboard
fun cone(base: Shape2d, height: Double): Shape3d

An extrusion which tapers to a point. A similar effect can be achieved by using Shape2d.extrude using a scale of 0. However, this is slightly different, because the apex will always be on the Z axis.

An extrusion which tapers to a point. A similar effect can be achieved by using Shape2d.extrude and using a scale of 0. However, the apex can be offset anywhere you like, it doesn't have to be in the center of the shape.

A convenient version of cone (Shape2d,Vector3)

Link copied to clipboard
fun drum(bottom: Shape2d, top: Shape2d, height: Double): Shape3d

An extrusion where the top and bottom shapes can be different. The ends are parallel to each other.

Link copied to clipboard
fun extrude(profile: Shape2d, height: Double): Shape3d
fun extrude(profile: Shape2d, height: Double, convexity: Int?): Shape3d
Link copied to clipboard
fun followPath(path: Path3d, crossSection: Shape2d): Polyhedron
fun followPath(path: Path3d, profile: Shape2d, autoScale: Boolean, convexity: Int?): Polyhedron

fun followPath(path: Path3d, profile: Shape2d, autoScale: Boolean): Polyhedron

Extrude profile, but instead of it heading straight up the Z axis, it follows the 3D path.

Link copied to clipboard
fun followShape(curve: Shape2d, crossSection: Shape2d): Shape3d

Extrude crossSection, but instead of it heading straight up the Z axis, it follows the curve shape. Equivalent to :

fun followShape(curve: Shape2d, profile: Shape2d, autoScale: Boolean): Shape3d

fun followShape(curve: Shape2d, profile: Shape2d, autoScale: Boolean, convexity: Int?): Shape3d

Extrude profile, but instead of it heading straight up the Z axis, it follows the curve shape.

Link copied to clipboard
fun thread(profile: Shape2d, length: Double, radius: Double, pitch: Double, sides: Double): Polyhedron

fun thread(profile: Shape2d, length: Double, radius: Double, pitch: Double, sides: Double, leadInAngle: Double, leadOutAngle: Double): Polyhedron

Creates a thread shape. Wrap it around a cylinder to form a bolt.