Skip to content

feat(modeling): add linked STL contour draft - #3

Merged
Brutich merged 1 commit into
mainfrom
codex/draft-linked-stl-concave-hull-contour
Aug 27, 2026
Merged

Brutich merged 1 commit into
mainfrom
codex/draft-linked-stl-concave-hull-contour

Conversation

@Brutich

@Brutich Brutich commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

What changed

  • add an IronPython draft that slices one selected linked STL ImportInstance at a named Revit level plus an offset;
  • deduplicate section points and calculate a NetTopologySuite 2.6.0 concave hull;
  • create the largest exterior hull as a closed chain of Revit model lines;
  • document all inputs, model and file-system side effects, dependency loading, safety limits, output, limitations, and a manual test;
  • register the script in catalog.json and the README table.

The defaults preserve the current prototype: L3, +1500 mm, 25 mm point snap, 2500 mm maximum hull edge, 50 mm simplification, and 10 m² minimum area.

Scope and exclusions

This PR intentionally creates only the largest exterior contour. Courtyards/holes, detached polygons, all-level batch processing, automatic package installation, and a pure-Python hull implementation are out of scope for this draft.

NetTopologySuite paths are explicit IN[6] values when the assemblies are not already loaded. No machine-specific path or network download is embedded in the script.

User impact

The script writes one line subcategory when absent, one horizontal SketchPlane, and a closed set of model curves in one rollback-safe Revit transaction. It does not modify the selected link or source STL.

Validation performed

  • python tools/validate_catalog.py — passed for 6 scripts.
  • git diff --check — passed.
  • NetTopologySuite 2.6.0 XML API metadata was checked for ConcaveHull.MaximumEdgeLength, HolesAllowed, GetHull, and GeometryFactory.CreateMultiPointFromCoords.

A one-off source prototype ran successfully in Revit 2024 on the current building STL at L3 + 1500 mm: 7,264,272 triangles inspected, 12,281 intersected triangles, 8,902 snapped hull points, 46 model lines, approximately 590.55 m², and 25.8 seconds. The generalized repository file in this PR has not yet been executed as-is, so revit.tested remains empty.

Risks and remaining manual checks

  • run this exact catalog script in a disposable Revit 2024 model with the documented IN[6] assembly paths;
  • verify linked-instance transforms, line-style assignment, contour closure, and undo behavior;
  • tune point snap, maximum edge length, simplification, and minimum area against additional STL models;
  • review whether later iterations should preserve courtyards and detached contours.

Documentation impact

Adds the paired script guide and updates both human-readable and machine-readable catalogs.

@Brutich
Brutich force-pushed the codex/draft-linked-stl-concave-hull-contour branch from 48349c3 to 95bb87f Compare August 27, 2026 21:10
@Brutich
Brutich force-pushed the codex/draft-linked-stl-concave-hull-contour branch from 95bb87f to 6210179 Compare August 27, 2026 21:14
@Brutich
Brutich marked this pull request as ready for review August 27, 2026 21:51
@Brutich
Brutich merged commit 7497555 into main Aug 27, 2026
1 check passed
@Brutich
Brutich deleted the codex/draft-linked-stl-concave-hull-contour branch August 27, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant