Skip to main content

Crate quiddity

Crate quiddity 

Source
Expand description

Quiddity: deterministic, geometry-only manufacturing feature recognition for STEP B-rep models. See the README for the command line and the recognition document.

The recognisers (features) stand on the geometry kernel, haecceity, re-exported as kernel. pmi_json is the versioned JSON form of the kernel’s semantic PMI model, the quiddity parts / quiddity pmi process boundary.

Re-exports§

pub use haecceity as kernel;

Modules§

cli
quiddity <file.step>: recognise a STEP file’s features and print them as JSON: each family’s records at the top level, their fingerprints, and the versioned recognition document (crate::recognition: per feature its family, Python record type, defining faces and record). The part is recognised in its own frame and the records reported in the file’s coordinates; nonprincipal directions use vectors and record-owned origins. The document gives the recognition frame as provenance. A part with no frame (no plane or cylinder, no material) is recognised as placed in the file, with a warning on stderr.
correspondence
Correspondence between two revisions of a part, from their recognition results alone (docs/correspondence.md): revision-stable [fingerprint]s, and correspond, a pure function of two sets of them.
dimensioning
Requirement planning for prismatic holes, patterns and support-plane levels.
evidence_view
The recognition evidence view (quiddity.evidence.build_recognition_evidence and _project_recognition_evidence): one recognition run’s accepted features and rejected candidates, projected onto the part’s faces.
features
The feature recognisers, ported family by family from the Python implementation, and the per-run machinery they share.
file_api
File/byte entry points shared by the Python wheel and additive CLI commands.
framed_records
Records recognised in the part’s own frame, reported in the file’s coordinates (the maintainer’s decision on review M8: recognition canonicalises the frame first, so results do not depend on how the part was placed).
frames
Part-relative recognition with an explicit caller-space frame (quiddity.frames).
part_input
File-format dispatch shared by the command line and JSON-lines service.
pmi_json
The versioned JSON form of haecceity’s semantic PMI model (haecceity::pmi::PartPmi), the process boundary specify-core and draftwright use (quiddity pmi read, quiddity pmi check; design: docs/step-ap242.md, Architecture item 7).
published_records
Self-contained publication of fields that cannot use the file’s principal axes.
recognition
The versioned recognition document (review finding M5): one record per recognised feature, with its family, Python’s record class name, its defining faces and its record, for draftwright to read in place of Python quiddity’s document.
serve
quiddity serve: recognition and correspondence over JSON lines, one request per line on the input and one response per line on the output, in order.

Structs§

