Path3d

class Path3d(val points: List<Vector3>, val closed: Boolean)

A list of 3D points (Vector3). This class was first created, so that ExtrusionBuilder could extrude along an arbitrary 3D path.

To construct a Path, consider using Path3dBuilder, which supports straight lines and bezier curves.

Constructors

Link copied to clipboard
constructor(points: List<Vector3>, closed: Boolean)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val size: Int

Functions

Link copied to clipboard
fun extend(by: Double): Path3d

Extends the ends of the path by the given amount. This only make sense for open paths. It can be useful when using an extrusion along a path with a hole through the middle. e.g.

Link copied to clipboard
operator fun get(i: Int): Vector3

Allows array-like access, where the index is rolled around, so that index -1 is the same as size-1 and also index size is the same as index 0 etc. This is particularly useful when you have an index, and want to find the next or previous. You can safely add or subtract without fear of IndexOutOfBoundsExceptions.

Link copied to clipboard

fun roundAllCorners(radius: Double, sides: Int?): Path3d

Note, unlike Shape2d, a Path is not closed, i.e. it is NOT a ring of points

Link copied to clipboard
fun roundCorner(cornerIndex: Int, radius: Double): Path3d
fun roundCorner(cornerIndex: Int, radius: Double, sides: Int? = null): Path3d
Link copied to clipboard