pub fn containment_lane(face: &FaceRecord) -> Result<ContainmentLane, String>Expand description
Which lane of parameter_point_in_face a face’s questions go to, read off
the face alone — the kernel’s own lane selection, through the same prepared
data the query uses, for a caller that answers some containment questions
ahead of the kernel and must know which rule the kernel applies.
The lanes are tried in this order, and a face is in the first whose gates it passes (each comparand is in the carrier’s parameters unless stated):
SeamBand:closed_directions() == (true, true), and the seam-band preparation reads the face — every loop a collapsed puncture (its trace within1e-3of the domain span in u and in v), one seam-crossing loop unwrapped (unlessSEAM_BAND_MERGED_SWITCH), two loops the seam-band analysis reassembles, or two clean full-wrap rims (a periodic extent of at least0.6period and a cross extent of at most0.05of the cross span each).SphereCap: an analytic sphere closed in exactly u with two loops, each winding one period to within0.05period and the two opposite, one flat (a v extent within1e-6of the v span) at a pole (within1e-6of the v span of a v end).WrappedHorizon: closed in exactly u, at least one loop, neitherHORIZON_CONTAINMENT_SWITCHnor (for one or two loops)HORIZON_SINGLE_LOOP_SWITCH, some loop of three or more samples stepping over the seam (a sample-to-sample u step more than a quarter period from its period-folded value), and no loop winding the period (its unwrapped first and last samples more than a quarter period apart).CoveringRimStrip: closed in exactly u, two loops, notCOVERING_RIM_STRIP_SWITCH, a sample beyond the u domain by more than1e-3period, each loop travelling one period to within2e-2period and closing in v to within1e-3of the v span, opposite directions, v hulls apart by more than1e-6of the v span, and the lower rim travelling +u exactly when the face issame_sense.Generic: everything else.
Sampling is trim_sample_count chords per pcurve at trim_station
(the seam band: 24). Err is the error the face’s first query would
return.
It reads the prepared data of a face a query has prepared, and otherwise prepares what the walk reaches on the side, leaving the thread’s prepared-face cache as it was: asked for every face of a part, it would otherwise push out the faces the queries are using.