brepjs-bim 0.6.0 → 0.8.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.
@@ -16618,12 +16618,22 @@ function addOpenings(model, host, wallId, containerId, idByKeyPath) {
16618
16618
  const keyed = requireKeyed(opening);
16619
16619
  if (!keyed.ok) return keyed;
16620
16620
  const fillT = peelTranslates(opening.geometry).total;
16621
+ const axisX = host.props["axisX"] ?? [
16622
+ 1,
16623
+ 0,
16624
+ 0
16625
+ ];
16626
+ const delta = [
16627
+ fillT[0] - hostT[0],
16628
+ fillT[1] - hostT[1],
16629
+ fillT[2] - hostT[2]
16630
+ ];
16621
16631
  const added = addFill(model, fill, {
16622
16632
  materialName: SPEC_DEFAULTS.materialName,
16623
16633
  ...stripGeometryProps(fill.props),
16624
16634
  wallLocalId: wallId,
16625
- offsetAlongWall: fillT[0] - hostT[0],
16626
- offsetFromFloor: fillT[2] - hostT[2]
16635
+ offsetAlongWall: delta[0] * axisX[0] + delta[1] * axisX[1] + delta[2] * axisX[2],
16636
+ offsetFromFloor: delta[2]
16627
16637
  }, {
16628
16638
  stableKey: fill.keyPath,
16629
16639
  openingStableKey: opening.keyPath
@@ -16595,12 +16595,22 @@ function addOpenings(model, host, wallId, containerId, idByKeyPath) {
16595
16595
  const keyed = requireKeyed(opening);
16596
16596
  if (!keyed.ok) return keyed;
16597
16597
  const fillT = peelTranslates(opening.geometry).total;
16598
+ const axisX = host.props["axisX"] ?? [
16599
+ 1,
16600
+ 0,
16601
+ 0
16602
+ ];
16603
+ const delta = [
16604
+ fillT[0] - hostT[0],
16605
+ fillT[1] - hostT[1],
16606
+ fillT[2] - hostT[2]
16607
+ ];
16598
16608
  const added = addFill(model, fill, {
16599
16609
  materialName: SPEC_DEFAULTS.materialName,
16600
16610
  ...stripGeometryProps(fill.props),
16601
16611
  wallLocalId: wallId,
16602
- offsetAlongWall: fillT[0] - hostT[0],
16603
- offsetFromFloor: fillT[2] - hostT[2]
16612
+ offsetAlongWall: delta[0] * axisX[0] + delta[1] * axisX[1] + delta[2] * axisX[2],
16613
+ offsetFromFloor: delta[2]
16604
16614
  }, {
16605
16615
  stableKey: fill.keyPath,
16606
16616
  openingStableKey: opening.keyPath
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs-bim",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "BIM layer for brepjs — IFC4-aligned parametric building elements",
5
5
  "keywords": [
6
6
  "bim",