Skip to main content

Crate brep_geometry

Crate brep_geometry 

Source
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 but 0, off or false. 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 an Option<Cow<str>>, kept for the process when BREP_ENV_READ_ONCE is on. Only for variables nothing sets at run time.
mode_switch
One 0|off / check / on mode (consolidation X1): an [env_read::Mode]; unset, On when default_on and Off otherwise. mode_switch!(live "BREP_X", default_on) reads it on every call.
profile_line
eprintln! for a BREP_PROFILE line: buffered while a [profile::ProfileSink] is open (consolidation I8).
switch
One on/off switch (consolidation S1): switch!("BREP_X", default) reads BREP_X through its call site’s once-cell ([env_read::switch], kept for the process while BREP_ENV_READ_ONCE is 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|false off, 1|on|true on, 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.
ApproximationBudget
The spent budget of an unmet construction request, typed: why refinement stopped, and the rounds and stations it used against their limits.
ArrangementPiece
ArrangementRegion
BezierTriangle
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, with tangent_s × tangent_t = normal, so ∂p/∂s × ∂p/∂t points OUT of the sphere everywhere on the chart.
ChartSegment
One piece of a trim polyline, already confined to a single chart.
CompatWork
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.
CoonsReport
What the constructor had to do, and what it measured doing it.
CurveCurveIntersection
CurveProjection
CurveSurfaceIntersection
CycleUse
DeformPick
One interpolation pick.
DeformResult
A deformed surface and what the solve measured.
DeformSpec
DiagnosticEvent
GordonReport
What the constructor had to do, and what it measured doing it.
ImageCurve
The 3D image of a pcurve on a surface, plus the parameter range that matches the pcurve’s own domain fraction for fraction.
KernelDiagnostics
KernelOutcome
KernelRefusal
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 RefusalClass that 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, which Display prints verbatim so every message a user or a test saw before typing is unchanged.
KernelTolerances
Ordered accuracy targets plus deliberately separate geometric search radii.
KnotVector
MeasuredTolerance
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
NSidedReport
What an N-sided fill built and measured.
NurbsCurve
A rational B-spline curve.
NurbsSurface
A rational B-spline surface.
OffCarrierEdge
One edge whose built curve stands off one of its carriers, as an Approximation names it.
OffsetEvaluator
The pointwise offset evaluator, bound to one carrier and one orientation convention.
OffsetSample
One evaluation of the offset: the source point, the unit normal the offset rides, and the offset point itself.
PcurveFit
A fitted pcurve with what the fit achieved.
PcurveFitLedger
Per-operation tally of pcurve fits and how many missed their floor.
PcurveFitReport
What a pcurve fit ACHIEVED, returned beside the curve so a ceiling exit can never be mistaken for a met floor.
PcurveFitScope
An open tally of the pcurve fits made on this thread — see PcurveFitLedger. Open it where an operation starts, close it where the operation returns its diagnostics; a ? that unwinds past it drops the tally.
PoleSupport
One control point’s support, as deform_surface_where shows it.
PolylineFit
PolylineFitLedger
Per-operation tally of polyline fits and how many missed their tolerance.
PolylineFitReport
What a polyline fit ACHIEVED, returned beside the curve so a budget exit can never be mistaken for a met tolerance.
PolylineFitScope
An open tally of the polyline fits made on this thread — see PolylineFitLedger. Open it where an operation starts, close it where the operation returns its diagnostics; a ? that unwinds past it drops the tally.
RecognizedCircle
RegularityReport
What a certificate cost: Bézier pieces, boxes judged, C0 knot lines checked.
RevolutionFrame
RevolutionStructure
Frame, generatrix, and sweep of any surface built by make_revolution (full or partial), validated by exact reconstruction. Unlike AnalyticSurface this does not require the generatrix to be a line or classic quadric profile.
RibbonReport
The measured continuity of a ribbon patch. Read Self::cross_derivative_residual before calling anything G1: it is the number that says whether the prescribed cross-derivative field was actually met.
Segment2
SpanHullSet
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.
SphereAtlas
A sphere’s pole-free cube atlas: centre, radius, and the right-handed basis the six charts are built on.
SphericalRegion
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.
SurfaceIntersectionCurve
SurfaceIntersectionOptions
SurfaceProjection
SurfaceTie
Surfaces a and b share their boundary sides side_a and side_b; reversed when 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 + 2 each, 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.
TangentContact
A tangential contact between two carriers, refined onto the contact and classified by the rank of the height-difference Hessian there.
TiedResult
TiedSurface
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.
TrianglePiece
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.
UnionFind
Deterministic union-find (smallest index wins as representative).
Vec2
Vec3
Vec4

Enums§

AnalyticSurface
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).
BezierTriangleRefusal
Why a triangle patch or one of its operations was refused.
BudgetMechanism
The budget mechanism an ApproximationBudget counts.
BudgetReason
Why a construction request stopped short of what it asked.
ChartSide
Which side of a chart square a cube edge is: the chart’s other coordinate runs along the edge.
CoonsRefusal
A Coons constructor’s refusal, with the measurement that caused it.
DeformRefusal
DeformSide
The four sides, in the order DeformSpec::hold lists them.
DiagnosticSeverity
EdgeHold
What a boundary side keeps.
EdgeOrigin
ExtendRefusal
Why a natural extension produced nothing. Each variant carries what was measured, so a caller can report the number rather than the verdict.
GordonRefusal
A Gordon constructor’s refusal, with the measurement that caused it.
ImageCurveTier
Which lane produced an ImageCurve.
Irregularity
Why a surface is not certified regular. Points are in the surface’s own parameters.
KernelStage
KnotDirection
Which parameter direction a knot is inserted in.
KnotRefinementRefusal
Why a knot refinement was refused. The surface is never changed in part.
MeasuredComponent
What a request report’s measured value is the reading of.
NSidedRefusal
Why an N-sided fill was refused.
OffsetNormal
Which unit normal the offset rides, and how it is recovered where the parametric normal degenerates.
PcurveFitExit
Why a pcurve refinement stopped. Only PcurveFitExit::Converged means 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.
PolylineFitExit
Why a polyline fit’s refinement stopped. Only PolylineFitExit::Converged means the tolerance was met; every other variant is a BUDGET exit whose deviation was measured on the curve actually returned.
RefusalClass
The closed set of refusal classes. Dispatchers match on it exhaustively; adding a variant is a deliberate taxonomy change, never a message edit.
RuledGate
Which predicate admits a general revolution’s generatrix as the straight line of a cone, frustum or cylinder in intersect_analytic_pair.
SoundnessDefect
What the soundness scan found in a result it refused.
SurfaceSide
Which boundary of the parameter square an extension grows from.
TMeshSegment
A straight run of T-mesh edges in index space, end indices inclusive.
TSplineRefusal
Why a T-mesh or T-spline was refused.
TieContinuity
What a tie kept across its edge.
TriangleSide
Which side of the triangle: the side opposite the named corner.
UndecidedCause
Why an undecided refusal is undecided — what the evidence lacked. The boolean’s Simulation-of-Simplicity retry acts on exactly one of these.
WeightSite
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|λ| / κ of H = II_a − II_b at which the contact counts as an isolated node or point rather than EXTENDED along H’s null direction. The same number csg/imprint/tangent_contact.rs reads: genuine nodes measure 0.7..1.0, extended contacts 1e-15 and 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 looser KNOT_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” that split enforces and that imprint’s trim guards mirror. Distinct in PURPOSE (not just value) from KNOT_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 r of its own span diverges like r^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_surface accepts 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 Internal under what at stage. This is a constructor at the consuming site, not a blanket From.
SolidScale
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_surface for the callers that only need the curve. The report is not dropped: it is tallied on the open PcurveFitScope, 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_marched for the callers that only need the curve; the report is tallied on the open PcurveFitScope exactly as build_pcurve_on_surface does.
build_pcurve_on_surface_range
fit_pcurve_on_surface_range for 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_dense for the callers that only need the curve, accepted or refused on its bar (accept_fit).
build_pcurve_on_surface_stations
fit_pcurve_on_surface_stations for 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 through evaluate_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 by margin along 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. false when 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 surface regular (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 (or t).
circle_angle_to_parameter
Parameter of the standard tangent-intersection rational quadratic arc construction (make_arc / make_revolution): a sweep split uniformly into spans segments, 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 witness onto the tangential contact of the two carriers and classify it. None when the witness is not near any contact (the refinement leaves a residual above tolerance) 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_bilinear plus the CoonsReport of 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; =0 off)?
cube_edge_corner
The corner at the q = +1 (positive_end) or q = -1 end of a cube edge.
cube_edge_divisions
Divisions per cube edge that hold the chord sag of a radius sphere under chord_tolerance. A chord subtending θ sags radius·(1 − cos(θ/2)), so θ = 2·acos(1 − tolerance/radius); the edge arc is 2·atan(1/√2) long.
cube_edge_index
Canonical index of the cube edge whose VARYING axis is varying and whose two other axes (varying+1) % 3 and (varying+2) % 3 are 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_scale of a curve, sampled uniformly over [t0, t1].
deform_surface
Deform surface as spec asks. The input is never changed.
deform_surface_where
deform_surface where, besides the held sides, a control point may move only when may_move accepts 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 surfaces together under ties. 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_range keeps the long-standing (base 64, 3 refinement rounds, 513 cap) budget; a fit that binds at that cap with the bar unmet grows once to PCURVE_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 tolerance of that polyline.
fit_polyline_at
Fit ONE rung at the given station budget and measure it — no refinement.
fit_polyline_of_degree
fit_polyline with 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-p interpolant through them errs by O(h^(p+1)) between stations: on BadBoolean’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_surface with a caller-stated crossing band, plus the GordonReport of what it did and measured.
hull_sets_proved_apart
carriers_proved_apart on 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 points at the supplied strictly increasing parameters.
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 None when 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_pair under 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_revolution with the turn in ONE rational quadratic span (middle weight cos(theta/2)) for theta under 180 degrees, where make_revolution splits 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 = 0 meridian runs). seam_direction is Gram-Schmidt’d against the axis; None — and a seam parallel to the axis, which names no meridian — falls back to Vec3::perpendicular, i.e. exactly what make_sphere_surface builds.
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) with N four-sided patches.
n_sided_fill_centre_solved
n_sided_fill with 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_fill with each corner-twist bump along a side with a prescribed tangent reaching only as far as keeps the field’s own across component (see fill): 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_reach with 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 k is where side k starts, after orienting head to tail from side 0). A boundary fill uses it to send a four-sided loop with a re-entrant corner to n_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 revolution spanning a given AZIMUTH range about the carrier’s own frame — the arc-restricted, seam-anchorable form of the full sections intersect_plane_quadric returns.
point_in_polygon
project_point_to_curve
project_point_to_surface
The point of surface nearest point, 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 returned distance against 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_scale change (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=0 runs the count gate.
ruled_gate_census
CENSUS ONLY (BREP_FIT_CENSUS=1): a description of surface’s generatrix when it is a general revolution the two generatrix gates answer differently, None otherwise.
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, 0 off): the boolean imprint culls a face pair whose carriers hull_sets_proved_apart before its classification and seeding.
simplify_polyline
simplify_polyline_indices
Douglas–Peucker against tolerance, as INDICES into points.
solve_banded
solve_dense
split_at_crossing_nodes
Split curves at 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. None when 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.