@archilogic/floor-plan-sdk 5.0.0-beta.19 → 5.0.0-beta.20

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.d.ts CHANGED
@@ -467,7 +467,6 @@ type ResourceScope =
467
467
  | "organization"
468
468
  | "dxf"
469
469
  | "floor"
470
- | "ifc"
471
470
  | "job"
472
471
  | "order"
473
472
  | "product"
@@ -1420,6 +1419,25 @@ declare class LayoutBoundarySlab extends LayoutBoundaryElementBase {
1420
1419
  getSpaces(): LayoutSpace[];
1421
1420
  }
1422
1421
 
1422
+ type EdgeType = 'graph:adjacentTo' | 'graph:connectedTo';
1423
+ /**
1424
+ * undirected graph for traversal without edge weights
1425
+ */
1426
+ declare class Graph {
1427
+ nodeMap: Map<LayoutNode, Map<EdgeType, Set<LayoutNode>>>;
1428
+ addNode(node: LayoutNode): Map<EdgeType, Set<LayoutNode>>;
1429
+ addEdge(type: EdgeType, source: LayoutNode, destination: LayoutNode): void;
1430
+ removeNode(node: LayoutNode): void;
1431
+ removeEdge(type: EdgeType, source: LayoutNode, destination: LayoutNode): void;
1432
+ /**
1433
+ * Breadth-First Search
1434
+ * if edges have weights this needs to be replaces with dijkstra algorithm
1435
+ */
1436
+ findShortestPath(edgeType: EdgeType, start: LayoutNode, end: LayoutNode, options?: {
1437
+ depthLimit?: number;
1438
+ }): LayoutNode[] | null;
1439
+ }
1440
+
1423
1441
  interface SpatialGraphNodeBaseJson extends LayoutNodeBaseJson {
1424
1442
  }
1425
1443
  interface SpatialGraphVertexJson extends SpatialGraphNodeBaseJson {
@@ -2235,6 +2253,9 @@ declare class LayoutSpace extends LayoutNodeBase {
2235
2253
  setId(id: string): void;
2236
2254
  setAttributes(attributes: LayoutSpaceAttributesJson): void;
2237
2255
  getArea(): number;
2256
+ getAdjacentSpaces(graph: Graph, { connectivity }?: {
2257
+ connectivity?: number;
2258
+ }): LayoutSpace[];
2238
2259
  getElements(types?: string | string[]): LayoutElement[];
2239
2260
  getBoundaryFromVertex(vertex: SpatialGraphVertex): {
2240
2261
  boundary: LayoutBoundary | undefined;
@@ -2346,6 +2367,7 @@ declare class SpaceGraphLayout extends SpaceGraphSpatialStructureBase {
2346
2367
  include?: string[];
2347
2368
  };
2348
2369
  }): number;
2370
+ getLayoutGraph(): Graph;
2349
2371
  getUniqueId(prefix: string, nodesById: Record<string, SpaceGraphNode>): string;
2350
2372
  getSpaceId(prefix?: string): string;
2351
2373
  getElementId(element: LayoutElement, prefix?: string): string;