brepjs 8.0.0 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d/blueprints/booleanHelpers.d.ts +32 -0
- package/dist/2d/blueprints/booleanHelpers.d.ts.map +1 -0
- package/dist/2d/blueprints/booleanOperations.d.ts +5 -3
- package/dist/2d/blueprints/booleanOperations.d.ts.map +1 -1
- package/dist/2d/blueprints/intersectionSegments.d.ts +12 -0
- package/dist/2d/blueprints/intersectionSegments.d.ts.map +1 -0
- package/dist/2d/blueprints/segmentAssembly.d.ts +31 -0
- package/dist/2d/blueprints/segmentAssembly.d.ts.map +1 -0
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +8 -8
- package/dist/{Blueprint-D3JfGJTz.js → Blueprint-B9fhnpFp.js} +117 -30
- package/dist/{Blueprint-CVctc41Z.cjs → Blueprint-VGbo3izk.cjs} +111 -24
- package/dist/{boolean2D-BdZATaHs.cjs → boolean2D-B1XrGVgx.cjs} +426 -345
- package/dist/{boolean2D-hOw5Qay5.js → boolean2D-_WiqPxWZ.js} +391 -310
- package/dist/{booleanFns-BBSVKhL2.cjs → booleanFns-BxW-N3rP.cjs} +12 -16
- package/dist/{booleanFns-CqehfzcK.js → booleanFns-CkccZ7UL.js} +14 -18
- package/dist/brepjs.cjs +133 -62
- package/dist/brepjs.js +290 -217
- package/dist/{cast-DQaUibmm.js → cast-C4Ff_1Qe.js} +2 -2
- package/dist/{cast-DkB0GKmQ.cjs → cast-DIiyxDLo.cjs} +2 -2
- package/dist/core/disposal.d.ts +1 -1
- package/dist/core/disposal.d.ts.map +1 -1
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/cornerFinder-BndBNtJE.cjs +58 -0
- package/dist/cornerFinder-DzGzfiqb.js +59 -0
- package/dist/curveBuilders-BUoFO1UG.cjs +196 -0
- package/dist/curveBuilders-CBlIWlbU.js +197 -0
- package/dist/{curveFns-BilyYL_s.cjs → curveFns-BrJDkaWi.cjs} +31 -44
- package/dist/{curveFns-CdVE4da7.js → curveFns-BshHA9Ys.js} +31 -44
- package/dist/{drawFns-921SkhDL.js → drawFns-Btmlh_Oz.js} +13 -14
- package/dist/{drawFns-CUyx50gi.cjs → drawFns-D2eDcf4k.cjs} +58 -59
- package/dist/{faceFns-DHu-2JpA.js → faceFns-DDzCECn3.js} +3 -3
- package/dist/{faceFns-BwK7FP7N.cjs → faceFns-NDRFeekj.cjs} +3 -3
- package/dist/helpers-Ck8GJ58k.cjs +203 -0
- package/dist/helpers-jku2V1DY.js +204 -0
- package/dist/io.cjs +4 -4
- package/dist/io.js +4 -4
- package/dist/kernel/occtAdapter.d.ts +1 -0
- package/dist/kernel/occtAdapter.d.ts.map +1 -1
- package/dist/kernel/sweepOps.d.ts +8 -0
- package/dist/kernel/sweepOps.d.ts.map +1 -1
- package/dist/kernel/types.d.ts +1 -0
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/loft-Bk9EM0gZ.js +373 -0
- package/dist/loft-DJXwxV_L.cjs +372 -0
- package/dist/{measurement-C5JGCuUP.js → measurement-DlXaTzKc.js} +3 -3
- package/dist/{measurement-fxm_pW7x.cjs → measurement-LcGh4wV0.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-AqAjTTVl.js → meshFns-Djzdn-CS.js} +1 -1
- package/dist/{meshFns-BhrZGi6w.cjs → meshFns-c8lDKfYy.cjs} +1 -1
- package/dist/{occtBoundary-du8_ex-p.cjs → occtBoundary-6kQSl3cF.cjs} +21 -0
- package/dist/{occtBoundary-CwegMzqc.js → occtBoundary-CqXvDhZY.js} +26 -5
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/extrudeUtils.d.ts +17 -0
- package/dist/operations/extrudeUtils.d.ts.map +1 -1
- package/dist/{operations-C1rWoba2.js → operations-CrQlFDHc.js} +30 -7
- package/dist/{operations-BP1wVDw0.cjs → operations-Do-WZGXc.cjs} +30 -7
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +4 -4
- package/dist/query/cornerFinder.d.ts +48 -0
- package/dist/query/cornerFinder.d.ts.map +1 -0
- package/dist/query/directionUtils.d.ts +6 -0
- package/dist/query/directionUtils.d.ts.map +1 -0
- package/dist/query/edgeFinder.d.ts +15 -0
- package/dist/query/edgeFinder.d.ts.map +1 -0
- package/dist/query/faceFinder.d.ts +15 -0
- package/dist/query/faceFinder.d.ts.map +1 -0
- package/dist/query/finderCore.d.ts +35 -0
- package/dist/query/finderCore.d.ts.map +1 -0
- package/dist/query/finderFns.d.ts +21 -106
- package/dist/query/finderFns.d.ts.map +1 -1
- package/dist/query/shapeDistanceFilter.d.ts +11 -0
- package/dist/query/shapeDistanceFilter.d.ts.map +1 -0
- package/dist/query/vertexFinder.d.ts +16 -0
- package/dist/query/vertexFinder.d.ts.map +1 -0
- package/dist/query/wireFinder.d.ts +10 -0
- package/dist/query/wireFinder.d.ts.map +1 -0
- package/dist/query.cjs +42 -5
- package/dist/query.js +40 -2
- package/dist/{shapeFns-BrF97sKt.js → shapeFns-DQtpzndX.js} +17 -18
- package/dist/{shapeFns-BvOndshS.cjs → shapeFns-cN4qGpbO.cjs} +6 -7
- package/dist/{shapeTypes-DKhwEnUM.cjs → shapeTypes-BJ3Hmskg.cjs} +24 -20
- package/dist/{shapeTypes-BlSElW8z.js → shapeTypes-C9sUsmEW.js} +32 -28
- package/dist/sketching/Sketcher.d.ts.map +1 -1
- package/dist/sketching/Sketcher2d.d.ts +12 -4
- package/dist/sketching/Sketcher2d.d.ts.map +1 -1
- package/dist/sketching/ellipseUtils.d.ts +29 -0
- package/dist/sketching/ellipseUtils.d.ts.map +1 -0
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/curveBuilders.d.ts +75 -0
- package/dist/topology/curveBuilders.d.ts.map +1 -0
- package/dist/topology/curveFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/shapeHelpers.d.ts +6 -173
- package/dist/topology/shapeHelpers.d.ts.map +1 -1
- package/dist/topology/shapeUtils.d.ts +13 -0
- package/dist/topology/shapeUtils.d.ts.map +1 -0
- package/dist/topology/solidBuilders.d.ts +70 -0
- package/dist/topology/solidBuilders.d.ts.map +1 -0
- package/dist/topology/surfaceBuilders.d.ts +35 -0
- package/dist/topology/surfaceBuilders.d.ts.map +1 -0
- package/dist/topology/wrapperFns.d.ts +1 -0
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-tFzqSrGH.js → topology-CtfUZwLR.js} +8 -8
- package/dist/{topology-CIooytHH.cjs → topology-DXq8dLsi.cjs} +8 -8
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +31 -31
- package/dist/{vectors-CBuaMeZv.js → vectors-BVgXsYWl.js} +1 -1
- package/dist/{vectors-ChWEZPwy.cjs → vectors-DK2hEKcI.cjs} +1 -1
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +1 -1
- package/dist/loft-BzWFokmC.cjs +0 -178
- package/dist/loft-CtG5nMq5.js +0 -179
- package/dist/query-V6nV-VfL.js +0 -396
- package/dist/query-hMSmOWJP.cjs +0 -395
- package/dist/shapeHelpers-B2SXz1p4.cjs +0 -488
- package/dist/shapeHelpers-BcoZf2N9.js +0 -489
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-6kQSl3cF.cjs");
|
|
3
|
+
const shapeTypes = require("./shapeTypes-BJ3Hmskg.cjs");
|
|
4
4
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
5
|
-
const cast = require("./cast-
|
|
5
|
+
const cast = require("./cast-DIiyxDLo.cjs");
|
|
6
6
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
7
7
|
function clone(shape) {
|
|
8
8
|
return shapeTypes.castShape(errors.unwrap(cast.downcast(shape.wrapped)));
|
|
@@ -25,11 +25,10 @@ function isEqualShape(a, b) {
|
|
|
25
25
|
}
|
|
26
26
|
function simplify(shape) {
|
|
27
27
|
const oc = occtBoundary.getKernel().oc;
|
|
28
|
-
const
|
|
28
|
+
const r = shapeTypes.gcWithScope();
|
|
29
|
+
const upgrader = r(new oc.ShapeUpgrade_UnifySameDomain_2(shape.wrapped, true, true, false));
|
|
29
30
|
upgrader.Build();
|
|
30
|
-
|
|
31
|
-
upgrader.delete();
|
|
32
|
-
return result;
|
|
31
|
+
return shapeTypes.castShape(upgrader.Shape());
|
|
33
32
|
}
|
|
34
33
|
function translate(shape, v) {
|
|
35
34
|
const oc = occtBoundary.getKernel().oc;
|
|
@@ -44,16 +44,19 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
44
44
|
};
|
|
45
45
|
return next();
|
|
46
46
|
};
|
|
47
|
-
const occtBoundary = require("./occtBoundary-
|
|
48
|
-
|
|
47
|
+
const occtBoundary = require("./occtBoundary-6kQSl3cF.cjs");
|
|
48
|
+
const globalWithRegistry = globalThis;
|
|
49
|
+
if (!globalWithRegistry.FinalizationRegistry) {
|
|
49
50
|
console.warn("brepjs: FinalizationRegistry unavailable — garbage collection will not work");
|
|
50
|
-
|
|
51
|
-
register
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
globalWithRegistry.FinalizationRegistry = class NoOpFinalizationRegistry {
|
|
52
|
+
register(_target, _heldValue, _unregisterToken) {
|
|
53
|
+
}
|
|
54
|
+
unregister(_unregisterToken) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
55
58
|
}
|
|
56
|
-
const registry = new
|
|
59
|
+
const registry = new FinalizationRegistry((heldValue) => {
|
|
57
60
|
try {
|
|
58
61
|
heldValue.delete();
|
|
59
62
|
} catch {
|
|
@@ -172,19 +175,20 @@ function gcWithObject(obj) {
|
|
|
172
175
|
}
|
|
173
176
|
function localGC(debug) {
|
|
174
177
|
const cleaner = /* @__PURE__ */ new Set();
|
|
175
|
-
|
|
176
|
-
(v)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
()
|
|
181
|
-
|
|
178
|
+
const register = (v) => {
|
|
179
|
+
cleaner.add(v);
|
|
180
|
+
return v;
|
|
181
|
+
};
|
|
182
|
+
const cleanup = () => {
|
|
183
|
+
for (const d of cleaner) {
|
|
184
|
+
try {
|
|
182
185
|
d.delete();
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
} catch {
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
cleaner.clear();
|
|
190
|
+
};
|
|
191
|
+
return [register, cleanup, debug ? cleaner : void 0];
|
|
188
192
|
}
|
|
189
193
|
function brandHandle(handle) {
|
|
190
194
|
return handle;
|
|
@@ -43,16 +43,19 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
43
43
|
};
|
|
44
44
|
return next();
|
|
45
45
|
};
|
|
46
|
-
import { g as getKernel } from "./occtBoundary-
|
|
47
|
-
|
|
46
|
+
import { g as getKernel } from "./occtBoundary-CqXvDhZY.js";
|
|
47
|
+
const globalWithRegistry = globalThis;
|
|
48
|
+
if (!globalWithRegistry.FinalizationRegistry) {
|
|
48
49
|
console.warn("brepjs: FinalizationRegistry unavailable — garbage collection will not work");
|
|
49
|
-
|
|
50
|
-
register
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
globalWithRegistry.FinalizationRegistry = class NoOpFinalizationRegistry {
|
|
51
|
+
register(_target, _heldValue, _unregisterToken) {
|
|
52
|
+
}
|
|
53
|
+
unregister(_unregisterToken) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
54
57
|
}
|
|
55
|
-
const registry = new
|
|
58
|
+
const registry = new FinalizationRegistry((heldValue) => {
|
|
56
59
|
try {
|
|
57
60
|
heldValue.delete();
|
|
58
61
|
} catch {
|
|
@@ -171,19 +174,20 @@ function gcWithObject(obj) {
|
|
|
171
174
|
}
|
|
172
175
|
function localGC(debug) {
|
|
173
176
|
const cleaner = /* @__PURE__ */ new Set();
|
|
174
|
-
|
|
175
|
-
(v)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
()
|
|
180
|
-
|
|
177
|
+
const register = (v) => {
|
|
178
|
+
cleaner.add(v);
|
|
179
|
+
return v;
|
|
180
|
+
};
|
|
181
|
+
const cleanup = () => {
|
|
182
|
+
for (const d of cleaner) {
|
|
183
|
+
try {
|
|
181
184
|
d.delete();
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
} catch {
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
cleaner.clear();
|
|
189
|
+
};
|
|
190
|
+
return [register, cleanup, debug ? cleaner : void 0];
|
|
187
191
|
}
|
|
188
192
|
function brandHandle(handle) {
|
|
189
193
|
return handle;
|
|
@@ -296,14 +300,14 @@ export {
|
|
|
296
300
|
isSolid as k,
|
|
297
301
|
isVertex as l,
|
|
298
302
|
isWire as m,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
createWire as n,
|
|
304
|
+
createEdge as o,
|
|
305
|
+
gcWithScope as p,
|
|
306
|
+
createCompound as q,
|
|
307
|
+
createVertex as r,
|
|
308
|
+
createSolid as s,
|
|
309
|
+
localGC as t,
|
|
310
|
+
createFace as u,
|
|
307
311
|
createShell as v,
|
|
308
312
|
withScope as w,
|
|
309
313
|
gcWithObject as x,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sketcher.d.ts","sourceRoot":"","sources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"}
|
|
@@ -5,10 +5,10 @@ import { OcType } from '../kernel/types.js';
|
|
|
5
5
|
import { Curve2D, Point2D } from '../2d/lib/index.js';
|
|
6
6
|
import { default as Blueprint } from '../2d/blueprints/Blueprint.js';
|
|
7
7
|
type UVBounds = {
|
|
8
|
-
uMin: number;
|
|
9
|
-
uMax: number;
|
|
10
|
-
vMin: number;
|
|
11
|
-
vMax: number;
|
|
8
|
+
readonly uMin: number;
|
|
9
|
+
readonly uMax: number;
|
|
10
|
+
readonly vMin: number;
|
|
11
|
+
readonly vMax: number;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Base class for 2D sketchers that accumulate {@link Curve2D} segments.
|
|
@@ -27,6 +27,14 @@ export declare class BaseSketcher2d {
|
|
|
27
27
|
constructor(origin?: Point2D);
|
|
28
28
|
protected _convertToUV([x, y]: Point2D): Point2D;
|
|
29
29
|
protected _convertFromUV([u, v]: Point2D): Point2D;
|
|
30
|
+
/** Return the last curve in the pending list, or null if empty. */
|
|
31
|
+
protected _lastCurve(): Curve2D | null;
|
|
32
|
+
/** Require that a previous curve exists, returning it or throwing. */
|
|
33
|
+
protected _requireLastCurve(caller: string, action: string): Curve2D;
|
|
34
|
+
/** Resolve a relative offset from the current pointer position. */
|
|
35
|
+
protected _resolveRelative(xDist: number, yDist: number): Point2D;
|
|
36
|
+
/** Save a curve, advance the pointer to the given end point, and return `this`. */
|
|
37
|
+
protected _saveCurveAndAdvance(curve: Curve2D, end: Point2D): this;
|
|
30
38
|
/**
|
|
31
39
|
* Returns the current pen position as [x, y] coordinates
|
|
32
40
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sketcher2d.d.ts","sourceRoot":"","sources":["../../src/sketching/Sketcher2d.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAMjC,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":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,eAAe,IAAI,SAAS;IAK5B;;;;;;OAMG;IACH,qBAAqB,CACnB,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,QAAQ,GAAG,SAAS,GAAG,SAAoB,GAChD,SAAS;CAMb"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Point2D, Curve2D } from '../2d/lib/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Normalized ellipse parameters after swapping axes when horizontalRadius < verticalRadius.
|
|
4
|
+
*/
|
|
5
|
+
export interface NormalizedEllipseParams {
|
|
6
|
+
readonly majorRadius: number;
|
|
7
|
+
readonly minorRadius: number;
|
|
8
|
+
readonly rotationAngle: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Normalize ellipse radii so that major >= minor, adjusting the rotation
|
|
12
|
+
* angle by 90 degrees when the radii need to be swapped.
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizeEllipseRadii(horizontalRadius: number, verticalRadius: number, rotation: number): NormalizedEllipseParams;
|
|
15
|
+
/**
|
|
16
|
+
* Build a 2D elliptical arc curve from SVG-style endpoint parameters,
|
|
17
|
+
* applying the UV coordinate conversions used by {@link BaseSketcher2d}.
|
|
18
|
+
*
|
|
19
|
+
* @param startUV - Start point in UV space.
|
|
20
|
+
* @param endUV - End point in UV space.
|
|
21
|
+
* @param majorRadius - Major radius (already normalized so major >= minor).
|
|
22
|
+
* @param minorRadius - Minor radius.
|
|
23
|
+
* @param rotationAngleDeg - Rotation of the ellipse in degrees.
|
|
24
|
+
* @param longAxis - SVG large-arc flag.
|
|
25
|
+
* @param sweep - SVG sweep flag.
|
|
26
|
+
* @param convertToUV - Coordinate conversion function from user space to UV space.
|
|
27
|
+
*/
|
|
28
|
+
export declare function makeEllipseArcFromSvgParams(startUV: Point2D, endUV: Point2D, majorRadius: number, minorRadius: number, rotationAngleDeg: number, longAxis: boolean, sweep: boolean, convertToUV: (p: Point2D) => Point2D): Curve2D;
|
|
29
|
+
//# sourceMappingURL=ellipseUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ellipseUtils.d.ts","sourceRoot":"","sources":["../../src/sketching/ellipseUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,OAAO,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,GACf,uBAAuB,CAazB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,GACnC,OAAO,CAkCT"}
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const drawFns = require("./drawFns-
|
|
4
|
-
const boolean2D = require("./boolean2D-
|
|
3
|
+
const drawFns = require("./drawFns-D2eDcf4k.cjs");
|
|
4
|
+
const boolean2D = require("./boolean2D-B1XrGVgx.cjs");
|
|
5
5
|
exports.CompoundSketch = drawFns.CompoundSketch;
|
|
6
6
|
exports.Drawing = drawFns.Drawing;
|
|
7
7
|
exports.DrawingPen = drawFns.DrawingPen;
|
package/dist/sketching.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C, D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W } from "./drawFns-
|
|
2
|
-
import { B as B2, a as a2, F as F2, S as S2 } from "./boolean2D-
|
|
1
|
+
import { C, D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W } from "./drawFns-Btmlh_Oz.js";
|
|
2
|
+
import { B as B2, a as a2, F as F2, S as S2 } from "./boolean2D-_WiqPxWZ.js";
|
|
3
3
|
export {
|
|
4
4
|
B2 as BaseSketcher2d,
|
|
5
5
|
a2 as BlueprintSketcher,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booleanFns.d.ts","sourceRoot":"","sources":["../../src/topology/booleanFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG/D,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,mBAAmB,CAAC;AAGhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAoBxD,6DAA6D;AAC7D,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,UAAU,CAAC;IAClD,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sHAAsH;IACtH,QAAQ,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IACjC,oEAAoE;IACpE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AA6CD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAClB,CAAC,EAAE,OAAO,EACV,CAAC,EAA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AE,UAAU,EACjB,EAAE,aAAoB,EAAE,SAAe,EAAE,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9F,MAAM,CAAC,QAAQ,CAAC,CAyBlB;AAMD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,CAiC1E;AAMD;;;GAGG;AACH,wBAAgB,KAAK,CACnB,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,UAAU,EAAE,EACpB,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5D,MAAM,CAAC,QAAQ,EAAE,CAAC,CAQpB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Vec3 } from '../core/types.js';
|
|
2
|
+
import { Result } from '../core/result.js';
|
|
3
|
+
import { Edge, Wire } from '../core/shapeTypes.js';
|
|
4
|
+
/** Create a straight edge between two 3D points. */
|
|
5
|
+
export declare function makeLine(v1: Vec3, v2: Vec3): Edge;
|
|
6
|
+
/** Create a circular edge with the given radius, center, and normal. */
|
|
7
|
+
export declare function makeCircle(radius: number, center?: Vec3, normal?: Vec3): Edge;
|
|
8
|
+
/**
|
|
9
|
+
* Create an elliptical edge with the given radii.
|
|
10
|
+
*
|
|
11
|
+
* @param xDir - Optional direction for the major axis.
|
|
12
|
+
* @returns An error if `minorRadius` exceeds `majorRadius`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function makeEllipse(majorRadius: number, minorRadius: number, center?: Vec3, normal?: Vec3, xDir?: Vec3): Result<Edge>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a helical wire with the given pitch, height, and radius.
|
|
17
|
+
*
|
|
18
|
+
* @param pitch - Vertical distance per full turn.
|
|
19
|
+
* @param lefthand - Wind the helix in the left-hand direction.
|
|
20
|
+
*/
|
|
21
|
+
export declare function makeHelix(pitch: number, height: number, radius: number, center?: Vec3, dir?: Vec3, lefthand?: boolean): Wire;
|
|
22
|
+
/**
|
|
23
|
+
* Create a circular arc edge passing through three points.
|
|
24
|
+
*
|
|
25
|
+
* @param v1 - Start point.
|
|
26
|
+
* @param v2 - Mid point (on the arc).
|
|
27
|
+
* @param v3 - End point.
|
|
28
|
+
*/
|
|
29
|
+
export declare function makeThreePointArc(v1: Vec3, v2: Vec3, v3: Vec3): Edge;
|
|
30
|
+
/**
|
|
31
|
+
* Create an elliptical arc edge between two angles.
|
|
32
|
+
*
|
|
33
|
+
* @param startAngle - Start angle in radians.
|
|
34
|
+
* @param endAngle - End angle in radians.
|
|
35
|
+
* @param xDir - Optional direction for the major axis.
|
|
36
|
+
* @returns An error if `minorRadius` exceeds `majorRadius`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function makeEllipseArc(majorRadius: number, minorRadius: number, startAngle: number, endAngle: number, center?: Vec3, normal?: Vec3, xDir?: Vec3): Result<Edge>;
|
|
39
|
+
/** Configuration for {@link makeBSplineApproximation}. */
|
|
40
|
+
export interface BSplineApproximationOptions {
|
|
41
|
+
/** Maximum allowed distance between the curve and the input points. */
|
|
42
|
+
tolerance?: number;
|
|
43
|
+
/** Maximum B-spline degree. */
|
|
44
|
+
degMax?: number;
|
|
45
|
+
/** Minimum B-spline degree. */
|
|
46
|
+
degMin?: number;
|
|
47
|
+
/** Optional `[weight1, weight2, weight3]` smoothing weights, or `null` to disable. */
|
|
48
|
+
smoothing?: null | [number, number, number];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Create a B-spline edge that approximates a set of 3D points.
|
|
52
|
+
*
|
|
53
|
+
* @returns An error if the OCCT approximation algorithm fails.
|
|
54
|
+
*/
|
|
55
|
+
export declare function makeBSplineApproximation(points: Vec3[], { tolerance, smoothing, degMax, degMin }?: BSplineApproximationOptions): Result<Edge>;
|
|
56
|
+
/**
|
|
57
|
+
* Create a Bezier curve edge from control points.
|
|
58
|
+
*
|
|
59
|
+
* @param points - Two or more control points defining the curve.
|
|
60
|
+
* @returns Ok with the edge, or Err if fewer than 2 points are provided.
|
|
61
|
+
*/
|
|
62
|
+
export declare function makeBezierCurve(points: Vec3[]): Result<Edge>;
|
|
63
|
+
/**
|
|
64
|
+
* Create a circular arc edge tangent to a direction at the start point.
|
|
65
|
+
*
|
|
66
|
+
* @param startTgt - Tangent direction at the start point.
|
|
67
|
+
*/
|
|
68
|
+
export declare function makeTangentArc(startPoint: Vec3, startTgt: Vec3, endPoint: Vec3): Edge;
|
|
69
|
+
/**
|
|
70
|
+
* Assemble edges and/or wires into a single connected wire.
|
|
71
|
+
*
|
|
72
|
+
* @returns An error if the edges cannot form a valid wire (e.g. disconnected).
|
|
73
|
+
*/
|
|
74
|
+
export declare function assembleWire(listOfEdges: (Edge | Wire)[]): Result<Wire>;
|
|
75
|
+
//# sourceMappingURL=curveBuilders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curveBuilders.d.ts","sourceRoot":"","sources":["../../src/topology/curveBuilders.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGxD,oDAAoD;AACpD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,IAAI,CAQjD;AAED,wEAAwE;AACxE,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,IAAgB,EACxB,MAAM,GAAE,IAAgB,GACvB,IAAI,CAQN;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EAC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E,GAAG,MAAM,CAAC,IAAI,CAAC,CAwB5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAG,IAAI,CAcrF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,CAgCvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curveFns.d.ts","sourceRoot":"","sources":["../../src/topology/curveFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,KAAK,MAAM,EAAmB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"curveFns.d.ts","sourceRoot":"","sources":["../../src/topology/curveFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,KAAK,MAAM,EAAmB,MAAM,mBAAmB,CAAC;AA6BjE;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAK1D;AAED,sCAAsC;AACtC,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAKxD;AAED,oCAAoC;AACpC,wBAAgB,aAAa,CAAC,KAAK,EAA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C,aAAa,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAEvE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAEzF;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAEjG;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAErD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shapeFns.d.ts","sourceRoot":"","sources":["../../src/topology/shapeFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"shapeFns.d.ts","sourceRoot":"","sources":["../../src/topology/shapeFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAY3F,qDAAqD;AACrD,wBAAgB,KAAK,CAAC,CAAC,SAAS,QAAQ,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAErD;AAED,+CAA+C;AAC/C,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAA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EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;CAC3B;AAED,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,gBAAgB,CAU1D;AAMD,oDAAoD;AACpD,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAMnD"}
|
|
@@ -1,176 +1,9 @@
|
|
|
1
|
-
import { Vec3 } from '../core/types.js';
|
|
2
|
-
import { Result } from '../core/result.js';
|
|
3
|
-
import { AnyShape, Shape3D, Compound, Edge, Face, Wire, Solid, Vertex, Shell } from '../core/shapeTypes.js';
|
|
4
|
-
/** Create a straight edge between two 3D points. */
|
|
5
|
-
export declare const makeLine: (v1: Vec3, v2: Vec3) => Edge;
|
|
6
|
-
/** Create a circular edge with the given radius, center, and normal. */
|
|
7
|
-
export declare const makeCircle: (radius: number, center?: Vec3, normal?: Vec3) => Edge;
|
|
8
1
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @param xDir - Optional direction for the major axis.
|
|
12
|
-
* @returns An error if `minorRadius` exceeds `majorRadius`.
|
|
2
|
+
* Barrel re-export — keeps `import { ... } from './shapeHelpers.js'` working
|
|
3
|
+
* after the split into focused modules.
|
|
13
4
|
*/
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* @param pitch - Vertical distance per full turn.
|
|
19
|
-
* @param lefthand - Wind the helix in the left-hand direction.
|
|
20
|
-
*/
|
|
21
|
-
export declare const makeHelix: (pitch: number, height: number, radius: number, center?: Vec3, dir?: Vec3, lefthand?: boolean) => Wire;
|
|
22
|
-
/**
|
|
23
|
-
* Create a circular arc edge passing through three points.
|
|
24
|
-
*
|
|
25
|
-
* @param v1 - Start point.
|
|
26
|
-
* @param v2 - Mid point (on the arc).
|
|
27
|
-
* @param v3 - End point.
|
|
28
|
-
*/
|
|
29
|
-
export declare const makeThreePointArc: (v1: Vec3, v2: Vec3, v3: Vec3) => Edge;
|
|
30
|
-
/**
|
|
31
|
-
* Create an elliptical arc edge between two angles.
|
|
32
|
-
*
|
|
33
|
-
* @param startAngle - Start angle in radians.
|
|
34
|
-
* @param endAngle - End angle in radians.
|
|
35
|
-
* @param xDir - Optional direction for the major axis.
|
|
36
|
-
* @returns An error if `minorRadius` exceeds `majorRadius`.
|
|
37
|
-
*/
|
|
38
|
-
export declare const makeEllipseArc: (majorRadius: number, minorRadius: number, startAngle: number, endAngle: number, center?: Vec3, normal?: Vec3, xDir?: Vec3) => Result<Edge>;
|
|
39
|
-
/** Configuration for {@link makeBSplineApproximation}. */
|
|
40
|
-
export interface BSplineApproximationOptions {
|
|
41
|
-
/** Maximum allowed distance between the curve and the input points. */
|
|
42
|
-
tolerance?: number;
|
|
43
|
-
/** Maximum B-spline degree. */
|
|
44
|
-
degMax?: number;
|
|
45
|
-
/** Minimum B-spline degree. */
|
|
46
|
-
degMin?: number;
|
|
47
|
-
/** Optional `[weight1, weight2, weight3]` smoothing weights, or `null` to disable. */
|
|
48
|
-
smoothing?: null | [number, number, number];
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Create a B-spline edge that approximates a set of 3D points.
|
|
52
|
-
*
|
|
53
|
-
* @returns An error if the OCCT approximation algorithm fails.
|
|
54
|
-
*/
|
|
55
|
-
export declare const makeBSplineApproximation: (points: Vec3[], { tolerance, smoothing, degMax, degMin }?: BSplineApproximationOptions) => Result<Edge>;
|
|
56
|
-
/**
|
|
57
|
-
* Create a Bezier curve edge from control points.
|
|
58
|
-
*
|
|
59
|
-
* @param points - Two or more control points defining the curve.
|
|
60
|
-
* @returns Ok with the edge, or Err if fewer than 2 points are provided.
|
|
61
|
-
*/
|
|
62
|
-
export declare const makeBezierCurve: (points: Vec3[]) => Result<Edge>;
|
|
63
|
-
/**
|
|
64
|
-
* Create a circular arc edge tangent to a direction at the start point.
|
|
65
|
-
*
|
|
66
|
-
* @param startTgt - Tangent direction at the start point.
|
|
67
|
-
*/
|
|
68
|
-
export declare const makeTangentArc: (startPoint: Vec3, startTgt: Vec3, endPoint: Vec3) => Edge;
|
|
69
|
-
/**
|
|
70
|
-
* Assemble edges and/or wires into a single connected wire.
|
|
71
|
-
*
|
|
72
|
-
* @returns An error if the edges cannot form a valid wire (e.g. disconnected).
|
|
73
|
-
*/
|
|
74
|
-
export declare const assembleWire: (listOfEdges: (Edge | Wire)[]) => Result<Wire>;
|
|
75
|
-
/**
|
|
76
|
-
* Create a planar face from a closed wire, optionally with hole wires.
|
|
77
|
-
*
|
|
78
|
-
* @returns An error if the wire is non-planar or the face cannot be built.
|
|
79
|
-
*/
|
|
80
|
-
export declare const makeFace: (wire: Wire, holes?: Wire[]) => Result<Face>;
|
|
81
|
-
/**
|
|
82
|
-
* Create a face bounded by a wire on an existing face's underlying surface.
|
|
83
|
-
*
|
|
84
|
-
* @param originFace - Face whose surface geometry is reused.
|
|
85
|
-
* @param wire - Wire that defines the boundary on that surface.
|
|
86
|
-
*/
|
|
87
|
-
export declare const makeNewFaceWithinFace: (originFace: Face, wire: Wire) => Face;
|
|
88
|
-
/**
|
|
89
|
-
* Create a non-planar face from a wire using surface filling.
|
|
90
|
-
*
|
|
91
|
-
* @returns An error if the filling algorithm fails to produce a face.
|
|
92
|
-
*/
|
|
93
|
-
export declare const makeNonPlanarFace: (wire: Wire) => Result<Face>;
|
|
94
|
-
/**
|
|
95
|
-
* Creates a cylinder with the given radius and height.
|
|
96
|
-
*
|
|
97
|
-
* @category Solids
|
|
98
|
-
*/
|
|
99
|
-
export declare const makeCylinder: (radius: number, height: number, location?: Vec3, direction?: Vec3) => Solid;
|
|
100
|
-
/**
|
|
101
|
-
* Creates a sphere with the given radius.
|
|
102
|
-
*
|
|
103
|
-
* @category Solids
|
|
104
|
-
*/
|
|
105
|
-
export declare const makeSphere: (radius: number) => Solid;
|
|
106
|
-
/**
|
|
107
|
-
* Creates a cone (or frustum) with the given radii and height.
|
|
108
|
-
*
|
|
109
|
-
* @category Solids
|
|
110
|
-
*/
|
|
111
|
-
export declare const makeCone: (radius1: number, radius2: number, height: number, location?: Vec3, direction?: Vec3) => Solid;
|
|
112
|
-
/**
|
|
113
|
-
* Creates a torus with the given major and minor radii.
|
|
114
|
-
*
|
|
115
|
-
* @category Solids
|
|
116
|
-
*/
|
|
117
|
-
export declare const makeTorus: (majorRadius: number, minorRadius: number, location?: Vec3, direction?: Vec3) => Solid;
|
|
118
|
-
/**
|
|
119
|
-
* Creates an ellipsoid with the given axis lengths.
|
|
120
|
-
*
|
|
121
|
-
* @category Solids
|
|
122
|
-
*/
|
|
123
|
-
export declare const makeEllipsoid: (aLength: number, bLength: number, cLength: number) => Solid;
|
|
124
|
-
/**
|
|
125
|
-
* Creates a box with the given corner points.
|
|
126
|
-
*
|
|
127
|
-
* @category Solids
|
|
128
|
-
*/
|
|
129
|
-
export declare const makeBox: (corner1: Vec3, corner2: Vec3) => Solid;
|
|
130
|
-
/** Create a vertex at a 3D point. */
|
|
131
|
-
export declare const makeVertex: (point: Vec3) => Vertex;
|
|
132
|
-
/**
|
|
133
|
-
* Create an offset shape from a face.
|
|
134
|
-
*
|
|
135
|
-
* @param offset - Signed offset distance (positive = outward).
|
|
136
|
-
* @param tolerance - Geometric tolerance for the offset algorithm.
|
|
137
|
-
* @returns An error if the result is not a valid 3D shape.
|
|
138
|
-
*/
|
|
139
|
-
export declare const makeOffset: (face: Face, offset: number, tolerance?: number) => Result<Shape3D>;
|
|
140
|
-
/**
|
|
141
|
-
* Build a compound from multiple shapes.
|
|
142
|
-
*
|
|
143
|
-
* @param shapeArray - Shapes to group into a single compound.
|
|
144
|
-
* @returns A new Compound containing all input shapes.
|
|
145
|
-
*/
|
|
146
|
-
export declare const makeCompound: (shapeArray: AnyShape[]) => Compound;
|
|
147
|
-
/**
|
|
148
|
-
* Welds faces and shells into a single shell.
|
|
149
|
-
*
|
|
150
|
-
* @param facesOrShells - An array of faces and shells to be welded.
|
|
151
|
-
* @param ignoreType - If true, the function will not check if the result is a shell.
|
|
152
|
-
* @returns A shell that contains all the faces and shells.
|
|
153
|
-
*/
|
|
154
|
-
export declare function weldShellsAndFaces(facesOrShells: Array<Face | Shell>, ignoreType?: boolean): Result<Shell>;
|
|
155
|
-
/**
|
|
156
|
-
* Welds faces and shells into a single shell and then makes a solid.
|
|
157
|
-
*
|
|
158
|
-
* @param facesOrShells - An array of faces and shells to be welded.
|
|
159
|
-
* @returns A solid that contains all the faces and shells.
|
|
160
|
-
*
|
|
161
|
-
* @category Solids
|
|
162
|
-
*/
|
|
163
|
-
export declare function makeSolid(facesOrShells: Array<Face | Shell>): Result<Solid>;
|
|
164
|
-
/**
|
|
165
|
-
* Add hole wires to an existing face.
|
|
166
|
-
*
|
|
167
|
-
* Orientation of the holes is automatically fixed.
|
|
168
|
-
*/
|
|
169
|
-
export declare const addHolesInFace: (face: Face, holes: Wire[]) => Face;
|
|
170
|
-
/**
|
|
171
|
-
* Create a polygonal face from three or more coplanar points.
|
|
172
|
-
*
|
|
173
|
-
* @returns An error if fewer than 3 points are provided or the face cannot be built.
|
|
174
|
-
*/
|
|
175
|
-
export declare const makePolygon: (points: Vec3[]) => Result<Face>;
|
|
5
|
+
export { makeLine, makeCircle, makeEllipse, makeHelix, makeThreePointArc, makeEllipseArc, makeBSplineApproximation, type BSplineApproximationOptions, makeBezierCurve, makeTangentArc, assembleWire, } from './curveBuilders.js';
|
|
6
|
+
export { makeFace, makeNewFaceWithinFace, makeNonPlanarFace, addHolesInFace, makePolygon, } from './surfaceBuilders.js';
|
|
7
|
+
export { makeCylinder, makeSphere, makeCone, makeTorus, makeEllipsoid, makeBox, makeVertex, makeOffset, makeCompound, makeSolid, } from './solidBuilders.js';
|
|
8
|
+
export { weldShellsAndFaces } from './shapeUtils.js';
|
|
176
9
|
//# sourceMappingURL=shapeHelpers.d.ts.map
|