Crate centerline

source ·

Structs

  • 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.
  • bit field defining various reasons for edge/vertex rejection
  • 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.
  • A set of line-strings + an aabb Intended to contain related 3d shapes. E.g. outlines of letters with holes

Enums

Traits

Functions

  • try to consolidate shapes. If one AABB and convex hull (a) totally engulfs another shape (b) we put shape (b) inside (a)
  • Group input edges into connected shapes
  • Calculate an affine transform that will center, flip plane to XY, and scale the arbitrary shape so that it will fill the screen. For good measure the scale is then multiplied by 256 so the points makes half decent input data to boost voronoi (integer input only) ‘desired_voronoi_dimension’ is the maximum 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
  • Calculate an affine transform that will center, flip plane to XY, and scale the arbitrary shape so that it will fill the screen. For good measure the scale is then multiplied by 256 so the points makes half decent input data to boost voronoi (integer input only) ‘desired_voronoi_dimension’ is the maximum 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