@ifc-lite/create 1.14.5 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/ifc-creator-math.d.ts +23 -0
  2. package/dist/ifc-creator-math.d.ts.map +1 -0
  3. package/dist/ifc-creator-math.js +50 -0
  4. package/dist/ifc-creator-math.js.map +1 -0
  5. package/dist/ifc-creator.d.ts +63 -1
  6. package/dist/ifc-creator.d.ts.map +1 -1
  7. package/dist/ifc-creator.js +221 -40
  8. package/dist/ifc-creator.js.map +1 -1
  9. package/dist/in-store/_emit-helpers.d.ts +52 -0
  10. package/dist/in-store/_emit-helpers.d.ts.map +1 -0
  11. package/dist/in-store/_emit-helpers.js +147 -0
  12. package/dist/in-store/_emit-helpers.js.map +1 -0
  13. package/dist/in-store/anchor.d.ts +27 -0
  14. package/dist/in-store/anchor.d.ts.map +1 -0
  15. package/dist/in-store/anchor.js +5 -0
  16. package/dist/in-store/anchor.js.map +1 -0
  17. package/dist/in-store/auto-space-detect.d.ts +68 -0
  18. package/dist/in-store/auto-space-detect.d.ts.map +1 -0
  19. package/dist/in-store/auto-space-detect.js +353 -0
  20. package/dist/in-store/auto-space-detect.js.map +1 -0
  21. package/dist/in-store/beam.d.ts +25 -0
  22. package/dist/in-store/beam.d.ts.map +1 -0
  23. package/dist/in-store/beam.js +119 -0
  24. package/dist/in-store/beam.js.map +1 -0
  25. package/dist/in-store/column.d.ts +42 -0
  26. package/dist/in-store/column.d.ts.map +1 -0
  27. package/dist/in-store/column.js +108 -0
  28. package/dist/in-store/column.js.map +1 -0
  29. package/dist/in-store/door.d.ts +44 -0
  30. package/dist/in-store/door.d.ts.map +1 -0
  31. package/dist/in-store/door.js +68 -0
  32. package/dist/in-store/door.js.map +1 -0
  33. package/dist/in-store/duplicate.d.ts +100 -0
  34. package/dist/in-store/duplicate.d.ts.map +1 -0
  35. package/dist/in-store/duplicate.js +122 -0
  36. package/dist/in-store/duplicate.js.map +1 -0
  37. package/dist/in-store/extract-walls.d.ts +80 -0
  38. package/dist/in-store/extract-walls.d.ts.map +1 -0
  39. package/dist/in-store/extract-walls.js +529 -0
  40. package/dist/in-store/extract-walls.js.map +1 -0
  41. package/dist/in-store/generate-spaces.d.ts +71 -0
  42. package/dist/in-store/generate-spaces.d.ts.map +1 -0
  43. package/dist/in-store/generate-spaces.js +76 -0
  44. package/dist/in-store/generate-spaces.js.map +1 -0
  45. package/dist/in-store/member.d.ts +32 -0
  46. package/dist/in-store/member.d.ts.map +1 -0
  47. package/dist/in-store/member.js +35 -0
  48. package/dist/in-store/member.js.map +1 -0
  49. package/dist/in-store/plate.d.ts +43 -0
  50. package/dist/in-store/plate.d.ts.map +1 -0
  51. package/dist/in-store/plate.js +33 -0
  52. package/dist/in-store/plate.js.map +1 -0
  53. package/dist/in-store/resolve-anchor.d.ts +12 -0
  54. package/dist/in-store/resolve-anchor.d.ts.map +1 -0
  55. package/dist/in-store/resolve-anchor.js +89 -0
  56. package/dist/in-store/resolve-anchor.js.map +1 -0
  57. package/dist/in-store/resolve-source.d.ts +19 -0
  58. package/dist/in-store/resolve-source.d.ts.map +1 -0
  59. package/dist/in-store/resolve-source.js +203 -0
  60. package/dist/in-store/resolve-source.js.map +1 -0
  61. package/dist/in-store/roof.d.ts +43 -0
  62. package/dist/in-store/roof.d.ts.map +1 -0
  63. package/dist/in-store/roof.js +33 -0
  64. package/dist/in-store/roof.js.map +1 -0
  65. package/dist/in-store/slab.d.ts +44 -0
  66. package/dist/in-store/slab.d.ts.map +1 -0
  67. package/dist/in-store/slab.js +142 -0
  68. package/dist/in-store/slab.js.map +1 -0
  69. package/dist/in-store/space.d.ts +43 -0
  70. package/dist/in-store/space.d.ts.map +1 -0
  71. package/dist/in-store/space.js +71 -0
  72. package/dist/in-store/space.js.map +1 -0
  73. package/dist/in-store/wall.d.ts +27 -0
  74. package/dist/in-store/wall.d.ts.map +1 -0
  75. package/dist/in-store/wall.js +119 -0
  76. package/dist/in-store/wall.js.map +1 -0
  77. package/dist/in-store/window.d.ts +36 -0
  78. package/dist/in-store/window.d.ts.map +1 -0
  79. package/dist/in-store/window.js +57 -0
  80. package/dist/in-store/window.js.map +1 -0
  81. package/dist/index.d.ts +18 -1
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +18 -0
  84. package/dist/index.js.map +1 -1
  85. package/dist/types.d.ts +96 -0
  86. package/dist/types.d.ts.map +1 -1
  87. package/package.json +6 -2
