Topology Split Edge Classifier
Clusters disjoint zones via R-Tree adjacency, splits boundaries at intersections, and classifies edge topology.
Overview
Clusters disjoint zones via R-Tree adjacency, splits boundaries at intersections, and classifies edge topology.
Inputs (2)
- RoomCurves (Curve): The primary tree of input room boundary curves
- ToleranceValue (Number): The strict proximity tolerance to merge shared walls
Outputs (6)
- Instructions_Out (Text): Canvas setup instructions to enforce correct data binding
- ExternalEdges (Curve): The flattened (Z=0) external boundary curves
- InternalPartitions (Curve): The flattened (Z=0) internal shared partition curves
- MetadataOut (Text): JSON serialized spatial parameters for orientation reconstruction
- FloorSlabs (Curve): The flattened (Z=0) combined boolean union of the rooms
- Info (Text): Method, assumptions, simplifications and references.
Method, assumptions and simplifications
The same notes appear in the component's Info output.
Method
- Room curves in each branch are grouped into clusters: two rooms join if their curves intersect or if one of 5 test points per segment of one lies within Tolerance of the other (R-Tree search with boxes grown by max(0.1 m, 2 × Tolerance), union-find).
- Per cluster, the rooms are boolean-unioned into FloorSlabs and flattened to Z = 0.
- All room curves are exploded into segments, and each segment is split at the point intersections it has with the others and at the ends of collinear overlaps, so a wall shared over part of its length is split into an internal shared part and an external remainder. Split points closer than Tolerance (distance) to a segment end are ignored.
- Pieces are compared in pairs: if the midpoint of a piece lies within Tolerance of another unmatched piece, both are internal partitions; pieces without a match are external edges. All output curves are flattened to Z = 0.
- MetadataOut gives one JSON text per output curve: midpoint (origin), its Z as true_z, and type internal or external. Output branch paths are the input path plus the cluster index.
Assumptions
- Rooms are closed planar outlines that share walls exactly (within Tolerance, default 0.001 model units).
- Each shared wall is shared by exactly two rooms.
Simplifications and limits
- Shared walls appear twice in InternalPartitions, once from each room.
- MetadataOut mixes internal and external entries, so it is not index-aligned with either curve output.
Workflow
- Room or zone outlines per floor -> RoomCurves; ExternalEdges -> facade modules; FloorSlabs -> slab extrusion.