@bldrs-ai/conway 0.23.977 → 1.322.1027

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 (29) hide show
  1. package/README.md +77 -40
  2. package/compiled/Dist/ConwayGeomWasm.d.ts +2 -0
  3. package/compiled/Dist/ConwayGeomWasmNode.d.ts +2 -0
  4. package/compiled/Dist/ConwayGeomWasmNodeMT.d.ts +2 -0
  5. package/compiled/Dist/ConwayGeomWasmWeb.d.ts +2 -0
  6. package/compiled/Dist/ConwayGeomWasmWebMT.d.ts +2 -0
  7. package/compiled/examples/browser-bundled.cjs +1 -1
  8. package/compiled/examples/cli-bundled.cjs +1 -1
  9. package/compiled/examples/validator-bundled.cjs +1 -1
  10. package/compiled/src/AP214E3_2010/ap214_geometry_extraction.d.ts +33 -3
  11. package/compiled/src/AP214E3_2010/ap214_geometry_extraction.d.ts.map +1 -1
  12. package/compiled/src/AP214E3_2010/ap214_geometry_extraction.js +156 -111
  13. package/compiled/src/AP214E3_2010/ap214_geometry_extraction.test.js +79 -0
  14. package/compiled/src/AP214E3_2010/ap214_scene_builder.d.ts +10 -5
  15. package/compiled/src/AP214E3_2010/ap214_scene_builder.d.ts.map +1 -1
  16. package/compiled/src/AP214E3_2010/ap214_scene_builder.js +10 -5
  17. package/compiled/src/AP214E3_2010/ap214_transform_helpers.test.d.ts +2 -0
  18. package/compiled/src/AP214E3_2010/ap214_transform_helpers.test.d.ts.map +1 -0
  19. package/compiled/src/AP214E3_2010/ap214_transform_helpers.test.js +112 -0
  20. package/compiled/src/format_detection/model_format_detector.d.ts +2 -1
  21. package/compiled/src/format_detection/model_format_detector.d.ts.map +1 -1
  22. package/compiled/src/format_detection/model_format_detector.js +12 -11
  23. package/compiled/src/format_detection/model_format_detector.test.js +11 -0
  24. package/compiled/src/loaders/conway_model_loader.d.ts.map +1 -1
  25. package/compiled/src/loaders/conway_model_loader.js +8 -1
  26. package/compiled/src/version/version.d.ts.map +1 -1
  27. package/compiled/src/version/version.js +1 -1
  28. package/compiled/tsconfig.tsbuildinfo +1 -1
  29. package/package.json +4 -4
package/README.md CHANGED
@@ -80,39 +80,6 @@ And finally, using the watch functionality, you can also have the code automatic
80
80
  yarn build-test-watch
