@archilogic/floor-plan-sdk 5.1.4 → 5.1.5

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.
package/dist/fpe.js CHANGED
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  /*!
5
- Archilogic Floor Plan Engine SDK v5.1.4 webgl build 250227-135325-23b67b
5
+ Archilogic Floor Plan Engine SDK v5.1.5 webgl build 250303-144845-a5947a
6
6
 
7
7
  Copyright (c) 2025 Archilogic AG. All rights reserved.
8
8
 
@@ -12689,7 +12689,7 @@ function getCustomAttributesJson(customAttributes) {
12689
12689
  }
12690
12690
  return customAttributesJson;
12691
12691
  }
12692
- const schemaVersion = "0.20.0";
12692
+ const schemaVersion = "0.20.1";
12693
12693
  class SpaceGraph {
12694
12694
  constructor() {
12695
12695
  this.products = [];
@@ -14344,6 +14344,7 @@ function mergeGraphEdgeProfiles(graphEdges) {
14344
14344
  const computedGeometries = graphEdges.map((edge) => edge.geometry.computed);
14345
14345
  const sortedEdges = sortAndAlignEdges(graphEdges);
14346
14346
  const computed = graphEdges[0].geometry.computed;
14347
+ let valid = computed.valid;
14347
14348
  const firstEdgeReverse = sortedEdges[0].reverse;
14348
14349
  const firstEdgeComputed = sortedEdges[0].edge.geometry.computed;
14349
14350
  const lastEdgeReverse = sortedEdges[sortedEdges.length - 1].reverse;
@@ -14363,14 +14364,21 @@ function mergeGraphEdgeProfiles(graphEdges) {
14363
14364
  }
14364
14365
  }
14365
14366
  const union = polygonUnion(computedGeometries.map((p2) => p2.points));
14366
- let points;
14367
+ let points = [];
14367
14368
  if (union.length === 1) {
14368
14369
  points = union[0];
14369
- } else {
14370
- points = polygonOffset(union, 1e-3)[0];
14370
+ } else if (union.length > 1) {
14371
+ const offsetResult = polygonOffset(union, 1e-3);
14372
+ if (offsetResult.length > 0) {
14373
+ points = offsetResult[0];
14374
+ }
14375
+ }
14376
+ if (points.length === 0) {
14377
+ logger$1.warn(`Empty wall geometry after merging edge profiles: ${graphEdges.map((e2) => e2.id).join(", ")}`);
14378
+ valid = false;
14371
14379
  }
14372
14380
  return {
14373
- valid: computed.valid,
14381
+ valid,
14374
14382
  skipped: computed.skipped,
14375
14383
  selfIntersecting: computed.selfIntersecting,
14376
14384
  sidePoints1: sidePoints1.slice(),