Expand description
Geometry layer of the BREP kernel: vectors, tolerances, diagnostics, NURBS curves and surfaces, projection and intersection.
It is one of the implementation crates the kernel is built from. Applications
should depend on BREP_kernel, which
re-exports the public API of every kernel crate at its root (brep_kernel::…)
and adds the feature pipeline and the STEP, IGES, Parasolid (import), 3MF,
GLB, STL and OBJ exchange.
Many items here are public only so the other kernel crates can reach them;
those are hidden from the documentation and carry no stability promise beyond
the kernel’s own. The kernel crates are released together, at one version.
It contains:
- vectors, tolerances, diagnostics, runtime switches and text helpers;
- exact rational NURBS curves and surfaces, curve and surface fitting, Coons and Gordon surfaces;
- analytic carrier recognition (plane, cylinder, cone, sphere, torus) and sphere charts;
- point projection onto curves and surfaces;
- curve/curve, curve/surface and surface/surface intersection, tangent curves and crossing nodes;
- bounding boxes and bounding-volume hierarchies, planar segment arrangements and polygons;
- p-curves and offset-point evaluation;
- small linear-algebra helpers, union-find, and the work-count and timing instruments the kernel reports.
Kernel crates it requires: BREP_RANSAC. It is required by BREP_topology, BREP_surface_offset, BREP_boolean, BREP_solvers, BREP_construction, BREP_blend, BREP_offset, BREP_direct_edit, BREP_kernel.
§Building
The crate builds natively and for wasm32-unknown-unknown. The parallel
feature runs some per-face loops on rayon; profile-wall turns on a diagnostic
wall-time partition. Both are off by default, and BREP_kernel forwards them.
The packaged crate ships the library sources, the README, the licence and the manifest; it carries no test suite.
§License
The Autodrop3d licence in LICENSE.md, shipped in the crate (license-file in
the manifest). Source: https://github.com/mmiscool/next.BREP.io_RUST_BREP_KERNEL
Macros§
- debug_
flag - One debug, trace or
BREP_NO_*flag (consolidation S1): on when its variable is set to anything but0,offorfalse.debug_flag!(live "BREP_X")reads it on every call. - env_
read - One environment variable read through its call site’s once-cell
([
env_read::read], lane O row 19):std::env::var(name).ok()as anOption<Cow<str>>, kept for the process whenBREP_ENV_READ_ONCEis on. Only for variables nothing sets at run time. - mode_
switch - One
0|off / check / onmode (consolidation X1): an [env_read::Mode]; unset,Onwhendefault_onandOffotherwise.mode_switch!(live "BREP_X", default_on)reads it on every call. - profile_
line eprintln!for aBREP_PROFILEline: buffered while a [profile::ProfileSink] is open (consolidation I8).- switch
- One on/off switch (consolidation S1):
switch!("BREP_X", default)readsBREP_Xthrough its call site’s once-cell ([env_read::switch], kept for the process whileBREP_ENV_READ_ONCEis on);switch!(live "BREP_X", default)reads it on every call, for a variable a probe sets at run time. One grammar (owner decision 2026-11-01):0|off|falseoff,1|on|trueon, unset or anything else the default. In the kernel’s tests one keyed override (env_read::with_switch_for_test) forces either form.
Structs§
- Aabb
- Approximation
- A MEASURED approximation a SUCCESSFUL result carries: the result stands, and this says by how much, and why, it is not exact. Distinct from a refusal (the result does not stand) and from a fulfilment (what was done of what was asked) — the typed-refusal plan’s third kind of report.
- Approximation
Budget - The spent budget of an unmet construction request, typed: why refinement stopped, and the rounds and stations it used against their limits.
- Arrangement
Piece - Arrangement
Region - Bezier
Triangle - A (rational) triangular Bézier patch.
- Bvh
- Static BVH over per-item boxes; queries return indices into the slice the tree was built from.
- Chart
- One cube-face chart:
direction(s, t) = normal + s·tangent_s + t·tangent_t, withtangent_s × tangent_t = normal, so∂p/∂s × ∂p/∂tpoints OUT of the sphere everywhere on the chart. - Chart
Segment - One piece of a trim polyline, already confined to a single chart.
- Compat
Work - What a compatibility pass had to do to one curve. Reported, never inferred: a caller that promises “bit for bit” needs to see a zero here.
- Coons
Report - What the constructor had to do, and what it measured doing it.
- Curve
Curve Intersection - Curve
Projection - Curve
Surface Intersection - Cycle
Use - Deform
Pick - One interpolation pick.
- Deform
Result - A deformed surface and what the solve measured.
- Deform
Spec - Diagnostic
Event - Gordon
Report - What the constructor had to do, and what it measured doing it.
- Image
Curve - The 3D image of a pcurve on a surface, plus the parameter range that matches the pcurve’s own domain fraction for fraction.
- Kernel
Diagnostics - Kernel
Outcome - Kernel
Refusal - A kernel REFUSAL: the fail-safe contract’s carrier. The kernel never
degrades a result; where it cannot certify one it refuses, and this is the
refusal — a closed
RefusalClassthat consumers dispatch on (the boolean’s perturbation-retry gate, the CI baseline’s per-class diff), the stage that minted it, and the human text, whichDisplayprints verbatim so every message a user or a test saw before typing is unchanged. - Kernel
Tolerances - Ordered accuracy targets plus deliberately separate geometric search radii.
- Knot
Vector - Measured
Tolerance - A deviation measured between a constructed entity and the geometry that entity was built to reproduce, recorded next to the derived band it was judged against.
- Mesh
- NSided
Report - What an N-sided fill built and measured.
- Nurbs
Curve - A rational B-spline curve.
- Nurbs
Surface - A rational B-spline surface.
- OffCarrier
Edge - One edge whose built curve stands off one of its carriers, as an
Approximationnames it. - Offset
Evaluator - The pointwise offset evaluator, bound to one carrier and one orientation convention.
- Offset
Sample - One evaluation of the offset: the source point, the unit normal the offset rides, and the offset point itself.
- Pcurve
Fit - A fitted pcurve with what the fit achieved.
- Pcurve
FitLedger - Per-operation tally of pcurve fits and how many missed their floor.
- Pcurve
FitReport - What a pcurve fit ACHIEVED, returned beside the curve so a ceiling exit can never be mistaken for a met floor.
- Pcurve
FitScope - An open tally of the pcurve fits made on this thread — see
PcurveFitLedger. Open it where an operation starts,closeit where the operation returns its diagnostics; a?that unwinds past it drops the tally. - Pole
Support - One control point’s support, as
deform_surface_whereshows it. - Polyline
Fit - Polyline
FitLedger - Per-operation tally of polyline fits and how many missed their tolerance.
- Polyline
FitReport - What a polyline fit ACHIEVED, returned beside the curve so a budget exit can never be mistaken for a met tolerance.
- Polyline
FitScope - An open tally of the polyline fits made on this thread — see
PolylineFitLedger. Open it where an operation starts,closeit where the operation returns its diagnostics; a?that unwinds past it drops the tally. - Recognized
Circle - Regularity
Report - What a certificate cost: Bézier pieces, boxes judged, C0 knot lines checked.
- Revolution
Frame - Revolution
Structure - Frame, generatrix, and sweep of any surface built by
make_revolution(full or partial), validated by exact reconstruction. UnlikeAnalyticSurfacethis does not require the generatrix to be a line or classic quadric profile. - Ribbon
Report - The measured continuity of a ribbon patch. Read
Self::cross_derivative_residualbefore calling anything G1: it is the number that says whether the prescribed cross-derivative field was actually met. - Segment2
- Span
Hull Set - A carrier in Bezier form with its span hulls, built once per face so a
face tested against many others (
hull_sets_proved_apart) converts once. - Sphere
Atlas - A sphere’s pole-free cube atlas: centre, radius, and the right-handed basis the six charts are built on.
- Spherical
Region - The trim of a spherical face, as directed boundary arcs on the unit sphere, ready to classify points without touching any chart or parameter domain.
- Surface
Intersection Curve - Surface
Intersection Options - Surface
Projection - Surface
Tie - Surfaces
aandbshare their boundary sidesside_aandside_b;reversedwhen the two sides run opposite ways along the edge. - TAnchor
- One anchor: its index-space position and its local knot vectors, given
as index lines (
d + 2each, increasing) into the global knots. - TMesh
- A validated analysis-suitable T-mesh with its anchors.
- TSpline
- A rational T-spline surface on an analysis-suitable T-mesh.
- Tangent
Contact - A tangential contact between two carriers, refined onto the contact and classified by the rank of the height-difference Hessian there.
- Tied
Result - Tied
Surface - One surface of a tied deformation: its picks, holds and room in
spec(picks may be empty), and which of its control points may move. - Triangle
Piece - One tensor patch of a conversion and the bilinear map from its
(s, t)unit square into the triangle: barycentric corners[Q00, Q10, Q01, Q11],φ(s, t) = (1−s)(1−t)Q00 + s(1−t)Q10 + (1−s)t Q01 + st Q11. - Union
Find - Deterministic union-find (smallest index wins as representative).
- Vec2
- Vec3
- Vec4
Enums§
- Analytic
Surface - Backing
- What a refusal’s evidence establishes about the claim every refusal
judges: “this input has a result the kernel can certify”. A refusal is
either REFUTED — a witness in the input itself disproves the claim, and no
re-run of the construction can change that — or UNDECIDED — the
construction failed to certify and the input has not been shown to be at
fault. Retry policy reads this, never a list of variants: a refuted claim
is never retried, and only one undecided cause is one a perturbation
addresses (
UndecidedCause::Degeneracy). - Bezier
Triangle Refusal - Why a triangle patch or one of its operations was refused.
- Budget
Mechanism - The budget mechanism an
ApproximationBudgetcounts. - Budget
Reason - Why a construction request stopped short of what it asked.
- Chart
Side - Which side of a chart square a cube edge is: the chart’s other coordinate runs along the edge.
- Coons
Refusal - A Coons constructor’s refusal, with the measurement that caused it.
- Deform
Refusal - Deform
Side - The four sides, in the order
DeformSpec::holdlists them. - Diagnostic
Severity - Edge
Hold - What a boundary side keeps.
- Edge
Origin - Extend
Refusal - Why a natural extension produced nothing. Each variant carries what was measured, so a caller can report the number rather than the verdict.
- Gordon
Refusal - A Gordon constructor’s refusal, with the measurement that caused it.
- Image
Curve Tier - Which lane produced an
ImageCurve. - Irregularity
- Why a surface is not certified regular. Points are in the surface’s own parameters.
- Kernel
Stage - Knot
Direction - Which parameter direction a knot is inserted in.
- Knot
Refinement Refusal - Why a knot refinement was refused. The surface is never changed in part.
- Measured
Component - What a request report’s
measuredvalue is the reading of. - NSided
Refusal - Why an N-sided fill was refused.
- Offset
Normal - Which unit normal the offset rides, and how it is recovered where the parametric normal degenerates.
- Pcurve
FitExit - Why a pcurve refinement stopped. Only
PcurveFitExit::Convergedmeans the floor was met; every other variant is a BUDGET exit, and the report’s residual was measured on the returned curve rather than assumed. - Polyline
FitExit - Why a polyline fit’s refinement stopped. Only
PolylineFitExit::Convergedmeans the tolerance was met; every other variant is a BUDGET exit whose deviation was measured on the curve actually returned. - Refusal
Class - The closed set of refusal classes. Dispatchers match on it exhaustively; adding a variant is a deliberate taxonomy change, never a message edit.
- Ruled
Gate - Which predicate admits a general revolution’s generatrix as the straight
line of a cone, frustum or cylinder in
intersect_analytic_pair. - Soundness
Defect - What the soundness scan found in a result it refused.
- Surface
Side - Which boundary of the parameter square an extension grows from.
- TMesh
Segment - A straight run of T-mesh edges in index space, end indices inclusive.
- TSpline
Refusal - Why a T-mesh or T-spline was refused.
- TieContinuity
- What a tie kept across its edge.
- Triangle
Side - Which side of the triangle: the side opposite the named corner.
- Undecided
Cause - Why an undecided refusal is undecided — what the evidence lacked. The boolean’s Simulation-of-Simplicity retry acts on exactly one of these.
- Weight
Site - Where a non-positive weight was found.
Constants§
- CHART_
COUNT - Charts in the atlas: one per cube face.
- CUBE_
CORNER_ COUNT - Cube corners, each shared by exactly three charts and three cube edges.
- CUBE_
EDGE_ COUNT - Cube edges, each shared by exactly two charts.
- EXTENDED_
RANK_ FLOOR - Smallest
min|λ| / κofH = II_a − II_bat which the contact counts as an isolated node or point rather than EXTENDED alongH’s null direction. The same numbercsg/imprint/tangent_contact.rsreads: genuine nodes measure0.7..1.0, extended contacts1e-15and below, so this is a rank test, not a tolerance band. - KNOT_
DEDUP_ EPS - Numerical knot DEDUP epsilon (parameter-space): the tighter floor used when
counting distinct knots (SSI/CSI
interior_knot_count) or comparing whole knot vectors for exact reconstruction (analytic surface recognition). This answers “are these two knot floats the same value?”, NOT “are these the same knot for snapping?” — so it stays at 1e-12 and must NOT be unified with the looserKNOT_IDENTITY_TOL. - KNOT_
IDENTITY_ TOL - Knot IDENTITY tolerance (parameter-space): two knot parameters within this
absolute band are treated as the SAME knot for snapping — insert_knot,
NurbsCurve::split, monotonicity and clamp checks. This is the single source for the “absolute 1e-9 knot tolerance” thatsplitenforces and that imprint’s trim guards mirror. Distinct in PURPOSE (not just value) fromKNOT_DEDUP_EPS; the two are deliberately NOT unified. - MAXIMUM_
FOLD_ ANGLE - The largest angle the extension’s cross-boundary tangent may turn through before the extension is called a FOLD. π/2 is the sign change: past it the extension has stopped going outwards and is doubling back over the patch it came from, which is never a usable carrier.
- MAXIMUM_
GROWTH_ RATIO - The largest the appended strip may be, as a multiple of the surface’s own
3D extent in the direction being extended: the extension may not be longer
than the surface it continues. A polynomial extrapolated by a fraction
rof its own span diverges liker^degree, so this is a backstop and not a quality bar — callers that need a trustworthy extension ask for a small increment and check the result, they do not lean on this limit. - MAX_
FIT_ STATIONS - Absolute station ceiling, whatever the caller’s budget.
- OFFSET_
CONSTRUCTION_ FLOOR - Absolute floor of
offset_construction_band, so a vanishingly small part is not held to a band below the arithmetic that builds it. - OFFSET_
CONSTRUCTION_ REL - Fraction of the local characteristic length an APPROXIMATE offset
construction may deviate from the exact geometry it approximates — see
offset_construction_band. - PCURVE_
OFF_ BAR - The refusal every station builder returns for a fit off its bar.
- PCURVE_
REFINEMENT_ TOLERANCE - The 3D residual a pcurve’s image must reach before
build_pcurve_on_surfaceaccepts it, and the sample ceiling it refines up to. - RIGID_
TOL - Shared rigidity band for component and STEP placements.
- TRANSVERSE_
SEED_ CROSS - [
TRANSVERSE_START_CROSS] under its crate-wide name: the bound at which a contact stops being a graze and becomes a crossing.csg::imprint’s tangential-only gate asks the same question of a marched point, and must ask it with the same number the seeds were accepted by. - VERTEX_
MATCH_ FLOOR - Absolute floor (mm) of the edge-endpoint-vs-vertex identity band used by
BrepSolid::validate: below this a curve end and its topological vertex ARE the same point (vendor export precision), above it the model is asked to state the meeting exactly. - VOLUME_
DRIFT_ ABS - Absolute floor of the volume drift band, see
VOLUME_DRIFT_REL. - VOLUME_
DRIFT_ REL - Relative volume drift between two measurements of the same body that is
still the same answer: the case gate’s band between a replay and its
baseline (
examples/case_replay.rs), and the perturbation rescue’s bar for a rung against the exact lane’s inclusion–exclusion identity (csg::boolean::perturbation_retry). One number, so the rescue can never accept a body the gate would call a different one. It only absorbs last-bit summation noise.
Traits§
- OrRefuse
- Mechanical conversion of a stringly LOWER-layer error consumed inside a
typed stack (geometry evaluation, tolerance policy checks): the text is
kept and the refusal is classed
Internalunderwhatatstage. This is a constructor at the consuming site, not a blanketFrom. - Solid
Scale - A body whose size sets its tolerance bands; the topology layer implements it for
BrepSolid.
Functions§
- affine_
image_ curve - Exact 3D image of a pcurve on an AFFINE sheet: an affine map applied to the homogeneous control points commutes with the rational evaluation, so the image shares the pcurve’s degree / knots / weights and is parametrized identically — a rational circle pcurve maps to the exact 3D circle.
- arrange_
segments - build_
pcurve_ on_ surface fit_pcurve_on_surfacefor the callers that only need the curve. The report is not dropped: it is tallied on the openPcurveFitScope, if any, so the operation that owns this fit can say in its diagnostics whether every trim reached the floor.- build_
pcurve_ on_ surface_ marched fit_pcurve_on_surface_marchedfor the callers that only need the curve; the report is tallied on the openPcurveFitScopeexactly asbuild_pcurve_on_surfacedoes.- build_
pcurve_ on_ surface_ range fit_pcurve_on_surface_rangefor the callers that only need the curve: the fit is ACCEPTED or REFUSED on its bar (accept_fit), never returned off it.- build_
pcurve_ on_ surface_ range_ dense fit_pcurve_on_surface_range_densefor the callers that only need the curve, accepted or refused on its bar (accept_fit).- build_
pcurve_ on_ surface_ stations fit_pcurve_on_surface_stationsfor the callers that only need the curve, accepted or refused on its bar (accept_fit).- canonicalize_
points - Collapse points that are the same point to ONE value.
- carrier_
preview_ patch - Diagnostic “carrier preview” patch (§3.15 applied to display): re-express
the surface over an INFLATED domain so an inspector can show where the
carrier continues beyond the face’s trim. Open directions inflate about
the domain centre by
inflate(a factor; 1 = unchanged), evaluated throughevaluate_extended— exact linear extension for affine carriers, ruled/tangent extension generally. CLOSED (periodic) directions keep the stored full period instead of inflating — wrapping further would overlap the surface onto itself. A torus (closed both ways) returns unchanged. - carriers_
proved_ apart - Whether two carriers are PROVED apart by more than
margin: every pair of knot spans, one of each, is separated by its control hulls’ boxes or by a plane square to either span’s corner normal or to the line between the hulls’ centroids (a span lies in its control hull, so hulls apart bymarginalong any direction are surfaces apart). A span pair no direction separates is read again on both carriers with every span halved (exact knot insertion), its children only, up to three times while at most 64 pairs remain.falsewhen anything cannot be read, the span count is large, or a pair is still not proved apart: the march then runs as before. - certify_
regular - Certify
surfaceregular (see the module notes), or name where it fails. - chart_
grid_ divisions - Divisions across a chart square (90°) at
chord_tolerance. - chart_
grid_ parameters - The interior grid of a chart square, in the chart coordinate
s(ort). - circle_
angle_ to_ parameter - Parameter of the standard tangent-intersection rational quadratic arc
construction (
make_arc/make_revolution): a sweep split uniformly intospanssegments, each with middle weight cos(segment/2). Maps an angle in [0, sweep] to the curve parameter in [0, 1] exactly. - circumcenter
- circumcenter_
2d - Circumcenter in a plane, with a scale-relative degeneracy guard.
- classify_
tangent_ contact_ at - Refine
witnessonto the tangential contact of the two carriers and classify it.Nonewhen the witness is not near any contact (the refinement leaves a residual abovetolerance) or the carriers have no curvature to classify by (two planes). - closest_
point_ on_ triangle - Ericson Voronoi-region closest point, including degenerate triangle edges.
- coons_
bilinear - The bilinearly blended Coons patch through four boundary curves given in cyclic order.
- coons_
bilinear_ reported coons_bilinearplus theCoonsReportof what it did and measured.- coons_
with_ ribbons - The Coons patch through four boundaries that also interpolates the prescribed cross-boundary derivative fields.
- corner_
index - Canonical index of the cube corner with the given per-axis signs.
- crossing_
node_ split_ enabled - Is the crossing-node split on (
BREP_SSI_NODE_SPLIT, default on;=0off)? - cube_
edge_ corner - The corner at the
q = +1(positive_end) orq = -1end of a cube edge. - cube_
edge_ divisions - Divisions per cube edge that hold the chord sag of a
radiussphere underchord_tolerance. A chord subtendingθsagsradius·(1 − cos(θ/2)), soθ = 2·acos(1 − tolerance/radius); the edge arc is2·atan(1/√2)long. - cube_
edge_ index - Canonical index of the cube edge whose VARYING axis is
varyingand whose two other axes(varying+1) % 3and(varying+2) % 3are pinned to the given signs. Twelve edges: three varying axes times four sign pairs. - cube_
edge_ parameters - The shared subdivision of EVERY cube edge, in the edge parameter
q ∈ [-1, 1]. - cube_
edge_ parts - Inverse of
cube_edge_index:(varying axis, sign of (v+1)%3, sign of (v+2)%3). - curve_
model_ scale model_scaleof a curve, sampled uniformly over[t0, t1].- deform_
surface - Deform
surfaceasspecasks. The input is never changed. - deform_
surface_ where deform_surfacewhere, besides the held sides, a control point may move only whenmay_moveaccepts its support. A point of the surface depends only on the poles whose supports contain it (and on a support’s side only to the side’s vanishing order), so holding every pole whose support meets a region keeps the surface identical there to every order, and admitting one that only touches the region on a side of vanishing order 2 keeps the surface’s points and tangent planes there.- deform_
surfaces_ tied - Deform
surfacestogether underties. Every surface comes back on its prepared (elevated, split, merged) net; a tie’s two boundary rows come back identical, and tangent-continuous where the base edge was. - find_
tangent_ contact - Find a tangential contact between two carriers without a witness: grid the first carrier, project each sample onto the second, rank the samples by their distance and the angle between the normals, and refine the best few onto the contact. The grid is then repeated from the second carrier, so a contact one carrier samples poorly is still reached from the other.
- fit_
pcurve_ on_ surface - Build a parameter-space curve for a 3D curve lying on a surface, and say what the fit achieved.
- fit_
pcurve_ on_ surface_ marched - SECTION-PCURVE SEEDED MARCH (t222: cone × ABC 00000327, non-integral genus).
- fit_
pcurve_ on_ surface_ range - Build a pcurve for a represented subrange of a larger edge curve.
- fit_
pcurve_ on_ surface_ range_ dense - Range fitter with explicit sampling knobs, reporting what the fit achieved.
fit_pcurve_on_surface_rangekeeps the long-standing (base 64, 3 refinement rounds, 513 cap) budget; a fit that binds at that cap with the bar unmet grows once toPCURVE_RAISED_SAMPLES(fit_pcurve_on_surface_stations). - fit_
pcurve_ on_ surface_ stations - The body of
fit_pcurve_on_surface_range_dense, parameterized by the 3D station the pcurve must pass through at each coedge fraction instead of by an edge curve and a range. - fit_
polyline - Interpolate a curve through a polyline and REFINE it until the curve itself
is within
toleranceof that polyline. - fit_
polyline_ at - Fit ONE rung at the given station budget and measure it — no refinement.
- fit_
polyline_ of_ degree fit_polylinewith the GLOBAL lane’s interpolation degree chosen by the caller (the local lane is cubic Hermite whatever is asked). A marched section’s stations lie on both carriers to the march’s residual, and a degree-pinterpolant through them errs by O(h^(p+1)) between stations: onBadBoolean’s sphere×bore rim at its own 135 stations the cubic sits 2.5e-7 off a carrier with a mean signed bias of −1.2e-8, the quintic 8.5e-9 and +6e-11 — the SAME stations, knots and control-point count, so nothing downstream that samples per knot pays for it (2026-09-27).- gordon_
surface - The Gordon surface through two crossing curve families, judged against the kernel’s vertex identity band.
- gordon_
surface_ reported gordon_surfacewith a caller-stated crossing band, plus theGordonReportof what it did and measured.- hull_
sets_ proved_ apart carriers_proved_aparton two prepared hull sets.- image_
curve - Build the 3D image of an ARBITRARY pcurve on
surface. - image_
curve_ pair - The images of ONE pcurve on TWO surfaces, guaranteed to share a basis.
- interpolate_
curve - Global B-spline interpolation (The NURBS Book A9.1) through
pointsat the supplied strictly increasingparameters. - interpolate_
curve_ closed - interpolate_
curve_ local - interpolate_
curve_ thinned - interpolate_
curve_ with_ end_ tangents - Cubic interpolation with PRESCRIBED end derivatives (Piegl–Tiller §9.2.2): n+1 points plus two tangent rows give n+3 clamped control points. The derivative conditions use the exact clamped end forms C’(t0) = p/(u_{p+1}−t0)·(Q1−Q0) and C’(t1) = p/(t1−u_{m−p−1})·(Qn−Qn−1), so the requested tangents are reproduced exactly — the §5.8 loft tangency building block.
- intersect_
analytic_ pair - Exact intersection curves for recognized analytic pairs, or
Nonewhen the pair is not handled and the caller must fall back to SSI marching.Some(vec![])means “provably empty” and skips marching entirely. - intersect_
analytic_ pair_ with intersect_analytic_pairunder a named generatrix gate — what the fit census asks of the gate the boolean does NOT run.- intersect_
curve_ surface - intersect_
curves - intersect_
surfaces - intersect_
surfaces_ supplemental - Gated supplemental SSI detector for a pair the coarse pair-classifier
culled as “tangential-only” (
NearTangent+tangential_only). - make_
arc - make_
box - make_
circle - make_
cone_ surface - make_
cylinder - make_
cylinder_ surface - make_
extrusion - make_
hyperbola - Exact arc of the hyperbola branch x²/a² − y²/b² = 1, x > 0 in the local
frame (center at the origin,
major_axis= +x,minor_axis= +y), parametrized P(t) = (a·cosh t, b·sinh t) and trimmed to t ∈ [t0, t1]. A single rational quadratic Bézier is exact for any sweep on one branch: endpoints on the curve, middle control point at the intersection of the end tangents, and middle weight cosh((t1−t0)/2) chosen so the shoulder point lands back on the branch. Only the point set is hyperbola-exact away from the ends; the NURBS parameter coincides with the hyperbolic parameter t exactly at t0, (t0+t1)/2 and t1. - make_
line - make_
parabola - Exact parabola segment y² = 4·focal·x in the local frame (vertex at the
origin,
axis= +x,latus_direction= +y), parametrized the standard way P(t) = (focal·t², 2·focal·t) and trimmed to t ∈ [t0, t1]. A parabola segment is a plain quadratic polynomial in t (all weights 1), so a single degree-2 Bézier over the knot span [t0, t1] reproduces both the point set AND the parametrization exactly — no fitting, and evaluate(t) == P(t) for every t, not just at the ends. - make_
plane - make_
revolution - make_
revolution_ one_ span make_revolutionwith the turn in ONE rational quadratic span (middle weight cos(theta/2)) forthetaunder 180 degrees, wheremake_revolutionsplits past 90. Its circles then run at the parameter of a one-conic arc of the same turn, so an edge built that way lies on an iso line of it. Up to 90 degrees the two are the same surface.- make_
sphere_ surface - make_
sphere_ surface_ framed - A sphere with BOTH halves of its frame chosen: the polar axis (where the two
degenerate poles sit) and the SEAM direction (where the
u = 0meridian runs).seam_directionis Gram-Schmidt’d against the axis;None— and a seam parallel to the axis, which names no meridian — falls back toVec3::perpendicular, i.e. exactly whatmake_sphere_surfacebuilds. - make_
torus_ surface - model_
scale - The kernel’s single definition of a model’s characteristic length: the bounding-box diagonal of a point set.
- n_
sided_ fill - Fill the closed loop
sides(3 to 6 curves, in order round the loop, either way along each) withNfour-sided patches. - n_
sided_ fill_ centre_ solved n_sided_fillwith the centre’s height chosen to make the centre twists agree. The centre lies on the line from the midpoints’ mean to the mean of the midpoints shot along their spokes’ directions. The plain fill takes the middle of that line. Here the point is chosen where the least-squares misfit of the centre-twist system is least: a coarse scan, then golden sections. With an even number of sides that system has an exact solution only for one height, and anywhere else its misfit is a crease along the spokes. This is the fill for a set-back corner, whose six sides alternate between round sections and flat curves.- n_
sided_ fill_ shortening_ reach n_sided_fillwith each corner-twist bump along a side with a prescribed tangent reaching only as far as keeps the field’s own across component (seefill): the retry for a fill whose patch folds beside a side where the two twists at its corner disagree by far more than that component.- n_
sided_ fill_ shortening_ reach_ spokes_ off_ sides n_sided_fill_shortening_reachwith each spoke also leaving a side with a prescribed tangent at least 15 degrees off it: the second retry, for a fill whose patches part beside a spoke that leaves nearly along its side.- n_
sided_ reentrant_ corners - The re-entrant corners of a loop of 3 to 12 curves given in order round
it, either way along each (corner
kis where sidekstarts, after orienting head to tail from side 0). A boundary fill uses it to send a four-sided loop with a re-entrant corner ton_sided_fill. - offset_
construction_ band - The band an approximate offset construction is judged against: 0.05% of the
caller’s local characteristic length, floored at
OFFSET_CONSTRUCTION_FLOOR. - plane_
ruled_ section_ arc - The EXACT arc of
plane ∩ ruled revolutionspanning a given AZIMUTH range about the carrier’s own frame — the arc-restricted, seam-anchorable form of the full sectionsintersect_plane_quadricreturns. - point_
in_ polygon - project_
point_ to_ curve - project_
point_ to_ surface - The point of
surfacenearestpoint, over the surface’s whole domain. - project_
point_ to_ surface_ seeded - Project a point onto a surface starting Newton from an explicit
(u, v)guess, WITHOUT the global grid seed. This is a footpoint refiner for continuity-preserving curve-on-surface tracing: seeding each edge sample from its neighbour’s parameters keeps the fit on ONE branch of a surface that folds back over the small trimmed patch, where an independent global search would snap to whichever fold is momentarily closest and tear the pcurve into a self-crossing zig-zag. The caller compares the returneddistanceagainst the global answer and only adopts this result when it is geometrically just as valid, so a bad seed can never make a fit worse. - recognize_
circle - Sampled circle recognition; this does not certify exact NURBS equivalence.
- report_
scale_ migration - Migration diagnostic for the one-
model_scalechange (slice 0). - revolution_
structure - ruled_
gate - The gate the boolean runs: straightness, which is all the section
constructions read. The count proxy declined a knot-refined, degree-elevated
or re-weighted generatrix of the same cone and sent the pair to the marcher.
Escape hatch for measurement:
BREP_RULED_GATE_GEOMETRY=0runs the count gate. - ruled_
gate_ census - CENSUS ONLY (
BREP_FIT_CENSUS=1): a description ofsurface’s generatrix when it is a general revolution the two generatrix gates answer differently,Noneotherwise. - segment_
intersection - separation_
prefilter_ enabled - The knot-span leaves of a carrier (A4): one per non-empty span pair, each
boxed by the
(p+1)×(q+1)control points that influence it. A net whose span structure cannot be read is one leaf, the whole box.BREP_SSI_SEPARATION_PREFILTER(default on,0off): the boolean imprint culls a face pair whose carriershull_sets_proved_apartbefore its classification and seeding. - simplify_
polyline - simplify_
polyline_ indices - Douglas–Peucker against
tolerance, as INDICES intopoints. - solve_
banded - solve_
dense - split_
at_ crossing_ nodes - Split
curvesat every passage through a crossing node of the two carriers. Returns the curves (unchanged when no node is found) and the points of the nodes a branch was cut at. - trace_
tangent_ curve - March the tangent curve through an EXTENDED contact, both ways from the
contact point, and return it typed as a tangent section.
Nonewhen the contact is not extended (an isolated node or point has no curve to march). - uniform_
clamped_ knots - vertex_
tolerance_ from_ edges - Propagate measured tolerances up one level of the entity hierarchy: from a vertex’s incident edges (and the gaps between their ends and the vertex point) to the vertex itself.