81
81
  ```
82
82
 
83
- # Production NPM Build
84
- ```
85
- yarn test
86
- yarn build # stamps build version string
87
- grep '"version"' package.json # should see the new version string, 1 more than what the repo shows in GH
88
- npm pack
89
- ```
90
-
91
- ## Push to Production: H3 & Share
92
- The following process works the same for headless-three and Share.
93
-
94
- Do H3 first, then Share
95
- ```
96
- cp bldrs-ai-conway-<VERSION>.tgz $H3_DIR
97
- cd $H3_DIR
98
- git fetch upstream # or origin if not on fork
99
- git checkout -b conway-<VERSION> upstream/main
100
- rm bldrs-ai-conway-<OLD VERSION>.tgz
101
- ## OLD WAY: yarn remove @bldrs-ai/conway
102
- ## OLD WAY: yarn add ./bldrs-ai-conway-<VERSION>.tgz
103
- ## New way: edit package.json dep for conway to point to new filename.
104
- yarn install
105
- yarn build && yarn test
106
- yarn serve
107
- # Smoke test local candidate: load all sample models, load local model, exercise dialogs, etc.
108
- git add . ; git ci -m 'Upgrad of conway from <OLD VERSION> to <VERSION>'
109
- git push origin HEAD
110
- # 1) Send PR for review
111
- # 2) On merge, Netlify will detect and build and deploy to prod; watch deploy logs on Netlify
112
- # 3) Smoke test prod. Same as above
113
- # 4) Post to #bot or #share "New Conway <VERSION> in prod" with linked changelist
114
- ```
115
-
116
83
  # IFC Parser Console Test Application
117
84
 
118
85
  Conway has a test application for parsing IFC step files to see the performance and included entity types at src/core/ifc/ifc_command_line_main.ts.
@@ -210,10 +177,80 @@ Conway also has a regression testing framework, which can be run on individual m
210
177
 
211
178
 
212
179
  # Release Steps
213
- 1. Build Conway with `yarn build` via the above steps depending on your platform.
214
- 2. Run the performance test script, instructions outlined in the [performance documentation](scripts/README.md)
215
- 3. Run the regression testing batch script, instructions outlined in the [regression documentation](regression/README.md)
216
- 4. Run `yarn create-release-candidate <major | minor> <GITHUB_PAT>`. This package release is by default tagged "latest".
217
- 5. Send PR with updated version + benchmarks and await approval.
218
- 6. Once approved, Go to GitHub, select the new tagged version, and create a release from it. This means we also have changelogs for patch level releases.
219
- 7. Once release has been deployed into Share, tag package as stable.
180
+
181
+ **Releases are continuous.** Every green merge to `main` auto-tags and
182
+ publishes to npm at the default `latest` dist-tag. The version is
183
+ `<major>.<PR>.<commit>` where:
184
+
185
+ - `major` comes from `package.json` on `main` (only the first segment;
186
+ the other two are recomputed on every release)
187
+ - `PR` is the GitHub PR number that produced the merge commit
188
+ - `commit` is `git rev-list HEAD --count` at the merge commit (the
189
+ global commit position)
190
+
191
+ So a merge of PR #321 at the 985th commit on main publishes as
192
+ `1.321.985`. Each release is uniquely traceable to a PR and a commit.
193
+
194
+ The auto-publish job lives in `.github/workflows/build.yml` and runs as
195
+ `needs: [build, run-ifc-regression]` on `push: branches: [main]`. It
196
+ parses the PR number from the merge commit message, stamps the
197
+ computed version into `package.json` + `src/version/version.ts` in
198
+ CI's working tree (not committed back), rebuilds, publishes to npm,
199
+ and then tags the merge commit.
200
+
201
+ **Auth:** npm Trusted Publishing via GitHub OIDC. A Trusted Publisher
202
+ configured at npmjs.com on `@bldrs-ai/conway` is bound to this repo +
203
+ `build.yml`. No long-lived `NPM_TOKEN` secret is used; the workflow
204
+ gets a short-lived publish token per run via OIDC.
205
+
206
+ ### Normal flow: ship a change
207
+
208
+ 1. Open a PR with your change. CI runs `build` and `run-ifc-regression`.
209
+ 2. Merge once both checks are green.
210
+ 3. On main push, CI re-runs `build` + `run-ifc-regression`, then
211
+ `auto-publish` tags and ships. Watch the workflow run in the Actions
212
+ tab; the new version is on npm within ~5-10 min of the merge.
213
+
214
+ ### Bumping major
215
+
216
+ Edit the `version` field in `package.json` on a PR — only the first
217
+ segment matters (the `PR` and `commit` parts are recomputed). For
218
+ example, change `"version": "1.0.0"` to `"version": "2.0.0"` to start
219
+ the `2.x.x` line. The first auto-publish after that lands ships
220
+ `2.<PR>.<commit>`.
221
+
222
+ There is no minor bump — `PR` lives in that slot — so increasing
223
+ sequential versions across the `1.x` line look like `1.300.x`,
224
+ `1.301.x`, etc., as PRs land.
225
+
226
+ ### Rolling into headless-three and Share
227
+ The same flow applies to both — do **H3 first, then Share**:
228
+ ```
229
+ cd $H3_DIR
230
+ git fetch upstream # or origin if not on a fork
231
+ git checkout -b conway-<VERSION> upstream/main
232
+ # Edit package.json dep for @bldrs-ai/conway to "<VERSION>"
233
+ yarn install
234
+ yarn build && yarn test
235
+ yarn serve
236
+ # Smoke test the local candidate: load all sample models, load a local model,
237
+ # exercise dialogs, etc.
238
+ git add . && git commit -m "Upgrade conway from <OLD> to <VERSION>"
239
+ git push origin HEAD
240
+ ```
241
+ Then:
242
+ 1. Send PR for review.
243
+ 2. On merge, Netlify auto-builds and deploys to prod; watch the deploy logs.
244
+ 3. Smoke test prod (same checks as local).
245
+ 4. Post in `#bot` or `#share`: "New Conway <VERSION> in prod" with a link
246
+ to the changelog.
247
+
248
+ ### Blessing a `stable` version
249
+ After Share prod is verified on a given Conway version:
250
+ ```
251
+ # Create the GitHub release from the auto-pushed tag
252
+ gh release create <VERSION> --generate-notes
253
+
254
+ # Promote the npm package to the stable dist-tag
255
+ npm dist-tag add @bldrs-ai/conway@<VERSION> stable
256
+ ```
@@ -0,0 +1,2 @@
1
+ declare const ConwayGeomWasm: any;
2
+ export default ConwayGeomWasm;
@@ -0,0 +1,2 @@
1
+ declare const ConwayGeomWasm: any
2
+ export default ConwayGeomWasm
@@ -0,0 +1,2 @@
1
+ declare const ConwayGeomWasm: any
2
+ export default ConwayGeomWasm
@@ -0,0 +1,2 @@
1
+ declare const ConwayGeomWasm: any
2
+ export default ConwayGeomWasm
@@ -0,0 +1,2 @@
1
+ declare const ConwayGeomWasm: any
2
+ export default ConwayGeomWasm
@@ -69608,7 +69608,7 @@ var IfcStepParser = class extends StepParser {
69608
69608
  IfcStepParser.Instance = new IfcStepParser();
69609
69609
 
69610
69610
  // compiled/src/version/version.js
69611
- var versionString = "Conway Web-Ifc Shim v0.22.977";
69611
+ var versionString = "Conway Web-Ifc Shim v1.322.1027";
69612
69612
 
69613
69613
  // compiled/src/statistics/statistics.js
69614
69614
  var Statistics = class {
@@ -85869,7 +85869,7 @@ var IfcSceneBuilder = class {
85869
85869
  };
85870
85870
 
85871
85871
  // compiled/src/version/version.js
85872
- var versionString = "Conway Web-Ifc Shim v0.22.977";
85872
+ var versionString = "Conway Web-Ifc Shim v1.322.1027";
85873
85873
 
85874
85874
  // compiled/src/statistics/statistics.js
85875
85875
  var Statistics = class {
@@ -69606,7 +69606,7 @@ var IfcStepParser = class extends StepParser {
69606
69606
  IfcStepParser.Instance = new IfcStepParser();
69607
69607
 
69608
69608
  // compiled/src/version/version.js
69609
- var versionString = "Conway Web-Ifc Shim v0.22.977";
69609
+ var versionString = "Conway Web-Ifc Shim v1.322.1027";
69610
69610
 
69611
69611
  // compiled/src/statistics/statistics.js
69612
69612
  var Statistics = class {
@@ -4,7 +4,7 @@ import { CanonicalProfile } from "../core/canonical_profile.js";
4
4
  import { CsgMemoization } from "../core/csg_operations.js";
5
5
  import { NativeULongVector, NativeUintVector, NativeVectorBound3D, NativeVectorGeometryCollection, NativeVectorGlmVec2, NativeVectorGlmVec3, NativeVectorIndexedPolygonalFace, NativeVectorProfile, NativeVectorSegment, WasmModule } from "../core/native_types.js";
6
6
  import { ExtractResult } from "../core/shared_constants.js";
7
- import { advanced_face, axis1_placement, axis2_placement_2d, axis2_placement_3d, b_spline_curve, b_spline_curve_with_knots, b_spline_surface, boolean_result, cartesian_point, cartesian_transformation_operator_2d, cartesian_transformation_operator_3d, circle, colour_rgb, composite_curve, conical_surface, connected_face_set, curve, cylindrical_surface, direction, ellipse, extruded_area_solid, face, face_based_surface_model, faceted_brep, half_space_solid, length_unit, line, manifold_solid_brep, mapped_item, pcurve, placement, plane, polyline, ratio_measure, rational_b_spline_curve, representation_item, shell_based_surface_model, si_prefix, spherical_surface, styled_item, surface, surface_of_linear_extrusion, surface_of_revolution, surface_style_usage, toroidal_surface, trimmed_curve } from "./AP214E3_2010_gen/index.js";
7
+ import { advanced_face, axis1_placement, axis2_placement_2d, axis2_placement_3d, b_spline_curve, b_spline_curve_with_knots, b_spline_surface, boolean_result, cartesian_point, cartesian_transformation_operator_2d, cartesian_transformation_operator_3d, circle, colour_rgb, composite_curve, conical_surface, connected_face_set, curve, cylindrical_surface, direction, ellipse, extruded_area_solid, face, face_based_surface_model, faceted_brep, half_space_solid, length_unit, line, manifold_solid_brep, mapped_item, pcurve, placement, plane, polyline, ratio_measure, rational_b_spline_curve, representation_item, shape_representation, shape_representation_relationship, shell_based_surface_model, si_prefix, spherical_surface, styled_item, surface, surface_of_linear_extrusion, surface_of_revolution, surface_style_usage, toroidal_surface, trimmed_curve } from "./AP214E3_2010_gen/index.js";
8
8
  import { AP214MaterialCache } from "./ap214_material_cache.js";
9
9
  import AP214ModelCurves from "./ap214_model_curves.js";
10
10
  import { AP214ProductShapeMap } from "./ap214_product_shape_map.js";
@@ -657,12 +657,29 @@ export declare class AP214GeometryExtraction {
657
657
  */
658
658
  extractAxis2Placement3D(from: axis2_placement_3d, parentLocalId: number, extractOnly: true, mappedItem?: boolean): ParamsAxis2Placement3D;
659
659
  /**
660
+ * Extract a placement, adding it to the scene.
660
661
  *
661
- * @param from
662
- * @param mappedItem
662
+ * @param from The placement to extract.
663
+ * @param mappedItem Whether the placement is a mapped item.
664
+ * @return The extracted placement or undefined if the placement is not a axis2_placement_3d.
663
665
  */
664
666
  extractPlacement(from: placement, mappedItem?: boolean): AP214SceneTransform | undefined;
665
667
  extractRawPlacement(from: placement): NativeTransform4x4 | undefined;
668
+ /**
669
+ * Multiply a native 4x4 transform by a uniform scale factor in affine
670
+ * semantics: scale both the 3x3 basis and the translation column,
671
+ * leaving the bottom row at [0,0,0,1]. Equivalent to `factor * mat`
672
+ * for any affine input.
673
+ *
674
+ * Used in preference to the native `uniformScale` binding for unit
675
+ * conversion, where the placement's translation also needs to be
676
+ * scaled. See https://github.com/bldrs-ai/conway/issues/308.
677
+ *
678
+ * @param mat Source column-major Glmdmat4 transform; not mutated.
679
+ * @param factor Scalar applied to every affine entry.
680
+ * @return A freshly allocated 4x4 with the scale applied.
681
+ */
682
+ private uniformScaleAffine;
666
683
  /**
667
684
  *
668
685
  */
@@ -687,5 +704,18 @@ export declare class AP214GeometryExtraction {
687
704
  AP214SceneBuilder,
688
705
  AP214ProductShapeMap
689
706
  ];
707
+ /**
708
+ * Process the transforms for a shape relationship.
709
+ *
710
+ * @param shapeRelationship The shape relationship to process.
711
+ * @param sourceShape The source shape.
712
+ * @param targetShape The target shape.
713
+ * @param owningLocalID The owning local ID.
714
+ * @return The transform and a boolean indicating if the processing should continue inside the loop.
715
+ */
716
+ doTransforms(shapeRelationship: shape_representation_relationship, sourceShape: shape_representation, targetShape: shape_representation, owningLocalID: number): [
717
+ NativeTransform4x4 | undefined,
718
+ boolean
719
+ ];
690
720
  }
691
721
  //# sourceMappingURL=ap214_geometry_extraction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ap214_geometry_extraction.d.ts","sourceRoot":"","sources":["../../../src/AP214E3_2010/ap214_geometry_extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACd,sBAAsB,EAEtB,OAAO,EACP,WAAW,EAOX,wBAAwB,EAMxB,aAAa,EACb,SAAS,EACT,sBAAsB,EAEtB,cAAc,EACd,iBAAiB,EAOjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EAItB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAqB,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EAEnB,8BAA8B,EAC9B,mBAAmB,EACn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B,UAAU,CAAC,EAAE,OAAO,GAAG,sBAAsB;IA6E/C;;;;;;OAMG;IACH,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,GAAE,OAAe,GAAI,mBAAmB,GAAG,SAAS;IAkBhG,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAI,kBAAkB,GAAG,SAAS;IAQrE;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,kBAAkB;IAe1B;;OAEG;IACH,sBAAsB;IAiCtB;;;;OAIG;IACH,aAAa,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,MAAM;IAyChD,eAAe,CAAE,QAAQ,EAAE,WAAW,GAAI,MAAM,GAAG,SAAS;IAmC5D,yBAAyB,CAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAI,MAAM,GAAG,SAAS;IAe3F;;;;;;OAMG;IACH,wBAAwB,CAAC,OAAO,GAAE,OAAe,GAC/C;QAAC,aAAa;QAAE,iBAAiB;QAAE,oBAAoB;KAAC;IAwU1D;;;;;;;;OAQG;IACH,YAAY,CAAC,iBAAiB,EAAE,iCAAiC,EAAE,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC,kBAAkB,GAAG,SAAS,EAAE,OAAO,CAAC;CAiD3M"}
@@ -1581,11 +1581,55 @@ export class AP214GeometryExtraction {
1581
1581
  extractMappedItem(from, owningElementLocalID, parents = void 0) {
1582
1582
  const representationMap = from.mapping_source;
1583
1583
  const mappingTarget = from.mapping_target;
1584
- let popTransform = false;
1584
+ const mappingOrigin = representationMap.mapping_origin;
1585
+ let pushedTransforms = 0;
1586
+ const pushTransform = (nativeTransform) => {
1587
+ this.scene.addTransform(from.localID, nativeTransform.getValues(), nativeTransform, true);
1588
+ ++pushedTransforms;
1589
+ };
1585
1590
  if (mappingTarget instanceof cartesian_transformation_operator_3d) {
1586
1591
  const nativeCartesianTransform = this.extractCartesianTransformOperator3D(mappingTarget);
1587
- this.scene.addTransform(from.localID, nativeCartesianTransform.getValues(), nativeCartesianTransform, true);
1588
- popTransform = true;
1592
+ const originTransform = mappingOrigin instanceof placement ?
1593
+ this.extractRawPlacement(mappingOrigin) : void 0;
1594
+ let combinedTransform;
1595
+ if (originTransform !== void 0) {
1596
+ // Use the same semantics as doTransforms: from = origin^-1, to = target
1597
+ const from = originTransform.invert();
1598
+ const to = nativeCartesianTransform;
1599
+ const params = {
1600
+ useRelPlacement: true,
1601
+ axis2Placement: from,
1602
+ relPlacement: to,
1603
+ };
1604
+ combinedTransform = this.conwayModel.getLocalPlacement(params);
1605
+ }
1606
+ else {
1607
+ combinedTransform = nativeCartesianTransform;
1608
+ }
1609
+ pushTransform(combinedTransform);
1610
+ }
1611
+ else if (mappingTarget instanceof placement) {
1612
+ const targetTransform = this.extractRawPlacement(mappingTarget);
1613
+ const originTransform = mappingOrigin instanceof placement ?
1614
+ this.extractRawPlacement(mappingOrigin) : void 0;
1615
+ if (targetTransform !== void 0) {
1616
+ let combinedTransform;
1617
+ if (originTransform !== void 0) {
1618
+ // Again, same semantics as doTransforms
1619
+ const from = originTransform.invert();
1620
+ const to = targetTransform;
1621
+ const params = {
1622
+ useRelPlacement: true,
1623
+ axis2Placement: from,
1624
+ relPlacement: to,
1625
+ };
1626
+ combinedTransform = this.conwayModel.getLocalPlacement(params);
1627
+ }
1628
+ else {
1629
+ combinedTransform = targetTransform;
1630
+ }
1631
+ pushTransform(combinedTransform);
1632
+ }
1589
1633
  }
1590
1634
  for (const representationItem of representationMap.mapped_representation.items) {
1591
1635
  if (representationItem instanceof mapped_item) {
@@ -1623,7 +1667,7 @@ export class AP214GeometryExtraction {
1623
1667
  this.scene.addGeometry(representationItem.localID, owningElementLocalID, materialOverrideID);
1624
1668
  }
1625
1669
  }
1626
- if (popTransform) {
1670
+ for (; pushedTransforms > 0; --pushedTransforms) {
1627
1671
  this.scene.popTransform();
1628
1672
  }
1629
1673
  }
@@ -2534,23 +2578,22 @@ export class AP214GeometryExtraction {
2534
2578
  return this.scene.addTransform(parentLocalId, axis2PlacementTransform.getValues(), axis2PlacementTransform, true);
2535
2579
  }
2536
2580
  /**
2581
+ * Extract a placement, adding it to the scene.
2537
2582
  *
2538
- * @param from
2539
- * @param mappedItem
2583
+ * @param from The placement to extract.
2584
+ * @param mappedItem Whether the placement is a mapped item.
2585
+ * @return The extracted placement or undefined if the placement is not a axis2_placement_3d.
2540
2586
  */
2541
2587
  extractPlacement(from, mappedItem = false) {
2542
- // if ( !mappedItem ) {
2543
- // const result: AP214SceneTransform | undefined =
2544
- // this.scene.getTransform(from.localID)
2545
- // if (result !== void 0) {
2546
- // this.scene.pushTransform(result)
2547
- // return result
2548
- // }
2549
- // }
2588
+ if (from instanceof axis2_placement_3d) {
2589
+ const placementTransform = this.extractRawPlacement(from);
2590
+ if (placementTransform) {
2591
+ this.scene.addTransform(from.localID, placementTransform.getValues(), placementTransform, true);
2592
+ }
2593
+ }
2550
2594
  if (from instanceof axis2_placement_3d) {
2551
2595
  return this.extractAxis2Placement3D(from, from.localID, false, true);
2552
2596
  }
2553
- return;
2554
2597
  }
2555
2598
  extractRawPlacement(from) {
2556
2599
  if (from instanceof axis2_placement_3d) {
@@ -2559,6 +2602,42 @@ export class AP214GeometryExtraction {
2559
2602
  }
2560
2603
  return;
2561
2604
  }
2605
+ /**
2606
+ * Multiply a native 4x4 transform by a uniform scale factor in affine
2607
+ * semantics: scale both the 3x3 basis and the translation column,
2608
+ * leaving the bottom row at [0,0,0,1]. Equivalent to `factor * mat`
2609
+ * for any affine input.
2610
+ *
2611
+ * Used in preference to the native `uniformScale` binding for unit
2612
+ * conversion, where the placement's translation also needs to be
2613
+ * scaled. See https://github.com/bldrs-ai/conway/issues/308.
2614
+ *
2615
+ * @param mat Source column-major Glmdmat4 transform; not mutated.
2616
+ * @param factor Scalar applied to every affine entry.
2617
+ * @return A freshly allocated 4x4 with the scale applied.
2618
+ */
2619
+ uniformScaleAffine(mat, factor) {
2620
+ const v = mat.getValues().slice();
2621
+ // Column-major Glmdmat4 layout:
2622
+ // basis at 0,1,2 / 4,5,6 / 8,9,10
2623
+ // translation at 12,13,14
2624
+ // bottom row at 3,7,11,15 (untouched: [0,0,0,1])
2625
+ v[0] *= factor;
2626
+ v[1] *= factor;
2627
+ v[2] *= factor;
2628
+ v[4] *= factor;
2629
+ v[5] *= factor;
2630
+ v[6] *= factor;
2631
+ v[8] *= factor;
2632
+ v[9] *= factor;
2633
+ v[10] *= factor;
2634
+ v[12] *= factor;
2635
+ v[13] *= factor;
2636
+ v[14] *= factor;
2637
+ const result = (new (this.wasmModule.Glmdmat4));
2638
+ result.setValues(v);
2639
+ return result;
2640
+ }
2562
2641
  /**
2563
2642
  *
2564
2643
  */
@@ -2768,53 +2847,9 @@ export class AP214GeometryExtraction {
2768
2847
  shapeRepresentationRelationshipsSeen.add(shapeRelationship.localID);
2769
2848
  const sourceShape = shapeRelationship.rep_1;
2770
2849
  const targetShape = shapeRelationship.rep_2;
2771
- const transformInstance = shapeRelationship.findVariant(representation_relationship_with_transformation);
2772
- let transform = void 0;
2773
- let scaleTransform = void 0;
2774
- if (transformInstance !== void 0) {
2775
- const transformOperator = transformInstance.transformation_operator;
2776
- if (!(transformOperator instanceof item_defined_transformation)) {
2777
- continue;
2778
- }
2779
- const placement1 = transformOperator.transform_item_1;
2780
- if (!(placement1 instanceof placement)) {
2781
- continue;
2782
- }
2783
- const placement2 = transformOperator.transform_item_2;
2784
- if (!(placement2 instanceof placement)) {
2785
- continue;
2786
- }
2787
- const from = this.extractRawPlacement(placement1)?.invert() ?? this.identity3DNativeMatrix;
2788
- const to = this.extractRawPlacement(placement2) ?? this.identity3DNativeMatrix;
2789
- const localPlacementParameters = {
2790
- useRelPlacement: true,
2791
- axis2Placement: from,
2792
- relPlacement: to,
2793
- };
2794
- transform = this.conwayModel.getLocalPlacement(localPlacementParameters);
2795
- }
2796
- const sourceShapeContext = sourceShape.context_of_items.findVariant(global_unit_assigned_context)?.units?.
2797
- find(unit => unit.findVariant(length_unit))?.findVariant(length_unit);
2798
- const targetShapeContext = targetShape.context_of_items.findVariant(global_unit_assigned_context)?.units?.
2799
- find(unit => unit.findVariant(length_unit))?.findVariant(length_unit);
2800
- if (sourceShapeContext !== void 0 && targetShapeContext !== void 0) {
2801
- const scaleRatio = this.lengthUnitConversionRatio(sourceShapeContext, targetShapeContext);
2802
- if (scaleRatio !== void 0 && scaleRatio !== 1) {
2803
- scaleTransform = this.identity3DNativeMatrix.uniformScale(scaleRatio);
2804
- }
2805
- }
2806
- if (scaleTransform !== void 0) {
2807
- if (transform !== void 0) {
2808
- const localPlacementParameters = {
2809
- useRelPlacement: true,
2810
- axis2Placement: transform,
2811
- relPlacement: scaleTransform,
2812
- };
2813
- transform = this.conwayModel.getLocalPlacement(localPlacementParameters);
2814
- }
2815
- else {
2816
- transform = scaleTransform;
2817
- }
2850
+ const [transform, isContinue] = this.doTransforms(shapeRelationship, sourceShape, targetShape, owningLocalID);
2851
+ if (isContinue) {
2852
+ continue;
2818
2853
  }
2819
2854
  const sourceID = sourceShape.localID;
2820
2855
  const targetID = targetShape.localID;
@@ -2853,53 +2888,9 @@ export class AP214GeometryExtraction {
2853
2888
  */
2854
2889
  const sourceShape = shapeRelationship.rep_2;
2855
2890
  const targetShape = shapeRelationship.rep_1;
2856
- const transformInstance = shapeRelationship.findVariant(representation_relationship_with_transformation);
2857
- let transform = void 0;
2858
- let scaleTransform = void 0;
2859
- if (transformInstance !== void 0) {
2860
- const transformOperator = transformInstance.transformation_operator;
2861
- if (!(transformOperator instanceof item_defined_transformation)) {
2862
- continue;
2863
- }
2864
- const placement1 = transformOperator.transform_item_1;
2865
- if (!(placement1 instanceof placement)) {
2866
- continue;
2867
- }
2868
- const placement2 = transformOperator.transform_item_2;
2869
- if (!(placement2 instanceof placement)) {
2870
- continue;
2871
- }
2872
- const from = this.extractRawPlacement(placement1)?.invert() ?? this.identity3DNativeMatrix;
2873
- const to = this.extractRawPlacement(placement2) ?? this.identity3DNativeMatrix;
2874
- const localPlacementParameters = {
2875
- useRelPlacement: true,
2876
- axis2Placement: from,
2877
- relPlacement: to,
2878
- };
2879
- transform = this.conwayModel.getLocalPlacement(localPlacementParameters);
2880
- }
2881
- const sourceShapeContext = sourceShape.context_of_items.findVariant(global_unit_assigned_context)?.units?.
2882
- find(unit => unit.findVariant(length_unit))?.findVariant(length_unit);
2883
- const targetShapeContext = targetShape.context_of_items.findVariant(global_unit_assigned_context)?.units?.
2884
- find(unit => unit.findVariant(length_unit))?.findVariant(length_unit);
2885
- if (sourceShapeContext !== void 0 && targetShapeContext !== void 0) {
2886
- const scaleRatio = this.lengthUnitConversionRatio(sourceShapeContext, targetShapeContext);
2887
- if (scaleRatio !== void 0 && scaleRatio !== 1) {
2888
- scaleTransform = this.identity3DNativeMatrix.uniformScale(scaleRatio);
2889
- }
2890
- }
2891
- if (scaleTransform !== void 0) {
2892
- if (transform !== void 0) {
2893
- const localPlacementParameters = {
2894
- useRelPlacement: true,
2895
- axis2Placement: transform,
2896
- relPlacement: scaleTransform,
2897
- };
2898
- transform = this.conwayModel.getLocalPlacement(localPlacementParameters);
2899
- }
2900
- else {
2901
- transform = scaleTransform;
2902
- }
2891
+ const [transform, isContinue] = this.doTransforms(shapeRelationship, sourceShape, targetShape, owningLocalID);
2892
+ if (isContinue) {
2893
+ continue;
2903
2894
  }
2904
2895
  const sourceID = sourceShape.localID;
2905
2896
  const targetID = targetShape.localID;
@@ -2951,7 +2942,8 @@ export class AP214GeometryExtraction {
2951
2942
  let scaleTransform = void 0;
2952
2943
  if (sourceShapeContext !== void 0) {
2953
2944
  const sourceUnitInM = (this.convertToMetres(sourceShapeContext) ?? 1);
2954
- scaleTransform = this.identity3DNativeMatrix.uniformScale(1 / sourceUnitInM);
2945
+ scaleTransform =
2946
+ this.uniformScaleAffine(this.identity3DNativeMatrix, 1 / sourceUnitInM);
2955
2947
  }
2956
2948
  // not an assembly mapped item, just extract the representation
2957
2949
  thunk(void 0, scaleTransform);
@@ -2984,7 +2976,8 @@ export class AP214GeometryExtraction {
2984
2976
  let scaleTransform = void 0;
2985
2977
  if (sourceShapeContext !== void 0) {
2986
2978
  const sourceUnitInM = (this.convertToMetres(sourceShapeContext) ?? 1);
2987
- scaleTransform = this.identity3DNativeMatrix.uniformScale(1 / sourceUnitInM);
2979
+ scaleTransform =
2980
+ this.uniformScaleAffine(this.identity3DNativeMatrix, 1 / sourceUnitInM);
2988
2981
  }
2989
2982
  // not an assembly mapped item, just extract the representation
2990
2983
  mappedNode.thunk(void 0, scaleTransform);
@@ -3005,4 +2998,56 @@ export class AP214GeometryExtraction {
3005
2998
  this.model.elementMemoization = previousMemoizationState;
3006
2999
  }
3007
3000
  }
3001
+ /**
3002
+ * Process the transforms for a shape relationship.
3003
+ *
3004
+ * @param shapeRelationship The shape relationship to process.
3005
+ * @param sourceShape The source shape.
3006
+ * @param targetShape The target shape.
3007
+ * @param owningLocalID The owning local ID.
3008
+ * @return The transform and a boolean indicating if the processing should continue inside the loop.
3009
+ */
3010
+ doTransforms(shapeRelationship, sourceShape, targetShape, owningLocalID) {
3011
+ const transformInstance = shapeRelationship.findVariant(representation_relationship_with_transformation);
3012
+ let transform = void 0;
3013
+ if (transformInstance !== void 0) {
3014
+ const transformOperator = transformInstance.transformation_operator;
3015
+ if (transformOperator instanceof item_defined_transformation) {
3016
+ const placement1 = transformOperator.transform_item_1;
3017
+ const placement2 = transformOperator.transform_item_2;
3018
+ if (!(placement1 instanceof placement) || !(placement2 instanceof placement)) {
3019
+ return [void 0, true];
3020
+ }
3021
+ const from = this.extractRawPlacement(placement1)?.invert() ?? this.identity3DNativeMatrix;
3022
+ const to = this.extractRawPlacement(placement2) ?? this.identity3DNativeMatrix;
3023
+ const localPlacementParameters = {
3024
+ useRelPlacement: true,
3025
+ axis2Placement: from,
3026
+ relPlacement: to,
3027
+ };
3028
+ transform = this.conwayModel.getLocalPlacement(localPlacementParameters);
3029
+ }
3030
+ else if (transformOperator instanceof cartesian_transformation_operator_3d) {
3031
+ transform = this.extractCartesianTransformOperator3D(transformOperator);
3032
+ }
3033
+ }
3034
+ const sourceShapeContext = sourceShape.context_of_items.findVariant(global_unit_assigned_context)?.units?.
3035
+ find(unit => unit.findVariant(length_unit))?.findVariant(length_unit);
3036
+ const targetShapeContext = targetShape.context_of_items.findVariant(global_unit_assigned_context)?.units?.
3037
+ find(unit => unit.findVariant(length_unit))?.findVariant(length_unit);
3038
+ let scaleRatio = 1;
3039
+ let needsScale = false;
3040
+ if (sourceShapeContext !== void 0 && targetShapeContext !== void 0) {
3041
+ const sr = this.lengthUnitConversionRatio(sourceShapeContext, targetShapeContext);
3042
+ if (sr !== void 0 && sr !== 1) {
3043
+ scaleRatio = sr;
3044
+ needsScale = true;
3045
+ }
3046
+ }
3047
+ if (needsScale) {
3048
+ transform =
3049
+ this.uniformScaleAffine(transform ?? this.identity3DNativeMatrix, scaleRatio);
3050
+ }
3051
+ return [transform, false];
3052
+ }
3008
3053
  }