Expand description
Solid construction of the BREP kernel: extrusions, revolutions, sweeps and lofts.
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:
- extrusions (including up to a face), revolutions and lofts, with lofts along guide curves and guide chains;
- sweeps of a profile along a path, with round corners, and solid sweeps of a body along a motion;
- ellipses, ellipsoids and periodic B-splines;
- faces and solids from surfaces, sheets and polygons.
Kernel crates it requires: BREP_RANSAC, BREP_geometry, BREP_topology, BREP_boolean. It is required by 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
Re-exports§
pub use planar_region::cut_planar_sweep_from_prism;pub use planar_region::region_cut_on;pub use mill_program::flat_mill_region_prisms;pub use mill_program::MillMove;pub use mill_program::MILL_REGION_REFUSAL;pub use gears::worm_wheel_sizes;pub use gears::worm_wheel_solid;pub use gears::WormWheel;pub use gears::elliptical_section;pub use gears::elliptical_sizes;pub use gears::elliptical_solid;pub use gears::EllipticalGear;pub use gears::bevel_cones;pub use gears::bevel_section;pub use gears::bevel_solid;pub use gears::prism_by_rows;pub use gears::BevelGear;pub use gears::cycloidal_gear_section;pub use gears::cycloidal_gear_solid;pub use gears::CycloidalGear;pub use gears::cycloidal_disc_section;pub use gears::cycloidal_disc_solid;pub use gears::cycloidal_pin_ring;pub use gears::CycloidalDisc;pub use gears::worm_section;pub use gears::worm_solid;pub use gears::Worm;pub use gears::geneva_section;pub use gears::geneva_sizes;pub use gears::geneva_solid;pub use gears::GenevaWheel;pub use gears::ratchet_section;pub use gears::ratchet_solid;pub use gears::Ratchet;pub use gears::timing_pulley_section;pub use gears::timing_pulley_solid;pub use gears::TimingPulley;pub use gears::hub_from_section;pub use gears::straight_spline_hub;pub use gears::straight_spline_section;pub use gears::straight_spline_shaft;pub use gears::StraightSpline;pub use gears::helical_solid;pub use gears::helical_transverse;pub use gears::twisted_prism;pub use gears::Hand;pub use gears::HelicalGear;pub use gears::Twist;pub use gears::rack_section;pub use gears::rack_solid;pub use gears::ring_section;pub use gears::ring_solid;pub use gears::ring_solid_helical;pub use gears::sprocket_section;pub use gears::sprocket_solid;pub use gears::spur_section;pub use gears::spur_solid;pub use gears::GearData;pub use gears::GearSection;pub use gears::Rack;pub use gears::RingGear;pub use gears::SectionCurve;pub use gears::Sprocket;pub use gears::SprocketForm;pub use gears::SpurGear;pub use gears::GEAR_FIT_TOLERANCE;pub use brep_geometry::*;pub use brep_topology::*;pub use brep_boolean::*;
Modules§
- gears
- Gear sections and gear solids.
- mill_
program - What a flat-bottomed upright end mill removes from the level it is moved at: the plane region its circle covers as its axis runs a program of level moves (straight lines and arcs about upright axes), extruded from that level up through the workpiece’s top.
Structs§
- Bend
Station - One station’s tight-bend reading: what the path does there and how far the section reaches into it.
- Frame
Curve - A frame riding a cubic Bézier curve (
control, in a plane square toup): its origin on the curve, its first axis along the curve’s tangent,upfixed. The tool is given in the frame at the curve’s start and carried by it over the whole curve. - Guide
Loft Wall - Which wall a side face of a loft along guide chains is: the faces of the solid come one for each of these, in this order, and then the flat ends.
- Path
Joint - ONE joint of a resolved path: which two segments meet there, how continuously
(
JointContinuity), and the two measurements that decided it. - Profile
Anchor - The placement anchor a path sweep transplants its profile with: the plane
frame
(origin = boundary-sample centroid, normal, pu, pv)the station loop maps profile points through (local = p − origin→station + ri·(local ·pu) + si·(local·pv)). Extracted as data so a HOLE loop can sweep with its OUTER loop’s anchor — sweeping each loop with its OWN centroid would re-center every loop onto the path and lose the hole’s in-plane offset. - RibNames
- What a rib calls its faces: the feature id every name starts with, and the
source name of each profile curve (
{sketchId}:G{gid}for a sketch segment), index-aligned with the profile. - Rising
Turn - A turn about an axis whose rise along it grows as it turns: turned by t
(radians, right-handed about
axis_direction) the tool has risenrise[0] t + rise[1] t², for t fromfromtoto(a variable-lead screw). - Screw
Step - One elementary motion, linear in the motion parameter
t: a turn ofturn·tradians, right-handed about the axis throughaxis_originalongaxis_direction, together with an advance ofadvance·talong it. A turn alone isadvance = 0, a slide alone isturn = 0. - Solid
Motion - A rigid motion: the steps applied in order (the first to the tool first),
for
tfromfromtoto. - Station
Budget - What the sampler did to reach its stations.
- Sweep
Clip - The region the result must agree with the sweep in, about an axis: levels
(distance from the axis) in
radius, axial positions inaxial(measured fromaxis_origin), and polar angles inangle(fromreference, right-handed about the axis), when given. - Sweep
Closure - What a CLOSED sweep did to make its section meet itself after one lap — the applied twist the frame-closure policy REPORTS.
- Sweep
Path - A resolved sweep path AND its classification: the ordered, head-to-tail curves, the name of each, whether the run is CLOSED, the PLANE it lies in if it lies in one, and the continuity of every joint — the closing one included.
- Sweep
Station Report - The measured bound a station sweep carries.
- Swept
Chain - A swept solid with the MEASURED BOUND of its construction
(
SweepStationReport):Nonewhere the construction is exact — the mitre lane (exact pieces on bisector planes) and the envelope lane (a revolve) — and the station lane’s report otherwise. - Swept
Envelope - The recognized configuration: a circular section on a circular planar path, tight enough that the envelope crosses itself.
- TwoTurns
- Two turns driven by one parameter t: first by
rates[0]·tabout the first axis (point, direction), then byrates[1]·tabout the second; both axes fixed in the world; t fromfromtoto.
Enums§
- Joint
Continuity - How continuous a path is AT ONE JOINT — the classification every sweep refusal reads instead of re-deriving the same angle from the curves.
- Outline
Piece - One piece of a planar outline, in the outline’s own 2D coordinates.
- RibExtrusion
- Which way a rib grows out of its sketch — SolidWorks’ Extrusion Direction control, and the same two choices it offers.
- Section
Placement - HOW a section is placed at each station — the two things “sweep a profile along a path” can mean, and the reason they are not the same shape.
- Solid
Tool - A tool the whole sweep takes.
- Swept
Tool - The moving tool.
Constants§
- EXTRUDE_
UP_ TO_ REFUSAL - The prefix of every refusal of this operation.
- LOFT_
ON_ GUIDES_ REFUSAL - The prefix of every refusal of this operation.
- MAX_
JOINT_ TANGENT_ BREAK - The largest tangent break, in radians, a chained path may have at a joint before the joint is a CORNER.
- SOLID_
SWEEP_ REFUSAL - The prefix of every refusal of this operation.
- SOLID_
SWEEP_ WHOLE_ REFUSAL - The prefix of every refusal of this operation.
- SURFACE_
FACE_ REFUSAL - The prefix of every refusal of this module.
- SWEEP_
DEFAULT_ TOLERANCE - The centre-track deviation a station sweep is refined to when its caller
names none: 1e-4 mm. Read off the tolerance ladder in the record: the
loosest value at which both closed rings the plan named sit under 1e-6
relative on their closed forms (the rounded rectangle 4.8e-4 → 1.9e-7 at
211 stations from 81, the filleted skew quad 8.3e-4 → 7.4e-8 at 248 from
92), while the
R = 10ring keeps its 64 stations and every single-curve fixture the landed geometry pins (a quarter arc at 32 stations reads 1.4e-7, a 350° arc 3.9e-5) stays under it and so bit-identical. One decade tighter costs half again as many stations for a residual already under 1e-7. - SWEEP_
ENVELOPE_ REFUSAL - The prefix every refusal from this lane starts with, so a caller can CLASSIFY one without matching free text.
- SWEEP_
MAX_ STATIONS - The loft’s station cap: its interpolation solve is per control column and a run past this looks like a hang. Refinement stops here and says so.
- SWEEP_
REFINEMENT_ ROUNDS - How many refinement rounds the sampler runs before it stops and reports
what it reached (
StationBudget::rounds_exhausted). A round splits an offending span by up to 8, so six rounds cover a span 2.6e5× over under theh²law a G1 joint’s span obeys. - SWEEP_
ROUND_ CORNERS_ REFUSAL - The prefix of every refusal of this operation.
- SWEEP_
TIGHT_ BEND_ REFUSAL - The prefix every tight-bend refusal starts with, so a caller can CLASSIFY one (the wire harness reports it as a bundle status) without matching free text.
- SWEEP_
TWIST_ CLOSURE_ REFUSAL - The prefix of the refusal for a requested twist that does not close a CLOSED path, so a caller can classify one without matching free text.
Functions§
- build_
swept_ envelope - Build the swept union: the APPLE first, then the LEMON where the turn leaves one outside it.
- clip_
less_ on - The switch for
sweep_clip_less(default on). - cut_
planar_ sweep_ from_ prism - The prism
targetless whattoolsweeps undermotionwithinclip, as one extrusion of the plane region the target’s outline holds outside the swept region (exact where the sweep’s own region engine is; behindregion_cut_on, default on). The same solid as subtracting [sweep_prism_planar_region]’s bodies from the target, without the 3D boolean: the sweep is taken within the clip only, as there. - extrude_
profile_ brep - extrude_
profile_ brep_ draft - Straight extrude of a LINE/ARC profile loop with a draft (taper) angle, built DIRECTLY as a BREP: every wall is the EXACT drafted surface of its segment — a tilted plane for a line, a cone patch (rational ruled surface between the source arc and its concentric offset, over one shared angular window) for a circular arc — and every junction edge is the EXACT intersection curve of the two adjacent walls. Because all drafted walls shrink linearly at the same rate, any two of them intersect in a straight line (plane∧plane, or a tangent-junction ruling) or a CONIC (plane∧cone and cone∧cone both reduce to a plane section of a cone — the z² terms of the squared implicits cancel), so the junction edges are exact rational quadratics: no lofted approximation anywhere.
- extrude_
profile_ up_ to_ face - The prism on
profile(a closed loop of curves in a plane, or one closed curve) slid alongdirectionuntil it meets the faceface_idoftarget, on which it ends. - face_
from_ surface - A sheet of one face on
surfaceover its whole domain, its normal the surface’s own (∂S/∂u × ∂S/∂v). - face_
from_ surface_ trimmed - A sheet of one face on
surfacebounded byloops: the first its outer boundary, the rest holes. Each loop is a closed chain of curves lying on the surface, head to tail in either sense (a single closed curve is a loop of one); each curve becomes an edge and each joint a vertex. The face’s normal is the surface’s own. - fit_
helix_ curve helix_sample_pointsfitted as ONE cubic curve (global interpolation —interpolate_curve, the machinery every fitted path here uses). Cubic interpolation error on a circle of radius R with node spacing Δθ is ≈ R·Δθ⁴/384: ~2·10⁻⁷·R at 64 stations per turn.- helix_
sample_ points - Helical sweep (§5.7): sweep a CLOSED PLANAR profile loop along a helix of
helix_radiusabout the axis throughaxis_originwith directionaxis_direction, risingpitchper revolution forturnsrevolutions. - is_
sweep_ tight_ bend - Is this the sweep’s tight-bend refusal (
SWEEP_TIGHT_BEND_REFUSAL)? Read off the class and its slug, so a caller that decides on it (the wire harness’s bundle status) follows the refusal, not its wording. - loft_
profile_ brep - Loft corresponding edges of closed sections. For two sections, exact degree elevation and knot insertion reconcile mixed line/arc representations and the ruled skins retain both boundaries’ rational weights. Multi-section interpolation requires matching degrees, knots and weights.
- loft_
profile_ brep_ closed - §5.8 CLOSED loft: the sections form a RING (the last flows back into the
first), producing a capless genus-1 solid. Every interpolation column runs
through
interpolate_curve_closed, so the ring is C² across the closure — not a welded seam. Topology per skin is the cylinder-wall rectangle turned on its side: u runs along the section curve (open), v through the sections (closed); the section-0 curves themselves serve as the doubled v-seam edges and the corner rings (one closed curve through every section at each section corner) are shared between adjacent skins. - loft_
profile_ brep_ closed_ shifted loft_profile_brep_closedfor a ring whose sections come back SHIFTED: after the last section the cycle continues into section 0 with curvejflowing into curve(j + shift) mod m, not into curvej.- loft_
profile_ brep_ guided - Loft a set of loft-compatible cross-sections so the loft’s SPINE follows a GUIDE curve (§5.8) instead of the straight centroid-to-centroid path.
- loft_
profile_ brep_ guided_ chain - The loft of
sectionsalong the guideguide, a chain of curves that follow one another head to tail and meet smoothly;rotate_to_frameturns the sections with the guide’s moving frame (crate::loft_profile_brep_guided_frame) instead of keeping their own orientation (crate::loft_profile_brep_guided). A chain of one curve is that curve. - loft_
profile_ brep_ guided_ frame - Rotation-to-frame guided loft (§5.8): like
loft_profile_brep_guided, but intermediate sections ROTATE with the guide’s rotation-minimizing moving frame (double-reflection RMF, the same frames the path sweep uses) instead of keeping their world orientation. - loft_
profile_ brep_ on_ guide_ chains - The solid lofted through the closed sections
sectionsalongguides, each guide a chain of curves. - loft_
profile_ brep_ on_ guides - The solid lofted from the closed section
firstto the closed sectionlastalongguides. - loft_
profile_ brep_ on_ loose_ guide_ chains loft_profile_brep_on_guide_chainsfor sections and guides that are not yet matched: the guides in any order, and every section after the first starting at any of its corners and run either way round. The first section is taken as given; each guide is given to the corner of it that it passes through, and every later section is turned (and reversed if need be) until its corners lie on the guides of the first section’s corners. A last section at one point is left as it is.- loft_
profile_ brep_ tangent - §5.8 loft with END TANGENCY: the skin leaves the first section along
start_directionand arrives at the last alongend_direction(unit directions; each interpolation column scales them by its own chord length, the standard magnitude that keeps the v-parametrization well conditioned). Exact by construction — the column interpolant reproduces the prescribed end derivatives. - make_
ellipse - The whole ellipse of
make_ellipse_arc, closed, from its point on the major direction round towardminor_hint. - make_
ellipse_ arc - The arc of the ellipse about
centerwith semi-axissemi_majoralongmajor_directionandsemi_minorsquare to it (towardminor_hint), from the parameterstart_angletoend_angle(radians) ofP(t) = center + semi_major·cos t·x + semi_minor·sin t·y. - make_
ellipsoid_ brep - The solid ellipsoid about
centerwith semi-axessemi_axes[0]alongx_direction,semi_axes[1]square to it towardy_hint, andsemi_axes[2]along their cross product. - make_
periodic_ bspline - The closed, periodic uniform B-spline of
degreeon the control polygoncontrol_points(each given once; the polygon closes from the last to the first), as a clamped curve over[0, n]forncontrol points. - make_
pyramid_ on_ polygon - The pyramid on the plane polygon
base(its corners in order, either way round) with its point atapex: the base and one triangle on each of its sides. The base need not be regular, nor the apex over its middle. - profile_
anchor - Validate a closed planar profile loop and derive its placement anchor —
the path sweep’s §1 block, extracted bit-identically: 16 samples per curve,
closure at
tolerance, Newell normal, boundary-sample-mean origin, planarity attolerance * 100,pu = np.perpendicular(),pv = np × pu. - recognize_
swept_ envelope - Recognize the one configuration the envelope lane builds, or say — in words a refusal can quote — which half of it this sweep is not.
- region_
cut_ on - The switch for
cut_planar_sweep_from_prism(default on;BREP_SWEEP_REGION_CUT=0turns it off). - revolve_
profile_ brep - revolve_
profile_ brep_ named - Revolve with caller-supplied names.
side_namesis aligned with the INPUT curves; the kernel carries it through winding normalization and axis-curve skips, which the caller cannot reconstruct from the emitted face order.cap_namesis[start_cap, end_cap]for partial revolutions. Empty slices leave faces unnamed. - rib_
from_ profile - Rib / stiffener (§6.6) — SolidWorks’ Rib, both extrusion directions, with its Up To Next end condition.
- sheet_
from_ sheets - One sheet of all the faces of
sheets, joined along the edges that coincide withintolerance(the kernel’s sewing, assolid_from_sheetsjoins them), its boundary left open: the patches of a filled N-sided hole as one body. Refuses a joined body the kernel’s validation rejects. - solid_
from_ polygons - The solid bounded by the plane polygons
faces, each its corners in order (either way round): every polygon a flat face, joined along their common sides (crate::solid_from_sheets) and turned outward. The polygons need not be convex, nor the solid; each side of each polygon must be a whole side of exactly one other. - solid_
from_ sheets - solid_
pieces - The separate pieces of
solid: one solid per shell that bounds material, each with the shells of the hollows inside it. A solid of one piece comes back as itself. - sweep_
bend_ profile - The
ρκprofile a TRANSPLANT sweep ofprofilealongpathwould carry atstationsstations — the instrument behind the refusal below, exposed so a caller (or a probe) can measure a path BEFORE asking for the solid. - sweep_
clip_ less - The clip region less the sweep of
toolalongmotion(default on;BREP_SWEEP_CLIP_LESS=0answers None, so the caller subtracts the sweep): the workpiece the clip names (a rod: radius from 0, no angle window) with everything the tool passes through taken out, built by the level engine directly, without a boolean. At each level the material is what the sweep leaves; its walls are the sweep’s own, and at the clip’s outer radius the boundary is the circle less the sweep’s spans there. Over a crest (BREP_SWEEP_CLIP_LESS_CREST, default off) it is what stays below the crest.Nonewhere this is not built (another class than a screw, a crest with that switch off, a sweep that never reaches the outer radius or leaves more than one region, or anything the level engine refuses): the caller subtracts the sweep instead, and that route answers for its own refusals. - sweep_
closure - The CLOSURE a sweep of
profilealongpathapplies — the frame-closure policy’s report, exposed so a caller can read the twist a closed sweep laid down (seeSweepClosure).Nonefor an OPEN path, which has no lap to close. - sweep_
ellipsoid_ along_ line - Everything the ellipsoid about
centerpasses through as it slides without turning byslide. Its semi-axes aresemi_axes[0]alongx_direction,semi_axes[1]square to it towardy_hint, andsemi_axes[2]along their cross product (ascrate::make_ellipsoid_brep). - sweep_
envelope_ bodies - The swept union as BODIES — the entry for a caller that can take more than
one, which is what a partial turn past
ρκ = 1really sweeps. - sweep_
prism_ along - The whole sweep of a prism carried by a frame along a planar curve (its
axis along the frame’s up): the prism
outline(a convex polygon in the start frame: first coordinate along the start tangent, second along up × tangent) betweenfromandtoalong up. The motion is planar, so the sweep is the plane region the moving outline covers, extruded. That region is found exactly: its boundary lies on the outline’s corner paths, the paths of each edge’s grazing point (where the edge’s normal is square to the velocity), and the outline’s edges at the two ends; these are split where they meet, and a piece is kept where one side of it is covered and the other not (folds, where a corner digs past a side, come out right). - sweep_
profile_ along_ chain - Sweep a CLOSED PLANAR profile along a CHAIN of path curves joined head-to-tail — the multi-segment entry point, with the twist and anchor options the single-curve family exposes as separate functions folded into one signature (the feature layer picks all three per loop, so splitting them four ways here would only push the same match into the caller).
- sweep_
profile_ along_ chain_ reported sweep_profile_along_chainwith the requested wall TOLERANCE (mm;NoneforSWEEP_DEFAULT_TOLERANCE) and the measured bound the build reached, for a caller that carries it on (the sweep features put it inFeatureResult::approximations). The station lane refines its stations until the loft’s own interpolant stands withintoleranceof the kinematic sweep’s wall, or the station cap stops it; the report says which.- sweep_
profile_ along_ chain_ with_ stations sweep_profile_along_chainwith an explicit STATION budget and no twist — the entry a caller with a long, smooth chain uses when the default 32 stations would under-sample it (a wire-harness bundle along a many-anchor spline: three pieces per span, so a handful of spans already starves each piece of stations). The budget is spread over the chain by arc length exactly as the twisted builder’s law spreads its own; the 1024-station cap and the tangent-continuity refusal apply unchanged.- sweep_
profile_ along_ chain_ with_ stations_ reported sweep_profile_along_chain_with_stationswith the requested wall tolerance (Nonefor the default) and the measured bound: the caller’s budget is the FLOOR, refined where the measured deviation is over the tolerance.- sweep_
profile_ along_ path - Sweep a CLOSED PLANAR profile loop along a path curve (§3.3/§5.7),
TRANSPLANTING the profile onto the path — see
SectionPlacementfor the other reading, and for why the choice changes the solid. - sweep_
profile_ along_ path_ anchored sweep_profile_along_pathwith an explicit placement anchor (seeProfileAnchor) — the hole-loop cutter path: the swept loop is validated as usual but PLACED in its outer loop’s frame.- sweep_
profile_ helix - The helix is transcendental, not exactly NURBS-representable, so the path
is FIT: points (R·cosθ, R·sinθ, pitch·θ/2π) in the axis frame are sampled
uniformly in θ and globally interpolated with a cubic (
interpolate_curve— the same machinery every other fitted path here uses). DENSITY: 64 samples per turn, capped at 1025 total nodes. Cubic interpolation error on a circle of radius R with node spacing Δθ is ≈ R·Δθ⁴/384: ~2·10⁻⁷·R at 64/turn, and still ~6·10⁻⁵·R at the cap’s worst case (16/turn at the 64-turn limit) — orders below any profile a caller could sweep without self-intersecting. Uniform-in-θ parameters are exact chord-length for a helix (constant speed), which is what the averaged-knot interpolation assumes. - sweep_
profile_ round_ corners - The solid
sectionsweeps along the straight runs throughpath, turned about each corner. - sweep_
profile_ twisted - Twisted path sweep (§5.7): identical to
sweep_profile_along_path, but the profile additionally ROTATES about the path tangent, linearly in ARC LENGTH, from 0 at the sweep start totwist_angleradians (right-handed about the tangent) at the end. The arc-length fraction comes from the sampled station polyline, not the raw path parameter, so a non-uniformly parameterized path still twists uniformly in space. - sweep_
profile_ twisted_ anchored sweep_profile_twistedwith an explicit placement anchor: the hole loop twists about the SAME path axis as its outer loop (shared anchor), so the cutter stays registered with the outer wall through the whole twist.- sweep_
profile_ twisted_ scaled - Twisted path sweep with a SCALING LAW:
sweep_profile_twisted, with the section also scaled about its anchor origin (the profile’s centroid, which the sweep lands on the path) linearly in the same sampled arc-length fraction as the twist, from 1 at the start toend_scaleat the end. - sweep_
solid - The whole sweep of
toolalongmotion(a single screw, turn or slide), its two end positions included. - sweep_
solid_ along - The whole sweep of a solid of revolution carried by a frame along a
curve. In the riding frame the velocity field is the speed along the
tangent plus the turn about
up, so the grazing loop moves on the tool with the curve’s curvature. It is split at sample times (its structure must not change), each piece sampled exactly, and the walls lofted through those samples (quintic both ways; the samples’ count doubles until the wall is withinLOFT_TARGETof the exact loop at the times between). Caps are the tool’s back at the start and front at the end. - sweep_
solid_ clipped - The sweep of
toolalongmotion, where it lies inclip(the caller cuts a workpiece inside that region). A TURN about the clip’s own axis whose two end positions stay outside the clip’s wedge covers the wedge wholly with the tool’s shadow in (ρ, z): that shadow, turned over the wedge, is the sweep there (a convex polyhedron’s shadow is bounded by conic arcs from its edges and straight lines from its faces, so every surface is exact); a turn about that axis whose ends reach the wedge is refused. A screw or turn about the region’s axis whose tool reaches far past the region’s radius sweeps only the tool’s part that can reach it (seetrim_to_clip). Any other motion gets the whole sweep (sweep_solid). - sweep_
solid_ parts - The sweep of
toolalongmotionas parts whose union it is (a caller cuts a workpiece by all of them). One part where the whole sweep passes once. A convex polyhedron whose sweep folds over itself (a face facing away from a screw’s or turn’s axis grazes along a line inside it, and the faces beyond that line are swept over again) is split by the plane through the axis and that line: each half grazes that face only along its cut edge, and is swept whole. The halves’ walls share cylinders about the axis. - sweep_
solid_ rising - The sweep of
toolalong a turn whose rise grows as it turns, where it lies inclip(assweep_solid_clipped). Its front and back are those at the middle of the motion; a tool whose faces change side along it is refused. - sweep_
solid_ tumbled - The whole sweep of a solid of revolution tumbled by two turns about skew axes. The grazing loop moves on the tool (the instantaneous screw changes with t), so the walls are lofted through exact samples. Where the tumble passes over a point twice (the one-pass probe), the time is bisected into spans each passing once, and the spans’ sweeps are joined (consecutive spans meet along a grazing loop; distant ones overlap).
- sweep_
solid_ within - Build the sweep of
toolalongmotioninsideclip, as one body per connected region of the reduced section. - sweep_
tube_ slid_ across - Everything a tube (the ball of
radiusswept along the curvecentreline(s), s ∈ [0, 1], its ends included) passes through as it slides byslide, inside the slabslab[0] ≤ (x − slab_origin)·n ≤ slab[1](n=slab_normalnormalised), which the tube must cross wholly: before the slab at the start, past it at the end (checked at 8001 points of the centreline, with a margin of the longest step between them). The returned prism along the slide agrees with the sweep inside the slab; the caller cuts a workpiece that lies within it. - swept_
envelope_ volume - The whole swept solid’s closed-form volume: both lobes for a partial turn, the apple alone for a full one (where the lemon is inside it).