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, theirfingerprints, and the versioned recognitiondocument(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, andcorrespond, 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_evidenceand_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§
- Angled
Step - BSpline
Surface Support BSplineSurfaceSupport: the full native tensor-product support, before trimming.- Blend
Blend: one complete rolling-ball occurrence.- Boss
Record - A boss:
axispoints from its base to its free end,locationis the axis point at the free end,heightthe axial length including convex end chamfers and rounds, andlocationincludes 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
- Chamfer
Options - 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. - Circular
Blend Path - One complete circular rolling path: the torus centre-line.
- Circular
Blind Step - Circular
Face Pattern - Correspondence
- What
correspondfinds. - Counter
Sink axispoints from the wide opening into the part;locationis the opening (major circle) centre;included_angleis the full cone angle in degrees.- DoubleD
Bore - One geometrically proven through double-D bore.
major_diameteris the parent circle’s,across_flatsthe distance between the chords, andflat_directiontheir canonical unit normal.locationis the profile centre on the bore’s high end. - DoubleD
Bore Options recognise_double_d_bores’ keyword arguments.- Edge
Open Circular Pocket - A blind constant-depth recess with an interrupted circular-end profile.
run_intervalis floor to mouth alongaxis, andopen_signthe side of the mouth. - Edge
Open Prismatic Recess - A blind prismatic recess with one physical side open.
run_intervalis floor to mouth alongaxis, andopen_signthe side of the mouth. - Face
Level - Face
Level Options - Options named as
recognise_face_levels’ keyword arguments. - Fillet
- Fillet
Options - Options named as
recognise_fillets’ keyword arguments. - Fingerprints
- The fingerprints of one recognition result.
- Flat
- Freeform
Surface FreeformSurface: one native B-spline face and only the relations its geometry establishes.- Groove
- A recognised turned groove.
axisis the turning axis,widththe floor’s axial span,diameterthe floor diameter andatthe floor face’s box centre (the leader tip). - Gusset
Rib - A right-triangular rib between two perpendicular support planes (
GussetRib). - Helical
Spring - Measurements in mm, coils in turns.
axis.pointis the point on the axis nearest the file origin.start/endbound the physical wire along its unit direction. Unknown active coils are deliberately null: geometry does not establish seating/load. - Hole
Options - Options named as
recognise_holes’ keyword arguments. - Hole
Record - A drilled hole:
axispoints from the opening into the hole,locationis the axis point at the opening;diameter/depthdescribe the bore (the narrowest segment), withdepthfrom the top of the bore to the hole’s deep end.bottomis"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. - Interior
Void - Internal
Bevel - Local
Step - 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.
- Local
Step End - A perpendicular exterior boundary of the run, consulted rather than claimed.
- Modelled
Thread - Physical measurements, in millimetres. The span is measured from
axis.pointalongaxis.direction;length = end - start. Hand is intrinsic and survives axis reversal. - Modelled
Thread Refusal - A helical candidate that could not establish a constant screw thread. It claims no faces.
- Oblique
Through Step - Oriented
Chamfer - Oriented
Chamfer Options - Options named as
recognise_oriented_chamfers’ keyword arguments. - Oriented
Slot - A rectangular through slot with free in-plane width and long directions (
OrientedSlot).sourceis 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_keyisNonewhen the slot’s body is ambiguous. - PadOptions
- Options named as
recognise_rectangular_pads’ keyword arguments. - Paired
Ramp Step - 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. - Passage
Error - A refusal, with the Python implementation’s
ValueErrormessage. - Planar
Outer Profile - Schema 1 (
PlanarOuterProfile): one outer wire, oriented with material left of traversal. - Planar
Outer Profile Evidence PlanarOuterProfileEvidence: one profile bound to its source in this part. Body identity is the exact face roster, so equal-valued bodies have distinctbody_faces.- Plate
- A recognised thin slab.
axisis the thickness axis,lo/hiits bounding coordinates along it, andu/vthe area-weighted centre of its two supporting skins (including projected convex edge treatments) on the other two axes. - Plate
Options - Options named as
recognise_plates’ keyword arguments. - 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_anchoredmarks a corner notch, located by the two envelope edges it touches. - Polygonal
Oblique Through Step - Polygonal
Options - Options named as
recognise_polygonal_bosses’ andrecognise_polygonal_stock’s keyword arguments. - Polygonal
Prism PolygonalBossandPolygonalStock, which share their fields: a regular prism along principalaxis("x","y"or"z"),side_count4 or 6 (stock: 6), itscenter,across_flats, the axialbaseandtop, each side’s outward heading in ring order and a point on each side face (its centroid).- Prismatic
Pocket - A floored recess of constant planar cross-section, open at one end (
PrismaticPocket).axisis the direction the walls run,sidesthe number of walls,depthfrom the open end to the floor,open_sign+1 when the opening is at the high end ofaxis,atthe void’s centre, andsectionits corners in the two other axes, walked canonically. - Profile
Arc - A finite circular arc; its signed sweep is radians about the profile normal (
ProfileArc). - Profile
Line - An oriented finite straight support, traversed from start to end (
ProfileLine). - Raised
Pad RaisedPad: a bounded rectangular island, its box rounded to 3 decimals, the principalaxisit rises along ("x","y"or"z") and itsdirection(1 or -1) along it.- Recognition
Evidence - One recognition run’s evidence on part (
RecognitionEvidence). - Recognition
Options - Caller choices for one recognition (
recognise_with,fingerprints_with,crate::evidence_view::evidence_with). The default gives the plain functions’ results. - Rectangular
Blind Slot - One capped, edge-open rectangular U-section slot.
axisis the run direction andopen_signthe side of its mouth;depth_signthe side the section opens to alongdepth_axis. - Refused
Planar Outer Profile RefusedPlanarOuterProfile.- Repeating
Radial Profile - A complete physical profile proved invariant under one sector rotation.
sector_signatureis the traversal- and phase-neutral inventory of one sector’s curves. - Repeating
Radial Profile Options recognise_repeating_radial_profiles’ keyword arguments.- Riser
Evidence - Riser
Options - Options named as
recognise_risers’ keyword arguments. - Round
Bottom Blind Slot - One capped, edge-open U-section slot.
axisis the run direction andopen_signthe side of its mouth;depth_signthe side the U opens to alongdepth_axis. The opening isflat_width + 2 * radiuswide andradiusdeep. - Section
Passage - A recognised section passage (
SectionPassage). - Section
Recess Family Error - Failure of the unified projection. Standalone projection APIs return it; aggregate recognition and evidence report it in the family failure ledger.
- Sheet
Metal Body - A dominant developable sheet with its flange and bend geometry.
- Sheet
Metal Options - Options named as
recognise_sheet_metal_bodies’ keyword arguments. - Slot
- A milled through-slot: two opposed parallel walls facing each other.
widthis the wall separation alongwidth_axis,lo/hithe ends alonglong_axis,d_lo/d_hithe extent on the third (depth) axis.body_keyis the source solid’s key (Nonewhen it is ambiguous);end_radiusandcorner_radiusareNonewhen unproved, never “square”. - Spring
Tolerances - Straight
Blend Path - One straight rolling path: a point on the cylinder axis (the area centre projected onto it) and the canonical axis direction.
- Surface
Continuity Link SurfaceContinuityLink: a direct shared-edge relation to another native freeform face.- Thin
Wall Body - Thread
Analysis - A recogniser run’s measurements and explicit refusals.
- Thread
Axis - A line, with unit direction and the point on the line closest to the origin.
- Thread
Tolerances - Acceptance bounds in millimetres, including interpolation error in the STEP support.
- Through
Step - Turned
Body - Turned
Profile Key - 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. - Turned
Step - One axial segment of a stepped shaft, between two shoulders (or ends), measured along
axis.
Enums§
- Blend
Path BlendPath: serialised untagged, as the Python dataclasses are.- Fillet
Axis - Principal runs keep their existing letter and serialization. Oblique runs carry a full-precision unit direction, canonical with its dominant component positive.
- Gusset
RibPattern - Congruent ribs of one body: a constant-pitch array (
GussetRibArray) or a pair reflected across the body’s centre plane (GussetRibMirrorPair). - Hole
Pattern - Oriented
Slot Pattern - A linear array (
OrientedSlotArray) or grid (OrientedSlotGrid) of identical oriented slots. - Outer
Profile Refusal Reason - The closed unsupported outcomes (
OuterProfileRefusalReason). Python’s inspection never returnsInsufficientLineSupportsorConcaveProfile(it keeps such wires as schema 2); they are part of its public enumeration. - PadError
- Where Python raises
ValueError, with its message. - Pocket
Pattern - Profile
Support - One support of an outer profile; serialises as Python’s
to_dict, with itskind. - Slot
Pattern
Functions§
- correspond
- Matches the old revision’s features and faces to the new one’s.
- evidence_
with documentunder 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 givedocument’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 recogniseunder options. The default options giverecognise’s result.
Type Aliases§
- Polygonal
Boss - A polygonal boss attached to a support face.
- Polygonal
Stock - A whole solid proved to be a regular hexagonal prism.