@archilogic/floor-plan-sdk 5.1.0 → 5.1.3

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
@@ -77,7 +77,7 @@ export declare interface BezierCurve extends BaseShape {
77
77
  points: Polygon;
78
78
  }
79
79
 
80
- declare type BoundingBox2d = {
80
+ export declare type BoundingBox2d = {
81
81
  min: Vector2;
82
82
  max: Vector2;
83
83
  };
@@ -127,7 +127,9 @@ declare interface CommonParameters$3 {
127
127
  }
128
128
 
129
129
  declare interface CommonParameters$4 {
130
+ /** thickness of the frame in x direction */
130
131
  frameThickness: number;
132
+ /** depth of the frame in z direction */
131
133
  frameDepth: number;
132
134
  doorType: DoorType;
133
135
  doorAngle: number;
@@ -147,7 +149,9 @@ declare interface CommonParameters$6 {
147
149
  }
148
150
 
149
151
  declare interface CommonParameters {
152
+ /** thickness of the frame in x direction */
150
153
  frameThickness: number;
154
+ /** depth of the frame in z direction */
151
155
  frameDepth: number;
152
156
  panelLength: number;
153
157
  panelCount: number;
@@ -234,6 +238,19 @@ declare type DoorSide = 'side1' | 'side2';
234
238
 
235
239
  declare type DoorType = 'singleSwing' | 'doubleSwing' | 'slidingDoor' | 'opening' | 'elevatorDoor' | 'garageDoor';
236
240
 
241
+ declare enum DxfUnits {
242
+ unitLess = 0,
243
+ inches = 1,
244
+ feet = 2,
245
+ miles = 3,
246
+ millimeters = 4,
247
+ centimeters = 5,
248
+ meters = 6,
249
+ kilometers = 7
250
+ }
251
+
252
+ declare type DxfUnitsString = keyof typeof DxfUnits;
253
+
237
254
  declare interface EdgeCanSplitOptions {
238
255
  minimumLength?: number;
239
256
  }
@@ -336,6 +353,7 @@ declare class FloorPlanCore {
336
353
  * Change options after the floor plan engine instance has been created
337
354
  */
338
355
  set(args?: FpeConfig): void;
356
+ getBoundingBox(margin?: number): BoundingBox2d;
339
357
  /**
340
358
  * Get a list of spaces and assets for a specific plan position
341
359
  * @param {*} position - plan position
@@ -355,6 +373,7 @@ declare class FloorPlanCore {
355
373
  * The main Floor plan engine SDK class
356
374
  */
357
375
  export declare class FloorPlanEngine extends FloorPlanCore {
376
+ #private;
358
377
  fpeNode?: HTMLElement;
359
378
  view: WebGlView;
360
379
  interaction: FpeInteraction;
@@ -399,7 +418,6 @@ export declare class FloorPlanEngine extends FloorPlanCore {
399
418
  initDrawingEvents(): void;
400
419
  freeDrawingEvents(): void;
401
420
  generateUi(): void;
402
- getBoundingBox(margin?: number): BoundingBox2d;
403
421
  /**
404
422
  * Get a bounding box containing the layout, with some padding
405
423
  * @param layoutBoundingBox - bounding box of the layout, in meters.
@@ -866,6 +884,7 @@ export declare interface GraphicArgs {
866
884
 
867
885
  declare type GraphicUpdate = {
868
886
  position?: Vector2;
887
+ rotation?: number;
869
888
  style?: ShapeStyle;
870
889
  shapes?: Shape[];
871
890
  };
@@ -1402,6 +1421,7 @@ declare class LayoutEdgeElementBase extends LayoutElementBase {
1402
1421
  getAdjacentSpacesBySide(): [LayoutSpace[], LayoutSpace[]];
1403
1422
  getSpaces(): LayoutSpace[];
1404
1423
  getElementsAtLinearPosition(u: number): LayoutElement[];
1424
+ get isExternal(): boolean;
1405
1425
  }
1406
1426
 
1407
1427
  declare interface LayoutEdgeElementBaseJson extends LayoutElementBaseJson {
@@ -1429,7 +1449,13 @@ declare class LayoutElementBase extends LayoutNodeBase {
1429
1449
  insertElement(element: LayoutElement): void;
1430
1450
  getTransform(): Transform3d;
1431
1451
  getWorldTransform(): Transform3d;
1452
+ /**
1453
+ * returns the element's object aligned bounding box with transform
1454
+ */
1432
1455
  getBoundingBox(localTransform?: boolean): TransformBoundingBox3d;
1456
+ getAxisAlignedBoundingBox(localTransform?: boolean): BoundingBox3d;
1457
+ getBoundingBoxContour(localTransform?: boolean): Vector2_2[];
1458
+ get isExternal(): boolean;
1433
1459
  removeElement(element: LayoutElement): void;
1434
1460
  copyForClone(element: LayoutElement): void;
1435
1461
  setParameters(parameters: RecursivePartial<LayoutElementParameters>): void;
@@ -1467,6 +1493,7 @@ declare interface LayoutFloorPlanDxfAnnotationJson extends LayoutAnnotationBaseJ
1467
1493
  declare interface LayoutFloorPlanDxfParameters {
1468
1494
  uri: string;
1469
1495
  drawingOrigin: Vector2_2;
1496
+ drawingUnits: DxfUnitsString;
1470
1497
  hiddenLayers: string[];
1471
1498
  }
1472
1499
 
@@ -1590,6 +1617,7 @@ declare class LayoutOpening extends LayoutOpeningElementBase {
1590
1617
  transform: Transform3d;
1591
1618
  };
1592
1619
  getSpaces(): LayoutSpace[];
1620
+ get isExternal(): boolean;
1593
1621
  }
1594
1622
 
1595
1623
  declare type LayoutOpeningElement = LayoutOpening;
@@ -1751,6 +1779,7 @@ declare class LayoutSpace extends LayoutNodeBase {
1751
1779
  copyForClone(space: LayoutSpace): void;
1752
1780
  setId(id: string): void;
1753
1781
  setAttributes(attributes: LayoutSpaceAttributesJson): void;
1782
+ get isExternal(): boolean;
1754
1783
  getArea(): number;
1755
1784
  getAdjacentSpaces(graph: Graph, { connectivity }?: {
1756
1785
  connectivity?: number;
@@ -1765,6 +1794,8 @@ declare class LayoutSpace extends LayoutNodeBase {
1765
1794
  edgeIndex: number;
1766
1795
  };
1767
1796
  getBoundingBox(): TransformBoundingBox3d;
1797
+ getAxisAlignedBoundingBox(): BoundingBox3d;
1798
+ getBoundingBoxContour(): Vector2_2[];
1768
1799
  attachSlab(slab: LayoutBoundarySlab): void;
1769
1800
  detachSlab(slab: LayoutBoundarySlab): void;
1770
1801
  toJSON(): LayoutSpaceJson;
@@ -2227,7 +2258,7 @@ declare class PlanGraphic {
2227
2258
  gfxScale: number;
2228
2259
  private floorPlan;
2229
2260
  constructor({ shapes, position, alpha, scale, clearLayer, interactive, id, isHandler, scaleOnZoom, updatePositionOnDrag, baseLayer, container, floorPlan }: PlanGraphicArgs);
2230
- set({ position, style, shapes }?: GraphicUpdate): void;
2261
+ set({ position, rotation, style, shapes }?: GraphicUpdate): void;
2231
2262
  private doUpdatePositionOnDrag;
2232
2263
  on(event: string, callback: any, context?: any): this;
2233
2264
  off(event: string, callback?: any): this;
@@ -2251,6 +2282,7 @@ declare class PlanLayer {
2251
2282
  private floorPlan;
2252
2283
  constructor(floorPlan: FloorPlanEngine, baseLayer?: BaseLayers, id?: string);
2253
2284
  addGraphic(args: GraphicArgs): PlanGraphic;
2285
+ /* Excluded from this release type: findGraphic */
2254
2286
  deleteGraphic(graphic: PlanGraphic): void;
2255
2287
  /**
2256
2288
  * clear all shapes from the layer
@@ -2667,7 +2699,7 @@ declare interface SpaceGraphEventMap {
2667
2699
  'space-split': [LayoutSpace, [LayoutSpace, LayoutSpace]];
2668
2700
  'space-attributes-change': [LayoutSpace];
2669
2701
  'element-create': [LayoutElement];
2670
- 'element-delete': [LayoutElement];
2702
+ 'element-delete': [LayoutElement, LayoutElement | null];
2671
2703
  'element-parameters-change': [LayoutElementBase];
2672
2704
  'element-transform-change': [LayoutTransformElementBase];
2673
2705
  'element-edges-change': [LayoutEdgeElementBase];
@@ -2979,6 +3011,8 @@ declare class SpatialGraphEdge extends SpatialGraphNodeBase {
2979
3011
  element: LayoutEdgeElement | null;
2980
3012
  constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex);
2981
3013
  getPoints(): [Vector2, Vector2];
3014
+ getLength(): number;
3015
+ get isExternal(): boolean;
2982
3016
  setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void;
2983
3017
  setVerticesByIds(vertexId1: string, vertexId2: string): void;
2984
3018
  canSplit(u: number, options?: EdgeCanSplitOptions): boolean;