Skip to main content

loop_self_crossings

Function loop_self_crossings 

Source
pub fn loop_self_crossings(solid: &BrepSolid) -> LoopCrossingReport
Expand description

Does any face’s trim loop cross ITSELF in its own parameter domain — a bowtie?

This is the defect every other detector in this module is blind to by construction (see the blind-spot section of the module docs): the crossing is INSIDE one face, so there is no face pair to confirm; the incidence in the record is perfect, so validate() is silent; the counts are unchanged, so parity and connectivity are unchanged. The face’s own AREA is the only other tell, and nothing compares it to anything.

The loop is sampled at exactly the density crate::parameter_point_in_face’s generic lane classifies against (trim_sample_count), lifted into the covering plane a coedge at a time, and swept for chord pairs that cross. Chords the CHAIN joins are skipped by index, never by proximity: a loop that runs back over its own last vertex is a finding, not an adjacency.

Reported once per crossing COEDGE PAIR per loop — the stable half, since a denser sampling moves a crossing’s uv without changing which two trims cross. Nothing in the kernel’s build path calls this; the blend acceptance and the case gate are its callers.