@snaptrude/plugin-core 0.9.3 → 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 +7 -0
- package/api-manifest.full.json +8133 -0
- package/api-manifest.json +1262 -57
- 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/index.cjs +37 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +36 -2
- 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/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
|
|
@@ -5775,6 +5808,7 @@ export {
|
|
|
5775
5808
|
PluginGeomQueryBrepGetDistanceArgs,
|
|
5776
5809
|
PluginGeomQueryBrepGetEdgeArgs,
|
|
5777
5810
|
PluginGeomQueryBrepGetEdgeCountArgs,
|
|
5811
|
+
PluginGeomQueryBrepGetEdgeCurveArgs,
|
|
5778
5812
|
PluginGeomQueryBrepGetFaceCountArgs,
|
|
5779
5813
|
PluginGeomQueryBrepGetHalfEdgeCountArgs,
|
|
5780
5814
|
PluginGeomQueryBrepGetVertexCountArgs,
|