Skip to main content

Crate brepkit_offset

Crate brepkit_offset 

Source
Expand description

§brepkit-offset

Solid offset engine for brepkit.

This is layer L2, depending on brepkit-math, brepkit-topology, and brepkit-geometry.

§Pipeline

The offset algorithm follows a 9-phase pipeline:

  1. Analyse — classify edges as convex/concave/tangent, derive vertex classes.
  2. Offset — construct the offset surface for each face (translate planes, adjust cylinder radii, etc.).
  3. Intersect 3D — intersect adjacent offset faces in 3D to find new edge curves.
  4. Intersect 2D — intersect offset PCurves in parameter space to find edge split points.
  5. Split edges — split original edges at intersection parameters.
  6. Arc joints — optionally insert rolling-ball arc fillets at convex edges.
  7. Build loops — assemble trimmed edges into closed wire loops for each offset face.
  8. Assemble — build the final shell and solid from offset faces and wire loops.
  9. Self-intersection removal — detect and excise global self-intersections if enabled.

Re-exports§

pub use error::OffsetError;

Modules§

error
Error types for the offset engine.

Structs§

OffsetOptions
Configuration options for solid offset.

Enums§

JointType
Strategy for joining adjacent offset faces at convex edges.

Functions§

offset_solid
Offset all faces of a solid by the given signed distance.
thick_solid
Offset a solid while excluding specific faces, producing a thick (hollowed) solid.