@ifc-lite/create 2.7.0 → 2.9.2

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 (171) hide show
  1. package/README.md +7 -0
  2. package/dist/ifc-creator-alignment.d.ts +30 -0
  3. package/dist/ifc-creator-alignment.d.ts.map +1 -0
  4. package/dist/ifc-creator-alignment.js +174 -0
  5. package/dist/ifc-creator-alignment.js.map +1 -0
  6. package/dist/ifc-creator-header.d.ts +2 -0
  7. package/dist/ifc-creator-header.d.ts.map +1 -0
  8. package/dist/ifc-creator-header.js +22 -0
  9. package/dist/ifc-creator-header.js.map +1 -0
  10. package/dist/ifc-creator-math.d.ts +15 -5
  11. package/dist/ifc-creator-math.d.ts.map +1 -1
  12. package/dist/ifc-creator-math.js +25 -2
  13. package/dist/ifc-creator-math.js.map +1 -1
  14. package/dist/ifc-creator-relationships.d.ts +43 -0
  15. package/dist/ifc-creator-relationships.d.ts.map +1 -0
  16. package/dist/ifc-creator-relationships.js +38 -0
  17. package/dist/ifc-creator-relationships.js.map +1 -0
  18. package/dist/ifc-creator-styles.d.ts +22 -0
  19. package/dist/ifc-creator-styles.d.ts.map +1 -0
  20. package/dist/ifc-creator-styles.js +50 -0
  21. package/dist/ifc-creator-styles.js.map +1 -0
  22. package/dist/ifc-creator-terrain.d.ts +170 -0
  23. package/dist/ifc-creator-terrain.d.ts.map +1 -0
  24. package/dist/ifc-creator-terrain.js +180 -0
  25. package/dist/ifc-creator-terrain.js.map +1 -0
  26. package/dist/ifc-creator.d.ts +21 -7
  27. package/dist/ifc-creator.d.ts.map +1 -1
  28. package/dist/ifc-creator.js +95 -95
  29. package/dist/ifc-creator.js.map +1 -1
  30. package/dist/in-store/_emit-helpers.d.ts +10 -0
  31. package/dist/in-store/_emit-helpers.d.ts.map +1 -1
  32. package/dist/in-store/_emit-helpers.js +15 -2
  33. package/dist/in-store/_emit-helpers.js.map +1 -1
  34. package/dist/in-store/anchor.d.ts +2 -0
  35. package/dist/in-store/anchor.d.ts.map +1 -1
  36. package/dist/in-store/anchor.js.map +1 -1
  37. package/dist/in-store/apply-style.d.ts +3 -6
  38. package/dist/in-store/apply-style.d.ts.map +1 -1
  39. package/dist/in-store/apply-style.js +3 -77
  40. package/dist/in-store/apply-style.js.map +1 -1
  41. package/dist/in-store/beam.d.ts +2 -0
  42. package/dist/in-store/beam.d.ts.map +1 -1
  43. package/dist/in-store/beam.js +2 -2
  44. package/dist/in-store/beam.js.map +1 -1
  45. package/dist/in-store/column.d.ts +2 -0
  46. package/dist/in-store/column.d.ts.map +1 -1
  47. package/dist/in-store/column.js +4 -2
  48. package/dist/in-store/column.js.map +1 -1
  49. package/dist/in-store/door.d.ts +2 -0
  50. package/dist/in-store/door.d.ts.map +1 -1
  51. package/dist/in-store/door.js +2 -0
  52. package/dist/in-store/door.js.map +1 -1
  53. package/dist/in-store/extract-walls.d.ts +1 -1
  54. package/dist/in-store/extract-walls.d.ts.map +1 -1
  55. package/dist/in-store/extract-walls.js +28 -54
  56. package/dist/in-store/extract-walls.js.map +1 -1
  57. package/dist/in-store/generate-spaces-all.d.ts +6 -2
  58. package/dist/in-store/generate-spaces-all.d.ts.map +1 -1
  59. package/dist/in-store/generate-spaces-all.js +33 -9
  60. package/dist/in-store/generate-spaces-all.js.map +1 -1
  61. package/dist/in-store/generate-spaces.js +1 -1
  62. package/dist/in-store/generate-spaces.js.map +1 -1
  63. package/dist/in-store/member.d.ts +2 -0
  64. package/dist/in-store/member.d.ts.map +1 -1
  65. package/dist/in-store/member.js.map +1 -1
  66. package/dist/in-store/placement-frame.d.ts +8 -0
  67. package/dist/in-store/placement-frame.d.ts.map +1 -1
  68. package/dist/in-store/placement-frame.js.map +1 -1
  69. package/dist/in-store/plate.d.ts +4 -0
  70. package/dist/in-store/plate.d.ts.map +1 -1
  71. package/dist/in-store/plate.js +4 -0
  72. package/dist/in-store/plate.js.map +1 -1
  73. package/dist/in-store/resolve-anchor.d.ts +4 -2
  74. package/dist/in-store/resolve-anchor.d.ts.map +1 -1
  75. package/dist/in-store/resolve-anchor.js +79 -92
  76. package/dist/in-store/resolve-anchor.js.map +1 -1
  77. package/dist/in-store/resolve-source.d.ts +2 -1
  78. package/dist/in-store/resolve-source.d.ts.map +1 -1
  79. package/dist/in-store/resolve-source.js +49 -49
  80. package/dist/in-store/resolve-source.js.map +1 -1
  81. package/dist/in-store/roof.d.ts +4 -0
  82. package/dist/in-store/roof.d.ts.map +1 -1
  83. package/dist/in-store/roof.js +4 -0
  84. package/dist/in-store/roof.js.map +1 -1
  85. package/dist/in-store/slab.d.ts +4 -0
  86. package/dist/in-store/slab.d.ts.map +1 -1
  87. package/dist/in-store/slab.js +6 -2
  88. package/dist/in-store/slab.js.map +1 -1
  89. package/dist/in-store/space.d.ts +4 -0
  90. package/dist/in-store/space.d.ts.map +1 -1
  91. package/dist/in-store/space.js +6 -2
  92. package/dist/in-store/space.js.map +1 -1
  93. package/dist/in-store/spatial-children.d.ts +52 -0
  94. package/dist/in-store/spatial-children.d.ts.map +1 -0
  95. package/dist/in-store/spatial-children.js +112 -0
  96. package/dist/in-store/spatial-children.js.map +1 -0
  97. package/dist/in-store/structural-action.d.ts +85 -0
  98. package/dist/in-store/structural-action.d.ts.map +1 -0
  99. package/dist/in-store/structural-action.js +83 -0
  100. package/dist/in-store/structural-action.js.map +1 -0
  101. package/dist/in-store/structural-analysis-model.d.ts +49 -0
  102. package/dist/in-store/structural-analysis-model.d.ts.map +1 -0
  103. package/dist/in-store/structural-analysis-model.js +29 -0
  104. package/dist/in-store/structural-analysis-model.js.map +1 -0
  105. package/dist/in-store/structural-curve-member.d.ts +90 -0
  106. package/dist/in-store/structural-curve-member.d.ts.map +1 -0
  107. package/dist/in-store/structural-curve-member.js +83 -0
  108. package/dist/in-store/structural-curve-member.js.map +1 -0
  109. package/dist/in-store/structural-load-group.d.ts +61 -0
  110. package/dist/in-store/structural-load-group.d.ts.map +1 -0
  111. package/dist/in-store/structural-load-group.js +38 -0
  112. package/dist/in-store/structural-load-group.js.map +1 -0
  113. package/dist/in-store/structural-point-connection.d.ts +75 -0
  114. package/dist/in-store/structural-point-connection.d.ts.map +1 -0
  115. package/dist/in-store/structural-point-connection.js +41 -0
  116. package/dist/in-store/structural-point-connection.js.map +1 -0
  117. package/dist/in-store/structural-relationships.d.ts +47 -0
  118. package/dist/in-store/structural-relationships.d.ts.map +1 -0
  119. package/dist/in-store/structural-relationships.js +85 -0
  120. package/dist/in-store/structural-relationships.js.map +1 -0
  121. package/dist/in-store/style-entity-reader.d.ts +14 -0
  122. package/dist/in-store/style-entity-reader.d.ts.map +1 -0
  123. package/dist/in-store/style-entity-reader.js +58 -0
  124. package/dist/in-store/style-entity-reader.js.map +1 -0
  125. package/dist/in-store/wall.d.ts +2 -0
  126. package/dist/in-store/wall.d.ts.map +1 -1
  127. package/dist/in-store/wall.js +2 -2
  128. package/dist/in-store/wall.js.map +1 -1
  129. package/dist/in-store/window.d.ts +2 -0
  130. package/dist/in-store/window.d.ts.map +1 -1
  131. package/dist/in-store/window.js +2 -0
  132. package/dist/in-store/window.js.map +1 -1
  133. package/dist/index.d.ts +14 -0
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +13 -0
  136. package/dist/index.js.map +1 -1
  137. package/dist/landxml/alignment-mapping.d.ts +98 -0
  138. package/dist/landxml/alignment-mapping.d.ts.map +1 -0
  139. package/dist/landxml/alignment-mapping.js +282 -0
  140. package/dist/landxml/alignment-mapping.js.map +1 -0
  141. package/dist/landxml/alignment-record.d.ts +18 -0
  142. package/dist/landxml/alignment-record.d.ts.map +1 -0
  143. package/dist/landxml/alignment-record.js +63 -0
  144. package/dist/landxml/alignment-record.js.map +1 -0
  145. package/dist/landxml/coordinate-plausibility.d.ts +54 -0
  146. package/dist/landxml/coordinate-plausibility.d.ts.map +1 -0
  147. package/dist/landxml/coordinate-plausibility.js +59 -0
  148. package/dist/landxml/coordinate-plausibility.js.map +1 -0
  149. package/dist/landxml/landxml-to-ifc.d.ts +45 -0
  150. package/dist/landxml/landxml-to-ifc.d.ts.map +1 -0
  151. package/dist/landxml/landxml-to-ifc.js +197 -0
  152. package/dist/landxml/landxml-to-ifc.js.map +1 -0
  153. package/dist/landxml/refusals.d.ts +41 -0
  154. package/dist/landxml/refusals.d.ts.map +1 -0
  155. package/dist/landxml/refusals.js +118 -0
  156. package/dist/landxml/refusals.js.map +1 -0
  157. package/dist/landxml/result-types.d.ts +73 -0
  158. package/dist/landxml/result-types.d.ts.map +1 -0
  159. package/dist/landxml/result-types.js +5 -0
  160. package/dist/landxml/result-types.js.map +1 -0
  161. package/dist/landxml/source-types.d.ts +169 -0
  162. package/dist/landxml/source-types.d.ts.map +1 -0
  163. package/dist/landxml/source-types.js +5 -0
  164. package/dist/landxml/source-types.js.map +1 -0
  165. package/dist/landxml/writers.d.ts +31 -0
  166. package/dist/landxml/writers.d.ts.map +1 -0
  167. package/dist/landxml/writers.js +143 -0
  168. package/dist/landxml/writers.js.map +1 -0
  169. package/dist/types.d.ts +7 -0
  170. package/dist/types.d.ts.map +1 -1
  171. package/package.json +6 -6
