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;pub use pmi::PmiDatum;pub use pmi::PmiDimension;pub use pmi::PmiTolerance;pub use pmi::SemanticPmi;
Modules§
- naming
- Names for the faces and edges of a built solid that survive a rebuild.
- pmi
- Semantic annotations exchanged without kernel topology. Probes name the controlled faces; the caller specifies their coordinate frame.
Structs§
- Body
Handle Deprecated - 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
Fit - How a chain of points is fitted with lines and arcs.
- Chain
Probe - A probe asked part way through a solid-op chain: of the solid the first
after_opops make. - Chain
Projection - A projection asked part way through a solid-op chain: of the solid the
first
after_opops make. - Construction
Item - A named item of construction geometry.
- Distance
Request - Points to measure to a reference surface, and how.
- Drawing2d
- The curves and texts 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).
- Drawing
Text - A line of text on a drawing.
- 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, the largest angle between the faces’ normals along
it (zero where they meet tangent), and the largest difference in how
sharply they bend square to it (1/mm; zero where they meet curvature
continuous,
Nonewhere it could not be read). - 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.
- Edge
Refusal - The edges of a fillet or chamfer the kernel refused.
- 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.
- FacesOf
- Faces of another shape: the faces of
shape(a native-format snapshot, moved bytransform, a rigid row-major 4×4 matrix, into the body’s frame) nearest each ofpoints. - Failing
Edge - An edge a fillet or chamfer could not round or bevel: refused alone, or in a group of the op’s edges meeting at a vertex.
- Feature
Preview - What a feature being edited does to its body, beside the body without it: the view while it is edited.
- FitAnswer
- A least-squares fit and what it rests on.
- FitRequest
- Points to fit a shape to, and how.
- Free
Motion - 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.
- Grow
Answer - A grown region and its fit.
- Grow
Request - A region to grow over a mesh from points near it, and how.
- Iges
Export - Construction geometry written as IGES, with any omitted geometry or names reported.
- 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.
- Inertia
- A solid’s inertia at unit density, in mm⁵ (times a density in mass per mm³ gives mass times mm²), in the solid’s frame.
- Loop
Edge - One edge of a face’s boundary loop.
- 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
Chain Answer - A mesh history built: the mesh at its end, what each step did, and the step that failed, when one did (the mesh is then the one before it).
- 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.
- Mesh
Step - What one step of a mesh history did.
- 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.
- Orientation
- A scan’s proposed upright frame, expressed in its own coordinates.
- Overlap
- The solid two shapes share: its volume, its centre and its mesh, in the first shape’s frame.
- Path
Frame - A point on a path and the way the path runs there.
- Path
Frames - Stations along a path, by arc length: what is repeated along a curve stands at them.
- Path
Layout - Occurrences at stations along a path by arc length, the original at
the first: occurrence k is moved from where the first station stands
to where the k-th does, turned as the path turns between them when
align. - 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. - Projection
Probe - A solid’s edge projected onto a plane, or the curves where one of its faces crosses the plane: what a sketch takes from the solid it stands on, asked again of the solid a rebuild makes.
- Rebuild
Request Deprecated - Request describing which features or bodies must be recomputed.
- Rebuild
Response Deprecated - 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.
- Register
Request - Points to bring onto a reference surface by a rigid motion, and how.
- Registration
- A rigid motion that brings points onto a reference, and how well.
- 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.
- Section
Chain - One connected polyline of a mesh’s section by a plane, in the mesh’s own frame.
- Section
Curve - One curve where a plane crosses a shape.
- Section
Run - Curves where a plane crosses a shape, end to end: a closed loop round a solid’s cut, or an open run where a sheet’s edge stops it.
- Shadow
Answer - What a mesh’s shadow is: its loops as traced (outer boundaries counter-clockwise, holes clockwise) and the outline of lines, arcs and circles fitted around them.
- Shadow
Request - The shadow a mesh casts on a plane, and an outline fitted around it.
- Shape
Health - What the kernel’s checker found in a shape.
- Solid
Build Result - Result of executing a body’s solid-op chain.
- Symmetry
Plane - A scan’s mirror plane, expressed in its own coordinates.
- Tessellation
Settings - Parameters controlling tessellation quality for viewport rendering.
- Thickness
Request - Points on a part whose wall thickness is read, and how.
- TriMesh
- Triangular mesh generated from kernel bodies for viewports and export.
- Trim
Answer - A trimmed solid and how it meets the scan.
- Trim
Request - A solid trimmed where a scan breaks off: the scan’s triangles lying
deeper than
depthinside the solid are the break, which is extended past the solid, thickened bygapto each side and cut away. Both in the solid’s frame. - Volume
Region - A connected volume where a scan and a solid differ the same way, in the solid’s frame.
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.
- Construction
Shape - Reference geometry with no topology: what STEP and IGES files carry as construction geometry beside (or instead of) a part’s solid.
- Continuity
- How a surface meets the faces beside it across a shared edge.
- Curve
Source - A curve a surface is built from.
- Distance
Target - What distances are measured to.
- 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.
- FitKind
- What shape a set of measured points is fitted to.
- FitMethod
- How a shape is fitted to measured points.
- Fitted
Shape - A fitted shape, in the request’s frame. Directions are unit length.
- 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. - Mesh
Fairing - How a hole’s added vertices settle.
- MeshOp
- One step of a mesh’s history, in the mesh’s own frame.
- Mesh
Operand - A bounded solid a mesh boolean takes, as it stood when the step was made.
- Mesh
Region - Part of a mesh, by where its points are: a face is in it when all three of its corners are.
- Mesh
Side - Which side of an open sheet a shell thickens: inward is against the way its triangles face.
- Mesh
Step Report - Measurements made by a mesh step, in millimetres.
- Pattern
Path - The path a
PathLayoutruns along, in the chain’s frame. - Pattern
Step - One step of a
SolidOp::Pattern: each applies to every occurrence of the steps before it, the original among them, which stands first. - 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.
- Project
Mode - What a
SolidOp::Projectmakes of the faces a sketch lands on. - 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§
- Face
Points - A face of a shape, named by a point inside it, and points on it, each with the normal its curvature is signed against.
- Kernel
Result - Convenience alias for kernel fallible operations.