Crate centerline

Source

Structs§

Centerline
Center line calculation object. It: * calculates the segmented voronoi diagram. * Filter out voronoi edges based on the angle to input geometry. * Collects connected edges into line strings and line segments. * Performs line simplification on those line strings.
ColorFlag
bit field defining various reasons for edge/vertex rejection
LineStringSet2
A set of 2d LineString, an aabb + convex_hull. It also contains a list of aabb & convex_hulls of shapes this set has gobbled up. This can be useful for separating out inner regions of the shape.
LineStringSet3
A set of line-strings + an aabb Intended to contain related 3d shapes. E.g. outlines of letters with holes

Enums§

CenterlineError
Shape3d
Placeholder for different 3d shapes

Functions§

consolidate_shapes
try to consolidate shapes. If one AABB and convex hull (a) totally engulfs another shape (b) we put shape (b) inside (a)
divide_into_shapes
Group input edges into connected shapes
get_transform
Calculate an affine transform that will center, flip plane to XY, and scale the arbitrary shape so that it will fill the screen. ‘desired_voronoi_dimension’ is the maximum axis length of the voronoi input data aabb boost_voronoi uses integers as input so float vertices have to be scaled up substantially to maintain numerical precision
get_transform_relaxed
Calculate an affine transform that will center, flip plane to XY, and scale the arbitrary shape so that it will fill the screen. ‘desired_voronoi_dimension’ is the maximum axis length of the voronoi input data aabb boost_voronoi uses integers as input so float vertices have to be scaled up substantially to maintain numerical precision