moonbitMetrology is a MoonBit measurement-planning and quality-judgement library for mechanical parts. It models features, tolerances, devices, strategies, observations, and traceable plan summaries without pretending to be a full 3D geometry kernel.
What is included
feature and device domain types for holes, shafts, planes, slots, circles, cylinders, and datums;
deterministic device/feature matching with reachability and supported-feature checks;
repeat-count selection, conservative uncertainty estimation, capability checks, and coverage reporting;
measurement-result classification and a small CSV feature importer;
a dependency-light public API designed for later CMM, laser, vision, and OPC UA adapters.
Quick start
let feature = { id: "H1", kind: @yhsrtty/moonbit_metrology.Hole, nominal: 10.0, lower: -0.1, upper: 0.1, datum: false }
let device = { id: "cmm-01", accuracy: 0.01, reach: 50.0, supported_kinds: [@yhsrtty/moonbit_metrology.Hole] }
let plan = @yhsrtty/moonbit_metrology.plan(part_id="bracket-01", features=[feature], devices=[device])
assert plan.summary.coverage == 1.0
The sample input in examples/features.csv follows the same contract documented in docs/data-contract.md.
Run moon test, moon fmt --check, moon check --deny-warn, and moon info. The project intentionally starts with planning and judgement; geometry kernels and machine protocols are extension points, not hidden promises.
moonbitMetrology
moonbitMetrologyis a MoonBit measurement-planning and quality-judgement library for mechanical parts. It models features, tolerances, devices, strategies, observations, and traceable plan summaries without pretending to be a full 3D geometry kernel.What is included
Quick start
The sample input in
examples/features.csvfollows the same contract documented indocs/data-contract.md.Run
moon test,moon fmt --check,moon check --deny-warn, andmoon info. The project intentionally starts with planning and judgement; geometry kernels and machine protocols are extension points, not hidden promises.Project status
This is an early MoonBit Hackathon project. The API is expected to evolve during the event. See docs/architecture.md, CHANGELOG.md, and CONTRIBUTING.md.