Skip to main content

Module util

Module util 

Source
Expand description

Shared utility functions for the check crate.

Constants§

CLOSED_CURVE_SAMPLES
Number of sample points for closed-curve edges.
OPEN_CURVE_SAMPLES
Number of samples for an OPEN curved edge (arc or marched conic piece) in wire polygons; sized for sub-degree angular steps on typical arcs.

Functions§

expand_aabb_for_surface
Expand an AABB to account for surface curvature that may extend beyond the wire vertices.
face_aabb
Compute the axis-aligned bounding box of a face.
face_polygon
Build a polygon from the outer wire of a face by sampling vertex positions and closed-edge curves.
point_in_polygon_3d
Test whether a 3D point lies inside a 3D polygon by projecting onto the dominant axis plane (the plane most aligned with the polygon normal).
polygon_normal
Compute the normal of a polygon via Newell’s method.
sample_edge_curve
Sample a closed-edge curve at n evenly spaced parameter values.
wire_polygon
Build a polygon from a wire by sampling vertex positions and closed-edge curves.