@snaptrude/plugin-core 0.11.0-rc.1 → 1.0.0
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/AGENTS.md +4 -0
- package/CHANGELOG.md +176 -14
- package/api-manifest.json +872 -49
- package/dist/api/analysis/daylight.d.ts +5 -5
- package/dist/api/analysis/solar.d.ts +2 -2
- package/dist/api/core/camera/index.d.ts +447 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +942 -101
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/brep.d.ts +59 -2
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +59 -35
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/edge.d.ts +2 -2
- package/dist/api/core/geom/query/face.d.ts +105 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +10 -2
- package/dist/api/core/geom/update/contour.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +5 -5
- package/dist/api/core/geom/update/profile.d.ts +3 -1
- package/dist/api/core/geom/update/profile.d.ts.map +1 -1
- package/dist/api/core/handles/index.d.ts +4 -2
- package/dist/api/core/handles/index.d.ts.map +1 -1
- package/dist/api/core/index.d.ts +4 -4
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +3 -1
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +377 -255
- package/dist/api/core/layers.d.ts.map +1 -1
- package/dist/api/core/mode/index.d.ts +19 -7
- package/dist/api/core/mode/index.d.ts.map +1 -1
- package/dist/api/core/proposals/index.d.ts +4 -3
- package/dist/api/core/proposals/index.d.ts.map +1 -1
- package/dist/api/core/storeys/index.d.ts +17 -2
- package/dist/api/core/storeys/index.d.ts.map +1 -1
- package/dist/api/core/storeys/layers.d.ts +408 -0
- package/dist/api/core/storeys/layers.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +84 -3
- package/dist/api/core/tags.d.ts.map +1 -1
- package/dist/api/core/zoom/index.d.ts +13 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/bim.d.ts +299 -0
- package/dist/api/design/bim.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +2 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -1
- package/dist/api/design/catalog.d.ts +320 -0
- package/dist/api/design/catalog.d.ts.map +1 -0
- package/dist/api/design/create/bulk-items.d.ts +269 -0
- package/dist/api/design/create/bulk-items.d.ts.map +1 -0
- package/dist/api/design/create/grids.d.ts +132 -0
- package/dist/api/design/create/grids.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +753 -102
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +38 -0
- package/dist/api/design/create/opening-fields.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +7 -20
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +427 -0
- package/dist/api/design/dimensions.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +24 -23
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +1446 -0
- package/dist/api/design/family.d.ts.map +1 -0
- package/dist/api/design/grids.d.ts +237 -0
- package/dist/api/design/grids.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +30 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/networks.d.ts +1703 -0
- package/dist/api/design/networks.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +33 -5
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/grids.d.ts +287 -0
- package/dist/api/design/query/grids.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +143 -36
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +5 -66
- package/dist/api/design/query/spaces.d.ts.map +1 -1
- package/dist/api/design/selection/index.d.ts +12 -12
- package/dist/api/design/types/index.d.ts +40 -24
- package/dist/api/design/types/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +412 -8
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +8 -8
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/entity/buildableEnvelope.d.ts +84 -2
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +13 -1
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +12 -15
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +4 -4
- package/dist/api/presentation/aiInspiration.d.ts +24 -24
- package/dist/api/presentation/annotate.d.ts +38 -22
- package/dist/api/presentation/annotate.d.ts.map +1 -1
- package/dist/api/presentation/camera.d.ts +265 -0
- package/dist/api/presentation/camera.d.ts.map +1 -0
- package/dist/api/presentation/drawingContract.d.ts +32 -0
- package/dist/api/presentation/drawingContract.d.ts.map +1 -0
- package/dist/api/presentation/drawings.d.ts +3523 -0
- package/dist/api/presentation/drawings.d.ts.map +1 -0
- package/dist/api/presentation/export.d.ts +23 -5
- package/dist/api/presentation/export.d.ts.map +1 -1
- package/dist/api/presentation/graphics.d.ts +419 -0
- package/dist/api/presentation/graphics.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +66 -12
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +117 -51
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/sections.d.ts +461 -0
- package/dist/api/presentation/sections.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/api/presentation/sheets.d.ts +175 -37
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/standards.d.ts +590 -0
- package/dist/api/presentation/standards.d.ts.map +1 -0
- package/dist/api/presentation/viewPresets.d.ts +222 -0
- package/dist/api/presentation/viewPresets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +144 -9
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/presentation/walkthroughs.d.ts +1350 -0
- package/dist/api/presentation/walkthroughs.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +58 -2
- package/dist/api/program/departments.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +16 -6
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/labels.d.ts +355 -0
- package/dist/api/program/labels.d.ts.map +1 -0
- package/dist/api/program/metadata.d.ts +328 -0
- package/dist/api/program/metadata.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +4 -4
- package/dist/api/program/spreadsheet.d.ts +267 -4
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +49 -2
- package/dist/api/workspace/index.d.ts.map +1 -1
- package/dist/errors/codes.d.ts +5 -8
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/handles.d.ts +32 -3
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +6534 -2865
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6118 -2857
- package/dist/index.js.map +1 -1
- package/dist/massParameters.d.ts +287 -0
- package/dist/massParameters.d.ts.map +1 -0
- package/dist/massParameters.ops.d.ts +138 -0
- package/dist/massParameters.ops.d.ts.map +1 -0
- package/package.json +2 -1
- package/scripts/check-dist-fresh.mjs +22 -0
- package/scripts/generate-manifest.mjs +5 -0
- package/scripts/generate-manifest.test.mjs +14 -3
- package/src/api/core/camera/index.ts +429 -1
- package/src/api/core/geom/create/index.ts +1037 -102
- package/src/api/core/geom/query/brep.ts +60 -2
- package/src/api/core/geom/query/curve.ts +26 -2
- package/src/api/core/geom/query/edge.ts +2 -2
- package/src/api/core/geom/query/face.ts +109 -4
- package/src/api/core/geom/update/contour.ts +10 -2
- package/src/api/core/geom/update/profile.ts +2 -0
- package/src/api/core/handles/index.ts +3 -2
- package/src/api/core/index.ts +4 -4
- package/src/api/core/io/import/index.ts +11 -3
- package/src/api/core/layers.ts +380 -173
- package/src/api/core/mode/index.ts +19 -7
- package/src/api/core/proposals/index.ts +4 -3
- package/src/api/core/storeys/index.ts +19 -2
- package/src/api/core/storeys/layers.ts +339 -0
- package/src/api/core/tags.ts +76 -0
- package/src/api/core/zoom/index.ts +13 -0
- package/src/api/design/bim.ts +210 -0
- package/src/api/design/boolean/index.ts +2 -0
- package/src/api/design/catalog.ts +203 -0
- package/src/api/design/create/bulk-items.ts +294 -0
- package/src/api/design/create/grids.ts +137 -0
- package/src/api/design/create/index.ts +824 -141
- package/src/api/design/create/opening-fields.ts +40 -0
- package/src/api/design/delete/index.ts +6 -20
- package/src/api/design/dimensions.ts +453 -0
- package/src/api/design/doors/index.ts +64 -41
- package/src/api/design/family.ts +1342 -0
- package/src/api/design/grids.ts +237 -0
- package/src/api/design/index.ts +49 -4
- package/src/api/design/networks.ts +607 -0
- package/src/api/design/query/geometry/index.ts +35 -4
- package/src/api/design/query/grids.ts +197 -0
- package/src/api/design/query/index.ts +105 -5
- package/src/api/design/query/spaces.ts +0 -68
- package/src/api/design/types/index.ts +31 -24
- package/src/api/design/update/index.ts +398 -4
- package/src/api/design/windows/index.ts +40 -22
- package/src/api/entity/buildableEnvelope.ts +77 -2
- package/src/api/entity/referenceLine.ts +25 -12
- package/src/api/entity/space.ts +0 -2
- package/src/api/presentation/annotate.ts +90 -58
- package/src/api/presentation/camera.ts +289 -0
- package/src/api/presentation/drawingContract.ts +70 -0
- package/src/api/presentation/drawings.ts +1179 -0
- package/src/api/presentation/export.ts +32 -6
- package/src/api/presentation/graphics.ts +324 -0
- package/src/api/presentation/index.ts +73 -14
- package/src/api/presentation/placedViews.ts +120 -57
- package/src/api/presentation/sections.ts +420 -0
- package/src/api/presentation/sheets.ts +182 -37
- package/src/api/presentation/standards.ts +445 -0
- package/src/api/presentation/viewPresets.ts +241 -0
- package/src/api/presentation/views.ts +81 -10
- package/src/api/presentation/walkthroughs.ts +1201 -0
- package/src/api/program/departments.ts +54 -2
- package/src/api/program/index.ts +16 -6
- package/src/api/program/labels.ts +332 -0
- package/src/api/program/metadata.ts +364 -0
- package/src/api/program/spreadsheet.ts +282 -0
- package/src/api/workspace/index.ts +51 -2
- package/src/errors/codes.ts +9 -30
- package/src/handles.ts +42 -3
- package/src/index.ts +2 -0
- package/src/massParameters.ops.ts +246 -0
- package/src/massParameters.ts +427 -0
- package/test/drawingContract.test.mjs +288 -0
- package/test/errors.test.mjs +1 -4
- package/test/massParameters.test.mjs +952 -0
- package/test/paperPensContract.test.mjs +75 -0
- package/test/presentationViewSettings.test.mjs +85 -0
- package/api-manifest.full.json +0 -6928
- package/snaptrude-plugin-core-0.11.0.tgz +0 -0
|
@@ -1,14 +1,41 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../../types";
|
|
3
|
-
import {
|
|
3
|
+
import type { SweepAlongCurveRecordOptions } from "../../../../massParameters";
|
|
4
|
+
import { Vec3Handle, LineHandle, ArcHandle, SplineHandle, CircleHandle, CurveHandle, ProfileHandle, ContourHandle, BrepHandle, FaceHandle, EdgeHandle, Vec3Components } from "../../../../handles";
|
|
5
|
+
/** Maximum boundary items one patch may span. */
|
|
6
|
+
export declare const MAX_PATCH_BOUNDARY_CURVES = 16;
|
|
7
|
+
/** Maximum interior points one patch may be pulled through. */
|
|
8
|
+
export declare const MAX_PATCH_INTERIOR_POINTS = 64;
|
|
9
|
+
/**
|
|
10
|
+
* An edge named together with the solid it belongs to — an edge handle cannot
|
|
11
|
+
* name its own solid, and one patch may meet two solids. `face` is the adjacent
|
|
12
|
+
* face a tangent patch continues: REQUIRED under `continuity: "tangent"`
|
|
13
|
+
* (a solid edge has two faces — the wall or the top of a rim — and only the
|
|
14
|
+
* caller knows which), ignored otherwise. Owner LAST, like every read that
|
|
15
|
+
* takes `(face, brep)`.
|
|
16
|
+
*/
|
|
17
|
+
export type OwnedEdge = {
|
|
18
|
+
edge: EdgeHandle;
|
|
19
|
+
brep: BrepHandle;
|
|
20
|
+
face?: FaceHandle;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The trailing bag of {@linkcode PluginGeomCreateApi.brepFromSweepAlongCurve}:
|
|
24
|
+
* the recorded switches plus `rail`, a live curve handle that never enters a
|
|
25
|
+
* record (a record is pure JSON, and a dead handle would not regenerate).
|
|
26
|
+
*/
|
|
27
|
+
export type SweepAlongCurveOptions = SweepAlongCurveRecordOptions & {
|
|
28
|
+
rail?: CurveHandle;
|
|
29
|
+
};
|
|
4
30
|
/**
|
|
5
31
|
* Curve creation — construct new geometric curves from point handles (all-handle
|
|
6
32
|
* model, §11).
|
|
7
33
|
*
|
|
8
34
|
* Each method takes point handles ({@linkcode Vec3Handle}) and returns an opaque
|
|
9
|
-
* curve handle ({@linkcode LineHandle}
|
|
10
|
-
* query, update, or entity-creation
|
|
11
|
-
* via the
|
|
35
|
+
* curve handle ({@linkcode LineHandle}, {@linkcode ArcHandle}, or
|
|
36
|
+
* {@linkcode SplineHandle}) that you pass to query, update, or entity-creation
|
|
37
|
+
* methods. Read geometry back as plain values via the
|
|
38
|
+
* `snaptrude.core.geom.query.*` methods.
|
|
12
39
|
*
|
|
13
40
|
* Accessed via `snaptrude.core.geom.create`.
|
|
14
41
|
*/
|
|
@@ -69,6 +96,89 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
69
96
|
* ```
|
|
70
97
|
*/
|
|
71
98
|
abstract circle(centrePoint: Vec3Handle, axis: Vec3Handle, radius: number): PluginApiReturn<CircleHandle>;
|
|
99
|
+
/**
|
|
100
|
+
* Create an open NURBS curve passing exactly THROUGH each point, in order
|
|
101
|
+
* (centripetal Catmull-Rom fit → clamped cubic B-spline; C1-smooth, no cusps
|
|
102
|
+
* on uneven spacing). Host API call — returns a handle. The points are
|
|
103
|
+
* interpolated, NOT control points. For a CLOSED smooth loop use
|
|
104
|
+
* {@linkcode PluginGeomCreateApi.profileFromSplinePoints} — closed splines
|
|
105
|
+
* exist only as profiles, never as a single curve handle.
|
|
106
|
+
*
|
|
107
|
+
* Pure host-side math — the geometry kernel is not loaded. The result is a
|
|
108
|
+
* {@linkcode CurveHandle}: pass it to `profileFromCurves` alongside lines and
|
|
109
|
+
* arcs, or read it back via `core.geom.query.curve.*`.
|
|
110
|
+
*
|
|
111
|
+
* @param points 3..256 ordered through-points; consecutive points must be distinct
|
|
112
|
+
* @returns The new open curve as a {@linkcode SplineHandle}
|
|
113
|
+
* @throws VALIDATION if fewer than 3 points (2 points are a straight line —
|
|
114
|
+
* use {@linkcode PluginGeomCreateApi.line}), more than 256 points, or two
|
|
115
|
+
* consecutive points coincide
|
|
116
|
+
*
|
|
117
|
+
* @examplePrompt Draw a smooth curve through these points
|
|
118
|
+
* @examplePrompt Make a wavy edge that passes through A, B, C and D
|
|
119
|
+
* @examplePrompt Freeform curved wall path through these clicks
|
|
120
|
+
*
|
|
121
|
+
* # Example
|
|
122
|
+
* ```ts
|
|
123
|
+
* const spline = await snaptrude.core.geom.create.splineFromPoints([p0, p1, p2, p3])
|
|
124
|
+
* // Mixed profile: smooth top, straight closing base
|
|
125
|
+
* const base = await snaptrude.core.geom.create.line(p3, p0)
|
|
126
|
+
* const profile = await snaptrude.core.geom.create.profileFromCurves([spline, base])
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
abstract splineFromPoints(points: Vec3Handle[]): PluginApiReturn<SplineHandle>;
|
|
130
|
+
/**
|
|
131
|
+
* Create an open NURBS curve DEFINED BY control points — the curve is pulled
|
|
132
|
+
* TOWARD the interior points, not through them; it starts at the first point
|
|
133
|
+
* and ends at the last. Knots are computed for you (clamped, uniform) —
|
|
134
|
+
* there is no knot-vector argument. For a curve that must pass THROUGH given
|
|
135
|
+
* points use {@linkcode PluginGeomCreateApi.splineFromPoints}.
|
|
136
|
+
*
|
|
137
|
+
* A curve made here records as `splinePoles` in a mass recipe and is
|
|
138
|
+
* re-minted verbatim on edit — so an agent that read a `splinePoles` curve
|
|
139
|
+
* back off a mass can move its poles and rebuild the mass with
|
|
140
|
+
* `design.update.parameters`. Pure host-side math — the geometry kernel is
|
|
141
|
+
* not loaded, and nothing is created in the scene. An edge's control points
|
|
142
|
+
* rebuild the same curve here only when its knots are clamped uniform.
|
|
143
|
+
*
|
|
144
|
+
* @param controlPoints 3..512 control points ({@linkcode Vec3Handle}s), in order
|
|
145
|
+
* @param options.degree 2 or 3; default `min(3, controlPoints.length - 1)`
|
|
146
|
+
* @returns The new open curve as a {@linkcode SplineHandle}
|
|
147
|
+
* @throws VALIDATION when fewer than `degree + 1` points are given, two
|
|
148
|
+
* consecutive points coincide, or `degree` is not 2 or 3
|
|
149
|
+
*
|
|
150
|
+
* @examplePrompt Draw a smooth curve controlled by these four points
|
|
151
|
+
*
|
|
152
|
+
* # Example
|
|
153
|
+
* ```ts
|
|
154
|
+
* const curve = await snaptrude.core.geom.create.splineFromControlPoints([p0, p1, p2, p3])
|
|
155
|
+
* // Quadratic instead of the default cubic
|
|
156
|
+
* const tighter = await snaptrude.core.geom.create.splineFromControlPoints(
|
|
157
|
+
* [p0, p1, p2, p3],
|
|
158
|
+
* { degree: 2 },
|
|
159
|
+
* )
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
abstract splineFromControlPoints(controlPoints: Vec3Handle[], options?: {
|
|
163
|
+
degree?: number;
|
|
164
|
+
}): PluginApiReturn<SplineHandle>;
|
|
165
|
+
/**
|
|
166
|
+
* Drops a curve onto a face along the face's normal and returns the curves it
|
|
167
|
+
* lands on — one per connected run, empty when the curve misses the face
|
|
168
|
+
* entirely. Host API call — returns new curve handles; the inputs are
|
|
169
|
+
* read-only. No lengths are involved: the result is a curve in the same
|
|
170
|
+
* internal length units as its inputs.
|
|
171
|
+
*
|
|
172
|
+
* @param curve The curve to project
|
|
173
|
+
* @param face The face to project onto
|
|
174
|
+
* @param faceBrep The solid `face` belongs to — a face handle cannot name its
|
|
175
|
+
* own solid
|
|
176
|
+
* @returns The projected curves as {@linkcode CurveHandle}`[]`
|
|
177
|
+
* @throws VALIDATION if `face` is not a face of `faceBrep`, or the curve's
|
|
178
|
+
* midpoint lies on the face's surface (there is no drop direction there)
|
|
179
|
+
* @throws OPERATION_FAILED if the kernel could not project the curve
|
|
180
|
+
*/
|
|
181
|
+
abstract curvesFromProjection(curve: CurveHandle, face: FaceHandle, faceBrep: BrepHandle): PluginApiReturn<CurveHandle[]>;
|
|
72
182
|
/**
|
|
73
183
|
* Create a closed profile from an ordered list of point handles connected by
|
|
74
184
|
* line segments (last auto-connected to first). Host API call — returns a handle.
|
|
@@ -101,8 +211,41 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
101
211
|
*/
|
|
102
212
|
abstract profileFromCurves(curves: CurveHandle[]): PluginApiReturn<ProfileHandle>;
|
|
103
213
|
/**
|
|
104
|
-
* Create
|
|
105
|
-
*
|
|
214
|
+
* Create a CLOSED smooth profile passing through each point, in order, with
|
|
215
|
+
* the loop closed smoothly back from the last point to the first (do NOT
|
|
216
|
+
* repeat the first point). Host API call — returns a handle. This is the
|
|
217
|
+
* closed counterpart of {@linkcode PluginGeomCreateApi.splineFromPoints} and
|
|
218
|
+
* the one-call route from points to an extrudable outline: wrap in
|
|
219
|
+
* `contourFromProfile` and extrude/loft/sweep as usual.
|
|
220
|
+
*
|
|
221
|
+
* The whole loop is smooth — this call takes no mixed straight/spline input.
|
|
222
|
+
* For a profile that is part curve and part straight, build the pieces with
|
|
223
|
+
* `splineFromPoints` + `line` and join them with
|
|
224
|
+
* {@linkcode PluginGeomCreateApi.profileFromCurves}.
|
|
225
|
+
*
|
|
226
|
+
* @param points 3..256 ordered through-points of the loop (first point NOT repeated)
|
|
227
|
+
* @returns The new closed profile as a {@linkcode ProfileHandle}
|
|
228
|
+
* @throws VALIDATION if fewer than 3 points, more than 256 points,
|
|
229
|
+
* consecutive points coincide (including last→first), or the loop
|
|
230
|
+
* self-intersects
|
|
231
|
+
*
|
|
232
|
+
* @examplePrompt Make a blob-shaped floor plate through these points
|
|
233
|
+
* @examplePrompt Organic curved outline through these corners
|
|
234
|
+
* @examplePrompt Freeform podium profile
|
|
235
|
+
*
|
|
236
|
+
* # Example
|
|
237
|
+
* ```ts
|
|
238
|
+
* const profile = await snaptrude.core.geom.create.profileFromSplinePoints([p0, p1, p2, p3, p4])
|
|
239
|
+
* const contour = await snaptrude.core.geom.create.contourFromProfile(profile)
|
|
240
|
+
* const brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)
|
|
241
|
+
* const podium = await snaptrude.design.create.massFromBrep(brep, "Podium")
|
|
242
|
+
* ```
|
|
243
|
+
*/
|
|
244
|
+
abstract profileFromSplinePoints(points: Vec3Handle[]): PluginApiReturn<ProfileHandle>;
|
|
245
|
+
/**
|
|
246
|
+
* Create an axis-aligned **rectangle** profile in the XZ plane,
|
|
247
|
+
* `width` × `depth`, centred at `center` (defaults to the origin). Host API
|
|
248
|
+
* call — returns a handle.
|
|
106
249
|
*
|
|
107
250
|
* Pair with `design.create.space` / `design.create.spaces` to author a rectangular
|
|
108
251
|
* (box) space — there is no dedicated rectangular-space creator; build the profile
|
|
@@ -139,6 +282,9 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
139
282
|
* Create a contour from an outer profile plus zero or more inner profiles (holes).
|
|
140
283
|
* Host API call — returns a handle.
|
|
141
284
|
*
|
|
285
|
+
* A hole here is part of the footprint and cannot be moved or deleted later;
|
|
286
|
+
* for an editable hole in a slab use `design.create.void`.
|
|
287
|
+
*
|
|
142
288
|
* @param outer The outer boundary loop
|
|
143
289
|
* @param holes Optional inner hole loops
|
|
144
290
|
* @returns The new contour as a {@linkcode ContourHandle}
|
|
@@ -210,15 +356,34 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
210
356
|
*
|
|
211
357
|
* @param contour The cross-section to extrude (outer profile + optional holes)
|
|
212
358
|
* @param direction Extrusion direction as plain `{x, y, z}` components (non-zero, normalised by the host)
|
|
213
|
-
* @param amount Extrusion distance (non-zero; negative extrudes opposite to `direction`)
|
|
359
|
+
* @param amount Extrusion distance in internal length units (non-zero; negative extrudes opposite to `direction`)
|
|
360
|
+
* @param options Optional twist and taper, both about `direction` through the
|
|
361
|
+
* base contour's centroid. `twistInDegrees` — total rotation base → top in
|
|
362
|
+
* DEGREES (an angle: never scaled by the project's length unit), positive
|
|
363
|
+
* turning the top CLOCKWISE seen from the far end of `direction` looking
|
|
364
|
+
* back at the base — for the usual upward extrusion, the plan view;
|
|
365
|
+
* `topScale` — the top outline's scale, a ratio (1 = no taper); `levels` —
|
|
366
|
+
* how many sections to build through, a count (2..64; each step may turn
|
|
367
|
+
* at most 22.5°). Leave `levels` out
|
|
368
|
+
* and the host resolves one and writes it into the record, so the mass
|
|
369
|
+
* regenerates identically ever after. An extrusion without twist or
|
|
370
|
+
* taper (no `options`, or zero twist and a `topScale` of 1) is
|
|
371
|
+
* built exactly as before these options existed.
|
|
214
372
|
* @returns The new solid as a {@linkcode BrepHandle}
|
|
215
373
|
* @throws if the extrusion is degenerate (zero amount, zero direction, or a
|
|
216
|
-
* direction lying in the contour
|
|
217
|
-
* into a valid solid
|
|
374
|
+
* direction lying in the plane of the contour) or the contour cannot be
|
|
375
|
+
* extruded into a valid solid
|
|
376
|
+
* @throws VALIDATION if `twistInDegrees` is not finite or turns more than
|
|
377
|
+
* 1440°, `topScale` is not a positive finite ratio, `levels` is outside
|
|
378
|
+
* 2..64 or too few for the twist (more than 22.5° per step), a twist is
|
|
379
|
+
* asked of a `direction` that is not the contour's normal, the contour has
|
|
380
|
+
* holes under a twist or taper, or a scaled section self-intersects
|
|
218
381
|
*
|
|
219
382
|
* @examplePrompt Extrude this profile 3 metres up
|
|
220
383
|
* @examplePrompt Make a solid by extruding this outline
|
|
221
384
|
* @examplePrompt Create a cylinder from a circle profile
|
|
385
|
+
* @examplePrompt Extrude this floor plate 40m up with a 90 degree twist
|
|
386
|
+
* @examplePrompt Taper this tower to 60 percent of its footprint at the top
|
|
222
387
|
*
|
|
223
388
|
* # Example
|
|
224
389
|
* ```ts
|
|
@@ -228,7 +393,80 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
228
393
|
* const faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6
|
|
229
394
|
* ```
|
|
230
395
|
*/
|
|
231
|
-
abstract brepFromExtrusion(contour: ContourHandle, direction: Vec3Components, amount: number
|
|
396
|
+
abstract brepFromExtrusion(contour: ContourHandle, direction: Vec3Components, amount: number, options?: {
|
|
397
|
+
twistInDegrees?: number;
|
|
398
|
+
topScale?: number;
|
|
399
|
+
levels?: number;
|
|
400
|
+
}): PluginApiReturn<BrepHandle>;
|
|
401
|
+
/**
|
|
402
|
+
* Stretches a surface across a closed loop of boundary curves and thickens it
|
|
403
|
+
* into a SOLID in one call — a roof over four curves, a canopy between two
|
|
404
|
+
* rails, a blend across a gap. `thickness` is in internal length units and is
|
|
405
|
+
* required: only solids reach the canvas, and there is no separate surface
|
|
406
|
+
* object to keep. Pass edges as `{ edge, brep, face }` with
|
|
407
|
+
* `continuity: "tangent"` to leave the named face smoothly. The result carries
|
|
408
|
+
* NO recipe (`design.query.getParameters` returns `null`) — label it when you
|
|
409
|
+
* commit it, because the label is all the provenance there is.
|
|
410
|
+
*
|
|
411
|
+
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
|
|
412
|
+
* of MB — expect a pause of seconds).
|
|
413
|
+
*
|
|
414
|
+
* @param boundary 3..16 items forming ONE closed loop (ends meeting within
|
|
415
|
+
* tolerance): a curve, or an edge named WITH the solid it belongs to
|
|
416
|
+
* ({@linkcode OwnedEdge}) — an edge handle cannot name its own solid, and
|
|
417
|
+
* one patch may meet two solids. Read scene breps with
|
|
418
|
+
* `design.query.geometry.getBrep(x, { frame: "world" })` so every item is in
|
|
419
|
+
* one frame.
|
|
420
|
+
* @param thickness Solid thickness in internal length units (> 0)
|
|
421
|
+
* @param options `interiorPoints` pull the surface through them (≤ 64, plain
|
|
422
|
+
* `{x, y, z}` in the same frame as the boundary). `continuity` —
|
|
423
|
+
* `"position"` (default) or `"tangent"`: every boundary item must then be an
|
|
424
|
+
* edge item that also names the `face` to continue (a solid edge has two
|
|
425
|
+
* faces — the wall or the top of a rim). `side` — `"below"` (default) or
|
|
426
|
+
* `"above"`: which side of the boundary the solid grows to.
|
|
427
|
+
* @returns The thickened patch as a new {@linkcode BrepHandle}
|
|
428
|
+
* @throws VALIDATION if the boundary is not one closed loop (the message names
|
|
429
|
+
* the gap and its size), a count cap is exceeded, `thickness` is not
|
|
430
|
+
* positive, `continuity: "tangent"` is used with a curve item or with an
|
|
431
|
+
* edge item that names no `face` (the message names the edge's two candidate
|
|
432
|
+
* faces), or a `face` is not adjacent to its `edge`
|
|
433
|
+
* @throws OPERATION_FAILED if the kernel could not fill the boundary, the
|
|
434
|
+
* filled surface misses its own boundary by more than 0.254 mm (the message
|
|
435
|
+
* carries the measured gap), or the thicken produced no solid
|
|
436
|
+
*
|
|
437
|
+
* @examplePrompt Patch a roof over these four boundary curves, 250 mm thick
|
|
438
|
+
* @examplePrompt Span a canopy between these two curved rails, 300 mm thick
|
|
439
|
+
*
|
|
440
|
+
* # Example
|
|
441
|
+
* ```ts
|
|
442
|
+
* // A roof over four curves
|
|
443
|
+
* const roof = await snaptrude.core.geom.create.brepFromPatch(
|
|
444
|
+
* [curveA, curveB, curveC, curveD],
|
|
445
|
+
* 0.984, // 250 mm
|
|
446
|
+
* )
|
|
447
|
+
* const mass = await snaptrude.design.create.massFromBrep(roof, "Roof patch")
|
|
448
|
+
* ```
|
|
449
|
+
*
|
|
450
|
+
* ```ts
|
|
451
|
+
* // A canopy between two towers' rims, leaving every wall it meets smoothly:
|
|
452
|
+
* // with `continuity: "tangent"` EVERY item is an edge naming its face.
|
|
453
|
+
* const canopy = await snaptrude.core.geom.create.brepFromPatch(
|
|
454
|
+
* [
|
|
455
|
+
* { edge: rimA, brep: towerA, face: wallA },
|
|
456
|
+
* { edge: sideA, brep: towerA, face: endA },
|
|
457
|
+
* { edge: rimB, brep: towerB, face: wallB },
|
|
458
|
+
* { edge: sideB, brep: towerB, face: endB },
|
|
459
|
+
* ],
|
|
460
|
+
* 1.181, // 300 mm
|
|
461
|
+
* { continuity: "tangent" },
|
|
462
|
+
* )
|
|
463
|
+
* ```
|
|
464
|
+
*/
|
|
465
|
+
abstract brepFromPatch(boundary: (CurveHandle | OwnedEdge)[], thickness: number, options?: {
|
|
466
|
+
interiorPoints?: Vec3Components[];
|
|
467
|
+
continuity?: "position" | "tangent";
|
|
468
|
+
side?: "below" | "above";
|
|
469
|
+
}): PluginApiReturn<BrepHandle>;
|
|
232
470
|
/**
|
|
233
471
|
* Create a closed solid **B-rep** by lofting between a bottom and a top
|
|
234
472
|
* contour, optionally through intermediate cross-sections. Host API call —
|
|
@@ -242,8 +480,8 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
242
480
|
* unchanged. A pair whose side faces would be non-planar under every
|
|
243
481
|
* correspondence still builds for hole-free straight-edged pairs — planar
|
|
244
482
|
* side quads stay quads and warped ones split into planar triangles (the
|
|
245
|
-
* triangulated
|
|
246
|
-
* auto-matching that would pair an arc with a straight edge. Matching hole
|
|
483
|
+
* triangulated fallback); arc-bearing or holed twisted pairs are rejected, as
|
|
484
|
+
* is auto-matching that would pair an arc with a straight edge. Matching hole
|
|
247
485
|
* counts are allowed in the two-section form. With intermediates the loft
|
|
248
486
|
* is a chain of ruled segments folded into one solid: sections must be
|
|
249
487
|
* planar and hole-free, ordered bottom → intermediates → top. The contours
|
|
@@ -257,7 +495,9 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
257
495
|
* bottom — sections are auto-matched)
|
|
258
496
|
* @param intermediateContours Optional in-between cross-sections, ordered
|
|
259
497
|
* bottom to top (hole-free; edge counts may differ — every section is
|
|
260
|
-
* normalized to the largest)
|
|
498
|
+
* normalized to the largest). Any count is accepted; a loft of more
|
|
499
|
+
* than 32 sections counting the bottom and the top still builds but
|
|
500
|
+
* carries no parameter record (records are capped, calls are not)
|
|
261
501
|
* @param options Optional behavior switches. `compatibility` — `"auto"`
|
|
262
502
|
* (default) inserts vertices to match differing edge counts; `"strict"`
|
|
263
503
|
* skips normalization and throws VALIDATION when outer edge counts (or,
|
|
@@ -265,9 +505,13 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
265
505
|
* `"auto"` (default) searches seam rotations on straight-edge sections to
|
|
266
506
|
* avoid a twist; `"authored"` keeps the authored start-vertex
|
|
267
507
|
* correspondence unchanged (a twisted correspondence then builds through
|
|
268
|
-
* the triangulated
|
|
508
|
+
* the triangulated fallback for hole-free straight-edged pairs).
|
|
269
509
|
* `{ compatibility: "strict", seamAlignment: "authored" }` reproduces
|
|
270
|
-
* pre-0.9.4 lofting exactly.
|
|
510
|
+
* pre-0.9.4 lofting exactly. `smoothing` — `"ruled"` (default) keeps the
|
|
511
|
+
* straight-sided behaviour described above; `"smooth"` lofts every
|
|
512
|
+
* section in ONE kernel pass, so the sides curve continuously through the
|
|
513
|
+
* intermediates instead of creasing at each one (a vase, a curved tower —
|
|
514
|
+
* the sections must still be planar and hole-free).
|
|
271
515
|
* @returns The new solid as a {@linkcode BrepHandle}
|
|
272
516
|
* @throws VALIDATION if the contours are coincident, their hole counts
|
|
273
517
|
* differ, any section has holes when intermediates are present
|
|
@@ -289,6 +533,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
289
533
|
* @examplePrompt Loft these outlines even though their corners don't line up
|
|
290
534
|
* @examplePrompt Loft these outlines exactly as authored, corner to corner
|
|
291
535
|
* @examplePrompt Fail the loft if my sections don't have matching edge counts
|
|
536
|
+
* @examplePrompt Loft these three outlines with smoothly curving sides
|
|
292
537
|
*
|
|
293
538
|
* # Example
|
|
294
539
|
* ```ts
|
|
@@ -305,6 +550,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
305
550
|
abstract brepFromLoft(bottomContour: ContourHandle, topContour: ContourHandle, intermediateContours?: ContourHandle[], options?: {
|
|
306
551
|
compatibility?: "strict" | "auto";
|
|
307
552
|
seamAlignment?: "authored" | "auto";
|
|
553
|
+
smoothing?: "ruled" | "smooth";
|
|
308
554
|
}): PluginApiReturn<BrepHandle>;
|
|
309
555
|
/**
|
|
310
556
|
* Create a closed solid **B-rep** from indexed mesh data: a vertex position
|
|
@@ -387,6 +633,9 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
387
633
|
* The first boolean call loads the OpenCascade geometry kernel (a wasm of
|
|
388
634
|
* tens of MB — expect a pause of seconds); subsequent calls are fast.
|
|
389
635
|
*
|
|
636
|
+
* Returns a detached solid; to cut an editable hole in a slab, floor or roof
|
|
637
|
+
* in the model use `design.create.void`.
|
|
638
|
+
*
|
|
390
639
|
* @param a The solid to subtract from
|
|
391
640
|
* @param b The solid to remove from `a`
|
|
392
641
|
* @returns `a` minus `b` as a new {@linkcode BrepHandle}
|
|
@@ -395,7 +644,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
395
644
|
*
|
|
396
645
|
* @examplePrompt Subtract the courtyard from the building mass
|
|
397
646
|
* @examplePrompt Cut this solid out of that one
|
|
398
|
-
* @examplePrompt
|
|
647
|
+
* @examplePrompt Subtract this box solid from that solid
|
|
399
648
|
*
|
|
400
649
|
* # Example
|
|
401
650
|
* ```ts
|
|
@@ -432,46 +681,110 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
432
681
|
*/
|
|
433
682
|
abstract brepFromIntersection(a: BrepHandle, b: BrepHandle): PluginApiReturn<BrepHandle>;
|
|
434
683
|
/**
|
|
435
|
-
* Rounds the given
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
684
|
+
* Rounds the given edges of a solid with a constant radius. Host API call —
|
|
685
|
+
* returns a new {@linkcode BrepHandle}; the input brep is read-only.
|
|
686
|
+
*
|
|
687
|
+
* Works on curved solids: edges may be straight, circular or spline, and
|
|
688
|
+
* adjacent edges (corner blends) are allowed. To pick a **rim** — the circle
|
|
689
|
+
* where a cylinder meets a flat cap — walk the edges and keep the ones whose
|
|
690
|
+
* two faces are a `cylinder` and a `plane`:
|
|
691
|
+
* `core.geom.query.brep.listEdges(brep)` → per edge
|
|
692
|
+
* `core.geom.query.edge.listFaces(edge)` → `core.geom.query.face.getSurfaceKind`
|
|
693
|
+
* on both faces. (`core.geom.query.brep.listEdgesBetween` takes two VERTEX
|
|
694
|
+
* indices — it is NOT a face-pair lookup.) For one cap's rim only, the
|
|
695
|
+
* shorter walk is: find the cap (call `getSurfaceKind` on each face from
|
|
696
|
+
* `brep.listFaces`), then `core.geom.query.face.listEdges(capFace)`.
|
|
697
|
+
*
|
|
698
|
+
* When the input brep carries a creation recipe, the result carries it too,
|
|
699
|
+
* with this operation appended to `operations`; `design.create.massFromBrep`
|
|
700
|
+
* then keeps the mass editable through `design.update.parameters`.
|
|
701
|
+
*
|
|
702
|
+
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
|
|
703
|
+
* of MB — expect a pause of seconds).
|
|
443
704
|
*
|
|
444
705
|
* Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
|
|
445
706
|
* with `design.create.massFromBrep`.
|
|
446
707
|
*
|
|
447
708
|
* @param brep The solid whose edges to round
|
|
448
|
-
* @param edges The
|
|
449
|
-
*
|
|
709
|
+
* @param edges The edges to fillet (one or more, all on `brep`, no
|
|
710
|
+
* duplicates; more than 64 still fillets but the result carries no
|
|
711
|
+
* parameter record)
|
|
712
|
+
* @param radius Fillet radius in internal length units (positive, finite) —
|
|
713
|
+
* the radius at the START of the blend with `endRadius`; unused with
|
|
714
|
+
* `radii` (the table is the whole law — pass its first row's radius)
|
|
715
|
+
* @param options Optional VARIABLE blend, in one of two forms, each naming
|
|
716
|
+
* exactly ONE edge: the law belongs to the whole tangent chain that edge
|
|
717
|
+
* lies on, and it is measured from that edge's start. `endRadius` —
|
|
718
|
+
* the radius at the far end, in internal length units, interpolated
|
|
719
|
+
* linearly along the chain; on a closed rim it must equal `radius` (0 and
|
|
720
|
+
* 1 are the same point) — use `radii` there. `radii` — a sampled law instead:
|
|
721
|
+
* `position` is normalised ARC LENGTH along the chain (a ratio 0..1, never
|
|
722
|
+
* converted), `radius` is internal length units; 2..32 rows with strictly
|
|
723
|
+
* increasing `position`; before the first row and after the last the
|
|
724
|
+
* radius is held constant. On a closed rim 0 and 1 are the same point, so
|
|
725
|
+
* give them the same radius and put the variation in the interior rows. The two
|
|
726
|
+
* forms are mutually exclusive; without either, the fillet has one constant
|
|
727
|
+
* radius.
|
|
450
728
|
* @returns The filleted solid as a new {@linkcode BrepHandle}
|
|
451
|
-
* @throws VALIDATION if `edges` is empty, `radius` is
|
|
452
|
-
* number, an edge is not on `brep`, an edge
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
729
|
+
* @throws VALIDATION if `edges` is empty or holds a duplicate, `radius` is
|
|
730
|
+
* not a positive finite number, an edge is not on `brep`, or an edge has no
|
|
731
|
+
* crease to round — it is a seam of a closed face, or it lies between two
|
|
732
|
+
* patches of one smooth surface; for a variable blend, if `endRadius` and
|
|
733
|
+
* `radii` are both given, more than one edge is passed, a `radii` table is
|
|
734
|
+
* outside 2..32 rows or its positions do not strictly increase within
|
|
735
|
+
* 0..1, or the law's two ends differ on a closed rim (an `endRadius`
|
|
736
|
+
* other than `radius`, or a `radii` table whose first and last radii
|
|
737
|
+
* differ)
|
|
738
|
+
* @throws PRECONDITION_FAILED if an edge could not be located on the kernel
|
|
739
|
+
* solid after healing (select a different edge, or fillet before the
|
|
740
|
+
* operation that curved the solid), or the kernel could not blend the edge
|
|
741
|
+
* named in the message (reduce the radius or drop that edge)
|
|
742
|
+
* @throws OPERATION_FAILED if the kernel or the translation fails, or the
|
|
743
|
+
* result is non-manifold, splits into several solids, or contains a surface
|
|
744
|
+
* Snaptrude cannot represent
|
|
745
|
+
*
|
|
746
|
+
* @examplePrompt Round the rim of the column with 200 mm
|
|
747
|
+
* @examplePrompt Soften where the dome meets the wall
|
|
459
748
|
* @examplePrompt Fillet the corners of the podium with a 0.5m radius
|
|
460
749
|
* @examplePrompt Soften the vertical edges of this tower
|
|
750
|
+
* @examplePrompt Blend this edge from 200mm at one end to 600mm at the other
|
|
751
|
+
* @examplePrompt Round this rim wider at the back than at the front
|
|
461
752
|
*
|
|
462
753
|
* # Example
|
|
463
754
|
* ```ts
|
|
464
|
-
*
|
|
465
|
-
* const edges = await snaptrude.core.geom.query.brep.listEdges(
|
|
466
|
-
* const
|
|
755
|
+
* // Rim = every edge between the cylinder side and a plane cap
|
|
756
|
+
* const edges = await snaptrude.core.geom.query.brep.listEdges(column)
|
|
757
|
+
* const rim = []
|
|
758
|
+
* for (const edge of edges) {
|
|
759
|
+
* const faces = await snaptrude.core.geom.query.edge.listFaces(edge)
|
|
760
|
+
* const kinds = await Promise.all(
|
|
761
|
+
* faces.map((f) => snaptrude.core.geom.query.face.getSurfaceKind(f)),
|
|
762
|
+
* )
|
|
763
|
+
* if (kinds.includes("cylinder") && kinds.includes("plane")) rim.push(edge)
|
|
764
|
+
* }
|
|
765
|
+
* const rounded = await snaptrude.core.geom.create.brepFromFillet(column, rim, 0.787) // 200 mm
|
|
467
766
|
* ```
|
|
468
767
|
*/
|
|
469
|
-
abstract brepFromFillet(brep: BrepHandle, edges: EdgeHandle[], radius: number
|
|
768
|
+
abstract brepFromFillet(brep: BrepHandle, edges: EdgeHandle[], radius: number, options?: {
|
|
769
|
+
endRadius?: number;
|
|
770
|
+
radii?: {
|
|
771
|
+
position: number;
|
|
772
|
+
radius: number;
|
|
773
|
+
}[];
|
|
774
|
+
}): PluginApiReturn<BrepHandle>;
|
|
470
775
|
/**
|
|
471
776
|
* Grows or shrinks a solid by offsetting every face — positive distance
|
|
472
777
|
* moves faces outward, negative moves them inward. Host API call — returns
|
|
473
778
|
* a new {@linkcode BrepHandle}; the input brep is read-only.
|
|
474
779
|
*
|
|
780
|
+
* Works on curved solids: a sphere offsets to a sphere, a torus to a torus,
|
|
781
|
+
* a cylinder to a cylinder. There is nothing to select — the whole solid is
|
|
782
|
+
* offset.
|
|
783
|
+
*
|
|
784
|
+
* When the input brep carries a creation recipe, the result carries it too,
|
|
785
|
+
* with this operation appended to `operations`; `design.create.massFromBrep`
|
|
786
|
+
* then keeps the mass editable through `design.update.parameters`.
|
|
787
|
+
*
|
|
475
788
|
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of
|
|
476
789
|
* tens of MB — expect a pause of seconds).
|
|
477
790
|
*
|
|
@@ -483,9 +796,15 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
483
796
|
* @returns The offset solid as a new {@linkcode BrepHandle}
|
|
484
797
|
* @throws VALIDATION if `distance` is not finite, is too small to offset
|
|
485
798
|
* anything, or an inward distance consumes the solid entirely
|
|
486
|
-
* @throws OPERATION_FAILED if the kernel
|
|
487
|
-
* result
|
|
488
|
-
*
|
|
799
|
+
* @throws OPERATION_FAILED if the kernel or the translation fails, or the
|
|
800
|
+
* result is non-manifold, splits into several solids, or contains a surface
|
|
801
|
+
* Snaptrude cannot represent (an offset free-form NURBS surface may have no
|
|
802
|
+
* exact representation — the model is left unchanged). A distance too
|
|
803
|
+
* large for the solid is reported here, with a hint asking for a smaller
|
|
804
|
+
* one. There is no per-face refusal: the whole call fails, and the error
|
|
805
|
+
* names no face
|
|
806
|
+
*
|
|
807
|
+
* @examplePrompt Thicken the torus ring by 100 mm
|
|
489
808
|
* @examplePrompt Grow this solid by 0.5m in every direction
|
|
490
809
|
* @examplePrompt Shrink this mass by 200mm
|
|
491
810
|
* @examplePrompt Offset the building envelope outward by 1m
|
|
@@ -503,6 +822,18 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
503
822
|
* input brep is read-only. The outer surface is kept and the walls grow
|
|
504
823
|
* inward.
|
|
505
824
|
*
|
|
825
|
+
* Works on curved solids: the open faces may be spherical, cylindrical,
|
|
826
|
+
* conical, toroidal or free-form patches, not only flat ones. To open the
|
|
827
|
+
* flat base of a dome, check every face first —
|
|
828
|
+
* `core.geom.query.brep.listFaces` then
|
|
829
|
+
* `core.geom.query.face.getSurfaceKind` on each — and keep the `"plane"`
|
|
830
|
+
* one. A closed curved surface is stored as several patches (a sphere as
|
|
831
|
+
* lunes), so opening "the sphere" may mean passing several faces.
|
|
832
|
+
*
|
|
833
|
+
* When the input brep carries a creation recipe, the result carries it too,
|
|
834
|
+
* with this operation appended to `operations`; `design.create.massFromBrep`
|
|
835
|
+
* then keeps the mass editable through `design.update.parameters`.
|
|
836
|
+
*
|
|
506
837
|
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of
|
|
507
838
|
* tens of MB — expect a pause of seconds).
|
|
508
839
|
*
|
|
@@ -510,24 +841,36 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
510
841
|
* with `design.create.massFromBrep`.
|
|
511
842
|
*
|
|
512
843
|
* @param brep The solid to hollow
|
|
513
|
-
* @param openFaces The faces to remove as openings (
|
|
844
|
+
* @param openFaces The faces to remove as openings (one or more, all on
|
|
845
|
+
* `brep`, no duplicates; more than 32 still shells but the result carries
|
|
846
|
+
* no parameter record)
|
|
514
847
|
* @param thickness Wall thickness (positive, finite, smaller than half the solid's smallest span)
|
|
515
848
|
* @returns The hollowed solid as a new {@linkcode BrepHandle}
|
|
516
|
-
* @throws VALIDATION if `openFaces` is empty, a face is
|
|
517
|
-
* `thickness` is not a positive finite number, or the
|
|
518
|
-
* large (it must be smaller than half the solid's smallest
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
*
|
|
849
|
+
* @throws VALIDATION if `openFaces` is empty or holds a duplicate, a face is
|
|
850
|
+
* not on `brep`, `thickness` is not a positive finite number, or the
|
|
851
|
+
* thickness is too large (it must be smaller than half the solid's smallest
|
|
852
|
+
* span)
|
|
853
|
+
* @throws OPERATION_FAILED if the kernel or the translation fails, or the
|
|
854
|
+
* result is non-manifold, splits into several solids, or contains a surface
|
|
855
|
+
* Snaptrude cannot represent. A thickness too large for the solid is
|
|
856
|
+
* reported here, with a hint asking for one below half the smallest span.
|
|
857
|
+
* There is no per-face refusal: the whole call fails, and the error
|
|
858
|
+
* names no face
|
|
859
|
+
*
|
|
860
|
+
* @examplePrompt Hollow the dome into a 300 mm shell, open at the base
|
|
522
861
|
* @examplePrompt Hollow this mass into 200mm walls
|
|
523
862
|
* @examplePrompt Shell this form with the top face open
|
|
524
863
|
* @examplePrompt Turn this solid tower into a tube open at both ends
|
|
525
864
|
*
|
|
526
865
|
* # Example
|
|
527
866
|
* ```ts
|
|
528
|
-
*
|
|
529
|
-
* const faces = await snaptrude.core.geom.query.brep.listFaces(
|
|
530
|
-
* const
|
|
867
|
+
* // Open the dome at its flat base: the one face whose surface is a plane
|
|
868
|
+
* const faces = await snaptrude.core.geom.query.brep.listFaces(dome)
|
|
869
|
+
* const base = []
|
|
870
|
+
* for (const face of faces) {
|
|
871
|
+
* if ((await snaptrude.core.geom.query.face.getSurfaceKind(face)) === "plane") base.push(face)
|
|
872
|
+
* }
|
|
873
|
+
* const hollow = await snaptrude.core.geom.create.brepFromShell(dome, base, 1.181) // 300 mm
|
|
531
874
|
* ```
|
|
532
875
|
*/
|
|
533
876
|
abstract brepFromShell(brep: BrepHandle, openFaces: FaceHandle[], thickness: number): PluginApiReturn<BrepHandle>;
|
|
@@ -567,28 +910,84 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
567
910
|
*/
|
|
568
911
|
abstract brepsFromSplit(brep: BrepHandle, planeOrigin: Vec3Components, planeNormal: Vec3Components): PluginApiReturn<BrepHandle[]>;
|
|
569
912
|
/**
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
*
|
|
913
|
+
* Cuts a solid with a FACE of another solid — the curved twin of
|
|
914
|
+
* {@linkcode PluginGeomCreateApi.brepsFromSplit}, which cuts with a plane.
|
|
915
|
+
* Host API call — returns new {@linkcode BrepHandle}s; both inputs are
|
|
916
|
+
* read-only. BOTH breps must be in the same frame: read scene masses with
|
|
917
|
+
* `design.query.geometry.getBrep(x, { frame: "world" })` (the default is each
|
|
918
|
+
* mass's own local frame, and two masses have two). The pieces come back in
|
|
919
|
+
* DESCENDING volume order; pick the one you want with
|
|
920
|
+
* `core.geom.query.brep.getCentroid` or `getVolume` and commit it. A piece
|
|
921
|
+
* carries no recipe — label it.
|
|
922
|
+
*
|
|
923
|
+
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
|
|
924
|
+
* of MB — expect a pause of seconds).
|
|
925
|
+
*
|
|
926
|
+
* @param brep The solid to cut
|
|
927
|
+
* @param toolFace The cutting face, read-only
|
|
928
|
+
* @param toolBrep The solid `toolFace` belongs to — a face handle cannot name
|
|
929
|
+
* its own solid
|
|
930
|
+
* @returns The resulting pieces as {@linkcode BrepHandle}`[]`, largest first
|
|
931
|
+
* @throws VALIDATION if `toolFace` is not a face of `toolBrep`, `toolBrep` IS
|
|
932
|
+
* `brep`, or the cut produced a single part — the surface does not pass all
|
|
933
|
+
* the way through (extend it past the mass on every side, and check both
|
|
934
|
+
* breps were read in the same frame)
|
|
935
|
+
* @throws OPERATION_FAILED if the kernel could not split the solid
|
|
936
|
+
*
|
|
937
|
+
* @examplePrompt Cut this mass with the curved roof surface and keep the lower part
|
|
573
938
|
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
939
|
+
* # Example
|
|
940
|
+
* ```ts
|
|
941
|
+
* const target = await snaptrude.design.query.geometry.getBrep(tower, { frame: "world" })
|
|
942
|
+
* const tool = await snaptrude.design.query.geometry.getBrep(roof, { frame: "world" })
|
|
943
|
+
* const [toolFace] = await snaptrude.core.geom.query.brep.listFaces(tool)
|
|
944
|
+
* const pieces = await snaptrude.core.geom.create.brepsFromSplitByFace(target, toolFace, tool)
|
|
945
|
+
* ```
|
|
946
|
+
*/
|
|
947
|
+
abstract brepsFromSplitByFace(brep: BrepHandle, toolFace: FaceHandle, toolBrep: BrepHandle): PluginApiReturn<BrepHandle[]>;
|
|
948
|
+
/**
|
|
949
|
+
* Bevels the given edges of a solid with a symmetric planar cut. Host API
|
|
950
|
+
* call — returns a new {@linkcode BrepHandle}; the input brep is read-only.
|
|
951
|
+
*
|
|
952
|
+
* Works on curved solids: edges may be straight, circular or spline, and
|
|
953
|
+
* adjacent edges are allowed. Pick edges the same way as for
|
|
954
|
+
* {@linkcode PluginGeomCreateApi.brepFromFillet} — `brep.listEdges`, then
|
|
955
|
+
* `core.geom.query.edge.listFaces` and `core.geom.query.face.getSurfaceKind`
|
|
956
|
+
* on both faces of each edge. (`core.geom.query.brep.listEdgesBetween` takes
|
|
957
|
+
* two VERTEX indices — it is NOT a face-pair lookup.) Chamfering a cylinder's
|
|
958
|
+
* rim yields a cone patch where a fillet would yield a torus patch.
|
|
959
|
+
*
|
|
960
|
+
* When the input brep carries a creation recipe, the result carries it too,
|
|
961
|
+
* with this operation appended to `operations`; `design.create.massFromBrep`
|
|
962
|
+
* then keeps the mass editable through `design.update.parameters`.
|
|
963
|
+
*
|
|
964
|
+
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
|
|
965
|
+
* of MB — expect a pause of seconds).
|
|
577
966
|
*
|
|
578
967
|
* Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
|
|
579
968
|
* with `design.create.massFromBrep`.
|
|
580
969
|
*
|
|
581
970
|
* @param brep The solid whose edges to bevel
|
|
582
|
-
* @param edges The
|
|
971
|
+
* @param edges The edges to chamfer (one or more, all on `brep`, no
|
|
972
|
+
* duplicates; more than 64 still chamfers but the result carries no
|
|
973
|
+
* parameter record)
|
|
583
974
|
* @param distance Chamfer distance from the edge on each adjacent face (positive, finite)
|
|
584
975
|
* @returns The chamfered solid as a new {@linkcode BrepHandle}
|
|
585
|
-
* @throws VALIDATION if `edges` is empty, `distance` is
|
|
586
|
-
* finite number, an edge is not on `brep`, an edge
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
* @throws
|
|
590
|
-
*
|
|
591
|
-
*
|
|
976
|
+
* @throws VALIDATION if `edges` is empty or holds a duplicate, `distance` is
|
|
977
|
+
* not a positive finite number, an edge is not on `brep`, or an edge has no
|
|
978
|
+
* crease to cut — it is a seam of a closed face, or it lies between two
|
|
979
|
+
* patches of one smooth surface
|
|
980
|
+
* @throws PRECONDITION_FAILED if an edge could not be located on the kernel
|
|
981
|
+
* solid after healing (select a different edge, or chamfer before the
|
|
982
|
+
* operation that curved the solid)
|
|
983
|
+
* @throws OPERATION_FAILED if the kernel or the translation fails, or the
|
|
984
|
+
* result is non-manifold, splits into several solids, or contains a surface
|
|
985
|
+
* Snaptrude cannot represent. A distance larger than an adjacent face
|
|
986
|
+
* is reported here, with a hint asking for a smaller one. Unlike
|
|
987
|
+
* {@linkcode PluginGeomCreateApi.brepFromFillet}, the kernel does not say
|
|
988
|
+
* which edge failed a chamfer, so the error names no edge
|
|
989
|
+
*
|
|
990
|
+
* @examplePrompt Chamfer the top edge of the cylinder
|
|
592
991
|
* @examplePrompt Bevel these edges by 100mm
|
|
593
992
|
* @examplePrompt Chamfer the top edges of the plinth
|
|
594
993
|
* @examplePrompt Cut a 45-degree flat along the corners of this mass
|
|
@@ -619,11 +1018,16 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
619
1018
|
* tapering across a bend or along an arc edge would create faces Snaptrude
|
|
620
1019
|
* cannot represent and throws (sweep each straight run separately and union
|
|
621
1020
|
* the results instead). An optional `transition` picks the corner
|
|
622
|
-
* treatment: `"miter"` (default) is
|
|
1021
|
+
* treatment: `"miter"` (default) is a sharp mitred bend; `"round"`
|
|
1022
|
+
* carries the section around each turning corner on a tangent circular arc,
|
|
1023
|
+
* so the corner patch is a real curved surface (geometrically cylindrical;
|
|
1024
|
+
* `getSurfaceKind` reports it as `"spline"`) rather than a
|
|
1025
|
+
* flat cut (open paths only — `"round"` on a closed ring path is refused);
|
|
623
1026
|
* `{ bevel: b }` chamfers each turning corner by cutting `b` back along
|
|
624
1027
|
* both adjacent legs (works on open and closed paths — each leg must be
|
|
625
|
-
* long enough for its cuts). On a corner-less path `transition` has no
|
|
626
|
-
* varying
|
|
1028
|
+
* long enough for its cuts). On a corner-less path `transition` has no
|
|
1029
|
+
* effect, and a varying scale only accepts straight paths, so it never meets
|
|
1030
|
+
* a corner.
|
|
627
1031
|
*
|
|
628
1032
|
* Open paths run on the OpenCascade kernel (the first kernel call loads a
|
|
629
1033
|
* wasm of tens of MB — expect a pause of seconds); closed paths are
|
|
@@ -633,19 +1037,22 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
633
1037
|
* with `design.create.massFromBrep`.
|
|
634
1038
|
*
|
|
635
1039
|
* @param profile The cross-section to sweep (hole-free contour)
|
|
636
|
-
* @param path The polyline path as plain `{x, y, z}` points (
|
|
637
|
-
* first point as the last to close the path into a ring
|
|
1040
|
+
* @param path The polyline path as plain `{x, y, z}` points (2 or more;
|
|
1041
|
+
* repeat the first point as the last to close the path into a ring; more
|
|
1042
|
+
* than 512 points still sweeps but the result carries no parameter record)
|
|
638
1043
|
* @param options Optional scale law and corner transition. Scale law:
|
|
639
1044
|
* `startScale`/`endScale` (linear taper by arc length) or `scales` (one
|
|
640
1045
|
* factor per path point; mutually exclusive with
|
|
641
1046
|
* `startScale`/`endScale`); every factor must be finite and within
|
|
642
|
-
* 1e-3..1e3. `transition`: `"miter"` (default, sharp corners)
|
|
643
|
-
* `
|
|
644
|
-
*
|
|
1047
|
+
* 1e-3..1e3. `transition`: `"miter"` (default, sharp corners),
|
|
1048
|
+
* `"round"` (arc-carried corners — curved corner patches; open paths
|
|
1049
|
+
* only) or `{ bevel: b }` (chamfered corners, `b` finite within
|
|
1050
|
+
* 1e-3..1e3; open and closed paths)
|
|
645
1051
|
* @returns The swept solid as a new {@linkcode BrepHandle}
|
|
646
1052
|
* @throws VALIDATION if the profile has holes, the path has fewer than 2
|
|
647
|
-
* points, consecutive path points coincide, a
|
|
648
|
-
* or the profile plane contains the first
|
|
1053
|
+
* points, consecutive path points coincide, a
|
|
1054
|
+
* coordinate is not finite, or the profile plane contains the first
|
|
1055
|
+
* path segment's direction
|
|
649
1056
|
* (degenerate sweep); for closed paths, if the ring has fewer than 3
|
|
650
1057
|
* distinct corners, the path is non-planar, a corner doubles back, the
|
|
651
1058
|
* profile has an arc edge, or the profile is too large for a mitred
|
|
@@ -653,11 +1060,14 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
653
1060
|
* is combined with `startScale`/`endScale`, `scales` does not match the
|
|
654
1061
|
* path length, or a varying scale is used on a bent or closed path or
|
|
655
1062
|
* with an arc-edged profile; for `{ bevel }`, if a leg is too short for
|
|
656
|
-
* the cuts its
|
|
657
|
-
* back so its
|
|
1063
|
+
* the cuts its bevelled corners take from it or a corner nearly doubles
|
|
1064
|
+
* back so its bevel collapses (the errors name the corner)
|
|
1065
|
+
* @throws PRECONDITION_FAILED if `transition` is `"round"` and the path is
|
|
1066
|
+
* closed — round corners work on open paths only; use `"miter"` or
|
|
1067
|
+
* `{ bevel }` on a ring
|
|
658
1068
|
* @throws OPERATION_FAILED if the kernel cannot sweep the profile into a
|
|
659
|
-
* valid solid
|
|
660
|
-
*
|
|
1069
|
+
* valid solid — including a `"round"` corner whose arc does not fit its
|
|
1070
|
+
* legs, which is not pre-checked and so is not named per corner
|
|
661
1071
|
*
|
|
662
1072
|
* @examplePrompt Sweep this profile along the corridor path
|
|
663
1073
|
* @examplePrompt Extrude the railing section along this route
|
|
@@ -666,6 +1076,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
666
1076
|
* @examplePrompt Taper this duct from 1x1 to 2x2 along its run
|
|
667
1077
|
* @examplePrompt Sweep a column section that narrows toward the top
|
|
668
1078
|
* @examplePrompt Chamfer the corners of this swept frame by 200mm
|
|
1079
|
+
* @examplePrompt Sweep this handrail with rounded corners at the bends
|
|
669
1080
|
*
|
|
670
1081
|
* # Example
|
|
671
1082
|
* ```ts
|
|
@@ -701,17 +1112,71 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
701
1112
|
startScale?: number;
|
|
702
1113
|
endScale?: number;
|
|
703
1114
|
scales?: number[];
|
|
704
|
-
transition?: "miter" | {
|
|
1115
|
+
transition?: "miter" | "round" | {
|
|
705
1116
|
bevel: number;
|
|
706
1117
|
};
|
|
707
1118
|
}): PluginApiReturn<BrepHandle>;
|
|
1119
|
+
/**
|
|
1120
|
+
* Sweeps a cross-section along a SMOOTH path — splines, arcs and lines chained
|
|
1121
|
+
* end to end — with control of how the profile turns.
|
|
1122
|
+
* {@linkcode PluginGeomCreateApi.brepFromSweep} takes a polyline path; this
|
|
1123
|
+
* takes curves. Host API call — returns a new {@linkcode BrepHandle}; the
|
|
1124
|
+
* inputs are read-only. Records as `sweepAlongCurve`, so the orientation stays
|
|
1125
|
+
* editable through `design.update.parameters`. The properties panel shows it
|
|
1126
|
+
* read-only, because it is a text value, not a number. A railed sweep records
|
|
1127
|
+
* nothing (`getParameters` answers `null`).
|
|
1128
|
+
*
|
|
1129
|
+
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
|
|
1130
|
+
* of MB — expect a pause of seconds).
|
|
1131
|
+
*
|
|
1132
|
+
* @param profile Hole-free cross-section contour; placed at the first curve's start
|
|
1133
|
+
* @param path 1..64 curves, ordered, meeting end to end within tolerance
|
|
1134
|
+
* @param options `orientation` — `"upright"` (default) keeps the profile's up
|
|
1135
|
+
* aligned with world up (ducts, handrails, ribbons that must not roll);
|
|
1136
|
+
* `"frenet"` lets it roll with the path's curvature; `"fixed"` carries the
|
|
1137
|
+
* authored frame along unchanged, which is a pure translation — use it to
|
|
1138
|
+
* bend a footprint along an arc. `rail` is a second guide curve.
|
|
1139
|
+
* @returns The swept solid as a new {@linkcode BrepHandle}
|
|
1140
|
+
* @throws VALIDATION if the path curves are not connected, the path is closed,
|
|
1141
|
+
* the profile has holes, the first tangent lies in the profile plane, the
|
|
1142
|
+
* path runs vertically under `"upright"` (that frame is undefined there —
|
|
1143
|
+
* the message names the run and points at `"frenet"`), the path turns
|
|
1144
|
+
* parallel to the profile under `"fixed"`, `rail` is closed, or `rail` and
|
|
1145
|
+
* `orientation` are both given
|
|
1146
|
+
* @throws OPERATION_FAILED if the kernel could not sweep the profile — a
|
|
1147
|
+
* self-intersection on a tight bend
|
|
1148
|
+
*
|
|
1149
|
+
* @examplePrompt Sweep a 600x400 duct along this curved route and keep it upright
|
|
1150
|
+
* @examplePrompt Run this handrail along the curved stair edge
|
|
1151
|
+
* @examplePrompt Bend this footprint along the arc
|
|
1152
|
+
*
|
|
1153
|
+
* # Example
|
|
1154
|
+
* ```ts
|
|
1155
|
+
* const route = await snaptrude.core.geom.create.splineFromPoints(points)
|
|
1156
|
+
* const duct = await snaptrude.core.geom.create.brepFromSweepAlongCurve(profile, [route], {
|
|
1157
|
+
* orientation: "upright",
|
|
1158
|
+
* })
|
|
1159
|
+
* ```
|
|
1160
|
+
*/
|
|
1161
|
+
abstract brepFromSweepAlongCurve(profile: ContourHandle, path: CurveHandle[], options?: SweepAlongCurveOptions): PluginApiReturn<BrepHandle>;
|
|
708
1162
|
/**
|
|
709
1163
|
* Revolves a planar profile about an axis to make a solid of revolution — a
|
|
710
1164
|
* full turn by default. Host API call — returns a new
|
|
711
1165
|
* {@linkcode BrepHandle}; the input contour is read-only. Holes in the
|
|
712
|
-
* profile are allowed
|
|
713
|
-
*
|
|
714
|
-
*
|
|
1166
|
+
* profile are allowed, and segments may run at any angle to the axis: an
|
|
1167
|
+
* inclined segment revolves into a cone, an arc into a sphere or torus
|
|
1168
|
+
* section. This is the general route to domes, vases, columns and rotundas.
|
|
1169
|
+
*
|
|
1170
|
+
* Two rules bind the axis to the profile. First, the axis line must lie IN
|
|
1171
|
+
* the profile's plane or run parallel to it — a revolution turns a planar
|
|
1172
|
+
* section about a line drawn in that same plane; a parallel axis offset out
|
|
1173
|
+
* of the plane is judged by its projection into the plane (the result is a
|
|
1174
|
+
* hollow ring). A skew axis is refused: move the axis into the profile's
|
|
1175
|
+
* plane. Second, within that plane the whole profile stays on ONE side of
|
|
1176
|
+
* the axis.
|
|
1177
|
+
* Vertices and whole segments may lie ON the axis — that is how a dome's
|
|
1178
|
+
* pole and a cylinder's inner edge are authored — but no part of the profile
|
|
1179
|
+
* may cross to the other side, which would sweep a self-intersecting solid.
|
|
715
1180
|
*
|
|
716
1181
|
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of
|
|
717
1182
|
* tens of MB — expect a pause of seconds).
|
|
@@ -725,19 +1190,25 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
725
1190
|
* @param angleInDegrees Optional revolution angle in degrees (0 < angle ≤ 360; default 360)
|
|
726
1191
|
* @returns The revolved solid as a new {@linkcode BrepHandle}
|
|
727
1192
|
* @throws VALIDATION if `axisDirection` is zero-length, `angleInDegrees` is
|
|
728
|
-
* not in (0, 360],
|
|
729
|
-
*
|
|
730
|
-
*
|
|
731
|
-
*
|
|
732
|
-
*
|
|
1193
|
+
* not in (0, 360], a coordinate is not finite, or the profile crosses the
|
|
1194
|
+
* axis (the message names the offending segment — keep the whole profile
|
|
1195
|
+
* on one side; points may touch the axis but not cross it)
|
|
1196
|
+
* @throws PRECONDITION_FAILED if the axis is skew to the profile's plane
|
|
1197
|
+
* (neither in it nor parallel to it; the message asks you to move the axis
|
|
1198
|
+
* into the plane of the profile)
|
|
1199
|
+
* @throws OPERATION_FAILED if the kernel cannot revolve the profile into a
|
|
1200
|
+
* valid solid
|
|
733
1201
|
*
|
|
734
1202
|
* @examplePrompt Create a dome from this section
|
|
735
1203
|
* @examplePrompt Revolve this profile 360 degrees around the vertical axis
|
|
736
1204
|
* @examplePrompt Build a rotunda by revolving this wall section
|
|
1205
|
+
* @examplePrompt Make a dome by revolving a quarter-circle about the vertical axis
|
|
1206
|
+
* @examplePrompt Turn this curved outline into a vase
|
|
737
1207
|
*
|
|
738
1208
|
* # Example
|
|
739
1209
|
* ```ts
|
|
740
|
-
* // A cylinder: revolve a 2m-wide, 3m-tall rectangle about the Y axis at
|
|
1210
|
+
* // A cylinder: revolve a 2m-wide, 3m-tall rectangle about the Y axis at
|
|
1211
|
+
* // its edge — the left edge sits ON the axis, which is legal.
|
|
741
1212
|
* const rect = await snaptrude.core.geom.create.profileFromLinePoints([
|
|
742
1213
|
* await snaptrude.core.math.vec3.new(0, 0, 0),
|
|
743
1214
|
* await snaptrude.core.math.vec3.new(2, 0, 0),
|
|
@@ -753,6 +1224,136 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
753
1224
|
* ```
|
|
754
1225
|
*/
|
|
755
1226
|
abstract brepFromRevolution(profile: ContourHandle, axisOrigin: Vec3Components, axisDirection: Vec3Components, angleInDegrees?: number): PluginApiReturn<BrepHandle>;
|
|
1227
|
+
/**
|
|
1228
|
+
* Create a solid **sphere** B-rep (boundary representation: the solid's
|
|
1229
|
+
* exact faces, edges and vertices) from a centre and radius. Host API call
|
|
1230
|
+
* — returns a {@linkcode BrepHandle}; commit it to the scene with
|
|
1231
|
+
* `design.create.massFromBrep`. The result carries an exact spherical
|
|
1232
|
+
* surface (not a faceted approximation) and a creation recipe — read the
|
|
1233
|
+
* committed mass's parameters back with `design.query.getParameters` and edit
|
|
1234
|
+
* them with `design.update.parameters`.
|
|
1235
|
+
*
|
|
1236
|
+
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
|
|
1237
|
+
* of MB — expect a pause of seconds).
|
|
1238
|
+
*
|
|
1239
|
+
* @param centre Sphere centre as plain `{x, y, z}` components (internal length units)
|
|
1240
|
+
* @param radius Sphere radius (> 0, internal length units)
|
|
1241
|
+
* @returns The new solid as a {@linkcode BrepHandle}
|
|
1242
|
+
* @throws VALIDATION if `radius` is not a positive finite number or a
|
|
1243
|
+
* coordinate is not finite
|
|
1244
|
+
*
|
|
1245
|
+
* @examplePrompt Create a sphere of radius 5 at the origin
|
|
1246
|
+
* @examplePrompt Add a 3m ball on top of the tower
|
|
1247
|
+
*
|
|
1248
|
+
* # Example
|
|
1249
|
+
* ```ts
|
|
1250
|
+
* const brep = await snaptrude.core.geom.create.brepFromSphere({ x: 0, y: 5, z: 0 }, 5)
|
|
1251
|
+
* const mass = await snaptrude.design.create.massFromBrep(brep, "Sphere")
|
|
1252
|
+
* ```
|
|
1253
|
+
*/
|
|
1254
|
+
abstract brepFromSphere(centre: Vec3Components, radius: number): PluginApiReturn<BrepHandle>;
|
|
1255
|
+
/**
|
|
1256
|
+
* Create a solid **cylinder** B-rep from its bottom-cap centre, axis
|
|
1257
|
+
* direction, radius and height. Host API call — returns a
|
|
1258
|
+
* {@linkcode BrepHandle}; commit with `design.create.massFromBrep`. The
|
|
1259
|
+
* bottom cap sits AT `base` and the solid extends `height` along `axis` —
|
|
1260
|
+
* place `base` on the floor and use axis `{x: 0, y: 1, z: 0}` for an upright
|
|
1261
|
+
* column. Carries a creation recipe (radius, height), editable through
|
|
1262
|
+
* `design.update.parameters`.
|
|
1263
|
+
*
|
|
1264
|
+
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
|
|
1265
|
+
* of MB — expect a pause of seconds).
|
|
1266
|
+
*
|
|
1267
|
+
* @param base Centre of the bottom cap as plain `{x, y, z}` components
|
|
1268
|
+
* @param axis Axis direction as plain `{x, y, z}` components (non-zero, normalised by the host)
|
|
1269
|
+
* @param radius Cylinder radius (> 0)
|
|
1270
|
+
* @param height Cylinder height along `axis` (> 0)
|
|
1271
|
+
* @returns The new solid as a {@linkcode BrepHandle}
|
|
1272
|
+
* @throws VALIDATION if `radius`/`height` are not positive finite numbers or
|
|
1273
|
+
* `axis` is zero-length
|
|
1274
|
+
*
|
|
1275
|
+
* @examplePrompt Create a cylinder 2m across and 4m tall
|
|
1276
|
+
* @examplePrompt Add a circular column here
|
|
1277
|
+
*
|
|
1278
|
+
* # Example
|
|
1279
|
+
* ```ts
|
|
1280
|
+
* const brep = await snaptrude.core.geom.create.brepFromCylinder(
|
|
1281
|
+
* { x: 0, y: 0, z: 0 },
|
|
1282
|
+
* { x: 0, y: 1, z: 0 },
|
|
1283
|
+
* 1,
|
|
1284
|
+
* 4,
|
|
1285
|
+
* )
|
|
1286
|
+
* const column = await snaptrude.design.create.massFromBrep(brep, "Column")
|
|
1287
|
+
* ```
|
|
1288
|
+
*/
|
|
1289
|
+
abstract brepFromCylinder(base: Vec3Components, axis: Vec3Components, radius: number, height: number): PluginApiReturn<BrepHandle>;
|
|
1290
|
+
/**
|
|
1291
|
+
* Create a solid **cone or frustum** B-rep: bottom-cap centre, axis, base
|
|
1292
|
+
* radius, height, and an optional top radius (default 0 — a full cone to a
|
|
1293
|
+
* point; > 0 — a frustum / tapered column). Host API call — returns a
|
|
1294
|
+
* {@linkcode BrepHandle}; commit with `design.create.massFromBrep`. Carries
|
|
1295
|
+
* a creation recipe (radii + height), editable through `design.update.parameters`.
|
|
1296
|
+
*
|
|
1297
|
+
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
|
|
1298
|
+
* of MB — expect a pause of seconds).
|
|
1299
|
+
*
|
|
1300
|
+
* @param base Centre of the bottom cap as plain `{x, y, z}` components
|
|
1301
|
+
* @param axis Axis direction as plain `{x, y, z}` components (non-zero, normalised by the host)
|
|
1302
|
+
* @param baseRadius Radius at the base (> 0)
|
|
1303
|
+
* @param height Height along `axis` (> 0)
|
|
1304
|
+
* @param topRadius Optional radius at the top (≥ 0, ≠ `baseRadius`; default 0 = apex)
|
|
1305
|
+
* @returns The new solid as a {@linkcode BrepHandle}
|
|
1306
|
+
* @throws VALIDATION if radii/height are invalid, `topRadius === baseRadius`
|
|
1307
|
+
* (that is a cylinder — use {@linkcode PluginGeomCreateApi.brepFromCylinder}),
|
|
1308
|
+
* or `axis` is zero-length
|
|
1309
|
+
*
|
|
1310
|
+
* @examplePrompt Create a cone roof 4m wide and 3m tall
|
|
1311
|
+
* @examplePrompt Make a tapered column narrowing from 1m to 0.6m
|
|
1312
|
+
*
|
|
1313
|
+
* # Example
|
|
1314
|
+
* ```ts
|
|
1315
|
+
* const roof = await snaptrude.core.geom.create.brepFromCone(
|
|
1316
|
+
* { x: 0, y: 9, z: 0 },
|
|
1317
|
+
* { x: 0, y: 1, z: 0 },
|
|
1318
|
+
* 2,
|
|
1319
|
+
* 3,
|
|
1320
|
+
* )
|
|
1321
|
+
* ```
|
|
1322
|
+
*/
|
|
1323
|
+
abstract brepFromCone(base: Vec3Components, axis: Vec3Components, baseRadius: number, height: number, topRadius?: number): PluginApiReturn<BrepHandle>;
|
|
1324
|
+
/**
|
|
1325
|
+
* Create a solid **torus** (ring / donut) B-rep from its centre, plane
|
|
1326
|
+
* normal, ring radius and tube radius. Host API call — returns a
|
|
1327
|
+
* {@linkcode BrepHandle}; commit with `design.create.massFromBrep`.
|
|
1328
|
+
* `majorRadius` is centre-to-tube-centre; `minorRadius` is the tube's own
|
|
1329
|
+
* radius and must be strictly smaller. Carries a creation recipe, editable
|
|
1330
|
+
* through `design.update.parameters`.
|
|
1331
|
+
*
|
|
1332
|
+
* Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
|
|
1333
|
+
* of MB — expect a pause of seconds).
|
|
1334
|
+
*
|
|
1335
|
+
* @param centre Torus centre as plain `{x, y, z}` components
|
|
1336
|
+
* @param axis Plane normal of the ring as plain `{x, y, z}` components (non-zero)
|
|
1337
|
+
* @param majorRadius Ring radius, centre to tube centre (> 0)
|
|
1338
|
+
* @param minorRadius Tube radius (> 0 and < `majorRadius` — a self-intersecting torus is rejected)
|
|
1339
|
+
* @returns The new solid as a {@linkcode BrepHandle}
|
|
1340
|
+
* @throws VALIDATION if a radius is invalid, `minorRadius >= majorRadius`,
|
|
1341
|
+
* or `axis` is zero-length
|
|
1342
|
+
*
|
|
1343
|
+
* @examplePrompt Create a donut-shaped ring 10m across with a 1m tube
|
|
1344
|
+
* @examplePrompt Add a torus canopy around the tower
|
|
1345
|
+
*
|
|
1346
|
+
* # Example
|
|
1347
|
+
* ```ts
|
|
1348
|
+
* const ring = await snaptrude.core.geom.create.brepFromTorus(
|
|
1349
|
+
* { x: 0, y: 6, z: 0 },
|
|
1350
|
+
* { x: 0, y: 1, z: 0 },
|
|
1351
|
+
* 5,
|
|
1352
|
+
* 1,
|
|
1353
|
+
* )
|
|
1354
|
+
* ```
|
|
1355
|
+
*/
|
|
1356
|
+
abstract brepFromTorus(centre: Vec3Components, axis: Vec3Components, majorRadius: number, minorRadius: number): PluginApiReturn<BrepHandle>;
|
|
756
1357
|
}
|
|
757
1358
|
/**
|
|
758
1359
|
* Arguments for {@linkcode PluginGeomCreateApi.line}.
|
|
@@ -799,6 +1400,32 @@ export declare const PluginGeomCreateCircleArgs: z.ZodObject<{
|
|
|
799
1400
|
radius: z.ZodNumber;
|
|
800
1401
|
}, z.core.$strip>;
|
|
801
1402
|
export type PluginGeomCreateCircleArgs = z.infer<typeof PluginGeomCreateCircleArgs>;
|
|
1403
|
+
/**
|
|
1404
|
+
* Arguments for {@linkcode PluginGeomCreateApi.splineFromPoints}.
|
|
1405
|
+
*
|
|
1406
|
+
* | Property | Type | Description |
|
|
1407
|
+
* |---|---|---|
|
|
1408
|
+
* | `points` | {@linkcode Vec3Handle}`[]` | 3..256 ordered through-points of the curve |
|
|
1409
|
+
*/
|
|
1410
|
+
export declare const PluginGeomCreateSplineFromPointsArgs: z.ZodObject<{
|
|
1411
|
+
points: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
|
|
1412
|
+
}, z.core.$strip>;
|
|
1413
|
+
export type PluginGeomCreateSplineFromPointsArgs = z.infer<typeof PluginGeomCreateSplineFromPointsArgs>;
|
|
1414
|
+
/**
|
|
1415
|
+
* Arguments for {@linkcode PluginGeomCreateApi.splineFromControlPoints}.
|
|
1416
|
+
*
|
|
1417
|
+
* | Property | Type | Description |
|
|
1418
|
+
* |---|---|---|
|
|
1419
|
+
* | `controlPoints` | {@linkcode Vec3Handle}`[]` | 3..512 control points of the curve, in order |
|
|
1420
|
+
* | `options` | `object`? | `degree`: 2 or 3 (default `min(3, controlPoints.length - 1)`) |
|
|
1421
|
+
*/
|
|
1422
|
+
export declare const PluginGeomCreateSplineFromControlPointsArgs: z.ZodObject<{
|
|
1423
|
+
controlPoints: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
|
|
1424
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
1425
|
+
degree: z.ZodOptional<z.ZodNumber>;
|
|
1426
|
+
}, z.core.$strip>>;
|
|
1427
|
+
}, z.core.$strip>;
|
|
1428
|
+
export type PluginGeomCreateSplineFromControlPointsArgs = z.infer<typeof PluginGeomCreateSplineFromControlPointsArgs>;
|
|
802
1429
|
/**
|
|
803
1430
|
* Arguments for {@linkcode PluginGeomCreateApi.profileFromLinePoints}.
|
|
804
1431
|
*
|
|
@@ -818,9 +1445,20 @@ export type PluginGeomCreateProfileFromLinePointsArgs = z.infer<typeof PluginGeo
|
|
|
818
1445
|
* | `curves` | {@linkcode CurveHandle}`[]` | Ordered curve handles forming a closed loop |
|
|
819
1446
|
*/
|
|
820
1447
|
export declare const PluginGeomCreateProfileFromCurvesArgs: z.ZodObject<{
|
|
821
|
-
curves: z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>>;
|
|
1448
|
+
curves: z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"arc">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>>;
|
|
822
1449
|
}, z.core.$strip>;
|
|
823
1450
|
export type PluginGeomCreateProfileFromCurvesArgs = z.infer<typeof PluginGeomCreateProfileFromCurvesArgs>;
|
|
1451
|
+
/**
|
|
1452
|
+
* Arguments for {@linkcode PluginGeomCreateApi.profileFromSplinePoints}.
|
|
1453
|
+
*
|
|
1454
|
+
* | Property | Type | Description |
|
|
1455
|
+
* |---|---|---|
|
|
1456
|
+
* | `points` | {@linkcode Vec3Handle}`[]` | 3..256 ordered through-points of the closed loop (first point NOT repeated) |
|
|
1457
|
+
*/
|
|
1458
|
+
export declare const PluginGeomCreateProfileFromSplinePointsArgs: z.ZodObject<{
|
|
1459
|
+
points: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
|
|
1460
|
+
}, z.core.$strip>;
|
|
1461
|
+
export type PluginGeomCreateProfileFromSplinePointsArgs = z.infer<typeof PluginGeomCreateProfileFromSplinePointsArgs>;
|
|
824
1462
|
/**
|
|
825
1463
|
* Arguments for {@linkcode PluginGeomCreateApi.contourFromProfile}.
|
|
826
1464
|
*
|
|
@@ -868,6 +1506,7 @@ export type PluginGeomCreateBrepFromFacesArgs = z.infer<typeof PluginGeomCreateB
|
|
|
868
1506
|
* | `contour` | {@linkcode ContourHandle} | The cross-section to extrude |
|
|
869
1507
|
* | `direction` | {@linkcode Vec3Components} | Extrusion direction (non-zero, finite components) |
|
|
870
1508
|
* | `amount` | `number` | Extrusion distance (finite, non-zero) |
|
|
1509
|
+
* | `options` | `object`? | Optional twist and taper: `twistInDegrees` (an angle, finite), `topScale` (a ratio, finite and positive) and `levels` (a count, 2..64) |
|
|
871
1510
|
*/
|
|
872
1511
|
export declare const PluginGeomCreateBrepFromExtrusionArgs: z.ZodObject<{
|
|
873
1512
|
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
|
|
@@ -877,6 +1516,11 @@ export declare const PluginGeomCreateBrepFromExtrusionArgs: z.ZodObject<{
|
|
|
877
1516
|
z: z.ZodNumber;
|
|
878
1517
|
}, z.core.$strip>;
|
|
879
1518
|
amount: z.ZodNumber;
|
|
1519
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
1520
|
+
twistInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
1521
|
+
topScale: z.ZodOptional<z.ZodNumber>;
|
|
1522
|
+
levels: z.ZodOptional<z.ZodNumber>;
|
|
1523
|
+
}, z.core.$strip>>;
|
|
880
1524
|
}, z.core.$strip>;
|
|
881
1525
|
export type PluginGeomCreateBrepFromExtrusionArgs = z.infer<typeof PluginGeomCreateBrepFromExtrusionArgs>;
|
|
882
1526
|
/**
|
|
@@ -886,8 +1530,8 @@ export type PluginGeomCreateBrepFromExtrusionArgs = z.infer<typeof PluginGeomCre
|
|
|
886
1530
|
* |---|---|---|
|
|
887
1531
|
* | `bottomContour` | {@linkcode ContourHandle} | The bottom cross-section |
|
|
888
1532
|
* | `topContour` | {@linkcode ContourHandle} | The top cross-section |
|
|
889
|
-
* | `intermediateContours` | {@linkcode ContourHandle}`[]`? | Optional in-between cross-sections, ordered bottom to top |
|
|
890
|
-
* | `options` | `object`? | Optional behavior switches: `compatibility` (`"strict"` throws on mismatched edge counts instead of auto-matching; default `"auto"`)
|
|
1533
|
+
* | `intermediateContours` | {@linkcode ContourHandle}`[]`? | Optional in-between cross-sections, ordered bottom to top (any count; more than 32 sections in all builds but carries no parameter record) |
|
|
1534
|
+
* | `options` | `object`? | Optional behavior switches: `compatibility` (`"strict"` throws on mismatched edge counts instead of auto-matching; default `"auto"`), `seamAlignment` (`"authored"` keeps the authored correspondence instead of searching seam rotations; default `"auto"`) and `smoothing` (`"smooth"` lofts every section in one pass, so the sides curve through the intermediates; default `"ruled"`) |
|
|
891
1535
|
*/
|
|
892
1536
|
export declare const PluginGeomCreateBrepFromLoftArgs: z.ZodObject<{
|
|
893
1537
|
bottomContour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
|
|
@@ -902,6 +1546,10 @@ export declare const PluginGeomCreateBrepFromLoftArgs: z.ZodObject<{
|
|
|
902
1546
|
auto: "auto";
|
|
903
1547
|
authored: "authored";
|
|
904
1548
|
}>>;
|
|
1549
|
+
smoothing: z.ZodOptional<z.ZodEnum<{
|
|
1550
|
+
ruled: "ruled";
|
|
1551
|
+
smooth: "smooth";
|
|
1552
|
+
}>>;
|
|
905
1553
|
}, z.core.$strip>>;
|
|
906
1554
|
}, z.core.$strip>;
|
|
907
1555
|
export type PluginGeomCreateBrepFromLoftArgs = z.infer<typeof PluginGeomCreateBrepFromLoftArgs>;
|
|
@@ -944,15 +1592,62 @@ export type PluginGeomCreateBrepBooleanArgs = z.infer<typeof PluginGeomCreateBre
|
|
|
944
1592
|
* | Property | Type | Description |
|
|
945
1593
|
* |---|---|---|
|
|
946
1594
|
* | `brep` | {@linkcode BrepHandle} | The solid whose edges to round |
|
|
947
|
-
* | `edges` | {@linkcode EdgeHandle}`[]` | The
|
|
948
|
-
* | `radius` | `number` | Fillet radius (positive, finite) |
|
|
1595
|
+
* | `edges` | {@linkcode EdgeHandle}`[]` | The edges to fillet (one or more; more than 64 builds but carries no parameter record) |
|
|
1596
|
+
* | `radius` | `number` | Fillet radius (positive, finite); the start radius with `endRadius`, unused with `radii` |
|
|
1597
|
+
* | `options` | `object`? | Optional variable blend: `endRadius` (positive, finite) or `radii` (2..32 rows of `{ position, radius }`, `position` a ratio 0..1 strictly increasing). Mutually exclusive, and either one takes exactly ONE edge |
|
|
949
1598
|
*/
|
|
950
1599
|
export declare const PluginGeomCreateBrepFromFilletArgs: z.ZodObject<{
|
|
951
1600
|
brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
|
|
952
1601
|
edges: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"edge">, string>>>;
|
|
953
1602
|
radius: z.ZodNumber;
|
|
1603
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
1604
|
+
endRadius: z.ZodOptional<z.ZodNumber>;
|
|
1605
|
+
radii: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1606
|
+
position: z.ZodNumber;
|
|
1607
|
+
radius: z.ZodNumber;
|
|
1608
|
+
}, z.core.$strip>>>;
|
|
1609
|
+
}, z.core.$strip>>;
|
|
954
1610
|
}, z.core.$strip>;
|
|
955
1611
|
export type PluginGeomCreateBrepFromFilletArgs = z.infer<typeof PluginGeomCreateBrepFromFilletArgs>;
|
|
1612
|
+
/** An edge with the solid it belongs to. See {@linkcode OwnedEdge}. */
|
|
1613
|
+
export declare const OwnedEdge: z.ZodObject<{
|
|
1614
|
+
edge: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"edge">, string>>;
|
|
1615
|
+
brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
|
|
1616
|
+
face: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>>;
|
|
1617
|
+
}, z.core.$strip>;
|
|
1618
|
+
/**
|
|
1619
|
+
* Arguments for {@linkcode PluginGeomCreateApi.brepFromPatch}.
|
|
1620
|
+
*
|
|
1621
|
+
* | Property | Type | Description |
|
|
1622
|
+
* |---|---|---|
|
|
1623
|
+
* | `boundary` | ({@linkcode CurveHandle} \| {@linkcode OwnedEdge})`[]` | 3..16 items forming one closed loop |
|
|
1624
|
+
* | `thickness` | `number` | Solid thickness in internal length units (positive, finite) |
|
|
1625
|
+
* | `options` | `object`? | `interiorPoints` (≤ 64 plain `{x, y, z}` the surface is pulled through), `continuity` (`"position"` default, or `"tangent"` — every item must then be an edge item naming its `face`), `side` (`"below"` default, or `"above"`) |
|
|
1626
|
+
*/
|
|
1627
|
+
export declare const PluginGeomCreateBrepFromPatchArgs: z.ZodObject<{
|
|
1628
|
+
boundary: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"arc">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>, z.ZodObject<{
|
|
1629
|
+
edge: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"edge">, string>>;
|
|
1630
|
+
brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
|
|
1631
|
+
face: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>>;
|
|
1632
|
+
}, z.core.$strip>]>>;
|
|
1633
|
+
thickness: z.ZodNumber;
|
|
1634
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
1635
|
+
interiorPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1636
|
+
x: z.ZodNumber;
|
|
1637
|
+
y: z.ZodNumber;
|
|
1638
|
+
z: z.ZodNumber;
|
|
1639
|
+
}, z.core.$strip>>>;
|
|
1640
|
+
continuity: z.ZodOptional<z.ZodEnum<{
|
|
1641
|
+
position: "position";
|
|
1642
|
+
tangent: "tangent";
|
|
1643
|
+
}>>;
|
|
1644
|
+
side: z.ZodOptional<z.ZodEnum<{
|
|
1645
|
+
below: "below";
|
|
1646
|
+
above: "above";
|
|
1647
|
+
}>>;
|
|
1648
|
+
}, z.core.$strip>>;
|
|
1649
|
+
}, z.core.$strip>;
|
|
1650
|
+
export type PluginGeomCreateBrepFromPatchArgs = z.infer<typeof PluginGeomCreateBrepFromPatchArgs>;
|
|
956
1651
|
/**
|
|
957
1652
|
* Arguments for {@linkcode PluginGeomCreateApi.brepFromOffset}.
|
|
958
1653
|
*
|
|
@@ -972,7 +1667,7 @@ export type PluginGeomCreateBrepFromOffsetArgs = z.infer<typeof PluginGeomCreate
|
|
|
972
1667
|
* | Property | Type | Description |
|
|
973
1668
|
* |---|---|---|
|
|
974
1669
|
* | `brep` | {@linkcode BrepHandle} | The solid to hollow |
|
|
975
|
-
* | `openFaces` | {@linkcode FaceHandle}`[]` | The faces to remove as openings (
|
|
1670
|
+
* | `openFaces` | {@linkcode FaceHandle}`[]` | The faces to remove as openings (one or more; more than 32 builds but carries no parameter record) |
|
|
976
1671
|
* | `thickness` | `number` | Wall thickness (positive, finite) |
|
|
977
1672
|
*/
|
|
978
1673
|
export declare const PluginGeomCreateBrepFromShellArgs: z.ZodObject<{
|
|
@@ -1004,13 +1699,43 @@ export declare const PluginGeomCreateBrepsFromSplitArgs: z.ZodObject<{
|
|
|
1004
1699
|
}, z.core.$strip>;
|
|
1005
1700
|
}, z.core.$strip>;
|
|
1006
1701
|
export type PluginGeomCreateBrepsFromSplitArgs = z.infer<typeof PluginGeomCreateBrepsFromSplitArgs>;
|
|
1702
|
+
/**
|
|
1703
|
+
* Arguments for {@linkcode PluginGeomCreateApi.brepsFromSplitByFace}.
|
|
1704
|
+
*
|
|
1705
|
+
* | Property | Type | Description |
|
|
1706
|
+
* |---|---|---|
|
|
1707
|
+
* | `brep` | {@linkcode BrepHandle} | The solid to cut |
|
|
1708
|
+
* | `toolFace` | {@linkcode FaceHandle} | The cutting face (read-only) |
|
|
1709
|
+
* | `toolBrep` | {@linkcode BrepHandle} | The solid `toolFace` belongs to (owner last) |
|
|
1710
|
+
*/
|
|
1711
|
+
export declare const PluginGeomCreateBrepsFromSplitByFaceArgs: z.ZodObject<{
|
|
1712
|
+
brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
|
|
1713
|
+
toolFace: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>;
|
|
1714
|
+
toolBrep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
|
|
1715
|
+
}, z.core.$strip>;
|
|
1716
|
+
export type PluginGeomCreateBrepsFromSplitByFaceArgs = z.infer<typeof PluginGeomCreateBrepsFromSplitByFaceArgs>;
|
|
1717
|
+
/**
|
|
1718
|
+
* Arguments for {@linkcode PluginGeomCreateApi.curvesFromProjection}.
|
|
1719
|
+
*
|
|
1720
|
+
* | Property | Type | Description |
|
|
1721
|
+
* |---|---|---|
|
|
1722
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to project |
|
|
1723
|
+
* | `face` | {@linkcode FaceHandle} | The face to project onto |
|
|
1724
|
+
* | `faceBrep` | {@linkcode BrepHandle} | The solid `face` belongs to (owner last) |
|
|
1725
|
+
*/
|
|
1726
|
+
export declare const PluginGeomCreateCurvesFromProjectionArgs: z.ZodObject<{
|
|
1727
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"arc">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>;
|
|
1728
|
+
face: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>;
|
|
1729
|
+
faceBrep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
|
|
1730
|
+
}, z.core.$strip>;
|
|
1731
|
+
export type PluginGeomCreateCurvesFromProjectionArgs = z.infer<typeof PluginGeomCreateCurvesFromProjectionArgs>;
|
|
1007
1732
|
/**
|
|
1008
1733
|
* Arguments for {@linkcode PluginGeomCreateApi.brepFromChamfer}.
|
|
1009
1734
|
*
|
|
1010
1735
|
* | Property | Type | Description |
|
|
1011
1736
|
* |---|---|---|
|
|
1012
1737
|
* | `brep` | {@linkcode BrepHandle} | The solid whose edges to bevel |
|
|
1013
|
-
* | `edges` | {@linkcode EdgeHandle}`[]` | The
|
|
1738
|
+
* | `edges` | {@linkcode EdgeHandle}`[]` | The edges to chamfer (one or more; more than 64 builds but carries no parameter record) |
|
|
1014
1739
|
* | `distance` | `number` | Chamfer distance from the edge on each adjacent face (positive, finite) |
|
|
1015
1740
|
*/
|
|
1016
1741
|
export declare const PluginGeomCreateBrepFromChamferArgs: z.ZodObject<{
|
|
@@ -1025,8 +1750,8 @@ export type PluginGeomCreateBrepFromChamferArgs = z.infer<typeof PluginGeomCreat
|
|
|
1025
1750
|
* | Property | Type | Description |
|
|
1026
1751
|
* |---|---|---|
|
|
1027
1752
|
* | `profile` | {@linkcode ContourHandle} | The cross-section to sweep (hole-free) |
|
|
1028
|
-
* | `path` | {@linkcode Vec3Components}`[]` | The polyline path (
|
|
1029
|
-
* | `options` | `object`? | Optional scale law: `startScale`/`endScale` (linear taper by arc length) or per-point `scales` (mutually exclusive; factors finite, 1e-3..1e3; `scales.length` must equal `path.length`). Optional corner `transition`: `"miter"` (default) or `{ bevel }` (chamfered corners; finite, 1e-3..1e3) |
|
|
1753
|
+
* | `path` | {@linkcode Vec3Components}`[]` | The polyline path (2 or more points, finite components — more than 512 builds but carries no parameter record; repeating the first point as the last closes it into a ring — closed paths must be flat and straight-segmented and take a straight-edged profile) |
|
|
1754
|
+
* | `options` | `object`? | Optional scale law: `startScale`/`endScale` (linear taper by arc length) or per-point `scales` (mutually exclusive; factors finite, 1e-3..1e3; `scales.length` must equal `path.length`). Optional corner `transition`: `"miter"` (default), `"round"` (arc-carried corners) or `{ bevel }` (chamfered corners; finite, 1e-3..1e3) |
|
|
1030
1755
|
*/
|
|
1031
1756
|
export declare const PluginGeomCreateBrepFromSweepArgs: z.ZodObject<{
|
|
1032
1757
|
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
|
|
@@ -1039,20 +1764,42 @@ export declare const PluginGeomCreateBrepFromSweepArgs: z.ZodObject<{
|
|
|
1039
1764
|
startScale: z.ZodOptional<z.ZodNumber>;
|
|
1040
1765
|
endScale: z.ZodOptional<z.ZodNumber>;
|
|
1041
1766
|
scales: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1042
|
-
transition: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"miter">, z.ZodObject<{
|
|
1767
|
+
transition: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"miter">, z.ZodLiteral<"round">, z.ZodObject<{
|
|
1043
1768
|
bevel: z.ZodNumber;
|
|
1044
1769
|
}, z.core.$strip>]>>;
|
|
1045
1770
|
}, z.core.$strip>>;
|
|
1046
1771
|
}, z.core.$strip>;
|
|
1047
1772
|
export type PluginGeomCreateBrepFromSweepArgs = z.infer<typeof PluginGeomCreateBrepFromSweepArgs>;
|
|
1773
|
+
/**
|
|
1774
|
+
* Arguments for {@linkcode PluginGeomCreateApi.brepFromSweepAlongCurve}.
|
|
1775
|
+
*
|
|
1776
|
+
* | Property | Type | Description |
|
|
1777
|
+
* |---|---|---|
|
|
1778
|
+
* | `profile` | {@linkcode ContourHandle} | The cross-section to sweep (hole-free) |
|
|
1779
|
+
* | `path` | {@linkcode CurveHandle}`[]` | 1..64 curves, ordered, meeting end to end |
|
|
1780
|
+
* | `options` | `object`? | `orientation` — `"upright"` (default), `"frenet"` or `"fixed"`; `rail` — a second guide {@linkcode CurveHandle} |
|
|
1781
|
+
*/
|
|
1782
|
+
export declare const PluginGeomCreateBrepFromSweepAlongCurveArgs: z.ZodObject<{
|
|
1783
|
+
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
|
|
1784
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"arc">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>>;
|
|
1785
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
1786
|
+
orientation: z.ZodOptional<z.ZodEnum<{
|
|
1787
|
+
fixed: "fixed";
|
|
1788
|
+
frenet: "frenet";
|
|
1789
|
+
upright: "upright";
|
|
1790
|
+
}>>;
|
|
1791
|
+
rail: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"arc">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>>;
|
|
1792
|
+
}, z.core.$strip>>;
|
|
1793
|
+
}, z.core.$strip>;
|
|
1794
|
+
export type PluginGeomCreateBrepFromSweepAlongCurveArgs = z.infer<typeof PluginGeomCreateBrepFromSweepAlongCurveArgs>;
|
|
1048
1795
|
/**
|
|
1049
1796
|
* Arguments for {@linkcode PluginGeomCreateApi.brepFromRevolution}.
|
|
1050
1797
|
*
|
|
1051
1798
|
* | Property | Type | Description |
|
|
1052
1799
|
* |---|---|---|
|
|
1053
1800
|
* | `profile` | {@linkcode ContourHandle} | The cross-section to revolve (holes allowed) |
|
|
1054
|
-
* | `axisOrigin` | {@linkcode Vec3Components} | A point on the revolution axis (finite components) |
|
|
1055
|
-
* | `axisDirection` | {@linkcode Vec3Components} | The axis direction (non-zero, finite components) |
|
|
1801
|
+
* | `axisOrigin` | {@linkcode Vec3Components} | A point on the revolution axis (finite components; the axis must lie in the plane of the profile) |
|
|
1802
|
+
* | `axisDirection` | {@linkcode Vec3Components} | The axis direction (non-zero, finite components; the axis must lie in the plane of the profile) |
|
|
1056
1803
|
* | `angleInDegrees` | `number`? | Revolution angle in degrees (0 < angle ≤ 360; default 360) |
|
|
1057
1804
|
*/
|
|
1058
1805
|
export declare const PluginGeomCreateBrepFromRevolutionArgs: z.ZodObject<{
|
|
@@ -1070,4 +1817,98 @@ export declare const PluginGeomCreateBrepFromRevolutionArgs: z.ZodObject<{
|
|
|
1070
1817
|
angleInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
1071
1818
|
}, z.core.$strip>;
|
|
1072
1819
|
export type PluginGeomCreateBrepFromRevolutionArgs = z.infer<typeof PluginGeomCreateBrepFromRevolutionArgs>;
|
|
1820
|
+
/**
|
|
1821
|
+
* Arguments for {@linkcode PluginGeomCreateApi.brepFromSphere}.
|
|
1822
|
+
*
|
|
1823
|
+
* | Property | Type | Description |
|
|
1824
|
+
* |---|---|---|
|
|
1825
|
+
* | `centre` | {@linkcode Vec3Components} | Sphere centre (finite components) |
|
|
1826
|
+
* | `radius` | `number` | Sphere radius (finite; positivity is checked host-side so the error names the parameter) |
|
|
1827
|
+
*/
|
|
1828
|
+
export declare const PluginGeomCreateBrepFromSphereArgs: z.ZodObject<{
|
|
1829
|
+
centre: z.ZodObject<{
|
|
1830
|
+
x: z.ZodNumber;
|
|
1831
|
+
y: z.ZodNumber;
|
|
1832
|
+
z: z.ZodNumber;
|
|
1833
|
+
}, z.core.$strip>;
|
|
1834
|
+
radius: z.ZodNumber;
|
|
1835
|
+
}, z.core.$strip>;
|
|
1836
|
+
export type PluginGeomCreateBrepFromSphereArgs = z.infer<typeof PluginGeomCreateBrepFromSphereArgs>;
|
|
1837
|
+
/**
|
|
1838
|
+
* Arguments for {@linkcode PluginGeomCreateApi.brepFromCylinder}.
|
|
1839
|
+
*
|
|
1840
|
+
* | Property | Type | Description |
|
|
1841
|
+
* |---|---|---|
|
|
1842
|
+
* | `base` | {@linkcode Vec3Components} | Centre of the bottom cap (finite components) |
|
|
1843
|
+
* | `axis` | {@linkcode Vec3Components} | Axis direction (non-zero, finite components) |
|
|
1844
|
+
* | `radius` | `number` | Cylinder radius (finite, positive) |
|
|
1845
|
+
* | `height` | `number` | Height along `axis` (finite, positive) |
|
|
1846
|
+
*/
|
|
1847
|
+
export declare const PluginGeomCreateBrepFromCylinderArgs: z.ZodObject<{
|
|
1848
|
+
base: z.ZodObject<{
|
|
1849
|
+
x: z.ZodNumber;
|
|
1850
|
+
y: z.ZodNumber;
|
|
1851
|
+
z: z.ZodNumber;
|
|
1852
|
+
}, z.core.$strip>;
|
|
1853
|
+
axis: z.ZodObject<{
|
|
1854
|
+
x: z.ZodNumber;
|
|
1855
|
+
y: z.ZodNumber;
|
|
1856
|
+
z: z.ZodNumber;
|
|
1857
|
+
}, z.core.$strip>;
|
|
1858
|
+
radius: z.ZodNumber;
|
|
1859
|
+
height: z.ZodNumber;
|
|
1860
|
+
}, z.core.$strip>;
|
|
1861
|
+
export type PluginGeomCreateBrepFromCylinderArgs = z.infer<typeof PluginGeomCreateBrepFromCylinderArgs>;
|
|
1862
|
+
/**
|
|
1863
|
+
* Arguments for {@linkcode PluginGeomCreateApi.brepFromCone}.
|
|
1864
|
+
*
|
|
1865
|
+
* | Property | Type | Description |
|
|
1866
|
+
* |---|---|---|
|
|
1867
|
+
* | `base` | {@linkcode Vec3Components} | Centre of the bottom cap (finite components) |
|
|
1868
|
+
* | `axis` | {@linkcode Vec3Components} | Axis direction (non-zero, finite components) |
|
|
1869
|
+
* | `baseRadius` | `number` | Radius at the base (finite, positive) |
|
|
1870
|
+
* | `height` | `number` | Height along `axis` (finite, positive) |
|
|
1871
|
+
* | `topRadius` | `number`? | Radius at the top (finite, ≥ 0, ≠ `baseRadius`; default 0 = apex) |
|
|
1872
|
+
*/
|
|
1873
|
+
export declare const PluginGeomCreateBrepFromConeArgs: z.ZodObject<{
|
|
1874
|
+
base: z.ZodObject<{
|
|
1875
|
+
x: z.ZodNumber;
|
|
1876
|
+
y: z.ZodNumber;
|
|
1877
|
+
z: z.ZodNumber;
|
|
1878
|
+
}, z.core.$strip>;
|
|
1879
|
+
axis: z.ZodObject<{
|
|
1880
|
+
x: z.ZodNumber;
|
|
1881
|
+
y: z.ZodNumber;
|
|
1882
|
+
z: z.ZodNumber;
|
|
1883
|
+
}, z.core.$strip>;
|
|
1884
|
+
baseRadius: z.ZodNumber;
|
|
1885
|
+
height: z.ZodNumber;
|
|
1886
|
+
topRadius: z.ZodOptional<z.ZodNumber>;
|
|
1887
|
+
}, z.core.$strip>;
|
|
1888
|
+
export type PluginGeomCreateBrepFromConeArgs = z.infer<typeof PluginGeomCreateBrepFromConeArgs>;
|
|
1889
|
+
/**
|
|
1890
|
+
* Arguments for {@linkcode PluginGeomCreateApi.brepFromTorus}.
|
|
1891
|
+
*
|
|
1892
|
+
* | Property | Type | Description |
|
|
1893
|
+
* |---|---|---|
|
|
1894
|
+
* | `centre` | {@linkcode Vec3Components} | Torus centre (finite components) |
|
|
1895
|
+
* | `axis` | {@linkcode Vec3Components} | Plane normal of the ring (non-zero, finite components) |
|
|
1896
|
+
* | `majorRadius` | `number` | Ring radius, centre to tube centre (finite, positive) |
|
|
1897
|
+
* | `minorRadius` | `number` | Tube radius (finite, positive, strictly less than `majorRadius`) |
|
|
1898
|
+
*/
|
|
1899
|
+
export declare const PluginGeomCreateBrepFromTorusArgs: z.ZodObject<{
|
|
1900
|
+
centre: z.ZodObject<{
|
|
1901
|
+
x: z.ZodNumber;
|
|
1902
|
+
y: z.ZodNumber;
|
|
1903
|
+
z: z.ZodNumber;
|
|
1904
|
+
}, z.core.$strip>;
|
|
1905
|
+
axis: z.ZodObject<{
|
|
1906
|
+
x: z.ZodNumber;
|
|
1907
|
+
y: z.ZodNumber;
|
|
1908
|
+
z: z.ZodNumber;
|
|
1909
|
+
}, z.core.$strip>;
|
|
1910
|
+
majorRadius: z.ZodNumber;
|
|
1911
|
+
minorRadius: z.ZodNumber;
|
|
1912
|
+
}, z.core.$strip>;
|
|
1913
|
+
export type PluginGeomCreateBrepFromTorusArgs = z.infer<typeof PluginGeomCreateBrepFromTorusArgs>;
|
|
1073
1914
|
//# sourceMappingURL=index.d.ts.map
|