@snaptrude/plugin-core 0.9.4 → 0.9.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/api-manifest.json +95 -0
- package/dist/api/core/io/underlay/index.d.ts +519 -0
- package/dist/api/core/io/underlay/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +127 -0
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/index.cjs +194 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +173 -0
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/api/core/io/underlay/index.ts +418 -8
- package/src/api/design/query/index.ts +99 -0
- package/api-manifest.full.json +0 -8133
package/dist/index.js
CHANGED
|
@@ -1430,6 +1430,135 @@ var PluginUnderlaySetOpacityArgs = z32.object({
|
|
|
1430
1430
|
var PluginUnderlayRefArgs = z32.object({
|
|
1431
1431
|
underlay: UnderlayHandle
|
|
1432
1432
|
});
|
|
1433
|
+
var PluginCadLineGeometry = z32.object({
|
|
1434
|
+
type: z32.literal("line"),
|
|
1435
|
+
start: Vec3Components,
|
|
1436
|
+
end: Vec3Components
|
|
1437
|
+
});
|
|
1438
|
+
var PluginCadArcGeometry = z32.object({
|
|
1439
|
+
type: z32.literal("arc"),
|
|
1440
|
+
centre: Vec3Components,
|
|
1441
|
+
axis: Vec3Components,
|
|
1442
|
+
start: Vec3Components,
|
|
1443
|
+
end: Vec3Components
|
|
1444
|
+
});
|
|
1445
|
+
var PluginCadGeometry = z32.discriminatedUnion("type", [
|
|
1446
|
+
PluginCadLineGeometry,
|
|
1447
|
+
PluginCadArcGeometry
|
|
1448
|
+
]);
|
|
1449
|
+
var PluginCadLayerGeometryOptions = z32.object({
|
|
1450
|
+
offset: z32.number().int().nonnegative().default(0),
|
|
1451
|
+
limit: z32.number().int().positive().max(1e3).default(500)
|
|
1452
|
+
});
|
|
1453
|
+
var PluginCadLayerGeometryArgs = z32.object({
|
|
1454
|
+
underlay: UnderlayHandle,
|
|
1455
|
+
layer: z32.string(),
|
|
1456
|
+
options: PluginCadLayerGeometryOptions.default({ offset: 0, limit: 500 })
|
|
1457
|
+
});
|
|
1458
|
+
var PluginCadLayerGeometryPage = z32.object({
|
|
1459
|
+
layer: z32.string(),
|
|
1460
|
+
coordinateSpace: z32.literal("snaptrude-world"),
|
|
1461
|
+
units: z32.literal("snaptrude-internal"),
|
|
1462
|
+
total: z32.number().int().nonnegative(),
|
|
1463
|
+
offset: z32.number().int().nonnegative(),
|
|
1464
|
+
curves: z32.array(PluginCadGeometry)
|
|
1465
|
+
});
|
|
1466
|
+
var PluginPlanPoint = z32.object({ x: z32.number(), z: z32.number() });
|
|
1467
|
+
var PluginCadCenterlineOptions = z32.object({
|
|
1468
|
+
thicknessRange: z32.tuple([z32.number().positive(), z32.number().positive()]).default([0.3, 1.6]),
|
|
1469
|
+
mergeGap: z32.number().nonnegative().default(0.05),
|
|
1470
|
+
minLength: z32.number().nonnegative().default(0.1),
|
|
1471
|
+
parallelTolDeg: z32.number().positive().max(15).default(2),
|
|
1472
|
+
minOverlap: z32.number().min(0).max(1).default(0.6),
|
|
1473
|
+
bridgeOpenings: z32.object({ maxWidth: z32.number().positive() }).nullable().default({ maxWidth: 9.6 })
|
|
1474
|
+
});
|
|
1475
|
+
var PluginCadCenterlinesArgs = z32.object({
|
|
1476
|
+
underlay: UnderlayHandle,
|
|
1477
|
+
layer: z32.string(),
|
|
1478
|
+
options: PluginCadCenterlineOptions.default({
|
|
1479
|
+
thicknessRange: [0.3, 1.6],
|
|
1480
|
+
mergeGap: 0.05,
|
|
1481
|
+
minLength: 0.1,
|
|
1482
|
+
parallelTolDeg: 2,
|
|
1483
|
+
minOverlap: 0.6,
|
|
1484
|
+
bridgeOpenings: { maxWidth: 9.6 }
|
|
1485
|
+
})
|
|
1486
|
+
});
|
|
1487
|
+
var PluginCadOpening = z32.object({
|
|
1488
|
+
start: PluginPlanPoint,
|
|
1489
|
+
end: PluginPlanPoint,
|
|
1490
|
+
width: z32.number()
|
|
1491
|
+
});
|
|
1492
|
+
var PluginCadCenterline = z32.object({
|
|
1493
|
+
start: PluginPlanPoint,
|
|
1494
|
+
end: PluginPlanPoint,
|
|
1495
|
+
thickness: z32.number(),
|
|
1496
|
+
length: z32.number(),
|
|
1497
|
+
sourceFaceCount: z32.number().int().nonnegative(),
|
|
1498
|
+
openings: z32.array(PluginCadOpening)
|
|
1499
|
+
});
|
|
1500
|
+
var PluginCadUnpairedFace = z32.object({
|
|
1501
|
+
start: PluginPlanPoint,
|
|
1502
|
+
end: PluginPlanPoint,
|
|
1503
|
+
length: z32.number()
|
|
1504
|
+
});
|
|
1505
|
+
var PluginCadCenterlinesResult = z32.object({
|
|
1506
|
+
layer: z32.string(),
|
|
1507
|
+
coordinateSpace: z32.literal("snaptrude-world"),
|
|
1508
|
+
units: z32.literal("snaptrude-internal"),
|
|
1509
|
+
centerlines: z32.array(PluginCadCenterline),
|
|
1510
|
+
unpaired: z32.array(PluginCadUnpairedFace),
|
|
1511
|
+
stats: z32.object({
|
|
1512
|
+
curvesRead: z32.number().int().nonnegative(),
|
|
1513
|
+
arcsSkipped: z32.number().int().nonnegative(),
|
|
1514
|
+
fragmentsCulled: z32.number().int().nonnegative(),
|
|
1515
|
+
duplicates: z32.number().int().nonnegative(),
|
|
1516
|
+
faces: z32.number().int().nonnegative()
|
|
1517
|
+
})
|
|
1518
|
+
});
|
|
1519
|
+
var PluginCadArcClassifyOptions = z32.object({
|
|
1520
|
+
radiusRange: z32.tuple([z32.number().positive(), z32.number().positive()]).default([3, 5.4]),
|
|
1521
|
+
sweepRangeDeg: z32.tuple([z32.number().positive(), z32.number().positive()]).default([60, 120]),
|
|
1522
|
+
clusterTol: z32.number().positive().default(0.1)
|
|
1523
|
+
});
|
|
1524
|
+
var PluginCadArcClassifyArgs = z32.object({
|
|
1525
|
+
underlay: UnderlayHandle,
|
|
1526
|
+
layer: z32.string(),
|
|
1527
|
+
options: PluginCadArcClassifyOptions.default({
|
|
1528
|
+
radiusRange: [3, 5.4],
|
|
1529
|
+
sweepRangeDeg: [60, 120],
|
|
1530
|
+
clusterTol: 0.1
|
|
1531
|
+
})
|
|
1532
|
+
});
|
|
1533
|
+
var PluginCadDoorCandidate = z32.object({
|
|
1534
|
+
hinge: PluginPlanPoint,
|
|
1535
|
+
leafWidth: z32.number(),
|
|
1536
|
+
swingDir: PluginPlanPoint,
|
|
1537
|
+
wallDir: PluginPlanPoint,
|
|
1538
|
+
openingWidth: z32.number(),
|
|
1539
|
+
double: z32.boolean()
|
|
1540
|
+
});
|
|
1541
|
+
var PluginCadArcClassifyResult = z32.object({
|
|
1542
|
+
layer: z32.string(),
|
|
1543
|
+
coordinateSpace: z32.literal("snaptrude-world"),
|
|
1544
|
+
units: z32.literal("snaptrude-internal"),
|
|
1545
|
+
doors: z32.array(PluginCadDoorCandidate),
|
|
1546
|
+
rejected: z32.array(
|
|
1547
|
+
z32.object({
|
|
1548
|
+
centre: PluginPlanPoint,
|
|
1549
|
+
radius: z32.number(),
|
|
1550
|
+
sweepDeg: z32.number(),
|
|
1551
|
+
reason: z32.string()
|
|
1552
|
+
})
|
|
1553
|
+
),
|
|
1554
|
+
radiusHistogram: z32.array(
|
|
1555
|
+
z32.object({ radius: z32.number(), count: z32.number().int().positive() })
|
|
1556
|
+
),
|
|
1557
|
+
stats: z32.object({
|
|
1558
|
+
curvesRead: z32.number().int().nonnegative(),
|
|
1559
|
+
arcsConsidered: z32.number().int().nonnegative()
|
|
1560
|
+
})
|
|
1561
|
+
});
|
|
1433
1562
|
|
|
1434
1563
|
// src/api/core/io/terrain/index.ts
|
|
1435
1564
|
import * as z33 from "zod";
|
|
@@ -2222,6 +2351,29 @@ var PluginDesignQueryApi = class {
|
|
|
2222
2351
|
constructor() {
|
|
2223
2352
|
}
|
|
2224
2353
|
};
|
|
2354
|
+
var PluginOutlinePlanPoint = z42.object({ x: z42.number(), z: z42.number() });
|
|
2355
|
+
var PluginStoreyOutlineOptions = z42.object({
|
|
2356
|
+
storey: z42.number().int().optional(),
|
|
2357
|
+
include: z42.array(PluginEntityType).nonempty().default(["wall"]),
|
|
2358
|
+
minArea: z42.number().nonnegative().default(1)
|
|
2359
|
+
});
|
|
2360
|
+
var PluginStoreyFootprint = z42.object({
|
|
2361
|
+
outline: z42.array(PluginOutlinePlanPoint),
|
|
2362
|
+
holes: z42.array(
|
|
2363
|
+
z42.object({
|
|
2364
|
+
ring: z42.array(PluginOutlinePlanPoint),
|
|
2365
|
+
areaSq: z42.number().nonnegative()
|
|
2366
|
+
})
|
|
2367
|
+
),
|
|
2368
|
+
areaSq: z42.number().nonnegative(),
|
|
2369
|
+
enclosed: z42.boolean()
|
|
2370
|
+
});
|
|
2371
|
+
var PluginStoreyOutlineResult = z42.object({
|
|
2372
|
+
footprints: z42.array(PluginStoreyFootprint),
|
|
2373
|
+
discarded: z42.array(
|
|
2374
|
+
z42.object({ areaSq: z42.number().nonnegative(), reason: z42.string() })
|
|
2375
|
+
)
|
|
2376
|
+
});
|
|
2225
2377
|
|
|
2226
2378
|
// src/api/design/selection/index.ts
|
|
2227
2379
|
import * as z43 from "zod";
|
|
@@ -5495,6 +5647,22 @@ export {
|
|
|
5495
5647
|
PluginBuildingType,
|
|
5496
5648
|
PluginBuildingTypeKind,
|
|
5497
5649
|
PluginBuildingTypeSummary,
|
|
5650
|
+
PluginCadArcClassifyArgs,
|
|
5651
|
+
PluginCadArcClassifyOptions,
|
|
5652
|
+
PluginCadArcClassifyResult,
|
|
5653
|
+
PluginCadArcGeometry,
|
|
5654
|
+
PluginCadCenterline,
|
|
5655
|
+
PluginCadCenterlineOptions,
|
|
5656
|
+
PluginCadCenterlinesArgs,
|
|
5657
|
+
PluginCadCenterlinesResult,
|
|
5658
|
+
PluginCadDoorCandidate,
|
|
5659
|
+
PluginCadGeometry,
|
|
5660
|
+
PluginCadLayerGeometryArgs,
|
|
5661
|
+
PluginCadLayerGeometryOptions,
|
|
5662
|
+
PluginCadLayerGeometryPage,
|
|
5663
|
+
PluginCadLineGeometry,
|
|
5664
|
+
PluginCadOpening,
|
|
5665
|
+
PluginCadUnpairedFace,
|
|
5498
5666
|
PluginCameraApi,
|
|
5499
5667
|
PluginCameraLookFromArgs,
|
|
5500
5668
|
PluginCameraMode,
|
|
@@ -5989,6 +6157,7 @@ export {
|
|
|
5989
6157
|
PluginNotFoundError,
|
|
5990
6158
|
PluginObjectCatalogGroup,
|
|
5991
6159
|
PluginObjectCatalogItem,
|
|
6160
|
+
PluginOutlinePlanPoint,
|
|
5992
6161
|
PluginPermissionError,
|
|
5993
6162
|
PluginPlacedView,
|
|
5994
6163
|
PluginPlacedViewCrop,
|
|
@@ -6003,6 +6172,7 @@ export {
|
|
|
6003
6172
|
PluginPlacedViewsSetOpacityArgs,
|
|
6004
6173
|
PluginPlacedViewsUpdateFontStylesArgs,
|
|
6005
6174
|
PluginPlacedViewsUpdateStylesArgs,
|
|
6175
|
+
PluginPlanPoint,
|
|
6006
6176
|
PluginPresentationAIInspirationApi,
|
|
6007
6177
|
PluginPresentationAnnotateApi,
|
|
6008
6178
|
PluginPresentationAnnotateArrowArgs,
|
|
@@ -6326,6 +6496,9 @@ export {
|
|
|
6326
6496
|
PluginStaircaseParams,
|
|
6327
6497
|
PluginStaircasePreset,
|
|
6328
6498
|
PluginStandardView,
|
|
6499
|
+
PluginStoreyFootprint,
|
|
6500
|
+
PluginStoreyOutlineOptions,
|
|
6501
|
+
PluginStoreyOutlineResult,
|
|
6329
6502
|
PluginStoryApi,
|
|
6330
6503
|
PluginStoryCreateArgs,
|
|
6331
6504
|
PluginStoryCreateResult,
|