@snaptrude/plugin-core 0.9.2 → 0.9.4
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/CHANGELOG.md +13 -0
- package/api-manifest.full.json +25 -4
- package/api-manifest.json +25 -4
- package/dist/api/core/geom/create/index.d.ts +141 -27
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/brep.d.ts +68 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +103 -4
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +10 -10
- package/dist/api/design/selection/index.d.ts +4 -4
- package/dist/api/program/index.d.ts +2 -2
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/site.d.ts +118 -7
- package/dist/api/program/site.d.ts.map +1 -1
- package/dist/handles.d.ts +2 -2
- package/dist/index.cjs +104 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +97 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/core/geom/create/index.ts +162 -29
- package/src/api/core/geom/query/brep.ts +74 -0
- package/src/api/design/create/index.ts +119 -4
- package/src/api/program/index.ts +2 -2
- package/src/api/program/site.ts +131 -8
- package/src/handles.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -134,7 +134,11 @@ var PluginGeomCreateBrepFromExtrusionArgs = z2.object({
|
|
|
134
134
|
var PluginGeomCreateBrepFromLoftArgs = z2.object({
|
|
135
135
|
bottomContour: ContourHandle,
|
|
136
136
|
topContour: ContourHandle,
|
|
137
|
-
intermediateContours: z2.array(ContourHandle).optional()
|
|
137
|
+
intermediateContours: z2.array(ContourHandle).optional(),
|
|
138
|
+
options: z2.object({
|
|
139
|
+
compatibility: z2.enum(["strict", "auto"]).optional(),
|
|
140
|
+
seamAlignment: z2.enum(["authored", "auto"]).optional()
|
|
141
|
+
}).optional()
|
|
138
142
|
});
|
|
139
143
|
var PluginGeomCreateBrepFromMeshArgs = z2.object({
|
|
140
144
|
positions: z2.array(Vec3Components).min(4),
|
|
@@ -173,9 +177,34 @@ var PluginGeomCreateBrepFromChamferArgs = z2.object({
|
|
|
173
177
|
edges: z2.array(EdgeHandle).min(1),
|
|
174
178
|
distance: z2.number().finite().positive()
|
|
175
179
|
});
|
|
180
|
+
var SweepScaleFactor = z2.number().finite().min(1e-3).max(1e3);
|
|
176
181
|
var PluginGeomCreateBrepFromSweepArgs = z2.object({
|
|
177
182
|
profile: ContourHandle,
|
|
178
|
-
path: z2.array(FiniteVec3Components).min(2)
|
|
183
|
+
path: z2.array(FiniteVec3Components).min(2),
|
|
184
|
+
options: z2.object({
|
|
185
|
+
startScale: SweepScaleFactor.optional(),
|
|
186
|
+
endScale: SweepScaleFactor.optional(),
|
|
187
|
+
scales: z2.array(SweepScaleFactor).optional(),
|
|
188
|
+
transition: z2.union([
|
|
189
|
+
z2.literal("miter"),
|
|
190
|
+
z2.object({ bevel: z2.number().finite().min(1e-3).max(1e3) })
|
|
191
|
+
]).optional()
|
|
192
|
+
}).optional()
|
|
193
|
+
}).superRefine((a, ctx) => {
|
|
194
|
+
const options = a.options;
|
|
195
|
+
if (!options || options.scales === void 0) return;
|
|
196
|
+
if (options.startScale !== void 0 || options.endScale !== void 0) {
|
|
197
|
+
ctx.addIssue({
|
|
198
|
+
code: z2.ZodIssueCode.custom,
|
|
199
|
+
message: "scales is mutually exclusive with startScale/endScale"
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
if (options.scales.length !== a.path.length) {
|
|
203
|
+
ctx.addIssue({
|
|
204
|
+
code: z2.ZodIssueCode.custom,
|
|
205
|
+
message: "scales must have exactly one entry per path point"
|
|
206
|
+
});
|
|
207
|
+
}
|
|
179
208
|
});
|
|
180
209
|
var PluginGeomCreateBrepFromRevolutionArgs = z2.object({
|
|
181
210
|
profile: ContourHandle,
|
|
@@ -495,6 +524,10 @@ var PluginGeomQueryBrepListHalfEdgesArgs = brepArg;
|
|
|
495
524
|
var PluginGeomQueryBrepGetEdgeArgs = brepEdgeArg;
|
|
496
525
|
var PluginGeomQueryBrepHasEdgeArgs = brepEdgeArg;
|
|
497
526
|
var PluginGeomQueryBrepListEdgesBetweenArgs = brepEdgeArg;
|
|
527
|
+
var PluginGeomQueryBrepGetEdgeCurveArgs = z8.object({
|
|
528
|
+
brep: BrepHandle,
|
|
529
|
+
edge: EdgeHandle
|
|
530
|
+
});
|
|
498
531
|
var PluginGeomQueryBrepGetVertexPositionArgs = z8.object({
|
|
499
532
|
brep: BrepHandle,
|
|
500
533
|
vertex: VertexHandle
|
|
@@ -1847,6 +1880,13 @@ var PluginStaircasePreset = z39.enum([
|
|
|
1847
1880
|
"mezzanineFloorLShaped",
|
|
1848
1881
|
"custom"
|
|
1849
1882
|
]);
|
|
1883
|
+
var PluginStaircaseDimensions = z39.object({
|
|
1884
|
+
width: z39.number().finite().positive().optional(),
|
|
1885
|
+
tread: z39.number().finite().positive().optional(),
|
|
1886
|
+
riser: z39.number().finite().positive().optional(),
|
|
1887
|
+
landingWidth: z39.number().finite().positive().optional(),
|
|
1888
|
+
angleInDegrees: z39.number().finite().multipleOf(90).optional()
|
|
1889
|
+
}).strict();
|
|
1850
1890
|
var PluginDesignCreateSpaceArgs = z39.object({
|
|
1851
1891
|
contour: ContourHandle,
|
|
1852
1892
|
height: z39.number(),
|
|
@@ -1903,14 +1943,16 @@ var PluginDesignCreateWallsArgs = z39.object({
|
|
|
1903
1943
|
profile: ProfileHandle,
|
|
1904
1944
|
height: z39.number().optional(),
|
|
1905
1945
|
thickness: z39.number().optional(),
|
|
1906
|
-
wallType: z39.string().min(1).optional()
|
|
1946
|
+
wallType: z39.string().min(1).optional(),
|
|
1947
|
+
storey: z39.number().int().optional()
|
|
1907
1948
|
});
|
|
1908
1949
|
var PluginDesignCreateStaircaseArgs = z39.object({
|
|
1909
1950
|
preset: PluginStaircasePreset,
|
|
1910
1951
|
position: Vec3Handle,
|
|
1911
1952
|
label: z39.string().optional(),
|
|
1912
1953
|
structureId: z39.string().optional(),
|
|
1913
|
-
level: z39.string().optional()
|
|
1954
|
+
level: z39.string().optional(),
|
|
1955
|
+
dimensions: PluginStaircaseDimensions.optional()
|
|
1914
1956
|
});
|
|
1915
1957
|
var PluginDesignCreateFurnitureArgs = z39.object({
|
|
1916
1958
|
catalogId: z39.string().min(1),
|
|
@@ -1933,6 +1975,26 @@ var PluginDesignCreateWindowArgs = z39.object({
|
|
|
1933
1975
|
label: z39.string().optional(),
|
|
1934
1976
|
facing: Vec3Handle.optional()
|
|
1935
1977
|
});
|
|
1978
|
+
var PluginOpeningBaseOptions = {
|
|
1979
|
+
catalogId: z39.string().min(1),
|
|
1980
|
+
hostWall: ComponentHandle,
|
|
1981
|
+
position: Vec3Handle,
|
|
1982
|
+
facing: Vec3Handle.optional(),
|
|
1983
|
+
label: z39.string().optional(),
|
|
1984
|
+
width: z39.number().finite().positive().optional(),
|
|
1985
|
+
height: z39.number().finite().positive().optional()
|
|
1986
|
+
};
|
|
1987
|
+
var PluginDesignCreateOpeningOptions = z39.discriminatedUnion("kind", [
|
|
1988
|
+
z39.object({
|
|
1989
|
+
kind: z39.literal("door"),
|
|
1990
|
+
...PluginOpeningBaseOptions
|
|
1991
|
+
}).strict(),
|
|
1992
|
+
z39.object({
|
|
1993
|
+
kind: z39.literal("window"),
|
|
1994
|
+
...PluginOpeningBaseOptions,
|
|
1995
|
+
sillHeight: z39.number().finite().nonnegative().optional()
|
|
1996
|
+
}).strict()
|
|
1997
|
+
]);
|
|
1936
1998
|
var PluginSmartLayoutArgs = z39.object({
|
|
1937
1999
|
templateGroup: z39.string().min(1).optional(),
|
|
1938
2000
|
templateComponents: z39.array(ComponentHandle).optional(),
|
|
@@ -3361,6 +3423,30 @@ var PluginProgramSiteApi = class {
|
|
|
3361
3423
|
constructor() {
|
|
3362
3424
|
}
|
|
3363
3425
|
};
|
|
3426
|
+
var PluginSiteAnalysisRow = z65.object({
|
|
3427
|
+
category: z65.string().min(1),
|
|
3428
|
+
description: z65.string(),
|
|
3429
|
+
quantity: z65.union([z65.string(), z65.number()]),
|
|
3430
|
+
unit: z65.string()
|
|
3431
|
+
});
|
|
3432
|
+
var PluginSiteAnalysisUpdateOptions = z65.object({
|
|
3433
|
+
siteLocation: z65.object({ lat: z65.number(), lng: z65.number() }).optional(),
|
|
3434
|
+
/** JSON-encoded polygon string written to the Site Polygon row. */
|
|
3435
|
+
sitePolygon: z65.string().optional()
|
|
3436
|
+
}).nullish();
|
|
3437
|
+
var PluginProgramSiteAnalysisResult = z65.object({
|
|
3438
|
+
sheetName: z65.string(),
|
|
3439
|
+
siteLocation: z65.object({ lat: z65.number(), lng: z65.number() }).nullable(),
|
|
3440
|
+
sitePolygon: z65.string().nullable(),
|
|
3441
|
+
rows: z65.array(PluginSiteAnalysisRow)
|
|
3442
|
+
}).nullable();
|
|
3443
|
+
var PluginProgramSiteAnalysisUpdateResult = z65.object({
|
|
3444
|
+
sheetName: z65.string(),
|
|
3445
|
+
/** Constraint rows on the sheet after the write. */
|
|
3446
|
+
rowCount: z65.number(),
|
|
3447
|
+
updatedRows: z65.number(),
|
|
3448
|
+
appendedRows: z65.number()
|
|
3449
|
+
});
|
|
3364
3450
|
var PluginSiteFootprintPoint = z65.object({
|
|
3365
3451
|
x: z65.number(),
|
|
3366
3452
|
z: z65.number()
|
|
@@ -5575,6 +5661,7 @@ export {
|
|
|
5575
5661
|
PluginDesignCreateFurnitureArgs,
|
|
5576
5662
|
PluginDesignCreateMassArgs,
|
|
5577
5663
|
PluginDesignCreateMassFromBrepArgs,
|
|
5664
|
+
PluginDesignCreateOpeningOptions,
|
|
5578
5665
|
PluginDesignCreateReferenceLinesArgs,
|
|
5579
5666
|
PluginDesignCreateRoofArgs,
|
|
5580
5667
|
PluginDesignCreateSlabArgs,
|
|
@@ -5721,6 +5808,7 @@ export {
|
|
|
5721
5808
|
PluginGeomQueryBrepGetDistanceArgs,
|
|
5722
5809
|
PluginGeomQueryBrepGetEdgeArgs,
|
|
5723
5810
|
PluginGeomQueryBrepGetEdgeCountArgs,
|
|
5811
|
+
PluginGeomQueryBrepGetEdgeCurveArgs,
|
|
5724
5812
|
PluginGeomQueryBrepGetFaceCountArgs,
|
|
5725
5813
|
PluginGeomQueryBrepGetHalfEdgeCountArgs,
|
|
5726
5814
|
PluginGeomQueryBrepGetVertexCountArgs,
|
|
@@ -6059,6 +6147,8 @@ export {
|
|
|
6059
6147
|
PluginProgramLayoutStateResult,
|
|
6060
6148
|
PluginProgramMetricsApi,
|
|
6061
6149
|
PluginProgramMetricsSummary,
|
|
6150
|
+
PluginProgramSiteAnalysisResult,
|
|
6151
|
+
PluginProgramSiteAnalysisUpdateResult,
|
|
6062
6152
|
PluginProgramSiteApi,
|
|
6063
6153
|
PluginProgramSiteAreaResult,
|
|
6064
6154
|
PluginProgramSiteContext,
|
|
@@ -6152,6 +6242,8 @@ export {
|
|
|
6152
6242
|
PluginSheetOrientation,
|
|
6153
6243
|
PluginSheetPosition,
|
|
6154
6244
|
PluginSheetSize,
|
|
6245
|
+
PluginSiteAnalysisRow,
|
|
6246
|
+
PluginSiteAnalysisUpdateOptions,
|
|
6155
6247
|
PluginSiteBounds,
|
|
6156
6248
|
PluginSiteContextParcel,
|
|
6157
6249
|
PluginSiteFootprintPoint,
|
|
@@ -6229,6 +6321,7 @@ export {
|
|
|
6229
6321
|
PluginSpreadsheetTransactionOp,
|
|
6230
6322
|
PluginSpreadsheetVerticalAlign,
|
|
6231
6323
|
PluginSpreadsheetWhenExists,
|
|
6324
|
+
PluginStaircaseDimensions,
|
|
6232
6325
|
PluginStaircaseParamUpdates,
|
|
6233
6326
|
PluginStaircaseParams,
|
|
6234
6327
|
PluginStaircasePreset,
|