AngledStep
BSplineSurfaceSupport
BSplineSurfaceSupport: the full native tensor-product support, before trimming.
Blend
Blend: one complete rolling-ball occurrence.
BossRecord
A boss: axis points from its base to its free end, location is the axis point at the free end, height the axial length including convex end chamfers and rounds, and location includes the free end’s treatment too. When geometry leaves the two ends interchangeable, axis/location represent an end gauge, not an asserted material base/free direction.
Chamfer
ChamferOptions
Options named as recognise_chamfers’ keyword arguments.
Channel
A floored rectangular channel open at both longitudinal ends of its solid: its one defining measurement is width; the rest is kept for identity.
CircularBlendPath
One complete circular rolling path: the torus centre-line.
CircularBlindStep
CircularFacePattern
Correspondence
What correspond finds.
CounterSink
axis points from the wide opening into the part; location is the opening (major circle) centre; included_angle is the full cone angle in degrees.
DoubleDBore
One geometrically proven through double-D bore. major_diameter is the parent circle’s, across_flats the distance between the chords, and flat_direction their canonical unit normal. location is the profile centre on the bore’s high end.
DoubleDBoreOptions
recognise_double_d_bores’ keyword arguments.
EdgeOpenCircularPocket
A blind constant-depth recess with an interrupted circular-end profile. run_interval is floor to mouth along axis, and open_sign the side of the mouth.
EdgeOpenPrismaticRecess
A blind prismatic recess with one physical side open. run_interval is floor to mouth along axis, and open_sign the side of the mouth.
FaceLevel
FaceLevelOptions
Options named as recognise_face_levels’ keyword arguments.
Fillet
FilletOptions
Options named as recognise_fillets’ keyword arguments.
Fingerprints
The fingerprints of one recognition result.
Flat
FreeformSurface
FreeformSurface: one native B-spline face and only the relations its geometry establishes.
Groove
A recognised turned groove. axis is the turning axis, width the floor’s axial span, diameter the floor diameter and at the floor face’s box centre (the leader tip).
GussetRib
A right-triangular rib between two perpendicular support planes (GussetRib).
HelicalSpring
Measurements in mm, coils in turns. axis.point is the point on the axis nearest the file origin. start/end bound the physical wire along its unit direction. Unknown active coils are deliberately null: geometry does not establish seating/load.
HoleOptions
Options named as recognise_holes’ keyword arguments.
HoleRecord
A drilled hole: axis points from the opening into the hole, location is the axis point at the opening; diameter/depth describe the bore (the narrowest segment), with depth from the top of the bore to the hole’s deep end. bottom is "through", "flat", "drill_point" or "unknown". For interchangeable mouths, axis/location are a presentation end gauge. Identical counterbore, spotface and outer-step readings at both mouths retain both sets of defining faces; differing readings are omitted. Identical countersinks at opposite mouths retain both seats as context, presenting the seat at the gauge end. With no proved attachment, the gauge is on the bore itself. No material drilling-entry end is asserted.
InteriorVoid
InternalBevel
LocalStep
Lengths are millimetres. Endpoints lie on the concave seam; the two transverse directions point from it towards the convex lips. Height is the first leg of the canonical section, depth the second, with no implication of world gravity.
LocalStepEnd
A perpendicular exterior boundary of the run, consulted rather than claimed.
ModelledThread
Physical measurements, in millimetres. The span is measured from axis.point along axis.direction; length = end - start. Hand is intrinsic and survives axis reversal.
ModelledThreadRefusal
A helical candidate that could not establish a constant screw thread. It claims no faces.
ObliqueThroughStep
OrientedChamfer
OrientedChamferOptions
Options named as recognise_oriented_chamfers’ keyword arguments.
OrientedSlot
A rectangular through slot with free in-plane width and long directions (OrientedSlot). source is the accepted rectangular passage it was issued from: its frame’s run and its run interval are the slot’s depth direction and span. Directions to 6 decimals, sizes and centre to 3; body_key is None when the slot’s body is ambiguous.
PadOptions
Options named as recognise_rectangular_pads’ keyword arguments.
PairedRampStep
Part
A part’s boundary representation: faces, edges and solids in OpenCascade’s traversal order.
Passage
A legacy passage (Passage): the principal axis it runs along, its wall count, its length and centre, and its cross-section corners in the two other axes, all to 3 decimals; the corners anticlockwise from the least.
PassageError
A refusal, with the Python implementation’s ValueError message.
PlanarOuterProfile
Schema 1 (PlanarOuterProfile): one outer wire, oriented with material left of traversal.
PlanarOuterProfileEvidence
PlanarOuterProfileEvidence: one profile bound to its source in this part. Body identity is the exact face roster, so equal-valued bodies have distinct body_faces.
Plate
A recognised thin slab. axis is the thickness axis, lo/hi its bounding coordinates along it, and u/v the area-weighted centre of its two supporting skins (including projected convex edge treatments) on the other two axes.
PlateOptions
Options named as recognise_plates’ keyword arguments.
Pocket
A bounded blind recess: a slot capped by a floor, so with a depth (d_hi - d_lo) and the side it opens to along the depth axis (open_sign). edge_anchored marks a corner notch, located by the two envelope edges it touches.
PolygonalObliqueThroughStep
PolygonalOptions
Options named as recognise_polygonal_bosses’ and recognise_polygonal_stock’s keyword arguments.
PolygonalPrism
PolygonalBoss and PolygonalStock, which share their fields: a regular prism along principal axis ("x", "y" or "z"), side_count 4 or 6 (stock: 6), its center, across_flats, the axial base and top, each side’s outward heading in ring order and a point on each side face (its centroid).
PrismaticPocket
A floored recess of constant planar cross-section, open at one end (PrismaticPocket). axis is the direction the walls run, sides the number of walls, depth from the open end to the floor, open_sign +1 when the opening is at the high end of axis, at the void’s centre, and section its corners in the two other axes, walked canonically.
ProfileArc
A finite circular arc; its signed sweep is radians about the profile normal (ProfileArc).
ProfileLine
An oriented finite straight support, traversed from start to end (ProfileLine).
RaisedPad
RaisedPad: a bounded rectangular island, its box rounded to 3 decimals, the principal axis it rises along ("x", "y" or "z") and its direction (1 or -1) along it.
RecognitionEvidence
One recognition run’s evidence on part (RecognitionEvidence).
RecognitionOptions
Caller choices for one recognition (recognise_with, fingerprints_with, crate::evidence_view::evidence_with). The default gives the plain functions’ results.
RectangularBlindSlot
One capped, edge-open rectangular U-section slot. axis is the run direction and open_sign the side of its mouth; depth_sign the side the section opens to along depth_axis.
RefusedPlanarOuterProfile
RefusedPlanarOuterProfile.
RepeatingRadialProfile
A complete physical profile proved invariant under one sector rotation. sector_signature is the traversal- and phase-neutral inventory of one sector’s curves.
RepeatingRadialProfileOptions
recognise_repeating_radial_profiles’ keyword arguments.
RiserEvidence
RiserOptions
Options named as recognise_risers’ keyword arguments.
RoundBottomBlindSlot
One capped, edge-open U-section slot. axis is the run direction and open_sign the side of its mouth; depth_sign the side the U opens to along depth_axis. The opening is flat_width + 2 * radius wide and radius deep.
SectionPassage
A recognised section passage (SectionPassage).
SectionRecessFamilyError
Failure of the unified projection. Standalone projection APIs return it; aggregate recognition and evidence report it in the family failure ledger.
SheetMetalBody
A dominant developable sheet with its flange and bend geometry.
SheetMetalOptions
Options named as recognise_sheet_metal_bodies’ keyword arguments.
Slot
A milled through-slot: two opposed parallel walls facing each other. width is the wall separation along width_axis, lo/hi the ends along long_axis, d_lo/d_hi the extent on the third (depth) axis. body_key is the source solid’s key (None when it is ambiguous); end_radius and corner_radius are None when unproved, never “square”.
SpringTolerances
StraightBlendPath
One straight rolling path: a point on the cylinder axis (the area centre projected onto it) and the canonical axis direction.
SurfaceContinuityLink
SurfaceContinuityLink: a direct shared-edge relation to another native freeform face.
ThinWallBody
ThreadAnalysis
A recogniser run’s measurements and explicit refusals.
ThreadAxis
A line, with unit direction and the point on the line closest to the origin.
ThreadTolerances
Acceptance bounds in millimetres, including interpolation error in the STEP support.
ThroughStep
TurnedBody
TurnedProfileKey
The body-local membership of one turned profile (TurnedProfileKey): the axis letter, the commonest band axis point with its axial coordinate zeroed, the body’s box and its key.
TurnedStep
One axial segment of a stepped shaft, between two shoulders (or ends), measured along axis.