@@ -0,0 +1,83 @@
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
+ import { vecCross, vecNorm, assertFinitePoint3 } from '../ifc-creator-math.js';
5
+ import { toNativePoint3 } from './anchor.js';
6
+ import { emitLocalPlacement, ownerHistoryRef, productGuid } from './_emit-helpers.js';
7
+ function computeRefDirection(axis) {
8
+ const up = Math.abs(axis[2]) < 0.9 ? [0, 0, 1] : [1, 0, 0];
9
+ return vecNorm(vecCross(up, axis));
10
+ }
11
+ export function addStructuralCurveMemberToStore(editor, anchor, params) {
12
+ if ((anchor.schema ?? 'IFC4') === 'IFC2X3') {
13
+ throw new Error('addStructuralCurveMemberToStore: IFC2X3 has no IfcStructuralCurveMember — target IFC4 or later');
14
+ }
15
+ const predefinedType = params.PredefinedType ?? 'NOTDEFINED';
16
+ if (predefinedType === 'USERDEFINED' && !params.ObjectType) {
17
+ throw new Error('addStructuralCurveMemberToStore: ObjectType is required when PredefinedType is USERDEFINED');
18
+ }
19
+ assertFinitePoint3({ Start: params.Start, End: params.End }, 'addStructuralCurveMemberToStore');
20
+ params = {
21
+ ...params,
22
+ Start: toNativePoint3(anchor, params.Start),
23
+ End: toNativePoint3(anchor, params.End),
24
+ };
25
+ const dx = params.End[0] - params.Start[0];
26
+ const dy = params.End[1] - params.Start[1];
27
+ const dz = params.End[2] - params.Start[2];
28
+ const length = Math.sqrt(dx * dx + dy * dy + dz * dz);
29
+ if (length <= 0) {
30
+ throw new Error('addStructuralCurveMemberToStore: Start and End must be distinct points');
31
+ }
32
+ const dir = vecNorm([dx, dy, dz]);
33
+ const refDir = computeRefDirection(dir);
34
+ // Placement at Start, local Z along the member axis (mirrors addBeamToStore).
35
+ const placementId = emitLocalPlacement(editor, anchor.storeyPlacementId, params.Start, dir, refDir);
36
+ // `IfcStructuralCurveMember.Axis` is expressed in the placement's LOCAL
37
+ // frame, and the placement's own local Z is already the member direction
38
+ // (set above), so the member's local axis is always world +Z here.
39
+ const axisDirectionId = editor.addEntity('IfcDirection', [[0, 0, 1]]).expressId;
40
+ // Topology geometry: an edge from the local origin to (0, 0, length) —
41
+ // `length` is already in the file's native unit (Start/End were converted
42
+ // above) — wholly owned by this member (see module doc).
43
+ const pt1Id = editor.addEntity('IfcCartesianPoint', [[0, 0, 0]]).expressId;
44
+ const pt2Id = editor.addEntity('IfcCartesianPoint', [[0, 0, length]]).expressId;
45
+ const vertex1Id = editor.addEntity('IfcVertexPoint', [`#${pt1Id}`]).expressId;
46
+ const vertex2Id = editor.addEntity('IfcVertexPoint', [`#${pt2Id}`]).expressId;
47
+ const edgeId = editor.addEntity('IfcEdge', [`#${vertex1Id}`, `#${vertex2Id}`]).expressId;
48
+ const topologyRepId = editor.addEntity('IfcTopologyRepresentation', [
49
+ `#${anchor.axisContextId}`,
50
+ 'Axis',
51
+ 'Edge',
52
+ [`#${edgeId}`],
53
+ ]).expressId;
54
+ const productShapeId = editor.addEntity('IfcProductDefinitionShape', [
55
+ null,
56
+ null,
57
+ [`#${topologyRepId}`],
58
+ ]).expressId;
59
+ const memberId = editor.addEntity('IfcStructuralCurveMember', [
60
+ productGuid(params, anchor.guidRandom),
61
+ ownerHistoryRef(anchor.ownerHistoryId),
62
+ params.Name ?? 'Structural Curve Member',
63
+ params.Description ?? null,
64
+ params.ObjectType ?? null,
65
+ `#${placementId}`,
66
+ `#${productShapeId}`,
67
+ `.${predefinedType}.`,
68
+ `#${axisDirectionId}`,
69
+ ]).expressId;
70
+ return {
71
+ memberId,
72
+ placementId,
73
+ axisDirectionId,
74
+ point1Id: pt1Id,
75
+ point2Id: pt2Id,
76
+ vertex1Id,
77
+ vertex2Id,
78
+ edgeId,
79
+ topologyRepId,
80
+ productShapeId,
81
+ };
82
+ }
83
+ //# sourceMappingURL=structural-curve-member.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-curve-member.js","sourceRoot":"","sources":["../../src/in-store/structural-curve-member.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA8D/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE/E,OAAO,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAmCtF,SAAS,mBAAmB,CAAC,IAAa;IACxC,MAAM,EAAE,GAAY,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpE,OAAO,OAAO,CAAC,QAAQ,CAAC,EAAE,EA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CAAC,CAAC,SAAS,CAAC;IACzF,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,2BAA2B,EAAE;QAClE,IAAI,MAAM,CAAC,aAAa,EAAE;QAC1B,MAAM;QACN,MAAM;QACN,CAAC,IAAI,MAAM,EAAE,CAAC;KACf,CAAC,CAAC,SAAS,CAAC;IACb,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,2BAA2B,EAAE;QACnE,IAAI;QACJ,IAAI;QACJ,CAAC,IAAI,aAAa,EAAE,CAAC;KACtB,CAAC,CAAC,SAAS,CAAC;IAEb,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,0BAA0B,EAAE;QAC5D,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;QACtC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC;QACtC,MAAM,CAAC,IAAI,IAAI,yBAAyB;QACxC,MAAM,CAAC,WAAW,IAAI,IAAI;QAC1B,MAAM,CAAC,UAAU,IAAI,IAAI;QACzB,IAAI,WAAW,EAAE;QACjB,IAAI,cAAc,EAAE;QACpB,IAAI,cAAc,GAAG;QACrB,IAAI,eAAe,EAAE;KACtB,CAAC,CAAC,SAAS,CAAC;IAEb,OAAO;QACL,QAAQ;QACR,WAAW;QACX,eAAe;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,SAAS;QACT,SAAS;QACT,MAAM;QACN,aAAa;QACb,cAAc;KACf,CAAC;AACJ,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Anchored builder for `IfcStructuralLoadGroup` / `IfcStructuralLoadCase`
3
+ * (#5167 task S.1).
4
+ *
5
+ * `IfcStructuralLoadGroup` is `IfcGroup` → `IfcObject`, never `IfcProduct` —
6
+ * no `ObjectPlacement`/`Representation` — so, like
7
+ * `structural-analysis-model.ts`, this builder emits no geometry.
8
+ *
9
+ * Schema targeted: IFC4 (IFC4_ADD2_TC1.exp), verified against the generated
10
+ * IFC4 registry's `allAttributes`:
11
+ * `IfcStructuralLoadGroup`: `GlobalId, OwnerHistory?, Name?, Description?,
12
+ * ObjectType?, PredefinedType, ActionType, ActionSource, Coefficient?,
13
+ * Purpose?`
14
+ * `IfcStructuralLoadCase` adds exactly one attribute after its parent's:
15
+ * `SelfWeightCoefficients?` (a `LIST [3:3] OF IfcRatioMeasure`).
16
+ * The EXPRESS `IsLoadCasePredefinedType` WHERE rule on
17
+ * `IfcStructuralLoadCase` requires `PredefinedType = LOAD_CASE`
18
+ * whenever `SelfWeightCoefficients` is present — enforced below rather
19
+ * than left for export/import to discover as a malformed file.
20
+ *
21
+ * A load group's members (the activities assigned to it) are established
22
+ * separately via `IfcRelAssignsToGroup`
23
+ * (`assignToStructuralGroupInStore` in `structural-relationships.ts`) —
24
+ * this mirrors `extractStructuralOnDemand`'s read side
25
+ * (`StructuralLoadGroupInfo.activityGlobalIds`).
26
+ *
27
+ * Pure: no I/O, no parser access — operates entirely through the editor.
28
+ */
29
+ import type { StoreEditor } from '@ifc-lite/mutations';
30
+ import type { SpatialAnchor } from './anchor.js';
31
+ export type StructuralLoadGroupType = 'LOAD_GROUP' | 'LOAD_CASE' | 'LOAD_COMBINATION' | 'USERDEFINED' | 'NOTDEFINED';
32
+ export type StructuralActionType = 'PERMANENT_G' | 'VARIABLE_Q' | 'EXTRAORDINARY_A' | 'USERDEFINED' | 'NOTDEFINED';
33
+ export type StructuralActionSourceType = 'DEAD_LOAD_G' | 'COMPLETION_G1' | 'LIVE_LOAD_Q' | 'SNOW_S' | 'WIND_W' | 'PRESTRESSING_P' | 'SETTLEMENT_U' | 'TEMPERATURE_T' | 'EARTHQUAKE_E' | 'FIRE' | 'IMPULSE' | 'IMPACT' | 'TRANSPORT' | 'ERECTION' | 'PROPPING' | 'SYSTEM_IMPERFECTION' | 'SHRINKAGE' | 'CREEP' | 'LACK_OF_FIT' | 'BUOYANCY' | 'ICE' | 'CURRENT' | 'WAVE' | 'RAIN' | 'BRAKES' | 'USERDEFINED' | 'NOTDEFINED';
34
+ export interface StructuralLoadGroupInStoreParams {
35
+ Name?: string;
36
+ Description?: string;
37
+ /** Required by the combined `HasObjectType` WHERE rule when `PredefinedType`/`ActionType`/`ActionSource` is `'USERDEFINED'`. */
38
+ ObjectType?: string;
39
+ PredefinedType?: StructuralLoadGroupType;
40
+ ActionType: StructuralActionType;
41
+ ActionSource: StructuralActionSourceType;
42
+ Coefficient?: number;
43
+ Purpose?: string;
44
+ /**
45
+ * Exactly 3 ratios `[x, y, z]`. Presence emits `IfcStructuralLoadCase`
46
+ * instead of `IfcStructuralLoadGroup` and forces `PredefinedType` to
47
+ * `'LOAD_CASE'` (see the EXPRESS WHERE rule in the module doc) — passing
48
+ * both this AND a conflicting `PredefinedType` is refused rather than
49
+ * silently overridden.
50
+ */
51
+ SelfWeightCoefficients?: [number, number, number];
52
+ /** Explicit GlobalId (22-char IFC GUID); generated when omitted. */
53
+ GlobalId?: string;
54
+ }
55
+ export interface StructuralLoadGroupBuildResult {
56
+ loadGroupId: number;
57
+ /** `'IfcStructuralLoadCase'` when `SelfWeightCoefficients` was supplied, else `'IfcStructuralLoadGroup'`. */
58
+ type: 'IfcStructuralLoadGroup' | 'IfcStructuralLoadCase';
59
+ }
60
+ export declare function addStructuralLoadGroupToStore(editor: StoreEditor, anchor: Pick<SpatialAnchor, 'ownerHistoryId' | 'guidRandom' | 'schema'>, params: StructuralLoadGroupInStoreParams): StructuralLoadGroupBuildResult;
61
+ //# sourceMappingURL=structural-load-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-load-group.d.ts","sourceRoot":"","sources":["../../src/in-store/structural-load-group.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,MAAM,MAAM,uBAAuB,GAAG,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AY,GAAG,QAAQ,CAAC,EACvE,MAAM,EAAE,gCAAgC,GACvC,8BAA8B,CAyChC"}
@@ -0,0 +1,38 @@
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
+ import { ownerHistoryRef, productGuid } from './_emit-helpers.js';
5
+ export function addStructuralLoadGroupToStore(editor, anchor, params) {
6
+ if (anchor.schema === 'IFC2X3') {
7
+ throw new Error('addStructuralLoadGroupToStore: IFC2X3 has no IfcStructuralLoadGroup — target IFC4 or later');
8
+ }
9
+ const isLoadCase = params.SelfWeightCoefficients !== undefined;
10
+ if (isLoadCase && params.PredefinedType !== undefined && params.PredefinedType !== 'LOAD_CASE') {
11
+ throw new Error(`addStructuralLoadGroupToStore: SelfWeightCoefficients requires PredefinedType 'LOAD_CASE' `
12
+ + `(EXPRESS IsLoadCasePredefinedType), got '${params.PredefinedType}'`);
13
+ }
14
+ const predefinedType = params.PredefinedType ?? (isLoadCase ? 'LOAD_CASE' : 'LOAD_GROUP');
15
+ if ((predefinedType === 'USERDEFINED' || params.ActionType === 'USERDEFINED' || params.ActionSource === 'USERDEFINED')
16
+ && !params.ObjectType) {
17
+ throw new Error('addStructuralLoadGroupToStore: ObjectType is required when PredefinedType, ActionType, or ActionSource is USERDEFINED');
18
+ }
19
+ const baseAttrs = [
20
+ productGuid(params, anchor.guidRandom),
21
+ ownerHistoryRef(anchor.ownerHistoryId),
22
+ params.Name ?? (isLoadCase ? 'Load Case' : 'Load Group'),
23
+ params.Description ?? null,
24
+ params.ObjectType ?? null,
25
+ `.${predefinedType}.`,
26
+ `.${params.ActionType}.`,
27
+ `.${params.ActionSource}.`,
28
+ params.Coefficient ?? null,
29
+ params.Purpose ?? null,
30
+ ];
31
+ const type = isLoadCase ? 'IfcStructuralLoadCase' : 'IfcStructuralLoadGroup';
32
+ const attrs = isLoadCase
33
+ ? [...baseAttrs, [...params.SelfWeightCoefficients]]
34
+ : baseAttrs;
35
+ const loadGroupId = editor.addEntity(type, attrs).expressId;
36
+ return { loadGroupId, type };
37
+ }
38
+ //# sourceMappingURL=structural-load-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-load-group.js","sourceRoot":"","sources":["../../src/in-store/structural-load-group.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAiC/D,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAsClE,MAAM,UAAU,6BAA6B,CAC3C,MAAmB,EACnB,MAAuE,EACvE,MAAwC;IAExC,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAC;IAChH,CAAC;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,sBAAsB,KAAK,SAAS,CAAC;IAC/D,IAAI,UAAU,IAAI,MAAM,CAAC,cAAc,KAAK,SAAS,IAAI,MAAM,CAAC,cAAc,KAAK,WAAW,EAAE,CAAC;QAC/F,MAAM,IAAI,KAAK,CACb,4FAA4F;cAC1F,4CAA4C,MAAM,CAAC,cAAc,GAAG,CACvE,CAAC;IACJ,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IAC1F,IACE,CAAC,cAAc,KAAK,aAAa,IAAI,MAAM,CAAC,UAAU,KAAK,aAAa,IAAI,MAAM,CAAC,YAAY,KAAK,aAAa,CAAC;WAC/G,CAAC,MAAM,CAAC,UAAU,EACrB,CAAC;QACD,MAAM,IAAI,KAAK,CACb,uHAAuH,CACxH,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAc;QAC3B,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;QACtC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC;QACtC,MAAM,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC;QACxD,MAAM,CAAC,WAAW,IAAI,IAAI;QAC1B,MAAM,CAAC,UAAU,IAAI,IAAI;QACzB,IAAI,cAAc,GAAG;QACrB,IAAI,MAAM,CAAC,UAAU,GAAG;QACxB,IAAI,MAAM,CAAC,YAAY,GAAG;QAC1B,MAAM,CAAC,WAAW,IAAI,IAAI;QAC1B,MAAM,CAAC,OAAO,IAAI,IAAI;KACvB,CAAC;IAEF,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,wBAAwB,CAAC;IAC7E,MAAM,KAAK,GAAG,UAAU;QACtB,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,CAAC,GAAI,MAAM,CAAC,sBAAmD,CAAC,CAAC;QAClF,CAAC,CAAC,SAAS,CAAC;IAEd,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,KAAgD,CAAC,CAAC,SAAS,CAAC;IACvG,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Anchored builder for `IfcStructuralPointConnection` — a support/joint
3
+ * node at a single point, optionally carrying an `IfcBoundaryNodeCondition`
4
+ * (#5167 task S.1).
5
+ *
6
+ * Schema targeted: IFC4 (IFC4_ADD2_TC1.exp), verified against the generated
7
+ * IFC4 registry's `allAttributes`:
8
+ * `IfcStructuralPointConnection`: `GlobalId, OwnerHistory?, Name?,
9
+ * Description?, ObjectType?, ObjectPlacement?, Representation?,
10
+ * AppliedCondition?, ConditionCoordinateSystem?`
11
+ * `IfcBoundaryNodeCondition`: `Name?, TranslationalStiffnessX?,
12
+ * TranslationalStiffnessY?, TranslationalStiffnessZ?,
13
+ * RotationalStiffnessX?, RotationalStiffnessY?, RotationalStiffnessZ?`
14
+ * (`IfcTranslationalStiffnessSelect`/`IfcRotationalStiffnessSelect` are
15
+ * each a 2-branch SELECT of `IfcBoolean` or a stiffness measure; this
16
+ * builder only writes the `IfcBoolean` branch — `true` = fixed/rigid,
17
+ * `false` = free — a numeric spring-stiffness value is out of scope here.)
18
+ *
19
+ * REPRESENTATION OWNERSHIP:
20
+ *
21
+ * `ObjectPlacement`: an `IfcLocalPlacement` at `Position`, chained from
22
+ * the storey placement (same prologue every other in-store builder in
23
+ * this directory uses). OWNED exclusively by this connection.
24
+ *
25
+ * `Representation`: deliberately omitted (`null`). A point's location is
26
+ * already fully captured by `ObjectPlacement.Location` — adding an
27
+ * `IfcTopologyRepresentation` with a single `IfcVertexPoint` (as
28
+ * `structural-curve-member.ts` does for its edge) would duplicate that
29
+ * same coordinate a second way with no read-side consumer
30
+ * (`StructuralConnectionInfo` carries no geometry field), so it is not
31
+ * authored. This is the deliberate asymmetry with the curve member's
32
+ * representation, not an oversight.
33
+ *
34
+ * `AppliedCondition` → `IfcBoundaryNodeCondition`, when `BoundaryCondition`
35
+ * is supplied: a fresh entity per connection, OWNED exclusively — never
36
+ * shared across connections even when two connections specify identical
37
+ * stiffness values, so (as with the curve member) removal never has to
38
+ * reason about a second referrer.
39
+ *
40
+ * Removal: same known gap as `structural-curve-member.ts` — see that
41
+ * module's doc comment for the full explanation. `StructuralPointConnectionBuildResult`
42
+ * exposes every owned id for the same reason.
43
+ *
44
+ * Pure: no I/O, no parser access — operates entirely through the editor.
45
+ */
46
+ import type { StoreEditor } from '@ifc-lite/mutations';
47
+ import { type SpatialAnchor } from './anchor.js';
48
+ /** The `IfcBoolean` branch of `IfcTranslationalStiffnessSelect`/`IfcRotationalStiffnessSelect`: `true` = fixed, `false` = free. */
49
+ export interface StructuralBoundaryConditionParams {
50
+ Name?: string;
51
+ TranslationalStiffnessX?: boolean;
52
+ TranslationalStiffnessY?: boolean;
53
+ TranslationalStiffnessZ?: boolean;
54
+ RotationalStiffnessX?: boolean;
55
+ RotationalStiffnessY?: boolean;
56
+ RotationalStiffnessZ?: boolean;
57
+ }
58
+ export interface StructuralPointConnectionInStoreParams {
59
+ Position: [number, number, number];
60
+ Name?: string;
61
+ Description?: string;
62
+ ObjectType?: string;
63
+ /** Emits an `IfcBoundaryNodeCondition` referenced by `AppliedCondition`. */
64
+ BoundaryCondition?: StructuralBoundaryConditionParams;
65
+ /** Explicit GlobalId (22-char IFC GUID); generated when omitted. */
66
+ GlobalId?: string;
67
+ }
68
+ /** Every expressId this builder emits — the connection's full owned sub-graph. */
69
+ export interface StructuralPointConnectionBuildResult {
70
+ connectionId: number;
71
+ placementId: number;
72
+ boundaryConditionId?: number;
73
+ }
74
+ export declare function addStructuralPointConnectionToStore(editor: StoreEditor, anchor: SpatialAnchor, params: StructuralPointConnectionInStoreParams): StructuralPointConnectionBuildResult;
75
+ //# sourceMappingURL=structural-point-connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-point-connection.d.ts","sourceRoot":"","sources":["../../src/in-store/structural-point-connection.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjE,mIAAmI;AACnI,MAAM,WAAW,iCAAiC;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,sCAAsC;IACrD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,iCAAiC,CAAC;IACtD,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,kFAAkF;AAClF,MAAM,WAAW,oCAAoC;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAMD,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,sCAAsC,GAC7C,oCAAoC,CAkCtC"}
@@ -0,0 +1,41 @@
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
+ import { toNativePoint3 } from './anchor.js';
5
+ import { emitLocalPlacement, ownerHistoryRef, productGuid } from './_emit-helpers.js';
6
+ function boolAttr(v) {
7
+ return v === undefined ? null : v ? '.T.' : '.F.';
8
+ }
9
+ export function addStructuralPointConnectionToStore(editor, anchor, params) {
10
+ if ((anchor.schema ?? 'IFC4') === 'IFC2X3') {
11
+ throw new Error('addStructuralPointConnectionToStore: IFC2X3 has no IfcStructuralPointConnection — target IFC4 or later');
12
+ }
13
+ const position = toNativePoint3(anchor, params.Position);
14
+ const placementId = emitLocalPlacement(editor, anchor.storeyPlacementId, position);
15
+ let boundaryConditionId;
16
+ const bc = params.BoundaryCondition;
17
+ if (bc) {
18
+ boundaryConditionId = editor.addEntity('IfcBoundaryNodeCondition', [
19
+ bc.Name ?? null,
20
+ boolAttr(bc.TranslationalStiffnessX),
21
+ boolAttr(bc.TranslationalStiffnessY),
22
+ boolAttr(bc.TranslationalStiffnessZ),
23
+ boolAttr(bc.RotationalStiffnessX),
24
+ boolAttr(bc.RotationalStiffnessY),
25
+ boolAttr(bc.RotationalStiffnessZ),
26
+ ]).expressId;
27
+ }
28
+ const connectionId = editor.addEntity('IfcStructuralPointConnection', [
29
+ productGuid(params, anchor.guidRandom),
30
+ ownerHistoryRef(anchor.ownerHistoryId),
31
+ params.Name ?? 'Structural Point Connection',
32
+ params.Description ?? null,
33
+ params.ObjectType ?? null,
34
+ `#${placementId}`,
35
+ null, // Representation — see module doc
36
+ boundaryConditionId === undefined ? null : `#${boundaryConditionId}`,
37
+ null, // ConditionCoordinateSystem
38
+ ]).expressId;
39
+ return { connectionId, placementId, ...(boundaryConditionId !== undefined ? { boundaryConditionId } : {}) };
40
+ }
41
+ //# sourceMappingURL=structural-point-connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-point-connection.js","sourceRoot":"","sources":["../../src/in-store/structural-point-connection.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAiD/D,OAAO,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AA+BtF,SAAS,QAAQ,CAAC,CAAsB;IACtC,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,MAAmB,EACnB,MAAqB,EACrB,MAA8C;IAE9C,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,wGAAwG,CAAC,CAAC;IAC5H,CAAC;IACD,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IACzD,MAAM,WAAW,GAAG,kBAAkB,CAAC,MAAM,EAAE,MAAM,CA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that turn loose `IfcStructural*` entities into a
3
+ * connected analytical *model* (#5167 task S.1) — verified against the
4
+ * generated IFC4 registry's `allAttributes`:
5
+ *
6
+ * `IfcRelConnectsStructuralMember`: `GlobalId, OwnerHistory?, Name?,
7
+ * Description?, RelatingStructuralMember, RelatedStructuralConnection,
8
+ * AppliedCondition?, AdditionalConditions?, SupportedLength?,
9
+ * ConditionCoordinateSystem?`
10
+ * `IfcRelConnectsStructuralActivity`: `GlobalId, OwnerHistory?, Name?,
11
+ * Description?, RelatingElement, RelatedStructuralActivity`
12
+ * (`RelatingElement` is `IfcStructuralActivityAssignmentSelect` =
13
+ * `IfcElement | IfcStructuralItem` — a member or connection here)
14
+ * `IfcRelAssignsToGroup`: `GlobalId, OwnerHistory?, Name?, Description?,
15
+ * RelatedObjects, RelatedObjectsType?, RelatingGroup` — used both for
16
+ * "these members/connections belong to this analysis model" and "these
17
+ * activities belong to this load group", exactly as
18
+ * `extractStructuralOnDemand` in `@ifc-lite/parser` reads it back (see
19
+ * that module's doc comment on why one relationship type serves both:
20
+ * the reader narrows a group's `RelatedObjects` by the role each
21
+ * collection promises, not by relationship subtype).
22
+ *
23
+ * Every call here emits a FRESH relationship rather than mutating an
24
+ * existing one for the same target — the same choice `column.ts` makes for
25
+ * `IfcRelContainedInSpatialStructure` ("Adding a parallel relationship is
26
+ * simpler than mutating the storey's existing one and produces an
27
+ * equivalent result on import"). Unlike `cost.ts`'s
28
+ * `assignCostItemsToScheduleInStore`, there is no merge-into-existing-list
29
+ * variant here; a caller assigning the same object into the same group
30
+ * twice gets two `IfcRelAssignsToGroup` records, which importers fold
31
+ * together same as `IfcRelContainedInSpatialStructure` does.
32
+ *
33
+ * Pure: no I/O, no parser access — operates entirely through the editor.
34
+ */
35
+ import { type RandomSource } from '@ifc-lite/encoding';
36
+ import type { StoreEditor } from '@ifc-lite/mutations';
37
+ /** Link a structural member to a structural connection (e.g. a curve member's end to its support). */
38
+ export declare function connectStructuralMemberToConnectionInStore(editor: StoreEditor, ownerHistoryId: number | null, memberId: number, connectionId: number, random?: RandomSource): number;
39
+ /** Apply a structural activity (action/reaction) to the member or connection it acts on. */
40
+ export declare function connectStructuralActivityToItemInStore(editor: StoreEditor, ownerHistoryId: number | null, itemId: number, activityId: number, random?: RandomSource): number;
41
+ /**
42
+ * Assign objects into an `IfcGroup` (an analysis model gathering its
43
+ * members/connections, or a load group gathering its activities).
44
+ * `objectIds` must be non-empty — `RelatedObjects` is `SET [1:?]`.
45
+ */
46
+ export declare function assignToStructuralGroupInStore(editor: StoreEditor, ownerHistoryId: number | null, groupId: number, objectIds: readonly number[], random?: RandomSource): number;
47
+ //# sourceMappingURL=structural-relationships.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-relationships.d.ts","sourceRoot":"","sources":["../../src/in-store/structural-relationships.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,sGAAsG;AACtG,wBAAgB,0CAA0C,CACxD,MAAM,EAAE,WAAW,EACnB,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,YAAY,GACpB,MAAM,CAaR;AAED,4FAA4F;AAC5F,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,WAAW,EACnB,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,YAAY,GACpB,MAAM,CASR;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,WAAW,EACnB,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,MAAM,CAAC,EAAE,YAAY,GACpB,MAAM,CAaR"}
@@ -0,0 +1,85 @@
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
+ * The three relationships that turn loose `IfcStructural*` entities into a
6
+ * connected analytical *model* (#5167 task S.1) — verified against the
7
+ * generated IFC4 registry's `allAttributes`:
8
+ *
9
+ * `IfcRelConnectsStructuralMember`: `GlobalId, OwnerHistory?, Name?,
10
+ * Description?, RelatingStructuralMember, RelatedStructuralConnection,
11
+ * AppliedCondition?, AdditionalConditions?, SupportedLength?,
12
+ * ConditionCoordinateSystem?`
13
+ * `IfcRelConnectsStructuralActivity`: `GlobalId, OwnerHistory?, Name?,
14
+ * Description?, RelatingElement, RelatedStructuralActivity`
15
+ * (`RelatingElement` is `IfcStructuralActivityAssignmentSelect` =
16
+ * `IfcElement | IfcStructuralItem` — a member or connection here)
17
+ * `IfcRelAssignsToGroup`: `GlobalId, OwnerHistory?, Name?, Description?,
18
+ * RelatedObjects, RelatedObjectsType?, RelatingGroup` — used both for
19
+ * "these members/connections belong to this analysis model" and "these
20
+ * activities belong to this load group", exactly as
21
+ * `extractStructuralOnDemand` in `@ifc-lite/parser` reads it back (see
22
+ * that module's doc comment on why one relationship type serves both:
23
+ * the reader narrows a group's `RelatedObjects` by the role each
24
+ * collection promises, not by relationship subtype).
25
+ *
26
+ * Every call here emits a FRESH relationship rather than mutating an
27
+ * existing one for the same target — the same choice `column.ts` makes for
28
+ * `IfcRelContainedInSpatialStructure` ("Adding a parallel relationship is
29
+ * simpler than mutating the storey's existing one and produces an
30
+ * equivalent result on import"). Unlike `cost.ts`'s
31
+ * `assignCostItemsToScheduleInStore`, there is no merge-into-existing-list
32
+ * variant here; a caller assigning the same object into the same group
33
+ * twice gets two `IfcRelAssignsToGroup` records, which importers fold
34
+ * together same as `IfcRelContainedInSpatialStructure` does.
35
+ *
36
+ * Pure: no I/O, no parser access — operates entirely through the editor.
37
+ */
38
+ import { generateIfcGuid } from '@ifc-lite/encoding';
39
+ import { ownerHistoryRef } from './_emit-helpers.js';
40
+ /** Link a structural member to a structural connection (e.g. a curve member's end to its support). */
41
+ export function connectStructuralMemberToConnectionInStore(editor, ownerHistoryId, memberId, connectionId, random) {
42
+ return editor.addEntity('IfcRelConnectsStructuralMember', [
43
+ generateIfcGuid(random),
44
+ ownerHistoryRef(ownerHistoryId),
45
+ null,
46
+ null,
47
+ `#${memberId}`,
48
+ `#${connectionId}`,
49
+ null, // AppliedCondition
50
+ null, // AdditionalConditions
51
+ null, // SupportedLength
52
+ null, // ConditionCoordinateSystem
53
+ ]).expressId;
54
+ }
55
+ /** Apply a structural activity (action/reaction) to the member or connection it acts on. */
56
+ export function connectStructuralActivityToItemInStore(editor, ownerHistoryId, itemId, activityId, random) {
57
+ return editor.addEntity('IfcRelConnectsStructuralActivity', [
58
+ generateIfcGuid(random),
59
+ ownerHistoryRef(ownerHistoryId),
60
+ null,
61
+ null,
62
+ `#${itemId}`,
63
+ `#${activityId}`,
64
+ ]).expressId;
65
+ }
66
+ /**
67
+ * Assign objects into an `IfcGroup` (an analysis model gathering its
68
+ * members/connections, or a load group gathering its activities).
69
+ * `objectIds` must be non-empty — `RelatedObjects` is `SET [1:?]`.
70
+ */
71
+ export function assignToStructuralGroupInStore(editor, ownerHistoryId, groupId, objectIds, random) {
72
+ if (objectIds.length === 0) {
73
+ throw new Error('assignToStructuralGroupInStore: objectIds must be non-empty (IfcRelAssignsToGroup.RelatedObjects is SET [1:?])');
74
+ }
75
+ return editor.addEntity('IfcRelAssignsToGroup', [
76
+ generateIfcGuid(random),
77
+ ownerHistoryRef(ownerHistoryId),
78
+ null,
79
+ null,
80
+ objectIds.map((id) => `#${id}`),
81
+ null, // RelatedObjectsType
82
+ `#${groupId}`,
83
+ ]).expressId;
84
+ }
85
+ //# sourceMappingURL=structural-relationships.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-relationships.js","sourceRoot":"","sources":["../../src/in-store/structural-relationships.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,eAAe,EAAqB,MAAM,oBAAoB,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,sGAAsG;AACtG,MAAM,UAAU,0CAA0C,CACxD,MAAmB,EACnB,cAA6B,EAC7B,QAAgB,EAChB,YAAoB,EACpB,MAAqB;IAErB,OAAO,MAAM,CAAC,SAAS,CAAC,gCAAgC,EAAE;QACxD,eAAe,CAAC,MAAM,CAAC;QACvB,eAAe,CAAC,cAAc,CAAC;QAC/B,IAAI;QACJ,IAAI;QACJ,IAAI,QAAQ,EAAE;QACd,IAAI,YAAY,EAAE;QAClB,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,4BAA4B;KACnC,CAAC,CAAC,SAAS,CAAC;AACf,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,sCAAsC,CACpD,MAAmB,EACnB,cAA6B,EAC7B,MAAc,EACd,UAAkB,EAClB,MAAqB;IAErB,OAAO,MAAM,CAAC,SAAS,CAAC,kCAAkC,EAAE;QAC1D,eAAe,CAAC,MAAM,CAAC;QACvB,eAAe,CAAC,cAAc,CAAC;QAC/B,IAAI;QACJ,IAAI;QACJ,IAAI,MAAM,EAAE;QACZ,IAAI,UAAU,EAAE;KACjB,CAAC,CAAC,SAAS,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAC5C,MAAmB,EACnB,cAA6B,EAC7B,OAAe,EACf,SAA4B,EAC5B,MAAqB;IAErB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,gHAAgH,CAAC,CAAC;IACpI,CAAC;IACD,OAAO,MAAM,CAAC,SAAS,CAAC,sBAAsB,EAAE;QAC9C,eAAe,CAAC,MAAM,CAAC;QACvB,eAAe,CAAC,cAAc,CAAC;QAC/B,IAAI;QACJ,IAAI;QACJ,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAC/B,IAAI,EAAE,qBAAqB;QAC3B,IAAI,OAAO,EAAE;KACd,CAAC,CAAC,SAAS,CAAC;AACf,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { type StoreEditor } from '@ifc-lite/mutations';
2
+ import { type IfcDataStore } from '@ifc-lite/parser';
3
+ export interface StyleEntity {
4
+ type: string;
5
+ attributes: readonly unknown[];
6
+ }
7
+ /** Source refs are numeric; authored refs use `#123` strings. */
8
+ export declare function asRef(value: unknown): number | null;
9
+ export declare function refList(value: unknown): number[];
10
+ /** Read one live entity as the next export will write it (#5249). */
11
+ export declare function createStyleEntityReader(store: IfcDataStore, editor: StoreEditor): (id: number) => StyleEntity | null;
12
+ /** One live styled item per target, including authored styles and retypes. */
13
+ export declare function indexExistingStyles(store: IfcDataStore, editor: StoreEditor, read: (id: number) => StyleEntity | null): Map<number, number>;
14
+ //# sourceMappingURL=style-entity-reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-entity-reader.d.ts","sourceRoot":"","sources":["../../src/in-store/style-entity-reader.ts"],"names":[],"mappings":"AAIA,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEpG,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,SAAS,OAAO,EAAE,CAAC;CAChC;AAED,iEAAiE;AACjE,wBAAgB,KAAK,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAOnD;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAQhD;AAED,qEAAqE;AACrE,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,WAAW,GAAG,IAAI,CAmBpH;AAED,8EAA8E;AAC9E,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,WAAW,GAAG,IAAI,GACvC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAOrB"}
@@ -0,0 +1,58 @@
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
+ import { iterateEffectiveEntityIds } from '@ifc-lite/mutations';
5
+ import { EntityExtractor, resolveEffectiveEntityRecord } from '@ifc-lite/parser';
6
+ /** Source refs are numeric; authored refs use `#123` strings. */
7
+ export function asRef(value) {
8
+ if (typeof value === 'number' && Number.isSafeInteger(value) && value > 0)
9
+ return value;
10
+ if (typeof value === 'string' && /^#0*[1-9][0-9]*$/.test(value)) {
11
+ const id = Number(value.slice(1));
12
+ return Number.isSafeInteger(id) ? id : null;
13
+ }
14
+ return null;
15
+ }
16
+ export function refList(value) {
17
+ if (!Array.isArray(value))
18
+ return [];
19
+ const out = [];
20
+ for (const item of value) {
21
+ const id = asRef(item);
22
+ if (id !== null)
23
+ out.push(id);
24
+ }
25
+ return out;
26
+ }
27
+ /** Read one live entity as the next export will write it (#5249). */
28
+ export function createStyleEntityReader(store, editor) {
29
+ const view = editor.getMutationView();
30
+ const extractor = store.source.byteLength > 0 ? new EntityExtractor(store.source) : null;
31
+ return (id) => {
32
+ if (!editor.hasEntity(id))
33
+ return null;
34
+ const created = view.getNewEntity(id);
35
+ // @raw-entity-enumeration-ok point lookup for one effective candidate's source attributes
36
+ const ref = created ? undefined : (store.entityIndex.byId.get(id) ?? store.deferredEntityIndex?.get(id));
37
+ const source = ref && extractor ? extractor.extractEntity(ref) : null;
38
+ const entity = created ?? source;
39
+ if (!entity)
40
+ return null;
41
+ return resolveEffectiveEntityRecord(entity, {
42
+ retype: view.getEntityTypeMutation(id)?.newType,
43
+ named: view.getAttributeMutationsForEntity(id).map(({ name, value }) => [name, value]),
44
+ positional: view.getPositionalMutationsForEntity(id) ?? [],
45
+ }, store.schemaVersion);
46
+ };
47
+ }
48
+ /** One live styled item per target, including authored styles and retypes. */
49
+ export function indexExistingStyles(store, editor, read) {
50
+ const styledBy = new Map();
51
+ for (const { expressId } of iterateEffectiveEntityIds(store, editor.getMutationView(), ['IFCSTYLEDITEM'])) {
52
+ const target = asRef(read(expressId)?.attributes[0]);
53
+ if (target !== null)
54
+ styledBy.set(target, expressId);
55
+ }
56
+ return styledBy;
57
+ }
58
+ //# sourceMappingURL=style-entity-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-entity-reader.js","sourceRoot":"","sources":["../../src/in-store/style-entity-reader.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,yBAAyB,EAAoB,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,4BAA4B,EAAqB,MAAM,kBAAkB,CAAC;AAOpG,iEAAiE;AACjE,MAAM,UAAU,KAAK,CAAC,KAAc;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACxF,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,OAAO,MA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CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACtE,MAAM,MAAM,GAAG,OAAO,IAAI,MAAM,CAAC;QACjC,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,OAAO,4BAA4B,CAAC,MAAM,EAAE;YAC1C,MAAM,EAAE,IAAI,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE,OAAO;YAC/C,KAAK,EAAE,IAAI,CAAC,8BAA8B,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,CAAU,CAAC;YAC/F,UAAU,EAAE,IAAI,CAAC,+BAA+B,CAAC,EAAE,CAAC,IAAI,EAAE;SAC3D,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,mBAAmB,CACjC,KAAmB,EACnB,MAAmB,EACnB,IAAwC;IAExC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC3C,KAAK,MAAM,EAAE,SAAS,EAAE,IAAI,yBAAyB,CAAC,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC;QAC1G,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,IAAI,MAAM,KAAK,IAAI;YAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -13,6 +13,8 @@ export interface WallInStoreParams {
13
13
  Description?: string;
14
14
  ObjectType?: string;
15
15
  Tag?: string;
16
+ /** Explicit GlobalId (22-char IFC GUID); generated when omitted. */
17
+ GlobalId?: string;
16
18
  }
17
19
  export interface WallBuildResult {
18
20
  wallId: number;
@@ -1 +1 @@
1
- {"version":3,"file":"wall.d.ts","sourceRoot":"","sources":["../../src/in-store/wall.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjF,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,kEAAkE;IAClE,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,iBAAiB,GACxB,eAAe,CA4HjB"}
1
+ {"version":3,"file":"wall.d.ts","sourceRoot":"","sources":["../../src/in-store/wall.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjF,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,kEAAkE;IAClE,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,iBAAiB,GACxB,eAAe,CA4HjB"}
@@ -18,7 +18,7 @@
18
18
  import { generateIfcGuid } from '@ifc-lite/encoding';
19
19
  import { vecNorm, assertFinitePoint3 } from '../ifc-creator-math.js';
20
20
  import { toNativeLength, toNativePoint3 } from './anchor.js';
21
- import { assertPositiveFinite, ownerHistoryRef } from './_emit-helpers.js';
21
+ import { assertPositiveFinite, ownerHistoryRef, productGuid } from './_emit-helpers.js';
22
22
  export function addWallToStore(editor, anchor, params) {
23
23
  const { ownerHistoryId, bodyContextId, storeyId, storeyPlacementId } = anchor;
24
24
  assertPositiveFinite([params.Thickness, params.Height], 'addWallToStore: Thickness and Height must be positive');
@@ -99,7 +99,7 @@ export function addWallToStore(editor, anchor, params) {
99
99
  ]).expressId;
100
100
  // `IfcWall.PredefinedType` only exists from IFC4 onward.
101
101
  const wallAttrs = [
102
- generateIfcGuid(anchor.guidRandom),
102
+ productGuid(params, anchor.guidRandom),
103
103
  ownerHistoryRef(ownerHistoryId),
104
104
  params.Name ?? 'Wall',
105
105
  params.Description ?? null,
@@ -1 +1 @@
1
- {"version":3,"file":"wall.js","sourceRoot":"","sources":["../../src/in-store/wall.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA2B3E,MAAM,UAAU,cAAc,CAC5B,MAAmB,EACnB,MAAqB,EACrB,MAAyB;IAEzB,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAAC;IAE9E,oBAAoB,CAClB,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EACjC,uDAAuD,CACxD,CAAC;IACF,uEAAuE;IACvE,uEAAuE;IACvE,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC;IAC/E,qEAAqE;IACrE,mEAAmE;IACnE,sEAAsE;IACtE,sDAAsD;IACtD,MAAM,GAAG;QACP,GAAG,MAAM;QACT,KAAK,EAAE,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;QAC3C,GAAG,EAAE,cAAc,CAAC,MAAM,EAAE,MA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