Module csg

Module csg 

Source
Expand description

CSG (Constructive Solid Geometry) Operations

Fast triangle clipping and boolean operations.

Structs§

ClippingProcessor
CSG Clipping Processor
CsgOpRecord
One recorded invocation of a CSG kernel op (perf-census diagnostics). op: 0=subtract 1=union 2=intersection 3=clip. a_tris/b_tris are the operand triangle counts — the arrangement cost driver — so the census measures the real heavy-path workload reaching the kernel (analytic AABB box clips never get here).
Plane
Plane definition for clipping
Triangle
Triangle definition

Enums§

ClipResult
Triangle clipping result
GroupCut
Outcome of ClippingProcessor::subtract_mesh_many and of ClippingProcessor::subtract_mesh, which is a group of one.
GroupReject
Why a group was not cut. For a group, only InvalidOutput and GateRejected record a crate::diagnostics::BoolFailure: the others are the expected, handled outcome (see ClippingProcessor::subtract_mesh_many). The single cutter records more; see ClippingProcessor::subtract_mesh.

Functions§

calculate_normals
Calculate smooth normals for a mesh.
reset_csg_census
Clear the CSG op census (call before a measured run).
take_csg_census
Drain the CSG op census (call after a measured run).

Type Aliases§

TriangleVec
Type alias for small triangle collections (typically 1-2 triangles from clipping)