Skip to main content

Module import

Module import 

Source
Expand description

Reading the bodies of a STEP file (AP203, AP214, AP242 — the B-rep geometry they share) as descriptions the kernel builds.

  • structure finds the bodies — every MANIFOLD_SOLID_BREP, BREP_WITH_VOIDS and SHELL_BASED_SURFACE_MODEL of every product — with their units and, in an assembly, where each part is placed.
  • geometry reads curves and surfaces and builds their NURBS.
  • body reads each body’s topology and turns it into a geop body.

What it cannot read it refuses, naming the entity by type and #id and saying why.

Re-exports§

pub use body::Healing;
pub use body::ImportedBody;

Modules§

body
One body of a STEP file — a solid or a sheet — as a BodySpec the kernel builds.
geometry
The geometry of a STEP file: points, placements, curves and surfaces as the file defines them — in millimetres, placed where the assembly puts them — and their conversion to the kernel’s NURBS.
midpoints
Curves and surfaces in f64: every control point, weight and knot at the middle of its enclosure. For the work whose answer is a free choice or a measurement in f64 — where to sample, a seed for a search, how far a point lies off a surface — many times cheaper than evaluating the enclosures, and off them only by roundings. The kernel itself stays in intervals: these serve the importer only, never an answer the kernel relies on (see Scalar::sharpen).
reader
Typed access to the instances of an Exchange: an entity of an expected type and its parameters by position, every failure naming the instance by #id and type.
structure
Where a file’s bodies are: the shape representations holding them, the units and uncertainty each is in, and — for an assembly — where its parts are placed, flattened into one placement per body.

Functions§

read_exchange
Every body of the exchange file exchange.
read_step
Every body of the STEP file text, in the order the file has them.