Expand description
Fillets, chamfers and blends of the BREP kernel.
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:
- constant, variable (radius-law) and conic edge fillets;
- chamfers;
- the blend surfaces, their trims and their junctions with the neighbouring faces.
Kernel crates it requires: BREP_RANSAC, BREP_geometry, BREP_topology, BREP_surface_offset, BREP_boolean, BREP_construction. It is required by 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
Re-exports§
pub use brep_geometry::*;pub use brep_topology::*;pub use brep_surface_offset::*;pub use brep_boolean::*;pub use brep_construction::*;
Structs§
- Blend
Selection - What a blend selection actually achieved.
- Blend
Timing - One ledger entry: the measure’s name, its accumulated milliseconds
(zero for a
count.*entry) and how many times it was recorded. - Radius
Law - A composable radius law over cumulative abscissa
[0, total_length].
Enums§
- LawSegment
- One user segment of a composite radius law, spanning
lengthof abscissa.
Functions§
- blend_
closed_ edge - blend_
edge_ variable - Variable-radius blend (4.9.5): radius stops as (edge fraction, radius) pairs, linearly interpolated along the edge parameter and clamped at the ends. Closed edges must supply matching first/last radii.
- blend_
open_ edge - General OPEN-edge rolling-ball fillet or chamfer: §4.9 march + §6.9 surgery with transverse edges on the two end faces.
- blend_
smooth_ chain - Blend a chain of conjugated edges with one rolling-ball blend face (Golovanov §6.9.5: all conjugated edges processed together). A CLOSED chain (stadium rim, T-pipe saddle) welds into a periodic blend; an OPEN chain (line->arc->line capped by end faces) rolls a clamped blend that terminates in a transverse edge on each end face.
- blend_
timing_ capture - Turn the ledger on (or off) for the blend operations that FOLLOW on
this thread;
BREP_PROFILEturns it on for every operation. - chamfer_
edge - Equal-leg chamfer of one edge (Golovanov §6.11: the same construction with the arc’s chord).
- chamfer_
edge_ angle - Distance-angle chamfer of one STRAIGHT edge between two planar faces
(Golovanov §6.11): setback
d1along face 1 and angleangle_radbetween the chamfer face and face 1.d2is constructed geometrically in the cross-section plane (seechamfer_angle_second_distance), then the two-distance builder is applied. - chamfer_
edge_ asymmetric - Asymmetric (two-distance) chamfer of one STRAIGHT edge between two planar
faces (Golovanov §6.11): setback
d1along face 1 andd2along face 2 — the standard CAD “d1 × d2” bevel. General/curved edges are out of scope for this slice and return a clear error. - chamfer_
edges_ angle - Distance-angle chamfer of a GROUP of edges, the app entry: each selected
edge (resolved by a point on it) gets a setback
d1on face 1 and a chamfer face atangle_radfrom face 1 (§6.11);d2is constructed per edge. - chamfer_
edges_ asymmetric - Asymmetric (two-distance) chamfer of a GROUP of edges, the app entry: each
selected edge (resolved by a point on it) gets a
d1 × d2bevel (§6.11). Edges are chamfered independently — asymmetric chamfers keep sharp vertices, so there is no shared-corner blending. - chamfer_
edges_ asymmetric_ linear - Two-distance chamfers of the straight edges through
edge_points, one after another, each with the distancesstart([d1, d2],d1on the edge’s first face ascrate::fillet::chamfer_edges_asymmetricreads it) at the end of the edge nearerstart_atandendat its other end, both linear between. Each edge lies between two planes and ends on planes square to it. - fillet_
edge - Constant-radius rolling-ball fillet of one edge (Golovanov §4.9 march, §6.9 surgery; the cutter only where the march refuses).
- fillet_
edge_ conic - Conic-section blend of one edge: the rolling ball’s two contacts joined by a conic instead of the ball’s arc.
- fillet_
edge_ g2 - A curvature-continuous (order 2) fillet of a straight edge between two
planes: its section meets each face where a ball of
offsetwould (offsetis the tangent offset), as flat as the face there (contact of order 2), and bends with radiuscenterat its middle (wherecenteris not positive, the thumbweight that takes off what the ball’s round does). The section is the order-2 Gⁿ blend of E. Hartmann (2001), exactly, as a rational quintic. - fillet_
edges - Fillet (or chamfer) a GROUP of edges as ONE operation, and — for fillets — round the convex “star” vertices where three or more of the selected edges meet (Golovanov §6.9.7). This is the whole multi-edge fillet in a single kernel call: the caller passes the object plus one 3D point on each edge, and the kernel orchestrates the filleting and corner blending against the full topology (so acute corners resolve coherently instead of being stitched edge-by-edge by the app). A corner the kernel cannot round (e.g. non-orthogonal beyond support, or a general no-common-ball star) is left as the edge fillets rather than failing the whole group.
- fillet_
edges_ conic fillet_edge_conicfor edges picked by a point on each. The edges are blended one after another and independently: where two of them meet, the vertex stays sharp between the two blends (no corner is built).- fillet_
edges_ conic_ distances - A conic-section blend of each edge (resolved by a point on it) with its
two contacts set apart:
along_referencefrom the edge on the edge’s face nearestreference(a point on or by that face),along_otheron its other face. The section is the rational quadratic offillet_edge_conicthrough those contacts, its middle pole the edge’s point, weights1, rho / (1 − rho), 1; between faces at a right anglerho = √2 − 1makes it the quarter ellipse of semi-axesalong_referenceandalong_other(an unequal round). Built on the edgesfillet_edge_conicbuilds on: a straight edge between planes, and a circular edge between straight-sided surfaces about its axis. The edges are blended one after another. - fillet_
edges_ conic_ setback fillet_edges_conicsized by setback: each edge the points lie on is rounded by a conic blend meeting both facessetbackfrom the edge, its shoulderrhoof the way from the contacts’ chord to the edge. The edges are blended one after another and independently, asfillet_edges_conicblends them, and on the same edges.- fillet_
edges_ g2 fillet_edge_g2for the edges the points lie on, one after another.- fillet_
edges_ radii - Fillets (or, with
chamfer, symmetric chamfers) of a GROUP of edges in one operation, each selected edge (resolved by a point on it) at its own constant sizesizes[i]: the variable group core with a constant stop list per edge, so edges of unequal sizes meeting at a vertex are blended together there rather than one after another: unequal fillets at a vertex close on the stripe network’s ribbon fill, chamfers meet in their planes. - fillet_
edges_ reported - fillet_
edges_ reported_ at_ offset fillet_edgeswith the selection outcome reported rather than refused.- fillet_
edges_ setback fillet_edgesofradiuswhose fillets stopsetbackshort of the corner where three of the selected edges meet (measured along each edge), the corner closed by one smooth patch meeting the three fillets and the three faces there (seeblend::setback_corner). The three edges must meet at one vertex.- fillet_
edges_ variable - Variable-radius fillet/chamfer of a GROUP of edges (§4.9.5), the app entry
for tapered blends: each selected edge (resolved by a point on it) is
blended with the SAME radius profile
radii— a list of (edge-fraction, radius) stops in[0,1]— applied along that edge’s own parameterization. Edges are blended independently (no shared-vertex corner rounding; a variable-radius star has no single tangent ball), so this is the tapered counterpart offillet_edgesfor the constant case. - fillet_
edges_ variable_ law - Fillet (or chamfer) a chain of edges under a composable radius law
evaluated on the chain’s cumulative arc-length abscissa (the OCCT
Law_Compositemodel; seecrate::law::RadiusLaw). The selected edges must form ONE OPEN CHAIN (or be a single edge); the chain starts at the free end of the earliest-selected end edge, and the law’s abscissa maps proportionally onto the chain’s measured arc length (a law built with the chain’s own lengths — e.g.crate::law::RadiusLaw::from_vertex_radii— maps 1:1). Endpoint radii are met exactly; radii at shared chain vertices match by the law’s continuity, so the per-edge blends miter through the corners; a chain whose blends cannot be mitered REFUSES rather than distorting the law through the sequential rebuild. - fillet_
edges_ variable_ vertex_ radii - The natural per-vertex user model: radius
vertex_radii[i]at chain vertexi(in CHAIN order, starting at the free end of the earliest-selected edge), smoothly interpolated along the chain (monotone C1 — every vertex radius met exactly, no overshoot). Requires exactly one radius per chain vertex (edges + 1). - fillet_
faces - Rounds between the faces
point_aandpoint_blie on by a ball ofradius(see the module’s account of what is built and what is refused). - full_
round - Replaces the face
middlelies on by a round tangent to it and to the facesside_aandside_blie on (see the module’s account). - round_
convex_ corner - §6.9.7 vertex (“star”) blend: round a convex trihedral corner whose three
incident edges are ALREADY filleted, by pure topology surgery — no
booleans.
corneris the ORIGINAL sharp corner coordinate (already trimmed away by the edge fillets). A spherical octant ofradius, tangent to all three cylindrical fillets along their tangent circles, is sewn into the notch; the three fillet loops are closed on those tangent circles and the leftover flat caps are removed. - take_
blend_ approximations - Consume EVERY wall-model report recorded on this thread since the last
call, in ONE snapshot, against ALL the bodies a call returned
(
(body name, solid)): a report becomes a typedblend.wall_modelcrate::Approximationon each body carrying its wall — a face with a bit-identical surface AND the report’s name, exactly or as registration renamed it (NAME[k]) — and is dropped when no returned body carries it (a lane that refused, a body a later step discarded). A wall carried by two returned bodies (one surface, bit for bit, in both) is reported on both: the reading is a property of that surface. Reports for one wall collapse to the last. Never a match by name alone.take_blend_approximations(&[])discards everything recorded (the history loop’s stale drain before a feature runs). - take_
blend_ notes - Take every blend note recorded on this thread since the last call. Blending runs on the feature’s own thread (no parallel march), so the history loop’s drain sees every note its feature recorded.
- take_
blend_ timings - Take every entry recorded on this thread since the last call (or the last outermost operation’s start), sorted by measure name.