@@ -0,0 +1,147 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ /**
5
+ * Shared sub-graph emitters for the in-store element builders.
6
+ *
7
+ * Every IFC element that lands on a storey shares the same prologue
8
+ * (IfcCartesianPoint → IfcAxis2Placement3D → IfcLocalPlacement) and
9
+ * the same epilogue (IfcShapeRepresentation → IfcProductDefinitionShape
10
+ * → IfcRelContainedInSpatialStructure). Extracting those into pure
11
+ * helpers keeps each builder focused on the one part that's actually
12
+ * unique — the profile + element-line attribute order.
13
+ *
14
+ * All helpers operate purely through the StoreEditor; no parser
15
+ * access, no I/O.
16
+ */
17
+ import { generateIfcGuid } from '@ifc-lite/encoding';
18
+ const POINT_EPSILON = 1e-6;
19
+ /**
20
+ * Emit an IfcLocalPlacement chained to a parent. Wraps the cartesian
21
+ * point + axis-placement bookkeeping. Pass `Axis` and/or `RefDirection`
22
+ * as `[x, y, z]` to override defaults (otherwise IFC fills them with
23
+ * world up / world X).
24
+ */
25
+ export function emitLocalPlacement(editor, parentPlacementId, location, axis, refDirection) {
26
+ const originPt = editor.addEntity('IfcCartesianPoint', [location]).expressId;
27
+ const axisRef = axis !== undefined
28
+ ? `#${editor.addEntity('IfcDirection', [axis]).expressId}`
29
+ : null;
30
+ const refDirRef = refDirection !== undefined
31
+ ? `#${editor.addEntity('IfcDirection', [refDirection]).expressId}`
32
+ : null;
33
+ const axisPlacement = editor.addEntity('IfcAxis2Placement3D', [
34
+ `#${originPt}`,
35
+ axisRef,
36
+ refDirRef,
37
+ ]).expressId;
38
+ return editor.addEntity('IfcLocalPlacement', [
39
+ `#${parentPlacementId}`,
40
+ `#${axisPlacement}`,
41
+ ]).expressId;
42
+ }
43
+ /**
44
+ * Emit a centred rectangle profile. `centerX`/`centerY` shift the
45
+ * profile's local origin — useful for slab-style "spans 0..W × 0..D"
46
+ * placements where the centre sits at (W/2, D/2).
47
+ */
48
+ export function emitRectangleProfile(editor, width, depth, centerX = 0, centerY = 0) {
49
+ const originPt = editor.addEntity('IfcCartesianPoint', [[centerX, centerY]]).expressId;
50
+ const pos = editor.addEntity('IfcAxis2Placement2D', [`#${originPt}`, null]).expressId;
51
+ return editor.addEntity('IfcRectangleProfileDef', [
52
+ '.AREA.',
53
+ null,
54
+ `#${pos}`,
55
+ width,
56
+ depth,
57
+ ]).expressId;
58
+ }
59
+ /**
60
+ * Emit an arbitrary closed profile from a 2D polyline. Auto-closes if
61
+ * the input doesn't already terminate at the start point.
62
+ */
63
+ export function emitPolygonProfile(editor, curve) {
64
+ if (curve.length < 3) {
65
+ throw new Error('emitPolygonProfile: outline needs at least 3 points');
66
+ }
67
+ const first = curve[0];
68
+ const last = curve[curve.length - 1];
69
+ const closed = Math.abs(first[0] - last[0]) < POINT_EPSILON &&
70
+ Math.abs(first[1] - last[1]) < POINT_EPSILON;
71
+ const sequence = closed ? curve : [...curve, first];
72
+ const pointIds = sequence.map((pt) => editor.addEntity('IfcCartesianPoint', [[pt[0], pt[1]]]).expressId);
73
+ const polylineId = editor.addEntity('IfcPolyline', [pointIds.map((id) => `#${id}`)]).expressId;
74
+ return editor.addEntity('IfcArbitraryClosedProfileDef', [
75
+ '.AREA.',
76
+ null,
77
+ `#${polylineId}`,
78
+ ]).expressId;
79
+ }
80
+ /**
81
+ * Emit an IfcExtrudedAreaSolid extruding `profileId` along local +Z
82
+ * for `depth` metres. Standard prologue for any swept-solid element.
83
+ */
84
+ export function emitExtrudedSolid(editor, profileId, depth) {
85
+ const originPt = editor.addEntity('IfcCartesianPoint', [[0, 0, 0]]).expressId;
86
+ const axis = editor.addEntity('IfcAxis2Placement3D', [`#${originPt}`, null, null]).expressId;
87
+ const direction = editor.addEntity('IfcDirection', [[0, 0, 1]]).expressId;
88
+ return editor.addEntity('IfcExtrudedAreaSolid', [
89
+ `#${profileId}`,
90
+ `#${axis}`,
91
+ `#${direction}`,
92
+ depth,
93
+ ]).expressId;
94
+ }
95
+ /**
96
+ * Emit a "Body" IfcShapeRepresentation + IfcProductDefinitionShape
97
+ * pair from a single solid. Returns both ids so callers can record
98
+ * them in their build result for downstream tooling.
99
+ */
100
+ export function emitBodyRepresentation(editor, bodyContextId, solidId) {
101
+ const shapeRepId = editor.addEntity('IfcShapeRepresentation', [
102
+ `#${bodyContextId}`,
103
+ 'Body',
104
+ 'SweptSolid',
105
+ [`#${solidId}`],
106
+ ]).expressId;
107
+ const productShapeId = editor.addEntity('IfcProductDefinitionShape', [
108
+ null,
109
+ null,
110
+ [`#${shapeRepId}`],
111
+ ]).expressId;
112
+ return { shapeRepId, productShapeId };
113
+ }
114
+ /**
115
+ * Emit a fresh IfcRelContainedInSpatialStructure that anchors a single
116
+ * element to its storey. Easier than mutating an existing rel — STEP
117
+ * importers fold parallel rels back into one container at parse time.
118
+ */
119
+ export function emitRelContainedInSpatialStructure(editor, ownerHistoryId, elementId, storeyId) {
120
+ return editor.addEntity('IfcRelContainedInSpatialStructure', [
121
+ generateIfcGuid(),
122
+ `#${ownerHistoryId}`,
123
+ null,
124
+ null,
125
+ [`#${elementId}`],
126
+ `#${storeyId}`,
127
+ ]).expressId;
128
+ }
129
+ /**
130
+ * Build the leading attributes shared by every IfcElement subclass
131
+ * (GlobalId → OwnerHistory → Name → Description → ObjectType →
132
+ * ObjectPlacement → Representation → Tag). Callers append their
133
+ * type-specific tail (PredefinedType, OperationType, etc.).
134
+ */
135
+ export function ifcElementHeader(ownerHistoryId, placementId, productShapeId, params, defaultName) {
136
+ return [
137
+ generateIfcGuid(),
138
+ `#${ownerHistoryId}`,
139
+ params.Name ?? defaultName,
140
+ params.Description ?? null,
141
+ params.ObjectType ?? null,
142
+ `#${placementId}`,
143
+ `#${productShapeId}`,
144
+ params.Tag ?? null,
145
+ ];
146
+ }
147
+ //# sourceMappingURL=_emit-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_emit-helpers.js","sourceRoot":"","sources":["../../src/in-store/_emit-helpers.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAmB,EACnB,iBAAyB,EACzB,QAAkC,EAClC,IAA+B,EAC/B,YAAuC;IAEvC,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7E,MAAM,OAAO,GAAG,IAAI,KAAK,SAAS;QAChC,CAAC,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE;QAC1D,CAAC,CAAC,IAAI,CAAC;IACT,MAAM,SAAS,GAAG,YAAY,KAAK,SAAS;QAC1C,CAAC,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EAAE;QAClE,CAAC,CAAC,IAAI,CAAC;IACT,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,qBAAqB,EAAE;QAC5D,IAAI,QAAQ,EAAE;QACd,OAAO;QACP,SAAS;KACV,CAAC,CAAC,SAAS,CAAC;IACb,OAAO,MAAM,CAAC,SAAS,CAAC,mBAAmB,EAAE;QAC3C,I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+ * Spatial anchor for in-store builders — the set of references that any
3
+ * element being added to an existing parsed model needs in order to slot
4
+ * into the existing IFC graph correctly.
5
+ *
6
+ * Resolution from a parsed `IfcDataStore` lives in the backend layer
7
+ * (where `@ifc-lite/parser` is already a dependency); the builder
8
+ * functions in this module operate purely on these resolved ids.
9
+ */
10
+ export type SpatialAnchorSchema = 'IFC2X3' | 'IFC4' | 'IFC4X3' | 'IFC5';
11
+ export interface SpatialAnchor {
12
+ /** IfcOwnerHistory expressId — referenced by every IfcRoot. */
13
+ ownerHistoryId: number;
14
+ /** IfcGeometricRepresentationSubContext for 'Body' (or its IfcGeometricRepresentationContext fallback). */
15
+ bodyContextId: number;
16
+ /** The target IfcBuildingStorey expressId. */
17
+ storeyId: number;
18
+ /** The IfcLocalPlacement that the storey itself sits on. New element placements are chained from this. */
19
+ storeyPlacementId: number;
20
+ /**
21
+ * Target schema. Builders use this to decide which optional STEP arguments
22
+ * to emit — e.g. `IfcColumn.PredefinedType` only exists from IFC4 onward.
23
+ * Defaults to `'IFC4'` when unset for backward compatibility.
24
+ */
25
+ schema?: SpatialAnchorSchema;
26
+ }
27
+ //# sourceMappingURL=anchor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/in-store/anchor.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAExE,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,cAAc,EAAE,MAAM,CAAC;IACvB,2GAA2G;IAC3G,aAAa,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,0GAA0G;IAC1G,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
@@ -0,0 +1,5 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ export {};
5
+ //# sourceMappingURL=anchor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anchor.js","sourceRoot":"","sources":["../../src/in-store/anchor.ts"],"names":[],"mappings":"AAAA;;+DAE+D"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Detect enclosed regions from a set of 2D wall axis segments.
3
+ *
4
+ * Pipeline:
5
+ * 1. Snap close vertices within `snapTolerance` (collapses tiny gaps
6
+ * between wall ends that should meet at a corner).
7
+ * 2. Resolve pairwise segment intersections — each crossing splits
8
+ * both segments into shorter pieces meeting at the new vertex.
9
+ * 3. Build a half-edge graph (DCEL): every undirected segment
10
+ * becomes two opposing directed half-edges; per vertex, the
11
+ * half-edges leaving it are ordered by polar angle so we can
12
+ * find the next CCW-around-a-face neighbour in O(1).
13
+ * 4. Walk minimum cycles by always taking the leftmost turn. Each
14
+ * half-edge belongs to exactly one face cycle.
15
+ * 5. Drop the outer (unbounded) face — the one with the most-
16
+ * negative signed area.
17
+ * 6. Filter the remaining faces by `minArea`.
18
+ *
19
+ * Pure: no IFC dependencies. Output is a list of CCW polygons
20
+ * (`outline`) plus the signed area of each. Callers feed these into
21
+ * the per-storey IfcSpace builder.
22
+ */
23
+ export type Vec2 = [number, number];
24
+ export interface Segment {
25
+ a: Vec2;
26
+ b: Vec2;
27
+ }
28
+ export interface DetectedSpace {
29
+ /** CCW outline (no implicit closing edge — first vertex isn't repeated). */
30
+ outline: Vec2[];
31
+ /** Absolute polygon area, m². */
32
+ area: number;
33
+ }
34
+ export interface DetectOptions {
35
+ /** Distance below which two endpoints are merged. Default 0.05 m. */
36
+ snapTolerance?: number;
37
+ /** Faces below this area are dropped. Default 0.5 m². */
38
+ minArea?: number;
39
+ /**
40
+ * When true, the detector emits `console.debug` messages tracing the
41
+ * pipeline (vertex/edge counts, face areas, drop reasons). Surfaces
42
+ * the data needed to diagnose "no enclosed regions detected" without
43
+ * touching the algorithm.
44
+ */
45
+ debug?: boolean;
46
+ }
47
+ export interface DetectStats {
48
+ inputSegments: number;
49
+ vertices: number;
50
+ segmentsAfterSplit: number;
51
+ edges: number;
52
+ faces: number;
53
+ outerFacesDropped: number;
54
+ belowMinAreaDropped: number;
55
+ /** Largest detected interior face area (m²). 0 when no face passed. */
56
+ largestArea: number;
57
+ }
58
+ export declare function detectEnclosedAreas(segments: Segment[], options?: DetectOptions): DetectedSpace[];
59
+ /**
60
+ * Same pipeline as `detectEnclosedAreas`, but returns the per-stage
61
+ * counts alongside the spaces so callers can surface diagnostic
62
+ * information (used by the orchestrator + viewer Auto Spaces panel).
63
+ */
64
+ export declare function detectEnclosedAreasWithStats(segments: Segment[], options?: DetectOptions): {
65
+ spaces: DetectedSpace[];
66
+ stats: DetectStats;
67
+ };
68
+ //# sourceMappingURL=auto-space-detect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-space-detect.d.ts","sourceRoot":"","sources":["../../src/in-store/auto-space-detect.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpC,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,IAAI,CAAC;IACR,CAAC,EAAE,IAAI,CAAC;CACT;AAED,MAAM,WAAW,aAAa;IAC5B,4EAA4E;IAC5E,OAAO,EAAE,IAAI,EAAE,CAAC;IAChB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uEAAuE;IACvE,WAAW,EAAE,MAAM,CAAC;CACrB;AA8BD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,GAAE,aAAkB,GAC1B,aAAa,EAAE,CAEjB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,GAAE,aAAkB,GAC1B;IAAE,MAAM,EAAE,aAAa,EAAE,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,CAiSjD"}
@@ -0,0 +1,353 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ const DEFAULT_SNAP = 0.05;
5
+ const DEFAULT_MIN_AREA = 0.5;
6
+ const EPS = 1e-9;
7
+ export function detectEnclosedAreas(segments, options = {}) {
8
+ return detectEnclosedAreasWithStats(segments, options).spaces;
9
+ }
10
+ /**
11
+ * Same pipeline as `detectEnclosedAreas`, but returns the per-stage
12
+ * counts alongside the spaces so callers can surface diagnostic
13
+ * information (used by the orchestrator + viewer Auto Spaces panel).
14
+ */
15
+ export function detectEnclosedAreasWithStats(segments, options = {}) {
16
+ const snap = options.snapTolerance ?? DEFAULT_SNAP;
17
+ const minArea = options.minArea ?? DEFAULT_MIN_AREA;
18
+ const debug = !!options.debug;
19
+ const log = debug ? (...args) => console.debug('[auto-space-detect]', ...args) : () => { };
20
+ const stats = {
21
+ inputSegments: segments.length,
22
+ vertices: 0,
23
+ segmentsAfterSplit: 0,
24
+ edges: 0,
25
+ faces: 0,
26
+ outerFacesDropped: 0,
27
+ belowMinAreaDropped: 0,
28
+ largestArea: 0,
29
+ };
30
+ log(`input: ${segments.length} segments, snapTolerance=${snap}, minArea=${minArea}`);
31
+ if (segments.length < 3) {
32
+ log('input below 3 segments — no faces possible');
33
+ return { spaces: [], stats };
34
+ }
35
+ // ── 1. Snap endpoints ──
36
+ const vertices = [];
37
+ const lookup = (pt) => {
38
+ for (const v of vertices) {
39
+ const dx = v.pt[0] - pt[0];
40
+ const dy = v.pt[1] - pt[1];
41
+ if (dx * dx + dy * dy <= snap * snap)
42
+ return v.id;
43
+ }
44
+ const id = vertices.length;
45
+ vertices.push({ id, pt: [pt[0], pt[1]] });
46
+ return id;
47
+ };
48
+ // Initial vertex set: every endpoint, snapped.
49
+ const indexedSegs = [];
50
+ for (const seg of segments) {
51
+ const ai = lookup(seg.a);
52
+ const bi = lookup(seg.b);
53
+ if (ai === bi)
54
+ continue; // zero-length, post-snap
55
+ indexedSegs.push([ai, bi]);
56
+ }
57
+ log(`after snap: ${vertices.length} vertices, ${indexedSegs.length} segments`);
58
+ // ── 1b. Snap dangling endpoints onto nearby edge interiors ──
59
+ // Walls extracted from real IFC files often DON'T share corner
60
+ // vertices: each wall's axis runs centreline-to-centreline, but
61
+ // adjacent perpendicular walls have axes ending at the inside
62
+ // face of the partner wall — so the endpoints land on each
63
+ // other's interior, not at the same point. A pure endpoint snap
64
+ // misses this; we project each unique endpoint onto every nearby
65
+ // segment and, when within snap tolerance, mark the projection
66
+ // as the canonical vertex (and queue the host segment to be
67
+ // split there).
68
+ const splitSegs = [];
69
+ for (let i = 0; i < indexedSegs.length; i++) {
70
+ splitSegs.push([...indexedSegs[i]]);
71
+ }
72
+ const snapSq = snap * snap;
73
+ let tjunctionPasses = 0;
74
+ let tjunctionsApplied = false;
75
+ do {
76
+ tjunctionsApplied = false;
77
+ tjunctionPasses++;
78
+ // Snapshot endpoints we need to test — segs grow during the loop,
79
+ // but the new pieces share endpoints with the originals so we
80
+ // don't have to re-scan them.
81
+ const endpointIds = new Set();
82
+ for (const [a, b] of splitSegs) {
83
+ endpointIds.add(a);
84
+ endpointIds.add(b);
85
+ }
86
+ for (const vid of endpointIds) {
87
+ const p = vertices[vid].pt;
88
+ for (let s = 0; s < splitSegs.length; s++) {
89
+ const [a, b] = splitSegs[s];
90
+ if (a === vid || b === vid)
91
+ continue;
92
+ const proj = closestPointOnSegment(p, vertices[a].pt, vertices[b].pt);
93
+ if (!proj)
94
+ continue;
95
+ const dx = proj.point[0] - p[0];
96
+ const dy = proj.point[1] - p[1];
97
+ if (dx * dx + dy * dy > snapSq)
98
+ continue;
99
+ // Strictly interior — skip projections that land on the
100
+ // segment endpoints (those are handled by the regular vertex
101
+ // snap and would degenerate the split).
102
+ if (proj.t < 1e-6 || proj.t > 1 - 1e-6)
103
+ continue;
104
+ // Insert the dangling endpoint as the split vertex (its
105
+ // coords are already in `vertices[vid]`); split the host edge.
106
+ splitSegs[s] = [a, vid];
107
+ splitSegs.push([vid, b]);
108
+ tjunctionsApplied = true;
109
+ break;
110
+ }
111
+ if (tjunctionsApplied)
112
+ break;
113
+ }
114
+ } while (tjunctionsApplied && tjunctionPasses < Math.max(50, indexedSegs.length * 5));
115
+ log(`T-junction snap: ${tjunctionPasses} pass(es)`);
116
+ const maxIterations = Math.max(100, indexedSegs.length * 10);
117
+ let changed = true;
118
+ let guard = 0;
119
+ while (changed && guard < maxIterations) {
120
+ changed = false;
121
+ guard++;
122
+ outer: for (let i = 0; i < splitSegs.length; i++) {
123
+ for (let j = i + 1; j < splitSegs.length; j++) {
124
+ const [ai, bi] = splitSegs[i];
125
+ const [aj, bj] = splitSegs[j];
126
+ if (ai === aj || ai === bj || bi === aj || bi === bj)
127
+ continue;
128
+ const ip = segmentIntersection(vertices[ai].pt, vertices[bi].pt, vertices[aj].pt, vertices[bj].pt);
129
+ if (!ip)
130
+ continue;
131
+ const newIdx = lookup(ip);
132
+ if (newIdx === ai || newIdx === bi || newIdx === aj || newIdx === bj) {
133
+ // Intersection coincides with an existing vertex — split
134
+ // only the segments that don't already touch it.
135
+ if (newIdx !== ai && newIdx !== bi) {
136
+ splitSegs[i] = [ai, newIdx];
137
+ splitSegs.push([newIdx, bi]);
138
+ changed = true;
139
+ }
140
+ if (newIdx !== aj && newIdx !== bj) {
141
+ splitSegs[j] = [aj, newIdx];
142
+ splitSegs.push([newIdx, bj]);
143
+ changed = true;
144
+ }
145
+ if (changed)
146
+ break outer;
147
+ }
148
+ else {
149
+ // Genuine T or X crossing.
150
+ splitSegs[i] = [ai, newIdx];
151
+ splitSegs.push([newIdx, bi]);
152
+ splitSegs[j] = [aj, newIdx];
153
+ splitSegs.push([newIdx, bj]);
154
+ changed = true;
155
+ break outer;
156
+ }
157
+ }
158
+ }
159
+ }
160
+ if (changed && guard >= maxIterations) {
161
+ // Iteration cap hit before the splitter converged — detection
162
+ // results may be incomplete, but emit them rather than failing.
163
+ log(`intersection splitter hit iteration cap ${maxIterations}; results may be incomplete`);
164
+ }
165
+ // Deduplicate (a, b) and (b, a) pairs.
166
+ const undirected = new Set();
167
+ const finalSegs = [];
168
+ for (const [a, b] of splitSegs) {
169
+ if (a === b)
170
+ continue;
171
+ const key = a < b ? `${a}-${b}` : `${b}-${a}`;
172
+ if (undirected.has(key))
173
+ continue;
174
+ undirected.add(key);
175
+ finalSegs.push([a, b]);
176
+ }
177
+ stats.vertices = vertices.length;
178
+ stats.segmentsAfterSplit = finalSegs.length;
179
+ log(`after intersect-split: ${finalSegs.length} unique edges`);
180
+ if (finalSegs.length < 3) {
181
+ log('after split: fewer than 3 edges — no faces possible');
182
+ return { spaces: [], stats };
183
+ }
184
+ // ── 3. Build half-edge graph ──
185
+ const edges = [];
186
+ const vertexEdges = vertices.map(() => []);
187
+ for (const [a, b] of finalSegs) {
188
+ const dxA = vertices[b].pt[0] - vertices[a].pt[0];
189
+ const dyA = vertices[b].pt[1] - vertices[a].pt[1];
190
+ const fwd = edges.length;
191
+ const bwd = edges.length + 1;
192
+ edges.push({
193
+ id: fwd,
194
+ origin: a,
195
+ dest: b,
196
+ twin: bwd,
197
+ angle: Math.atan2(dyA, dxA),
198
+ face: -1,
199
+ next: -1,
200
+ dx: dxA,
201
+ dy: dyA,
202
+ });
203
+ edges.push({
204
+ id: bwd,
205
+ origin: b,
206
+ dest: a,
207
+ twin: fwd,
208
+ angle: Math.atan2(-dyA, -dxA),
209
+ face: -1,
210
+ next: -1,
211
+ dx: -dxA,
212
+ dy: -dyA,
213
+ });
214
+ vertexEdges[a].push(fwd);
215
+ vertexEdges[b].push(bwd);
216
+ }
217
+ // Sort each vertex's outgoing edges by angle so we can compute
218
+ // "next around face" via the leftmost-turn rule in O(1).
219
+ for (const list of vertexEdges) {
220
+ list.sort((p, q) => edges[p].angle - edges[q].angle);
221
+ }
222
+ // ── 4. Walk faces ──
223
+ // Around a face (CCW interior), the next half-edge after entering
224
+ // a vertex along edge `e` is the half-edge whose origin is the
225
+ // entered vertex AND whose direction is the *clockwise* neighbour
226
+ // of e.twin's direction in the cyclic angle ordering.
227
+ //
228
+ // prev = e
229
+ // v = e.dest
230
+ // fanIdx = position of e.twin in vertexEdges[v]
231
+ // next = vertexEdges[v][(fanIdx - 1 + len) % len]
232
+ for (const e of edges) {
233
+ if (e.next !== -1)
234
+ continue;
235
+ const v = e.dest;
236
+ const fan = vertexEdges[v];
237
+ const idx = fan.indexOf(e.twin);
238
+ if (idx < 0)
239
+ continue; // structurally impossible, but defensive
240
+ const nextIdx = (idx - 1 + fan.length) % fan.length;
241
+ e.next = fan[nextIdx];
242
+ }
243
+ let faceCount = 0;
244
+ const faceCycles = [];
245
+ for (const e of edges) {
246
+ if (e.face !== -1)
247
+ continue;
248
+ const cycle = [];
249
+ let cur = e.id;
250
+ let safety = 0;
251
+ while (cur !== -1 && edges[cur].face === -1 && safety++ < edges.length + 4) {
252
+ edges[cur].face = faceCount;
253
+ cycle.push(cur);
254
+ cur = edges[cur].next;
255
+ if (cur === e.id)
256
+ break;
257
+ }
258
+ faceCycles.push(cycle);
259
+ faceCount++;
260
+ }
261
+ const faceAreas = faceCycles.map((cycle, idx) => {
262
+ let signed = 0;
263
+ for (const eid of cycle) {
264
+ const eg = edges[eid];
265
+ const p = vertices[eg.origin].pt;
266
+ const q = vertices[eg.dest].pt;
267
+ signed += p[0] * q[1] - q[0] * p[1];
268
+ }
269
+ signed *= 0.5;
270
+ return { idx, signed, area: Math.abs(signed) };
271
+ });
272
+ stats.edges = edges.length;
273
+ stats.faces = faceCycles.length;
274
+ log(`half-edge graph: ${edges.length} half-edges, ${faceCycles.length} faces total`);
275
+ // ── 6. Drop outer faces + filter by min area + emit CCW outlines ──
276
+ // With the leftmost-turn walk every interior (enclosed) face winds
277
+ // CCW (signed area > 0); the unbounded face surrounding each
278
+ // connected component winds CW (signed area < 0). Drop the
279
+ // negatives — that handles the multi-component case naturally,
280
+ // since each component contributes its own outer face.
281
+ const out = [];
282
+ for (const f of faceAreas) {
283
+ if (f.signed <= 0) {
284
+ stats.outerFacesDropped++;
285
+ continue;
286
+ }
287
+ if (f.area < minArea) {
288
+ stats.belowMinAreaDropped++;
289
+ log(`face #${f.idx}: dropped (area=${f.area.toFixed(3)} < minArea=${minArea})`);
290
+ continue;
291
+ }
292
+ const cycle = faceCycles[f.idx];
293
+ const outline = cycle.map((eid) => {
294
+ const v = vertices[edges[eid].origin].pt;
295
+ return [v[0], v[1]];
296
+ });
297
+ out.push({ outline, area: f.area });
298
+ if (f.area > stats.largestArea)
299
+ stats.largestArea = f.area;
300
+ }
301
+ // Stable sort: largest area first so the UI shows "main rooms" up top.
302
+ out.sort((a, b) => b.area - a.area);
303
+ log(`detected ${out.length} interior region(s); dropped ${stats.outerFacesDropped} outer + ${stats.belowMinAreaDropped} below min-area`);
304
+ return { spaces: out, stats };
305
+ }
306
+ /**
307
+ * Closest point on segment ab to a query point q, plus the
308
+ * parametric distance `t ∈ [0, 1]` along ab. Returns null for
309
+ * zero-length segments.
310
+ */
311
+ function closestPointOnSegment(q, a, b) {
312
+ const dx = b[0] - a[0];
313
+ const dy = b[1] - a[1];
314
+ const len2 = dx * dx + dy * dy;
315
+ if (len2 < 1e-12)
316
+ return null;
317
+ let t = ((q[0] - a[0]) * dx + (q[1] - a[1]) * dy) / len2;
318
+ if (t < 0)
319
+ t = 0;
320
+ else if (t > 1)
321
+ t = 1;
322
+ return { point: [a[0] + t * dx, a[1] + t * dy], t };
323
+ }
324
+ /**
325
+ * Proper-segment intersection test in 2D. Returns the crossing point
326
+ * when the segments cross strictly inside both (excluding shared
327
+ * endpoints at parameter 0 or 1, which produce no new vertex). Uses
328
+ * a small parametric tolerance so two near-coincident endpoints
329
+ * don't register as a fresh interior crossing.
330
+ */
331
+ function segmentIntersection(p1, p2, p3, p4) {
332
+ const x1 = p1[0], y1 = p1[1];
333
+ const x2 = p2[0], y2 = p2[1];
334
+ const x3 = p3[0], y3 = p3[1];
335
+ const x4 = p4[0], y4 = p4[1];
336
+ const denom = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);
337
+ if (Math.abs(denom) < EPS)
338
+ return null; // parallel / coincident
339
+ const t = ((x1 - x3) * (y3 - y4) - (y1 - y3) * (x3 - x4)) / denom;
340
+ const u = -((x1 - x2) * (y1 - y3) - (y1 - y2) * (x1 - x3)) / denom;
341
+ // Allow exact endpoints (t == 0 / 1) so a T-junction registers and
342
+ // splits the through-segment, but skip when both segments meet
343
+ // *only* at a shared endpoint (no new vertex needed).
344
+ const tol = 1e-7;
345
+ if (t < -tol || t > 1 + tol)
346
+ return null;
347
+ if (u < -tol || u > 1 + tol)
348
+ return null;
349
+ if ((t < tol || t > 1 - tol) && (u < tol || u > 1 - tol))
350
+ return null;
351
+ return [x1 + t * (x2 - x1), y1 + t * (y2 - y1)];
352
+ }
353
+ //# sourceMappingURL=auto-space-detect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-space-detect.js","sourceRoot":"","sources":["../../src/in-store/auto-space-detect.ts"],"names":[],"mappings":"AAAA;;+DAE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