brepjs 20.12.13 → 20.12.15
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/blueprintFns.d.ts +2 -0
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{adjacencyFns-Djv832MP.cjs → adjacencyFns-BHdJW5pd.cjs} +3 -3
- package/dist/{adjacencyFns-DBN26xm_.js → adjacencyFns-C4yjxKu4.js} +3 -3
- package/dist/{blueprint-nVQsEilp.cjs → blueprint-D4juQWXs.cjs} +5 -5
- package/dist/{blueprint-BTccTqFy.js → blueprint-ku_wYIZl.js} +5 -5
- package/dist/{blueprintFns-DFDOgqqe.cjs → blueprintFns-8obtvMEn.cjs} +4 -5
- package/dist/{blueprintFns-DX7yLZpR.js → blueprintFns-B0cqtoFB.js} +4 -5
- package/dist/{blueprintSketcher-CoGp1dM9.cjs → blueprintSketcher-CRFpnZAS.cjs} +3 -3
- package/dist/{blueprintSketcher-rk64lh8e.js → blueprintSketcher-Dpdgf5aR.js} +3 -3
- package/dist/{boolean2D-Dv-57m9d.js → boolean2D-CnCDsRJ4.js} +4 -4
- package/dist/{boolean2D-DP2DiMfT.cjs → boolean2D-D3jxohLZ.cjs} +4 -4
- package/dist/{booleanFns-CjIZaNBh.js → booleanFns-CItcObM_.js} +5 -5
- package/dist/{booleanFns-ewBwy7V_.cjs → booleanFns-GBPAGQ5g.cjs} +5 -5
- package/dist/brepjs.cjs +59 -61
- package/dist/brepjs.js +59 -61
- package/dist/{cameraFns-D0JDXxwO.js → cameraFns-B6ujpyKy.js} +3 -3
- package/dist/{cameraFns-DmIQsPIr.cjs → cameraFns-C2XhSqrr.cjs} +3 -3
- package/dist/core/shapeTypes.d.ts +8 -4
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-CZ1XbVx7.cjs → cornerFinder-CqHx_Itj.cjs} +1 -1
- package/dist/{cornerFinder-Df7ajnlz.js → cornerFinder-D3nBhdfi.js} +1 -1
- package/dist/{curveFns-DK5eG57I.cjs → curveFns-BQjw0VBB.cjs} +1 -1
- package/dist/{curveFns-CUrIF9LG.js → curveFns-nAwtilbz.js} +1 -1
- package/dist/{drawFns-BKKWQ4JW.js → drawFns-D9q4Hxc_.js} +12 -12
- package/dist/{drawFns-B2CPxqd1.cjs → drawFns-hFjTvdw4.cjs} +12 -12
- package/dist/{faceFns-C1Ii1MJ-.cjs → faceFns-DdMpocg9.cjs} +2 -2
- package/dist/{faceFns-B3vblI_s.js → faceFns-Dodcduw8.js} +2 -2
- package/dist/{healingFns-sfguIlrW.cjs → healingFns-Cdpu44d0.cjs} +5 -5
- package/dist/{healingFns-CqiHrJcx.js → healingFns-GNF1rFuw.js} +5 -5
- package/dist/{helpers-Dy1moMMd.js → helpers-CoVtL5c9.js} +6 -6
- package/dist/{helpers-CTxyRIoE.cjs → helpers-TWIfnyto.cjs} +6 -6
- package/dist/{importFns-BXiAHbyn.js → importFns-C9TUFscx.js} +479 -57
- package/dist/{importFns-C3ILnGTv.cjs → importFns-P-TcOJ1G.cjs} +479 -57
- package/dist/io/importFns.d.ts +6 -4
- package/dist/io/ioUtils.d.ts +23 -5
- package/dist/io/meshNesting.d.ts +25 -4
- package/dist/io/meshTopology.d.ts +33 -0
- package/dist/io/stlTriangles.d.ts +10 -0
- package/dist/io/threemfImportFns.d.ts +9 -6
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/capabilities.d.ts +9 -1
- package/dist/kernel/interfaces/evolutionOps.d.ts +1 -0
- package/dist/kernel/interfaces/transformOps.d.ts +7 -2
- package/dist/kernel/occt/transformOps.d.ts +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/{loftFns-BJqF1p_f.js → loftFns-DVsWk-9v.js} +19 -52
- package/dist/{loftFns-CzERU_TY.cjs → loftFns-Uq6BhPVL.cjs} +19 -52
- package/dist/{measureFns-DN5YMfKZ.cjs → measureFns-B0Cy7GcQ.cjs} +3 -3
- package/dist/{measureFns-CT2TRojo.js → measureFns-DoUWDfAP.js} +3 -3
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-Cp8uEpVt.js → meshFns-BpBgKIIE.js} +4 -4
- package/dist/{meshFns-BDn_nIVv.cjs → meshFns-Bz9PPZWP.cjs} +4 -4
- package/dist/{occtWasmAdapter-C-Qi-jxS.js → occtWasmAdapter-DeVQrL5n.js} +4 -3
- package/dist/{occtWasmAdapter-BK--kx4R.cjs → occtWasmAdapter-DzxyXpLG.cjs} +4 -3
- package/dist/operations/instanceFns.d.ts +3 -2
- package/dist/operations/sweepFns.d.ts +15 -3
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-BzJi89Y6.js → primitiveFns-Crqsdby_.js} +5 -5
- package/dist/{primitiveFns-1FcmvZ6Y.cjs → primitiveFns-DE1RROq-.cjs} +5 -5
- package/dist/{principalBoxFns-DT4ngNuy.cjs → principalBoxFns-CzEBI6tC.cjs} +3 -3
- package/dist/{principalBoxFns-farY7tvh.js → principalBoxFns-DwitCsif.js} +3 -3
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-dNAt7W9t.js → refResolveFns-BJz9UvXM.js} +6 -6
- package/dist/{refResolveFns-By31fyEv.cjs → refResolveFns-DgM_B9WU.cjs} +6 -6
- package/dist/{shapeFns-DhTfkxbN.cjs → shapeFns-B9LB54_t.cjs} +2 -2
- package/dist/{shapeFns-381QqZ8n.js → shapeFns-Ddh0M4Iz.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-C0NcoN5g.cjs → shapeTypes-C1Ljs72p.cjs} +20 -18
- package/dist/{shapeTypes-DfBx__EF.js → shapeTypes-DiCMRU6Z.js} +20 -18
- package/dist/sketching/compoundSketch.d.ts +3 -2
- package/dist/sketching/sketch.d.ts +5 -4
- package/dist/sketching/sketches.d.ts +3 -2
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-VPkj5ChQ.cjs → solidBuilders-C6_6tZXG.cjs} +3 -3
- package/dist/{solidBuilders-BZ1qXlFZ.js → solidBuilders-Dzhk5L6w.js} +3 -3
- package/dist/{surfaceBuilders-DQre19g8.cjs → surfaceBuilders-CU_vd71e.cjs} +3 -3
- package/dist/{surfaceBuilders-sBre5aYy.js → surfaceBuilders-Idshk6C3.js} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-ChDNr0L4.cjs → textBlueprints-BmIxy1fi.cjs} +8 -8
- package/dist/{textBlueprints-DCorV4gM.js → textBlueprints-DyT-kfxc.js} +8 -8
- package/dist/{textMetrics-C0qTX3sH.cjs → textMetrics-CbDASt0r.cjs} +1 -1
- package/dist/{textMetrics-ByzyMC1I.js → textMetrics-DuzBLY9z.js} +1 -1
- package/dist/{threadFns-AJP69FU6.js → threadFns-CN1R3YKa.js} +7 -7
- package/dist/{threadFns-CzWqzDN_.cjs → threadFns-YPn7KF9u.cjs} +7 -7
- package/dist/topology/apiTypes.d.ts +3 -3
- package/dist/topology/wrapperFns.d.ts +11 -2
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-svM8Yfsk.cjs → topologyQueryFns-0Ycw298Y.cjs} +1 -1
- package/dist/{topologyQueryFns-CTCsQIH_.js → topologyQueryFns-CNOqc1rB.js} +1 -1
- package/dist/{validityTypes-BCUWXQNA.cjs → validityTypes-CXnc46WG.cjs} +1 -1
- package/dist/{validityTypes-DrWg6_qM.js → validityTypes-rUpnumpL.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Result } from '../core/result.js';
|
|
2
|
-
import { AnyShape, Dimension } from '../core/shapeTypes.js';
|
|
2
|
+
import { AnyShape, Dimension, Shape3D } from '../core/shapeTypes.js';
|
|
3
3
|
import { Matrix4x4, Vec3 } from '../core/types.js';
|
|
4
4
|
import { ShapeMesh, MeshOptions } from '../topology/meshFns.js';
|
|
5
5
|
/** Grid provenance, set by `instanceGrid`, lets `materialize({fuse})` route
|
|
@@ -50,8 +50,9 @@ export interface MaterializeOptions {
|
|
|
50
50
|
* Produce real geometry: a Compound of N placed copies (default), or a single
|
|
51
51
|
* fused solid (`fuse: true`, 3D only). This is where the N kernel transforms
|
|
52
52
|
* happen. A grid-built instance fuses via the faster kernel `gridPattern`.
|
|
53
|
+
* Either result is a {@link Shape3D}.
|
|
53
54
|
*/
|
|
54
|
-
export declare function materialize<D extends Dimension>(inst: InstancedShape<D>, opts?: MaterializeOptions): Result<
|
|
55
|
+
export declare function materialize<D extends Dimension>(inst: InstancedShape<D>, opts?: MaterializeOptions): Result<Shape3D>;
|
|
55
56
|
export interface InstancedMesh {
|
|
56
57
|
/** The source shape meshed ONCE. */
|
|
57
58
|
readonly geometry: ShapeMesh;
|
|
@@ -39,8 +39,12 @@ export interface GuidedSweepOptions {
|
|
|
39
39
|
* @param spine - The path wire to sweep along.
|
|
40
40
|
* @param config - Sweep configuration (frenet, transition mode, scaling law, etc.).
|
|
41
41
|
* @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
|
|
42
|
-
* @returns `Result` containing
|
|
42
|
+
* @returns `Result` containing the swept shape, or a `[Shape3D, Wire, Wire]` tuple in shell mode.
|
|
43
43
|
*/
|
|
44
|
+
export declare function sweep(wire: ClosedWire<Dimension>, spine: Wire<Dimension>, config?: SweepOptions, shellMode?: false): Result<Shape3D>;
|
|
45
|
+
/** Sweep in shell mode, returning `[shell, startWire, endWire]`. */
|
|
46
|
+
export declare function sweep(wire: ClosedWire<Dimension>, spine: Wire<Dimension>, config: SweepOptions | undefined, shellMode: true): Result<[Shape3D, Wire, Wire]>;
|
|
47
|
+
/** Sweep with a shell mode known only at runtime. */
|
|
44
48
|
export declare function sweep(wire: ClosedWire<Dimension>, spine: Wire<Dimension>, config?: SweepOptions, shellMode?: boolean): Result<Shape3D | [Shape3D, Wire, Wire]>;
|
|
45
49
|
/**
|
|
46
50
|
* Extrude a wire along a normal constrained to a support surface.
|
|
@@ -67,8 +71,12 @@ export declare function supportExtrude(wire: ClosedWire<Dimension>, center: Vec3
|
|
|
67
71
|
* @param normal - Direction and length of the extrusion. Must be non-zero.
|
|
68
72
|
* @param profileShape - Optional scaling profile applied along the extrusion.
|
|
69
73
|
* @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
|
|
70
|
-
* @returns `Result` containing the extruded shape or a shell tuple.
|
|
74
|
+
* @returns `Result` containing the extruded shape, or a shell tuple in shell mode.
|
|
71
75
|
*/
|
|
76
|
+
export declare function complexExtrude(wire: ClosedWire<Dimension>, center: Vec3, normal: Vec3, profileShape?: ExtrusionProfile, shellMode?: false): Result<Shape3D>;
|
|
77
|
+
/** Complex extrusion in shell mode, returning `[shell, startWire, endWire]`. */
|
|
78
|
+
export declare function complexExtrude(wire: ClosedWire<Dimension>, center: Vec3, normal: Vec3, profileShape: ExtrusionProfile | undefined, shellMode: true): Result<[Shape3D, Wire, Wire]>;
|
|
79
|
+
/** Complex extrusion with a shell mode known only at runtime. */
|
|
72
80
|
export declare function complexExtrude(wire: ClosedWire<Dimension>, center: Vec3, normal: Vec3, profileShape?: ExtrusionProfile, shellMode?: boolean): Result<Shape3D | [Shape3D, Wire, Wire]>;
|
|
73
81
|
/**
|
|
74
82
|
* Extrude a wire along a normal with helical twist and optional profile scaling.
|
|
@@ -83,8 +91,12 @@ export declare function complexExtrude(wire: ClosedWire<Dimension>, center: Vec3
|
|
|
83
91
|
* @param normal - Direction and length of the extrusion. Must be non-zero.
|
|
84
92
|
* @param profileShape - Optional scaling profile applied along the extrusion.
|
|
85
93
|
* @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
|
|
86
|
-
* @returns `Result` containing the twisted extruded shape or a shell tuple.
|
|
94
|
+
* @returns `Result` containing the twisted extruded shape, or a shell tuple in shell mode.
|
|
87
95
|
*/
|
|
96
|
+
export declare function twistExtrude(wire: ClosedWire<Dimension>, angleDegrees: number, center: Vec3, normal: Vec3, profileShape?: ExtrusionProfile, shellMode?: false): Result<Shape3D>;
|
|
97
|
+
/** Twisted extrusion in shell mode, returning `[shell, startWire, endWire]`. */
|
|
98
|
+
export declare function twistExtrude(wire: ClosedWire<Dimension>, angleDegrees: number, center: Vec3, normal: Vec3, profileShape: ExtrusionProfile | undefined, shellMode: true): Result<[Shape3D, Wire, Wire]>;
|
|
99
|
+
/** Twisted extrusion with a shell mode known only at runtime. */
|
|
88
100
|
export declare function twistExtrude(wire: ClosedWire<Dimension>, angleDegrees: number, center: Vec3, normal: Vec3, profileShape?: ExtrusionProfile, shellMode?: boolean): Result<Shape3D | [Shape3D, Wire, Wire]>;
|
|
89
101
|
/**
|
|
90
102
|
* Sweep multiple profile sections along a spine wire.
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_threadFns = require("./threadFns-
|
|
3
|
-
const require_loftFns = require("./loftFns-
|
|
2
|
+
const require_threadFns = require("./threadFns-YPn7KF9u.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-Uq6BhPVL.cjs");
|
|
4
4
|
exports.addChild = require_threadFns.addChild;
|
|
5
5
|
exports.addJoint = require_threadFns.addJoint;
|
|
6
6
|
exports.addStep = require_threadFns.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-
|
|
2
|
-
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-CN1R3YKa.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-DVsWk-9v.js";
|
|
3
3
|
export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-DiCMRU6Z.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { n as isClosedWire } from "./validityTypes-
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-rUpnumpL.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { d as vecNormalize, h as vecScale } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-
|
|
7
|
-
import { f as collectInputFaceHashes, g as propagateMetadataThroughRelocation, h as propagateMetadataByHash, m as propagateAllMetadata, p as hasAnyMetadata } from "./booleanFns-
|
|
8
|
-
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-
|
|
6
|
+
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-Dzhk5L6w.js";
|
|
7
|
+
import { f as collectInputFaceHashes, g as propagateMetadataThroughRelocation, h as propagateMetadataByHash, m as propagateAllMetadata, p as hasAnyMetadata } from "./booleanFns-CItcObM_.js";
|
|
8
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-Idshk6C3.js";
|
|
9
9
|
// src/topology/transformFns.ts
|
|
10
10
|
/**
|
|
11
11
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-CXnc46WG.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
7
|
-
const require_booleanFns = require("./booleanFns-
|
|
8
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-C6_6tZXG.cjs");
|
|
7
|
+
const require_booleanFns = require("./booleanFns-GBPAGQ5g.cjs");
|
|
8
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CU_vd71e.cjs");
|
|
9
9
|
// src/topology/transformFns.ts
|
|
10
10
|
/**
|
|
11
11
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
|
|
2
2
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-0Ycw298Y.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_measureFns = require("./measureFns-B0Cy7GcQ.cjs");
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-DiCMRU6Z.js";
|
|
2
2
|
import { i as wasmIndex } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
|
|
4
|
-
import { E as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
+
import { E as kernelCallRaw } from "./topologyQueryFns-CNOqc1rB.js";
|
|
5
5
|
import { r as vecCross } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import { f as withCompoundOf, h as setCachedMeasurement, m as getCachedMeasurement, p as withSubShapes } from "./measureFns-
|
|
6
|
+
import { f as withCompoundOf, h as setCachedMeasurement, m as getCachedMeasurement, p as withSubShapes } from "./measureFns-DoUWDfAP.js";
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
package/dist/projection.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cameraFns = require("./cameraFns-
|
|
2
|
+
const require_cameraFns = require("./cameraFns-C2XhSqrr.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-
|
|
1
|
+
export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-B6ujpyKy.js";
|
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-TWIfnyto.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-CqHx_Itj.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
2
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
1
|
+
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CoVtL5c9.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-D3nBhdfi.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-
|
|
3
|
-
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-
|
|
1
|
+
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-DiCMRU6Z.js";
|
|
2
|
+
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-CNOqc1rB.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-Dodcduw8.js";
|
|
4
4
|
import { t as getFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
|
|
5
|
-
import { n as getHashCode } from "./shapeFns-
|
|
6
|
-
import { n as measureArea, s as measureLength } from "./measureFns-
|
|
7
|
-
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-
|
|
5
|
+
import { n as getHashCode } from "./shapeFns-Ddh0M4Iz.js";
|
|
6
|
+
import { n as measureArea, s as measureLength } from "./measureFns-DoUWDfAP.js";
|
|
7
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-C4yjxKu4.js";
|
|
8
8
|
// src/topology/shapeRef/scoring.ts
|
|
9
9
|
/**
|
|
10
10
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-0Ycw298Y.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-DdMpocg9.cjs");
|
|
4
4
|
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
7
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
5
|
+
const require_shapeFns = require("./shapeFns-B9LB54_t.cjs");
|
|
6
|
+
const require_measureFns = require("./measureFns-B0Cy7GcQ.cjs");
|
|
7
|
+
const require_adjacencyFns = require("./adjacencyFns-BHdJW5pd.cjs");
|
|
8
8
|
// src/topology/shapeRef/scoring.ts
|
|
9
9
|
/**
|
|
10
10
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-0Ycw298Y.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
// src/topology/shapeFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-DiCMRU6Z.js";
|
|
2
2
|
import { t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-
|
|
3
|
+
import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-CNOqc1rB.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
5
|
// src/topology/shapeFns.ts
|
|
6
6
|
/**
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
2
|
+
const require_refResolveFns = require("./refResolveFns-DgM_B9WU.cjs");
|
|
3
3
|
exports.assignRoles = require_refResolveFns.assignRoles;
|
|
4
4
|
exports.captureHint = require_refResolveFns.captureHint;
|
|
5
5
|
exports.createDerivedFaceRef = require_refResolveFns.createDerivedFaceRef;
|
package/dist/shapeRef.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { h as assignRoles, g as captureHint, l as createDerivedFaceRef, p as createEdgeRef, _ as createRef, d as createVertexRef, b as defaultScorer, t as isDerivedFaceRef, n as isEdgeRef, r as isFaceRef, i as isLineageRef, a as isVertexRef, u as resolveDerivedFaceRef, m as resolveEdgeRef, o as resolveLineageRef, v as resolveRef, s as resolveRefIn, c as resolveRefParams, f as resolveVertexRef, y as updateRoles } from "./refResolveFns-
|
|
1
|
+
export { h as assignRoles, g as captureHint, l as createDerivedFaceRef, p as createEdgeRef, _ as createRef, d as createVertexRef, b as defaultScorer, t as isDerivedFaceRef, n as isEdgeRef, r as isFaceRef, i as isLineageRef, a as isVertexRef, u as resolveDerivedFaceRef, m as resolveEdgeRef, o as resolveLineageRef, v as resolveRef, s as resolveRefIn, c as resolveRefParams, f as resolveVertexRef, y as updateRoles } from "./refResolveFns-BJz9UvXM.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
1
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-DzxyXpLG.cjs");
|
|
2
2
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
3
3
|
// src/kernel/quality.ts
|
|
4
4
|
/**
|
|
@@ -2184,7 +2184,7 @@ function transformBatch$2(oc, entries) {
|
|
|
2184
2184
|
return entries.map((e) => {
|
|
2185
2185
|
switch (e.type) {
|
|
2186
2186
|
case "translate": return translate$2(oc, e.shape, e.x, e.y, e.z);
|
|
2187
|
-
case "rotate": return rotate$2(oc, e.shape, e.angle, [...e.axis], [...e.center]);
|
|
2187
|
+
case "rotate": return rotate$2(oc, e.shape, e.angle * Math.PI / 180, [...e.axis], [...e.center]);
|
|
2188
2188
|
case "scale": return scale$2(oc, e.shape, [...e.center], e.factor);
|
|
2189
2189
|
case "mirror": return mirror$2(oc, e.shape, [...e.origin], [...e.normal]);
|
|
2190
2190
|
}
|
|
@@ -2229,7 +2229,7 @@ function translate$2(oc, shape, x, y, z) {
|
|
|
2229
2229
|
return result;
|
|
2230
2230
|
}
|
|
2231
2231
|
/**
|
|
2232
|
-
* Rotates a shape around an axis.
|
|
2232
|
+
* Rotates a shape by `angle` radians around an axis.
|
|
2233
2233
|
*/
|
|
2234
2234
|
function rotate$2(oc, shape, angle, axis = [
|
|
2235
2235
|
0,
|
|
@@ -2244,7 +2244,7 @@ function rotate$2(oc, shape, angle, axis = [
|
|
|
2244
2244
|
const origin = new oc.gp_Pnt_3(...center);
|
|
2245
2245
|
const dir = new oc.gp_Dir_5(...axis);
|
|
2246
2246
|
const ax1 = new oc.gp_Ax1_2(origin, dir);
|
|
2247
|
-
trsf.SetRotation_1(ax1, angle
|
|
2247
|
+
trsf.SetRotation_1(ax1, angle);
|
|
2248
2248
|
const result = transform$3(oc, shape, trsf);
|
|
2249
2249
|
trsf.delete();
|
|
2250
2250
|
ax1.delete();
|
|
@@ -6199,7 +6199,7 @@ function translate$1(bk, shape, x, y, z) {
|
|
|
6199
6199
|
return applyMatrix$1(bk, shape, translationMatrix$1(x, y, z));
|
|
6200
6200
|
}
|
|
6201
6201
|
function rotate$1(bk, shape, angle, axis, center) {
|
|
6202
|
-
return applyMatrix$1(bk, shape, rotationMatrix$1(angle, axis, center));
|
|
6202
|
+
return applyMatrix$1(bk, shape, rotationMatrix$1(angle * 180 / Math.PI, axis, center));
|
|
6203
6203
|
}
|
|
6204
6204
|
function mirror$1(bk, shape, origin, normal) {
|
|
6205
6205
|
const h = shape;
|
|
@@ -6223,7 +6223,7 @@ function positionOnCurve(bk, shape, spine, param) {
|
|
|
6223
6223
|
const nx = tx / len, ny = ty / len;
|
|
6224
6224
|
const dot = tz / len;
|
|
6225
6225
|
let result = shape;
|
|
6226
|
-
if (Math.abs(dot + 1) < 1e-10) result = rotate$1(bk, result,
|
|
6226
|
+
if (Math.abs(dot + 1) < 1e-10) result = rotate$1(bk, result, Math.PI, [
|
|
6227
6227
|
1,
|
|
6228
6228
|
0,
|
|
6229
6229
|
0
|
|
@@ -6234,8 +6234,7 @@ function positionOnCurve(bk, shape, spine, param) {
|
|
|
6234
6234
|
nx,
|
|
6235
6235
|
0
|
|
6236
6236
|
];
|
|
6237
|
-
|
|
6238
|
-
result = rotate$1(bk, result, angleDeg, axis);
|
|
6237
|
+
result = rotate$1(bk, result, Math.acos(Math.max(-1, Math.min(1, dot))), axis);
|
|
6239
6238
|
}
|
|
6240
6239
|
return translate$1(bk, result, point[0], point[1], point[2]);
|
|
6241
6240
|
}
|
|
@@ -6249,7 +6248,7 @@ function linearPattern$1(bk, shape, direction, spacing, count) {
|
|
|
6249
6248
|
}
|
|
6250
6249
|
function circularPattern$1(bk, shape, center, axis, angleStep, count) {
|
|
6251
6250
|
const results = [shape];
|
|
6252
|
-
for (let i = 1; i < count; i++) results.push(rotate$1(bk, shape, angleStep * i, axis, center));
|
|
6251
|
+
for (let i = 1; i < count; i++) results.push(rotate$1(bk, shape, angleStep * i * Math.PI / 180, axis, center));
|
|
6253
6252
|
return results;
|
|
6254
6253
|
}
|
|
6255
6254
|
function gridPattern$1(bk, shape, directionX, directionY, spacingX, spacingY, countX, countY) {
|
|
@@ -6260,7 +6259,7 @@ function transformBatch$1(bk, entries) {
|
|
|
6260
6259
|
return entries.map((e) => {
|
|
6261
6260
|
switch (e.type) {
|
|
6262
6261
|
case "translate": return translate$1(bk, e.shape, e.x, e.y, e.z);
|
|
6263
|
-
case "rotate": return rotate$1(bk, e.shape, e.angle, e.axis, e.center);
|
|
6262
|
+
case "rotate": return rotate$1(bk, e.shape, e.angle * Math.PI / 180, e.axis, e.center);
|
|
6264
6263
|
case "scale": return scale$1(bk, e.shape, e.center, e.factor);
|
|
6265
6264
|
case "mirror": return mirror$1(bk, e.shape, e.origin, e.normal);
|
|
6266
6265
|
}
|
|
@@ -6356,7 +6355,7 @@ function transformToPlacement(bk, shape, center, direction) {
|
|
|
6356
6355
|
const nx = dx / len;
|
|
6357
6356
|
const ny = dy / len;
|
|
6358
6357
|
const dot = dz / len;
|
|
6359
|
-
if (Math.abs(dot + 1) < 1e-10) result = rotate$1(bk, result,
|
|
6358
|
+
if (Math.abs(dot + 1) < 1e-10) result = rotate$1(bk, result, Math.PI, [
|
|
6360
6359
|
1,
|
|
6361
6360
|
0,
|
|
6362
6361
|
0
|
|
@@ -6367,8 +6366,7 @@ function transformToPlacement(bk, shape, center, direction) {
|
|
|
6367
6366
|
nx,
|
|
6368
6367
|
0
|
|
6369
6368
|
];
|
|
6370
|
-
|
|
6371
|
-
result = rotate$1(bk, result, angleDeg, axis);
|
|
6369
|
+
result = rotate$1(bk, result, Math.acos(Math.max(-1, Math.min(1, dot))), axis);
|
|
6372
6370
|
}
|
|
6373
6371
|
}
|
|
6374
6372
|
if (center && (center[0] !== 0 || center[1] !== 0 || center[2] !== 0)) result = translate$1(bk, result, center[0], center[1], center[2]);
|
|
@@ -8068,7 +8066,7 @@ function translateWithHistory(bk, shape, x, y, z, inputFaceHashes, hashUpperBoun
|
|
|
8068
8066
|
return buildEvolution(bk, translate$1(bk, shape, x, y, z), inputFaceHashes, hashUpperBound, true);
|
|
8069
8067
|
}
|
|
8070
8068
|
function rotateWithHistory(bk, shape, angle, inputFaceHashes, hashUpperBound, axis, center) {
|
|
8071
|
-
return buildEvolution(bk, rotate$1(bk, shape, angle
|
|
8069
|
+
return buildEvolution(bk, rotate$1(bk, shape, angle, axis, center), inputFaceHashes, hashUpperBound, true);
|
|
8072
8070
|
}
|
|
8073
8071
|
function mirrorWithHistory(bk, shape, origin, normal, inputFaceHashes, hashUpperBound) {
|
|
8074
8072
|
return buildEvolution(bk, mirror$1(bk, shape, origin, normal), inputFaceHashes, hashUpperBound, true);
|
|
@@ -16711,9 +16709,8 @@ function isShape1D(s) {
|
|
|
16711
16709
|
*
|
|
16712
16710
|
* **Note**: When `D` is `'2D'`, Shell/Solid/CompSolid are not valid members
|
|
16713
16711
|
* of `AnyShape<'2D'>`. If the kernel shape happens to be one of these types,
|
|
16714
|
-
* they will be cast unsoundly.
|
|
16715
|
-
*
|
|
16716
|
-
* for normal usage.
|
|
16712
|
+
* they will be cast unsoundly. For normal usage, call `castShape()` without a
|
|
16713
|
+
* dimension (it defaults to `'3D'`) or {@link castShape3D}, which does the same.
|
|
16717
16714
|
*/
|
|
16718
16715
|
function castShape(ocShape, dim) {
|
|
16719
16716
|
const kernel = getKernel();
|
|
@@ -16728,7 +16725,12 @@ function castShape(ocShape, dim) {
|
|
|
16728
16725
|
if (st === "compsolid") return createCompSolid(dc);
|
|
16729
16726
|
return createCompound(dc, dim);
|
|
16730
16727
|
}
|
|
16731
|
-
/**
|
|
16728
|
+
/**
|
|
16729
|
+
* Cast a raw kernel shape with the `'3D'` dimension brand, the same as
|
|
16730
|
+
* `castShape(ocShape)`. The 3D is the space the shape lives in, not its
|
|
16731
|
+
* topology: the result can be any kind from vertex to compound. Narrow it with
|
|
16732
|
+
* {@link isShape3D} to get a {@link Shape3D} (shell, solid, compsolid, or compound).
|
|
16733
|
+
*/
|
|
16732
16734
|
function castShape3D(ocShape) {
|
|
16733
16735
|
return castShape(ocShape);
|
|
16734
16736
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as UnsupportedKernelOperationError, C as reverseCurve2d$2, D as tangentCurve2d, E as serializeCurve2d$2, N as EXACT_BREP_CAPABILITIES, O as translateCurve2d$2, P as OCCT_CAPABILITIES, S as offsetCurve2d$2, T as scaleCurve2d$2, _ as makeCircle2d$2, a as buildAsciiSTL, b as mirrorAcrossAxis, c as createBBox2d, d as deserializeCurve2d$2, f as evaluateCurve2d$2, g as makeBezier2d$2, h as makeArc2dThreePoints, i as DEFAULT_STL_TOLERANCE, j as isUnsupportedKernelOperationError, k as quickHull, l as curveBounds, m as makeArc2dTangent, o as buildBinarySTL, p as intersectCurves2dFn, r as DEFAULT_STL_ANGULAR_TOLERANCE, s as addCurveToBBox, t as OcctWasmAdapter, u as curveTypeName, v as makeEllipse2d$2, w as rotateCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-
|
|
1
|
+
import { A as UnsupportedKernelOperationError, C as reverseCurve2d$2, D as tangentCurve2d, E as serializeCurve2d$2, N as EXACT_BREP_CAPABILITIES, O as translateCurve2d$2, P as OCCT_CAPABILITIES, S as offsetCurve2d$2, T as scaleCurve2d$2, _ as makeCircle2d$2, a as buildAsciiSTL, b as mirrorAcrossAxis, c as createBBox2d, d as deserializeCurve2d$2, f as evaluateCurve2d$2, g as makeBezier2d$2, h as makeArc2dThreePoints, i as DEFAULT_STL_TOLERANCE, j as isUnsupportedKernelOperationError, k as quickHull, l as curveBounds, m as makeArc2dTangent, o as buildBinarySTL, p as intersectCurves2dFn, r as DEFAULT_STL_ANGULAR_TOLERANCE, s as addCurveToBBox, t as OcctWasmAdapter, u as curveTypeName, v as makeEllipse2d$2, w as rotateCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-DeVQrL5n.js";
|
|
2
2
|
import { i as wasmIndex, r as vec3At } from "./bug-ClMTAJhe.js";
|
|
3
3
|
// src/kernel/quality.ts
|
|
4
4
|
/**
|
|
@@ -2184,7 +2184,7 @@ function transformBatch$2(oc, entries) {
|
|
|
2184
2184
|
return entries.map((e) => {
|
|
2185
2185
|
switch (e.type) {
|
|
2186
2186
|
case "translate": return translate$2(oc, e.shape, e.x, e.y, e.z);
|
|
2187
|
-
case "rotate": return rotate$2(oc, e.shape, e.angle, [...e.axis], [...e.center]);
|
|
2187
|
+
case "rotate": return rotate$2(oc, e.shape, e.angle * Math.PI / 180, [...e.axis], [...e.center]);
|
|
2188
2188
|
case "scale": return scale$2(oc, e.shape, [...e.center], e.factor);
|
|
2189
2189
|
case "mirror": return mirror$2(oc, e.shape, [...e.origin], [...e.normal]);
|
|
2190
2190
|
}
|
|
@@ -2229,7 +2229,7 @@ function translate$2(oc, shape, x, y, z) {
|
|
|
2229
2229
|
return result;
|
|
2230
2230
|
}
|
|
2231
2231
|
/**
|
|
2232
|
-
* Rotates a shape around an axis.
|
|
2232
|
+
* Rotates a shape by `angle` radians around an axis.
|
|
2233
2233
|
*/
|
|
2234
2234
|
function rotate$2(oc, shape, angle, axis = [
|
|
2235
2235
|
0,
|
|
@@ -2244,7 +2244,7 @@ function rotate$2(oc, shape, angle, axis = [
|
|
|
2244
2244
|
const origin = new oc.gp_Pnt_3(...center);
|
|
2245
2245
|
const dir = new oc.gp_Dir_5(...axis);
|
|
2246
2246
|
const ax1 = new oc.gp_Ax1_2(origin, dir);
|
|
2247
|
-
trsf.SetRotation_1(ax1, angle
|
|
2247
|
+
trsf.SetRotation_1(ax1, angle);
|
|
2248
2248
|
const result = transform$3(oc, shape, trsf);
|
|
2249
2249
|
trsf.delete();
|
|
2250
2250
|
ax1.delete();
|
|
@@ -6199,7 +6199,7 @@ function translate$1(bk, shape, x, y, z) {
|
|
|
6199
6199
|
return applyMatrix$1(bk, shape, translationMatrix$1(x, y, z));
|
|
6200
6200
|
}
|
|
6201
6201
|
function rotate$1(bk, shape, angle, axis, center) {
|
|
6202
|
-
return applyMatrix$1(bk, shape, rotationMatrix$1(angle, axis, center));
|
|
6202
|
+
return applyMatrix$1(bk, shape, rotationMatrix$1(angle * 180 / Math.PI, axis, center));
|
|
6203
6203
|
}
|
|
6204
6204
|
function mirror$1(bk, shape, origin, normal) {
|
|
6205
6205
|
const h = shape;
|
|
@@ -6223,7 +6223,7 @@ function positionOnCurve(bk, shape, spine, param) {
|
|
|
6223
6223
|
const nx = tx / len, ny = ty / len;
|
|
6224
6224
|
const dot = tz / len;
|
|
6225
6225
|
let result = shape;
|
|
6226
|
-
if (Math.abs(dot + 1) < 1e-10) result = rotate$1(bk, result,
|
|
6226
|
+
if (Math.abs(dot + 1) < 1e-10) result = rotate$1(bk, result, Math.PI, [
|
|
6227
6227
|
1,
|
|
6228
6228
|
0,
|
|
6229
6229
|
0
|
|
@@ -6234,8 +6234,7 @@ function positionOnCurve(bk, shape, spine, param) {
|
|
|
6234
6234
|
nx,
|
|
6235
6235
|
0
|
|
6236
6236
|
];
|
|
6237
|
-
|
|
6238
|
-
result = rotate$1(bk, result, angleDeg, axis);
|
|
6237
|
+
result = rotate$1(bk, result, Math.acos(Math.max(-1, Math.min(1, dot))), axis);
|
|
6239
6238
|
}
|
|
6240
6239
|
return translate$1(bk, result, point[0], point[1], point[2]);
|
|
6241
6240
|
}
|
|
@@ -6249,7 +6248,7 @@ function linearPattern$1(bk, shape, direction, spacing, count) {
|
|
|
6249
6248
|
}
|
|
6250
6249
|
function circularPattern$1(bk, shape, center, axis, angleStep, count) {
|
|
6251
6250
|
const results = [shape];
|
|
6252
|
-
for (let i = 1; i < count; i++) results.push(rotate$1(bk, shape, angleStep * i, axis, center));
|
|
6251
|
+
for (let i = 1; i < count; i++) results.push(rotate$1(bk, shape, angleStep * i * Math.PI / 180, axis, center));
|
|
6253
6252
|
return results;
|
|
6254
6253
|
}
|
|
6255
6254
|
function gridPattern$1(bk, shape, directionX, directionY, spacingX, spacingY, countX, countY) {
|
|
@@ -6260,7 +6259,7 @@ function transformBatch$1(bk, entries) {
|
|
|
6260
6259
|
return entries.map((e) => {
|
|
6261
6260
|
switch (e.type) {
|
|
6262
6261
|
case "translate": return translate$1(bk, e.shape, e.x, e.y, e.z);
|
|
6263
|
-
case "rotate": return rotate$1(bk, e.shape, e.angle, e.axis, e.center);
|
|
6262
|
+
case "rotate": return rotate$1(bk, e.shape, e.angle * Math.PI / 180, e.axis, e.center);
|
|
6264
6263
|
case "scale": return scale$1(bk, e.shape, e.center, e.factor);
|
|
6265
6264
|
case "mirror": return mirror$1(bk, e.shape, e.origin, e.normal);
|
|
6266
6265
|
}
|
|
@@ -6356,7 +6355,7 @@ function transformToPlacement(bk, shape, center, direction) {
|
|
|
6356
6355
|
const nx = dx / len;
|
|
6357
6356
|
const ny = dy / len;
|
|
6358
6357
|
const dot = dz / len;
|
|
6359
|
-
if (Math.abs(dot + 1) < 1e-10) result = rotate$1(bk, result,
|
|
6358
|
+
if (Math.abs(dot + 1) < 1e-10) result = rotate$1(bk, result, Math.PI, [
|
|
6360
6359
|
1,
|
|
6361
6360
|
0,
|
|
6362
6361
|
0
|
|
@@ -6367,8 +6366,7 @@ function transformToPlacement(bk, shape, center, direction) {
|
|
|
6367
6366
|
nx,
|
|
6368
6367
|
0
|
|
6369
6368
|
];
|
|
6370
|
-
|
|
6371
|
-
result = rotate$1(bk, result, angleDeg, axis);
|
|
6369
|
+
result = rotate$1(bk, result, Math.acos(Math.max(-1, Math.min(1, dot))), axis);
|
|
6372
6370
|
}
|
|
6373
6371
|
}
|
|
6374
6372
|
if (center && (center[0] !== 0 || center[1] !== 0 || center[2] !== 0)) result = translate$1(bk, result, center[0], center[1], center[2]);
|
|
@@ -8068,7 +8066,7 @@ function translateWithHistory(bk, shape, x, y, z, inputFaceHashes, hashUpperBoun
|
|
|
8068
8066
|
return buildEvolution(bk, translate$1(bk, shape, x, y, z), inputFaceHashes, hashUpperBound, true);
|
|
8069
8067
|
}
|
|
8070
8068
|
function rotateWithHistory(bk, shape, angle, inputFaceHashes, hashUpperBound, axis, center) {
|
|
8071
|
-
return buildEvolution(bk, rotate$1(bk, shape, angle
|
|
8069
|
+
return buildEvolution(bk, rotate$1(bk, shape, angle, axis, center), inputFaceHashes, hashUpperBound, true);
|
|
8072
8070
|
}
|
|
8073
8071
|
function mirrorWithHistory(bk, shape, origin, normal, inputFaceHashes, hashUpperBound) {
|
|
8074
8072
|
return buildEvolution(bk, mirror$1(bk, shape, origin, normal), inputFaceHashes, hashUpperBound, true);
|
|
@@ -16711,9 +16709,8 @@ function isShape1D(s) {
|
|
|
16711
16709
|
*
|
|
16712
16710
|
* **Note**: When `D` is `'2D'`, Shell/Solid/CompSolid are not valid members
|
|
16713
16711
|
* of `AnyShape<'2D'>`. If the kernel shape happens to be one of these types,
|
|
16714
|
-
* they will be cast unsoundly.
|
|
16715
|
-
*
|
|
16716
|
-
* for normal usage.
|
|
16712
|
+
* they will be cast unsoundly. For normal usage, call `castShape()` without a
|
|
16713
|
+
* dimension (it defaults to `'3D'`) or {@link castShape3D}, which does the same.
|
|
16717
16714
|
*/
|
|
16718
16715
|
function castShape(ocShape, dim) {
|
|
16719
16716
|
const kernel = getKernel();
|
|
@@ -16728,7 +16725,12 @@ function castShape(ocShape, dim) {
|
|
|
16728
16725
|
if (st === "compsolid") return createCompSolid(dc);
|
|
16729
16726
|
return createCompound(dc, dim);
|
|
16730
16727
|
}
|
|
16731
|
-
/**
|
|
16728
|
+
/**
|
|
16729
|
+
* Cast a raw kernel shape with the `'3D'` dimension brand, the same as
|
|
16730
|
+
* `castShape(ocShape)`. The 3D is the space the shape lives in, not its
|
|
16731
|
+
* topology: the result can be any kind from vertex to compound. Narrow it with
|
|
16732
|
+
* {@link isShape3D} to get a {@link Shape3D} (shell, solid, compsolid, or compound).
|
|
16733
|
+
*/
|
|
16732
16734
|
function castShape3D(ocShape) {
|
|
16733
16735
|
return castShape(ocShape);
|
|
16734
16736
|
}
|
|
@@ -2,7 +2,8 @@ import { default as Sketch, SketchInterface } from './sketch.js';
|
|
|
2
2
|
import { PointInput } from '../core/types.js';
|
|
3
3
|
import { ExtrusionProfile } from '../operations/extrudeUtils.js';
|
|
4
4
|
import { LoftOptions } from '../operations/loftFns.js';
|
|
5
|
-
import {
|
|
5
|
+
import { OrientedFace, Shape3D } from '../core/shapeTypes.js';
|
|
6
|
+
import { PlanarFace } from '../core/validityTypes.js';
|
|
6
7
|
/**
|
|
7
8
|
* Represent a face with holes as a group of sketches (one outer + zero or more inner).
|
|
8
9
|
*
|
|
@@ -37,7 +38,7 @@ export default class CompoundSketch implements SketchInterface {
|
|
|
37
38
|
*/
|
|
38
39
|
get wires(): import('../core/shapeTypes.js').Compound;
|
|
39
40
|
/** Build a face from the outer boundary with inner wires subtracted as holes. */
|
|
40
|
-
face():
|
|
41
|
+
face(): OrientedFace & PlanarFace;
|
|
41
42
|
/**
|
|
42
43
|
* Extrude the compound face (with holes) along the default or given direction.
|
|
43
44
|
*
|
|
@@ -2,11 +2,12 @@ import { Plane } from '../core/planeTypes.js';
|
|
|
2
2
|
import { Vec3, PointInput } from '../core/types.js';
|
|
3
3
|
import { ExtrusionProfile, SweepOptions } from '../operations/extrudeUtils.js';
|
|
4
4
|
import { LoftOptions } from '../operations/loftFns.js';
|
|
5
|
-
import { ClosedWire, Face, PlanarWire, Shape3D, Wire } from '../core/shapeTypes.js';
|
|
5
|
+
import { ClosedWire, Face, OrientedFace, PlanarWire, Shape3D, Wire } from '../core/shapeTypes.js';
|
|
6
|
+
import { PlanarFace } from '../core/validityTypes.js';
|
|
6
7
|
/** Common interface for sketch-like objects that can be extruded, revolved, or lofted. */
|
|
7
8
|
export interface SketchInterface {
|
|
8
9
|
/** Transforms the lines into a face. The lines should be closed. */
|
|
9
|
-
face():
|
|
10
|
+
face(): OrientedFace & PlanarFace;
|
|
10
11
|
/**
|
|
11
12
|
* Revolves the drawing on an axis (defined by its direction and an origin
|
|
12
13
|
* (defaults to the sketch origin)
|
|
@@ -103,11 +104,11 @@ export default class Sketch implements SketchInterface {
|
|
|
103
104
|
/** Set the default extrusion/normal direction. */
|
|
104
105
|
set defaultDirection(newDirection: PointInput);
|
|
105
106
|
/** Transforms the lines into a face. The lines should be closed. */
|
|
106
|
-
face():
|
|
107
|
+
face(): OrientedFace & PlanarFace;
|
|
107
108
|
/** Return a clone of the underlying wire. */
|
|
108
109
|
wires(): Wire;
|
|
109
110
|
/** Alias for {@link Sketch.face}. */
|
|
110
|
-
faces():
|
|
111
|
+
faces(): OrientedFace & PlanarFace;
|
|
111
112
|
/**
|
|
112
113
|
* Revolves the drawing on an axis (defined by its direction and an origin
|
|
113
114
|
* (defaults to the sketch origin)
|
|
@@ -2,7 +2,8 @@ import { PointInput, Vec3 } from '../core/types.js';
|
|
|
2
2
|
import { ExtrusionProfile, SweepOptions } from '../operations/extrudeUtils.js';
|
|
3
3
|
import { LoftOptions } from '../operations/loftFns.js';
|
|
4
4
|
import { Plane } from '../core/planeTypes.js';
|
|
5
|
-
import { Compound,
|
|
5
|
+
import { Compound, OrientedFace, Shape3D } from '../core/shapeTypes.js';
|
|
6
|
+
import { PlanarFace } from '../core/validityTypes.js';
|
|
6
7
|
import { default as CompoundSketch } from './compoundSketch.js';
|
|
7
8
|
import { default as Sketch, SketchInterface } from './sketch.js';
|
|
8
9
|
/**
|
|
@@ -30,7 +31,7 @@ export default class Sketches implements SketchInterface {
|
|
|
30
31
|
/** Release the kernel resources of every contained sketch. */
|
|
31
32
|
delete(): void;
|
|
32
33
|
/** Build a face from the sole contained profile (see {@link Sketches.faces}). */
|
|
33
|
-
face():
|
|
34
|
+
face(): OrientedFace & PlanarFace;
|
|
34
35
|
/** Loft from the sole contained profile to one or more other sketches. */
|
|
35
36
|
loftWith(otherSketches: SketchInterface | SketchInterface[], loftConfig?: LoftOptions, returnShell?: boolean): Shape3D;
|
|
36
37
|
/** Sweep a profile along the sole contained sketch's wire. */
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
3
|
-
const require_drawFns = require("./drawFns-
|
|
4
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CRFpnZAS.cjs");
|
|
3
|
+
const require_drawFns = require("./drawFns-hFjTvdw4.cjs");
|
|
4
|
+
const require_textBlueprints = require("./textBlueprints-BmIxy1fi.cjs");
|
|
5
5
|
// src/sketching.ts
|
|
6
6
|
/**
|
|
7
7
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
package/dist/sketching.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
2
|
-
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
3
|
-
import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-Dpdgf5aR.js";
|
|
2
|
+
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-D9q4Hxc_.js";
|
|
3
|
+
import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-DyT-kfxc.js";
|
|
4
4
|
// src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-0Ycw298Y.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
+
const require_faceFns = require("./faceFns-DdMpocg9.cjs");
|
|
6
6
|
// src/topology/metadata/originTrackingFns.ts
|
|
7
7
|
/**
|
|
8
8
|
* Face origin tracking — tag faces with integer origins and propagate
|