MedialAxis

class MedialAxis(val shape: Shape, val nodes: List<Vector2>, val branches: List<MedialAxisBranch>)(source)

The medial axis of shape represented as a graph of branches connecting nodes. Nodes are branch end points (leaves, including convex corners of shape) and junctions. Branches that meet at a node share the node position exactly.

Constructors

Link copied to clipboard
constructor(shape: Shape, nodes: List<Vector2>, branches: List<MedialAxisBranch>)

Properties

Link copied to clipboard
Link copied to clipboard
val contours: List<ShapeContour>

The branch contours, one for every run of the medial axis.

Link copied to clipboard
val nodes: List<Vector2>
Link copied to clipboard
val shape: Shape

Functions

Link copied to clipboard
fun radius(point: Vector2): Double

The radius of the maximal inscribed disk at point, or the distance from point to the boundary of shape.