--- name: freecad-imported-geometry-audit description: Audit imported STL meshes and foreign STEP/BRep geometry in FreeCAD to recover useful datums, support levels, interface candidates, units, orientation, and explicit assembly placements. Use when imported parts overlap or float in arbitrary coordinates, dense mesh booleans time out, a mating surface must be inferred from facets, or an agent needs reliable assembled and exploded views without modifying the printable source geometry. license: MIT metadata: dev.v-san.skills: |- origin: original (personal skill) version: '0.1' changeDate: '2026-08-12' authors: - Vladimir Rogozhin dependsOnSkills: - freecad-scripts - freecad-model-validation requires: dependencies: - FreeCAD 1.0+ (FreeCAD 1.1+ recommended) - Python 3.11+ --- # FreeCAD Imported Geometry Audit Recover trustworthy geometric facts from imported parts before redesigning or assembling around them. Use `freecad-scripts` for API syntax and `freecad-model-validation` for the final acceptance report. ## Workflow 1. Preserve imported printable objects in their original coordinates. Build assembly views with `App::Link`, clones, or separate copies with explicit `Placement`. 2. Record units, source path, object label, mesh/shape counts, bbox, center, and current placement. 3. For STL, run `scripts/mesh_surface_report.py` on each mesh before converting it. The helper accepts both tuple-like facet points and FreeCAD vectors. Use document-frame output when the object has a Placement; local levels alone are not assembly datums. 4. Group near-horizontal facets by Z level, connected component, area, and XY extent. Treat the result as interface candidates, not automatic mating surfaces. 5. Compare both sides of a suspected interface. A support pad on one part does not imply a matching pin on the other. 6. Maintain an interface ledger using [interface-ledger.md](references/interface-ledger.md): datum, normal, intended relationship, clearance, evidence, and uncertainty. 7. Use lightweight reference envelopes for PCBs, connectors, solder, wire bends, finger access, and removal paths. Model the controlled mechanical envelope, not unnecessary electronic detail. 8. Convert mesh to BRep once only when a selected check requires it. Restrict expensive booleans to chosen candidates and cache the conversion. 9. Create assembled and exploded views from explicit placements, then validate support levels, intersections, and clearances numerically. 10. Report which placements are measured, inferred, or provisional. Keep every unresolved orientation or unit assumption visible. Read [imported-geometry-playbook.md](references/imported-geometry-playbook.md) for decision rules and failure modes. ## Stop conditions - Stop and ask for a physical measurement when mesh resolution, shrinkage, or an already printed part controls a fit to tenths of a millimetre. - Do not infer function solely from visual resemblance or bbox alignment. - Do not start with full `common()` across multiple dense faceted solids. - Do not save a temporary inspection visibility/camera state into the user's source document. ## Resources - `scripts/mesh_surface_report.py` — pure-Python mesh facet analysis callable from FreeCAD. - [imported-geometry-playbook.md](references/imported-geometry-playbook.md) — staged audit and placement workflow. - [interface-ledger.md](references/interface-ledger.md) — reusable interface record. - [provenance.md](references/provenance.md) — sources and local case-study origin.