Expand description
printCAD’s geometry interface: meshes, profiles and solid operations
as plain data, with no geometry code. The app’s kernel adapter answers
it, and workbench packages build their solids as SolidOp plans
through printcad-bench-api.
Versions follow printcad-bench-api‘s: 0.1.x speaks the workbench
contract printcad:workbench@0.1, and a patch release only adds.
FaceSurface and ProfileSegment, which the app sends a package,
are #[non_exhaustive] unless the exhaustive feature (printCAD’s
own) is on; SolidOp and the enums inside it keep their variants’
fields within a minor version.
Re-exports§
pub use naming::TopoName;
Modules§
- naming
- Names for the faces and edges of a built solid that survive a rebuild.
Structs§
- Body
Handle - Handle to a body managed by the kernel.
- Centre
Line - The centre line of a pipe-like solid between two of its faces.
- Chain
Error - Error from executing a body’s solid-op chain, attributed to the failing step so the caller can mark the matching feature.
- Chain
Probe - A probe asked part way through a solid-op chain: of the solid the first
after_opops make. - Drawing2d
- The curves of a 2D drawing file, in the drawing’s own coordinates.
- Drawing
Curve - One curve of a drawing, and whether the drawing marks it hidden (a hidden layer, or a dashed line type).
- Edge
Continuity - Geometry questions a workbench may ask while it runs, answered by the kernel at once. Shapes arrive as the snapshot bytes the document keeps. How two faces of a shape meet across an edge they share: a point halfway along it, in the shape’s own frame, the largest gap between the edge and the faces, and the largest angle between the faces’ normals along it (zero where they meet tangent).
- Edge
Probe - A picked edge, as a point beside it and the way it runs there, and the names of the two faces it runs between. A rebuild finds the edge between faces of those names, the point choosing among several; without names, the nearest edge. A zero direction leaves the way open.
- Face
Probe - A picked face: its name, and a point on it with its outward normal. A rebuild finds the face by its name, the point choosing among the pieces of a face that split; without a name (or when no face bears it any more), the face nearest the point.
- Feature
Preview - What a feature being edited does to its body, beside the body without it: the view while it is edited.
- Gap
- How near two shapes come: the distance between their boundaries and a nearest point on each, in the first shape’s frame. Zero where the boundaries touch or cross.
- Import
Report - What the reader had to say about a file.
- Import
Warning Kind - One kind of imperfect import, counted rather than repeated.
- Imported
Annotation - One annotation an imported file carries (a dimension, a tolerance, a datum or a note), with what it draws.
- Imported
Body - A single body produced by an external import (e.g. STEP).
- Imported
Model - Result of importing an external CAD file.
- Imported
Node - One hierarchy node from the imported file’s product structure.
- Medial
Path - A stretch of a region’s medial axis, in the profile plane’s own 2D coordinates: points along one branch with the clearance at each, the radius of the largest disc centred there that stays inside the region.
- Medial
Region - The medial axis of one region of a profile: an outer wire and its holes.
- Mesh
Solid Result - A mesh body turned into a B-rep by the kernel: the shape, its mesh, the checker’s verdict, and what the conversion found.
- Narrowest
- Where a region is narrowest, and how narrow: the smallest clearance on its medial axis away from the branch ends at its corners (where the clearance runs down to nothing without the region getting any thinner). The wall there is twice the clearance.
- Overlap
- The solid two shapes share: its volume, its centre and its mesh, in the first shape’s frame.
- Physical
Properties - A body’s measure: its volume, surface area and centre of mass, exact where the kernel has a closed form for its faces.
- Placement
- A right-handed placement frame in world coordinates (millimetres).
- Probed
Circle - The circle an edge runs round.
- Profile
- A set of closed wires on one plane. The largest-area wire is the outer boundary, the rest become holes.
- Profile
Plane - The plane a profile lives on, in world coordinates (millimetres).
- Profile
Wire - A closed loop of profile segments. Consecutive segments share endpoints;
a single
Circlesegment is a wire by itself. - Rebuild
Request - Request describing which features or bodies must be recomputed.
- Rebuild
Response - Response returned for every rebuild invocation.
- Recognized
Hole - A round hole found in a solid: a full bore, open at one end (blind) or both (through), closed by a flat bottom or a drill point.
- Repair
Result - A shape run through the kernel’s repair: the mended snapshot, its mesh, what the repair did, and what the checker finds afterwards.
- Shape
Health - What the kernel’s checker found in a shape.
- Solid
Build Result - Result of executing a body’s solid-op chain.
- Tessellation
Settings - Parameters controlling tessellation quality for viewport rendering.
- TriMesh
- Triangular mesh generated from kernel bodies for viewports and export.
Enums§
- Annotation
Kind - What an imported annotation states.
- Bool
Kind - Boolean between the running solid and an external tool solid.
- Boolean
Op - How an extrusion combines with the body’s existing solid.
- Chamfer
Spec - Chamfer sizing, mirroring the three standard input styles.
- Continuity
- How a surface meets the faces beside it across a shared edge.
- Curve
Source - A curve a surface is built from.
- Drawing
Shape - The kinds of curve a drawing carries. Angles are radians, arcs run counter-clockwise.
- Edge
Selection - Which edges of the current solid a dress-up applies to. Edges are identified geometrically: by a face they border (sample point on the face) or by a point near the edge itself.
- Extrude
Termination - Where a one-directional extrusion stops.
- Face
Surface - The kind and placement of a kernel face’s surface, in the mesh’s frame.
- Imported
Node Kind - Node type emitted by STEP import hierarchy reconstruction.
- Kernel
Error - Standardized error type for kernel interactions.
- Length
Unit - Length unit declared by an imported source file.
- Linear
Deflection Mode - How linear (chord) deflection is chosen for kernel meshing.
- Loft
Section - One section of a
SolidOp::LoftThrough. - Pipe
Corner - How a pipe’s section turns a sharp corner of its path.
- Pipe
Frame - How a pipe’s section turns as it runs down its path.
- Pipe
Path - What a
SolidOp::PipeThroughruns along. - Primitive
Kind - Parametric primitive shapes (dimensions in millimetres, angles degrees).
- Probe
Answer - What a solid answers to a
ShapeProbe, in the solid’s own frame. - Profile
Segment - One segment of a closed 2D profile wire, in sketch-plane coordinates (millimetres). Arcs are encoded as three on-curve points so consumers never have to agree on a winding convention.
- Projected
Edge - An edge of a solid projected onto a plane, in the plane’s own 2D
coordinates (along its
x_axisandy_axis). - Revolve
Termination - Where a revolution stops turning.
- Shape
Probe - A question about a solid a reference stands on, named geometrically so it can be asked again of the solid a rebuild makes.
- SolidOp
- One step in a body’s build history. Shape-producing steps (
Sweep,Loft,Pipe,Primitive) carry aBooleanOp; the remaining steps modify or combine the running solid directly. - Surface
Op - The steps of surface modelling. A constructive step (every one but
Sew,TrimByPlaneandMirror) adds its sheet to the body beside what is there; the rest act on all of the body’s shape. - Sweep
Kind - How a profile is swept into a solid.
- Thickness
Join - How a thickness’s walls meet across an edge of the solid.
Traits§
- Kernel
- Trait implemented by any geometry kernel that can serve the application.
- Kernel
Queries
Functions§
- deserialize_
pipe_ frame - Reads a
PipeFrameor thefrenetflag it stands in for.
Type Aliases§
- Kernel
Result - Convenience alias for kernel fallible operations.