Enums§

BlendPath
BlendPath: serialised untagged, as the Python dataclasses are.
FilletAxis
Principal runs keep their existing letter and serialization. Oblique runs carry a full-precision unit direction, canonical with its dominant component positive.
GussetRibPattern
Congruent ribs of one body: a constant-pitch array (GussetRibArray) or a pair reflected across the body’s centre plane (GussetRibMirrorPair).
HolePattern
OrientedSlotPattern
A linear array (OrientedSlotArray) or grid (OrientedSlotGrid) of identical oriented slots.
OuterProfileRefusalReason
The closed unsupported outcomes (OuterProfileRefusalReason). Python’s inspection never returns InsufficientLineSupports or ConcaveProfile (it keeps such wires as schema 2); they are part of its public enumeration.
PadError
Where Python raises ValueError, with its message.
PocketPattern
ProfileSupport
One support of an outer profile; serialises as Python’s to_dict, with its kind.
SlotPattern

Functions§

correspond
Matches the old revision’s features and faces to the new one’s.
evidence_with
document under options: with an integration budget, every face’s integration is first measured against it, and a face that would exceed it is refused (crate::RecognitionOptions). The default options give document’s result.
fingerprints_with
The fingerprints of recognise_with’s recognition.
read_step
Read a STEP file’s bytes into a Part.
read_step_file
Read a STEP file from disk, transparently gunzipping *.gz.
recognise_with
recognise under options. The default options give recognise’s result.

Type Aliases§

PolygonalBoss
A polygonal boss attached to a support face.
PolygonalStock
A whole solid proved to be a regular hexagonal prism.