@snaptrude/plugin-core 0.9.4 → 0.9.6

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/index.js CHANGED
@@ -887,6 +887,14 @@ var PluginGridValueArgs = z21.object({
887
887
  var PluginToleranceArgs = z21.object({
888
888
  value: z21.number()
889
889
  });
890
+ var PluginProjectInfo = z21.object({
891
+ projectId: z21.string(),
892
+ name: z21.string().nullable(),
893
+ units: PUnitType,
894
+ activeStorey: z21.number(),
895
+ storeyCount: z21.number(),
896
+ location: z21.object({ latitude: z21.number(), longitude: z21.number() }).nullable()
897
+ });
890
898
 
891
899
  // src/api/core/comment/index.ts
892
900
  import * as z22 from "zod";
@@ -1430,6 +1438,135 @@ var PluginUnderlaySetOpacityArgs = z32.object({
1430
1438
  var PluginUnderlayRefArgs = z32.object({
1431
1439
  underlay: UnderlayHandle
1432
1440
  });
1441
+ var PluginCadLineGeometry = z32.object({
1442
+ type: z32.literal("line"),
1443
+ start: Vec3Components,
1444
+ end: Vec3Components
1445
+ });
1446
+ var PluginCadArcGeometry = z32.object({
1447
+ type: z32.literal("arc"),
1448
+ centre: Vec3Components,
1449
+ axis: Vec3Components,
1450
+ start: Vec3Components,
1451
+ end: Vec3Components
1452
+ });
1453
+ var PluginCadGeometry = z32.discriminatedUnion("type", [
1454
+ PluginCadLineGeometry,
1455
+ PluginCadArcGeometry
1456
+ ]);
1457
+ var PluginCadLayerGeometryOptions = z32.object({
1458
+ offset: z32.number().int().nonnegative().default(0),
1459
+ limit: z32.number().int().positive().max(1e3).default(500)
1460
+ });
1461
+ var PluginCadLayerGeometryArgs = z32.object({
1462
+ underlay: UnderlayHandle,
1463
+ layer: z32.string(),
1464
+ options: PluginCadLayerGeometryOptions.default({ offset: 0, limit: 500 })
1465
+ });
1466
+ var PluginCadLayerGeometryPage = z32.object({
1467
+ layer: z32.string(),
1468
+ coordinateSpace: z32.literal("snaptrude-world"),
1469
+ units: z32.literal("snaptrude-internal"),
1470
+ total: z32.number().int().nonnegative(),
1471
+ offset: z32.number().int().nonnegative(),
1472
+ curves: z32.array(PluginCadGeometry)
1473
+ });
1474
+ var PluginPlanPoint = z32.object({ x: z32.number(), z: z32.number() });
1475
+ var PluginCadCenterlineOptions = z32.object({
1476
+ thicknessRange: z32.tuple([z32.number().positive(), z32.number().positive()]).default([0.3, 1.6]),
1477
+ mergeGap: z32.number().nonnegative().default(0.05),
1478
+ minLength: z32.number().nonnegative().default(0.1),
1479
+ parallelTolDeg: z32.number().positive().max(15).default(2),
1480
+ minOverlap: z32.number().min(0).max(1).default(0.6),
1481
+ bridgeOpenings: z32.object({ maxWidth: z32.number().positive() }).nullable().default({ maxWidth: 9.6 })
1482
+ });
1483
+ var PluginCadCenterlinesArgs = z32.object({
1484
+ underlay: UnderlayHandle,
1485
+ layer: z32.string(),
1486
+ options: PluginCadCenterlineOptions.default({
1487
+ thicknessRange: [0.3, 1.6],
1488
+ mergeGap: 0.05,
1489
+ minLength: 0.1,
1490
+ parallelTolDeg: 2,
1491
+ minOverlap: 0.6,
1492
+ bridgeOpenings: { maxWidth: 9.6 }
1493
+ })
1494
+ });
1495
+ var PluginCadOpening = z32.object({
1496
+ start: PluginPlanPoint,
1497
+ end: PluginPlanPoint,
1498
+ width: z32.number()
1499
+ });
1500
+ var PluginCadCenterline = z32.object({
1501
+ start: PluginPlanPoint,
1502
+ end: PluginPlanPoint,
1503
+ thickness: z32.number(),
1504
+ length: z32.number(),
1505
+ sourceFaceCount: z32.number().int().nonnegative(),
1506
+ openings: z32.array(PluginCadOpening)
1507
+ });
1508
+ var PluginCadUnpairedFace = z32.object({
1509
+ start: PluginPlanPoint,
1510
+ end: PluginPlanPoint,
1511
+ length: z32.number()
1512
+ });
1513
+ var PluginCadCenterlinesResult = z32.object({
1514
+ layer: z32.string(),
1515
+ coordinateSpace: z32.literal("snaptrude-world"),
1516
+ units: z32.literal("snaptrude-internal"),
1517
+ centerlines: z32.array(PluginCadCenterline),
1518
+ unpaired: z32.array(PluginCadUnpairedFace),
1519
+ stats: z32.object({
1520
+ curvesRead: z32.number().int().nonnegative(),
1521
+ arcsSkipped: z32.number().int().nonnegative(),
1522
+ fragmentsCulled: z32.number().int().nonnegative(),
1523
+ duplicates: z32.number().int().nonnegative(),
1524
+ faces: z32.number().int().nonnegative()
1525
+ })
1526
+ });
1527
+ var PluginCadArcClassifyOptions = z32.object({
1528
+ radiusRange: z32.tuple([z32.number().positive(), z32.number().positive()]).default([3, 5.4]),
1529
+ sweepRangeDeg: z32.tuple([z32.number().positive(), z32.number().positive()]).default([60, 120]),
1530
+ clusterTol: z32.number().positive().default(0.1)
1531
+ });
1532
+ var PluginCadArcClassifyArgs = z32.object({
1533
+ underlay: UnderlayHandle,
1534
+ layer: z32.string(),
1535
+ options: PluginCadArcClassifyOptions.default({
1536
+ radiusRange: [3, 5.4],
1537
+ sweepRangeDeg: [60, 120],
1538
+ clusterTol: 0.1
1539
+ })
1540
+ });
1541
+ var PluginCadDoorCandidate = z32.object({
1542
+ hinge: PluginPlanPoint,
1543
+ leafWidth: z32.number(),
1544
+ swingDir: PluginPlanPoint,
1545
+ wallDir: PluginPlanPoint,
1546
+ openingWidth: z32.number(),
1547
+ double: z32.boolean()
1548
+ });
1549
+ var PluginCadArcClassifyResult = z32.object({
1550
+ layer: z32.string(),
1551
+ coordinateSpace: z32.literal("snaptrude-world"),
1552
+ units: z32.literal("snaptrude-internal"),
1553
+ doors: z32.array(PluginCadDoorCandidate),
1554
+ rejected: z32.array(
1555
+ z32.object({
1556
+ centre: PluginPlanPoint,
1557
+ radius: z32.number(),
1558
+ sweepDeg: z32.number(),
1559
+ reason: z32.string()
1560
+ })
1561
+ ),
1562
+ radiusHistogram: z32.array(
1563
+ z32.object({ radius: z32.number(), count: z32.number().int().positive() })
1564
+ ),
1565
+ stats: z32.object({
1566
+ curvesRead: z32.number().int().nonnegative(),
1567
+ arcsConsidered: z32.number().int().nonnegative()
1568
+ })
1569
+ });
1433
1570
 
1434
1571
  // src/api/core/io/terrain/index.ts
1435
1572
  import * as z33 from "zod";
@@ -2222,6 +2359,29 @@ var PluginDesignQueryApi = class {
2222
2359
  constructor() {
2223
2360
  }
2224
2361
  };
2362
+ var PluginOutlinePlanPoint = z42.object({ x: z42.number(), z: z42.number() });
2363
+ var PluginStoreyOutlineOptions = z42.object({
2364
+ storey: z42.number().int().optional(),
2365
+ include: z42.array(PluginEntityType).nonempty().default(["wall"]),
2366
+ minArea: z42.number().nonnegative().default(1)
2367
+ });
2368
+ var PluginStoreyFootprint = z42.object({
2369
+ outline: z42.array(PluginOutlinePlanPoint),
2370
+ holes: z42.array(
2371
+ z42.object({
2372
+ ring: z42.array(PluginOutlinePlanPoint),
2373
+ areaSq: z42.number().nonnegative()
2374
+ })
2375
+ ),
2376
+ areaSq: z42.number().nonnegative(),
2377
+ enclosed: z42.boolean()
2378
+ });
2379
+ var PluginStoreyOutlineResult = z42.object({
2380
+ footprints: z42.array(PluginStoreyFootprint),
2381
+ discarded: z42.array(
2382
+ z42.object({ areaSq: z42.number().nonnegative(), reason: z42.string() })
2383
+ )
2384
+ });
2225
2385
 
2226
2386
  // src/api/design/selection/index.ts
2227
2387
  import * as z43 from "zod";
@@ -2696,6 +2856,9 @@ var PluginDesignVisibilityApi = class {
2696
2856
  var PluginDesignVisibilityHideArgs = z56.object({
2697
2857
  components: z56.array(ComponentHandle)
2698
2858
  });
2859
+ var PluginDesignVisibilityShowArgs = z56.object({
2860
+ components: z56.array(ComponentHandle)
2861
+ });
2699
2862
  var PluginDesignVisibilityIsolateArgs = z56.object({
2700
2863
  components: z56.array(ComponentHandle)
2701
2864
  });
@@ -5495,6 +5658,22 @@ export {
5495
5658
  PluginBuildingType,
5496
5659
  PluginBuildingTypeKind,
5497
5660
  PluginBuildingTypeSummary,
5661
+ PluginCadArcClassifyArgs,
5662
+ PluginCadArcClassifyOptions,
5663
+ PluginCadArcClassifyResult,
5664
+ PluginCadArcGeometry,
5665
+ PluginCadCenterline,
5666
+ PluginCadCenterlineOptions,
5667
+ PluginCadCenterlinesArgs,
5668
+ PluginCadCenterlinesResult,
5669
+ PluginCadDoorCandidate,
5670
+ PluginCadGeometry,
5671
+ PluginCadLayerGeometryArgs,
5672
+ PluginCadLayerGeometryOptions,
5673
+ PluginCadLayerGeometryPage,
5674
+ PluginCadLineGeometry,
5675
+ PluginCadOpening,
5676
+ PluginCadUnpairedFace,
5498
5677
  PluginCameraApi,
5499
5678
  PluginCameraLookFromArgs,
5500
5679
  PluginCameraMode,
@@ -5747,6 +5926,7 @@ export {
5747
5926
  PluginDesignVisibilityApi,
5748
5927
  PluginDesignVisibilityHideArgs,
5749
5928
  PluginDesignVisibilityIsolateArgs,
5929
+ PluginDesignVisibilityShowArgs,
5750
5930
  PluginDesignWindowArgs,
5751
5931
  PluginDesignWindowExistsArgs,
5752
5932
  PluginDesignWindowGetCatalogItemArgs,
@@ -5989,6 +6169,7 @@ export {
5989
6169
  PluginNotFoundError,
5990
6170
  PluginObjectCatalogGroup,
5991
6171
  PluginObjectCatalogItem,
6172
+ PluginOutlinePlanPoint,
5992
6173
  PluginPermissionError,
5993
6174
  PluginPlacedView,
5994
6175
  PluginPlacedViewCrop,
@@ -6003,6 +6184,7 @@ export {
6003
6184
  PluginPlacedViewsSetOpacityArgs,
6004
6185
  PluginPlacedViewsUpdateFontStylesArgs,
6005
6186
  PluginPlacedViewsUpdateStylesArgs,
6187
+ PluginPlanPoint,
6006
6188
  PluginPresentationAIInspirationApi,
6007
6189
  PluginPresentationAnnotateApi,
6008
6190
  PluginPresentationAnnotateArrowArgs,
@@ -6221,6 +6403,7 @@ export {
6221
6403
  PluginProgramSpreadsheetTransactionArgs,
6222
6404
  PluginProgramSpreadsheetTransactionResult,
6223
6405
  PluginProjectApi,
6406
+ PluginProjectInfo,
6224
6407
  PluginProjectRef,
6225
6408
  PluginProjectSettingsApi,
6226
6409
  PluginQuatApi,
@@ -6326,6 +6509,9 @@ export {
6326
6509
  PluginStaircaseParams,
6327
6510
  PluginStaircasePreset,
6328
6511
  PluginStandardView,
6512
+ PluginStoreyFootprint,
6513
+ PluginStoreyOutlineOptions,
6514
+ PluginStoreyOutlineResult,
6329
6515
  PluginStoryApi,
6330
6516
  PluginStoryCreateArgs,
6331
6517
  PluginStoryCreateResult,