brepjs 8.8.0 → 8.8.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/lib/vectorOperations.d.ts +1 -3
- package/dist/2d/lib/vectorOperations.d.ts.map +1 -1
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-DEhjUTv4.cjs → Blueprint-BmbNUnGI.cjs} +8 -8
- package/dist/{Blueprint-BihoXiSm.js → Blueprint-C-JJkkwL.js} +8 -8
- package/dist/{boolean2D-B7MAHWWy.js → boolean2D-Dgnuy63w.js} +10 -10
- package/dist/{boolean2D-BMw-2GRS.cjs → boolean2D-q5FOdOQW.cjs} +10 -10
- package/dist/{booleanFns-CxU6z_LD.js → booleanFns--Orezl-b.js} +6 -6
- package/dist/{booleanFns-BOrYk5DW.cjs → booleanFns-CFit7JYt.cjs} +6 -6
- package/dist/brepjs.cjs +33 -148
- package/dist/brepjs.js +85 -200
- package/dist/core/errors.d.ts +0 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/occtBoundary.d.ts +1 -5
- package/dist/core/occtBoundary.d.ts.map +1 -1
- package/dist/core/planeOps.d.ts +0 -12
- package/dist/core/planeOps.d.ts.map +1 -1
- package/dist/core/vecOps.d.ts +1 -20
- package/dist/core/vecOps.d.ts.map +1 -1
- package/dist/core.cjs +4 -4
- package/dist/core.js +4 -4
- package/dist/{cornerFinder-Dh6RKiNy.js → cornerFinder-KNTFoGrm.js} +1 -1
- package/dist/{cornerFinder-DilC5fiE.cjs → cornerFinder-v4un1Fr9.cjs} +1 -1
- package/dist/{curveFns-BT8cTVDA.cjs → curveFns-6ovDM_sR.cjs} +3 -3
- package/dist/{curveFns-BJG6oqMt.js → curveFns-BhQECv8e.js} +3 -3
- package/dist/{drawFns-DcEDgZzq.cjs → drawFns-WgXeXHH1.cjs} +13 -13
- package/dist/{drawFns-aKd56G2a.js → drawFns-XwroLxdb.js} +13 -13
- package/dist/{errors-Coh_5_19.js → errors-DJ92ermb.js} +0 -2
- package/dist/{errors-eRQu29oc.cjs → errors-NNmTtM5u.cjs} +0 -2
- package/dist/{faceFns-C8ye0H_K.js → faceFns-3PDjBeW7.js} +3 -3
- package/dist/{faceFns-B8fGirMy.cjs → faceFns-CxaLWOjc.cjs} +3 -3
- package/dist/{helpers-MiJaYJMA.cjs → helpers-CRfqaW0Y.cjs} +6 -6
- package/dist/{helpers-8QToWU3Q.js → helpers-CtBCzEqs.js} +6 -6
- package/dist/io/objImportFns.d.ts.map +1 -1
- package/dist/io/threemfImportFns.d.ts.map +1 -1
- package/dist/io.cjs +5 -5
- package/dist/io.js +5 -5
- package/dist/kernel/constructorOps.d.ts +6 -0
- package/dist/kernel/constructorOps.d.ts.map +1 -1
- package/dist/kernel/hullOps.d.ts.map +1 -1
- package/dist/{loft-DCEZpu53.cjs → loft-CVb-IjEI.cjs} +7 -7
- package/dist/{loft-C810lPN5.js → loft-DMFjK6lk.js} +7 -7
- package/dist/{measurement-BFotSPr0.cjs → measurement-CecYIt3s.cjs} +3 -3
- package/dist/{measurement-BT2jlvKC.js → measurement-DHDLAH7-.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CxYud6A4.cjs → meshFns-CPNNlpbw.cjs} +3 -3
- package/dist/{meshFns-DPbSUo0q.js → meshFns-DAmWVyEp.js} +3 -3
- package/dist/{occtBoundary-ChEJsbOT.cjs → occtBoundary-Cqfsau2c.cjs} +31 -29
- package/dist/{occtBoundary-DC1yVJex.js → occtBoundary-DvBywHyU.js} +38 -36
- package/dist/operations/exporterUtils.d.ts +0 -9
- package/dist/operations/exporterUtils.d.ts.map +1 -1
- package/dist/operations/roofFns.d.ts.map +1 -1
- package/dist/{operations-CckDdRJ0.cjs → operations-BQ25CPI8.cjs} +6 -6
- package/dist/{operations-IFpeXZme.js → operations-vN0tcoaU.js} +6 -6
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query.cjs +5 -5
- package/dist/query.js +6 -6
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/{shapeFns-CQWvvjmd.cjs → shapeFns-C785aeVn.cjs} +4 -4
- package/dist/{shapeFns-BTnqah-6.js → shapeFns-ClpALED4.js} +4 -4
- package/dist/{shapeTypes-MK0PKst9.cjs → shapeTypes-CIijJxCz.cjs} +1 -1
- package/dist/{shapeTypes-BVd0rRNe.js → shapeTypes-DnwCo942.js} +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{surfaceBuilders-5Ci2Du77.cjs → surfaceBuilders-CC0ZQGix.cjs} +5 -5
- package/dist/{surfaceBuilders-nuWe3gns.js → surfaceBuilders-CrJtFu2a.js} +5 -5
- package/dist/topology/api.d.ts.map +1 -1
- package/dist/topology/surfaceFns.d.ts.map +1 -1
- package/dist/{topology-P-u0NDwX.js → topology-CqyxpmEh.js} +8 -8
- package/dist/{topology-C06jndeV.cjs → topology-zG8maSDK.cjs} +8 -8
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/dist/{vectors-Dp17lKnm.js → vectors-2lOjaa8N.js} +2 -2
- package/dist/{vectors-DrAMMsHl.cjs → vectors-CGLqemPY.cjs} +2 -2
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +4 -4
package/dist/core/vecOps.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vec3
|
|
1
|
+
import { Vec3 } from './types.js';
|
|
2
2
|
/** Add two 3D vectors component-wise. */
|
|
3
3
|
export declare function vecAdd(a: Vec3, b: Vec3): Vec3;
|
|
4
4
|
/** Subtract vector `b` from vector `a` component-wise. */
|
|
@@ -45,23 +45,4 @@ export declare function vecProjectToPlane(v: Vec3, planeOrigin: Vec3, planeNorma
|
|
|
45
45
|
export declare function vecRotate(v: Vec3, axis: Vec3, angleRad: number): Vec3;
|
|
46
46
|
/** Format a Vec3 as a human-readable string rounded to 3 decimal places. */
|
|
47
47
|
export declare function vecRepr(v: Vec3): string;
|
|
48
|
-
/** Add two 2D vectors component-wise. */
|
|
49
|
-
export declare function vec2Add(a: Vec2, b: Vec2): Vec2;
|
|
50
|
-
/** Subtract vector `b` from vector `a` in 2D. */
|
|
51
|
-
export declare function vec2Sub(a: Vec2, b: Vec2): Vec2;
|
|
52
|
-
/** Multiply each component of a 2D vector by a scalar. */
|
|
53
|
-
export declare function vec2Scale(v: Vec2, s: number): Vec2;
|
|
54
|
-
/** Compute the Euclidean length of a 2D vector. */
|
|
55
|
-
export declare function vec2Length(v: Vec2): number;
|
|
56
|
-
/** Compute the Euclidean distance between two 2D points. */
|
|
57
|
-
export declare function vec2Distance(a: Vec2, b: Vec2): number;
|
|
58
|
-
/** Return a unit-length 2D vector in the same direction, or `[0,0]` for zero input. */
|
|
59
|
-
export declare function vec2Normalize(v: Vec2): Vec2;
|
|
60
|
-
/**
|
|
61
|
-
* Test whether two 2D vectors are approximately equal.
|
|
62
|
-
*
|
|
63
|
-
* @param tolerance - Per-component absolute tolerance.
|
|
64
|
-
* @default tolerance `1e-5`
|
|
65
|
-
*/
|
|
66
|
-
export declare function vec2Equals(a: Vec2, b: Vec2, tolerance?: number): boolean;
|
|
67
48
|
//# sourceMappingURL=vecOps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vecOps.d.ts","sourceRoot":"","sources":["../../src/core/vecOps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"vecOps.d.ts","sourceRoot":"","sources":["../../src/core/vecOps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAMvC,yCAAyC;AACzC,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CA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AAI,EAAE,WAAW,EAAE,IAAI,GAAG,IAAI,CAMrF;AAED,sDAAsD;AACtD,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAYrE;AAQD,4EAA4E;AAC5E,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAEvC"}
|
package/dist/core.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
+
const occtBoundary = require("./occtBoundary-Cqfsau2c.cjs");
|
|
4
4
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
5
|
-
const errors = require("./errors-
|
|
6
|
-
const vectors = require("./vectors-
|
|
7
|
-
const shapeTypes = require("./shapeTypes-
|
|
5
|
+
const errors = require("./errors-NNmTtM5u.cjs");
|
|
6
|
+
const vectors = require("./vectors-CGLqemPY.cjs");
|
|
7
|
+
const shapeTypes = require("./shapeTypes-CIijJxCz.cjs");
|
|
8
8
|
const result = require("./result.cjs");
|
|
9
9
|
exports.resolveDirection = occtBoundary.resolveDirection;
|
|
10
10
|
exports.toVec2 = occtBoundary.toVec2;
|
package/dist/core.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r, t, a } from "./occtBoundary-
|
|
1
|
+
import { r, t, a } from "./occtBoundary-DvBywHyU.js";
|
|
2
2
|
import { D, H, R, v, a as a2, b, c, d, e, f, g, h, i, j, k, l, m, n, o } from "./vecOps-ZDdZWbwT.js";
|
|
3
|
-
import { O, a as a3, c as c2, b as b2, e as e2, f as f2, i as i2, d as d2, g as g2, m as m2, h as h2, j as j2, k as k2, o as o2, l as l2, q, s, t as t2, n as n2, p, u, r as r2, v as v2, w, x } from "./errors-
|
|
4
|
-
import { c as c3, a as a4, p as p2, r as r3, t as t3 } from "./vectors-
|
|
5
|
-
import { D as D2, c as c4, a as a5, b as b3, g as g3, i as i3, d as d3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, w as w2 } from "./shapeTypes-
|
|
3
|
+
import { O, a as a3, c as c2, b as b2, e as e2, f as f2, i as i2, d as d2, g as g2, m as m2, h as h2, j as j2, k as k2, o as o2, l as l2, q, s, t as t2, n as n2, p, u, r as r2, v as v2, w, x } from "./errors-DJ92ermb.js";
|
|
4
|
+
import { c as c3, a as a4, p as p2, r as r3, t as t3 } from "./vectors-2lOjaa8N.js";
|
|
5
|
+
import { D as D2, c as c4, a as a5, b as b3, g as g3, i as i3, d as d3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, w as w2 } from "./shapeTypes-DnwCo942.js";
|
|
6
6
|
import { BrepBugError, bug } from "./result.js";
|
|
7
7
|
export {
|
|
8
8
|
BrepBugError,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-
|
|
1
|
+
import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-CtBCzEqs.js";
|
|
2
2
|
import { D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
3
3
|
const PI_2 = 2 * Math.PI;
|
|
4
4
|
function positiveHalfAngle(angle) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
4
|
-
const errors = require("./errors-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-Cqfsau2c.cjs");
|
|
3
|
+
const shapeTypes = require("./shapeTypes-CIijJxCz.cjs");
|
|
4
|
+
const errors = require("./errors-NNmTtM5u.cjs");
|
|
5
5
|
let CURVE_TYPES_MAP = null;
|
|
6
6
|
const getCurveTypesMap = (refresh) => {
|
|
7
7
|
if (CURVE_TYPES_MAP && !refresh) return CURVE_TYPES_MAP;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as getKernel } from "./occtBoundary-
|
|
2
|
-
import { c as castShape, d as isEdge, m as isWire, n as gcWithScope } from "./shapeTypes-
|
|
3
|
-
import { e as err, p as typeCastError, l as ok, u as unwrap } from "./errors-
|
|
1
|
+
import { g as getKernel } from "./occtBoundary-DvBywHyU.js";
|
|
2
|
+
import { c as castShape, d as isEdge, m as isWire, n as gcWithScope } from "./shapeTypes-DnwCo942.js";
|
|
3
|
+
import { e as err, p as typeCastError, l as ok, u as unwrap } from "./errors-DJ92ermb.js";
|
|
4
4
|
let CURVE_TYPES_MAP = null;
|
|
5
5
|
const getCurveTypesMap = (refresh) => {
|
|
6
6
|
if (CURVE_TYPES_MAP && !refresh) return CURVE_TYPES_MAP;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const errors = require("./errors-
|
|
3
|
-
const vectors = require("./vectors-
|
|
4
|
-
const occtBoundary = require("./occtBoundary-
|
|
2
|
+
const errors = require("./errors-NNmTtM5u.cjs");
|
|
3
|
+
const vectors = require("./vectors-CGLqemPY.cjs");
|
|
4
|
+
const occtBoundary = require("./occtBoundary-Cqfsau2c.cjs");
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
|
-
const boolean2D = require("./boolean2D-
|
|
7
|
-
const faceFns = require("./faceFns-
|
|
8
|
-
const curveFns = require("./curveFns-
|
|
9
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
-
const shapeTypes = require("./shapeTypes-
|
|
11
|
-
const Blueprint = require("./Blueprint-
|
|
6
|
+
const boolean2D = require("./boolean2D-q5FOdOQW.cjs");
|
|
7
|
+
const faceFns = require("./faceFns-CxaLWOjc.cjs");
|
|
8
|
+
const curveFns = require("./curveFns-6ovDM_sR.cjs");
|
|
9
|
+
const surfaceBuilders = require("./surfaceBuilders-CC0ZQGix.cjs");
|
|
10
|
+
const shapeTypes = require("./shapeTypes-CIijJxCz.cjs");
|
|
11
|
+
const Blueprint = require("./Blueprint-BmbNUnGI.cjs");
|
|
12
12
|
const result = require("./result.cjs");
|
|
13
|
-
const helpers = require("./helpers-
|
|
14
|
-
const shapeFns = require("./shapeFns-
|
|
15
|
-
const loft = require("./loft-
|
|
13
|
+
const helpers = require("./helpers-CRfqaW0Y.cjs");
|
|
14
|
+
const shapeFns = require("./shapeFns-C785aeVn.cjs");
|
|
15
|
+
const loft = require("./loft-CVb-IjEI.cjs");
|
|
16
16
|
const opentype = require("opentype.js");
|
|
17
|
-
const cornerFinder = require("./cornerFinder-
|
|
17
|
+
const cornerFinder = require("./cornerFinder-v4un1Fr9.cjs");
|
|
18
18
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
19
19
|
const startPoints = new boolean2D.Flatbush(curves.length);
|
|
20
20
|
curves.forEach((c) => {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { u as unwrap, g as isOk, e as err, x as validationError, l as ok } from "./errors-
|
|
2
|
-
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-
|
|
3
|
-
import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-
|
|
1
|
+
import { u as unwrap, g as isOk, e as err, x as validationError, l as ok } from "./errors-DJ92ermb.js";
|
|
2
|
+
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-2lOjaa8N.js";
|
|
3
|
+
import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-DvBywHyU.js";
|
|
4
4
|
import { n as vecScale, j as vecNormalize, v as vecAdd, o as vecSub, b as vecCross, m as vecRotate, R as RAD2DEG, g as vecLength, e as vecEquals, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
5
|
-
import { b as Flatbush, c as convertSvgEllipseParams, d as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, e as Blueprints, C as CompoundBlueprint, f as cut2D, i as intersectCurves, g as fuse2D, m as make2dOffset, h as filletCurves, j as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, k as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-
|
|
6
|
-
import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-
|
|
7
|
-
import { c as curveTangentAt, a as curveEndPoint, b as getCurveType, o as offsetWire2D } from "./curveFns-
|
|
8
|
-
import { a as makeLine, d as makeThreePointArc, e as makeTangentArc, f as makeEllipseArc, g as makeBezierCurve, b as assembleWire, h as addHolesInFace, m as makeFace, i as makeCircle, j as makeEllipse, c as makeHelix, k as makeBSplineApproximation } from "./surfaceBuilders-
|
|
9
|
-
import { o as createWire, r as localGC, q as createFace, e as isFace, n as gcWithScope, c as castShape } from "./shapeTypes-
|
|
10
|
-
import { m as mirror, B as Blueprint, C as Curve2D, a as make2dSegmentCurve, b as make2dArcFromCenter, c as approximateAsSvgCompatibleCurve, d as BoundingBox2d, e as edgeToCurve, f as make2dInerpolatedBSplineCurve, g as make2dCircle, h as make2dEllipse, i as deserializeCurve2D } from "./Blueprint-
|
|
5
|
+
import { b as Flatbush, c as convertSvgEllipseParams, d as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, e as Blueprints, C as CompoundBlueprint, f as cut2D, i as intersectCurves, g as fuse2D, m as make2dOffset, h as filletCurves, j as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, k as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-Dgnuy63w.js";
|
|
6
|
+
import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-3PDjBeW7.js";
|
|
7
|
+
import { c as curveTangentAt, a as curveEndPoint, b as getCurveType, o as offsetWire2D } from "./curveFns-BhQECv8e.js";
|
|
8
|
+
import { a as makeLine, d as makeThreePointArc, e as makeTangentArc, f as makeEllipseArc, g as makeBezierCurve, b as assembleWire, h as addHolesInFace, m as makeFace, i as makeCircle, j as makeEllipse, c as makeHelix, k as makeBSplineApproximation } from "./surfaceBuilders-CrJtFu2a.js";
|
|
9
|
+
import { o as createWire, r as localGC, q as createFace, e as isFace, n as gcWithScope, c as castShape } from "./shapeTypes-DnwCo942.js";
|
|
10
|
+
import { m as mirror, B as Blueprint, C as Curve2D, a as make2dSegmentCurve, b as make2dArcFromCenter, c as approximateAsSvgCompatibleCurve, d as BoundingBox2d, e as edgeToCurve, f as make2dInerpolatedBSplineCurve, g as make2dCircle, h as make2dEllipse, i as deserializeCurve2D } from "./Blueprint-C-JJkkwL.js";
|
|
11
11
|
import { bug } from "./result.js";
|
|
12
|
-
import { d as distance2d, p as polarAngle2d, f as polarToCartesian, P as PRECISION_OFFSET, h as squareDistance2d, s as samePoint$1, e as subtract2d, c as add2d } from "./helpers-
|
|
13
|
-
import { d as getEdges } from "./shapeFns-
|
|
14
|
-
import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-
|
|
12
|
+
import { d as distance2d, p as polarAngle2d, f as polarToCartesian, P as PRECISION_OFFSET, h as squareDistance2d, s as samePoint$1, e as subtract2d, c as add2d } from "./helpers-CtBCzEqs.js";
|
|
13
|
+
import { d as getEdges } from "./shapeFns-ClpALED4.js";
|
|
14
|
+
import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-DMFjK6lk.js";
|
|
15
15
|
import opentype from "opentype.js";
|
|
16
|
-
import { c as cornerFinder } from "./cornerFinder-
|
|
16
|
+
import { c as cornerFinder } from "./cornerFinder-KNTFoGrm.js";
|
|
17
17
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
18
18
|
const startPoints = new Flatbush(curves.length);
|
|
19
19
|
curves.forEach((c) => {
|
|
@@ -185,8 +185,6 @@ const BrepErrorCode = {
|
|
|
185
185
|
MULTI_SWEEP_FAILED: "MULTI_SWEEP_FAILED",
|
|
186
186
|
// Guide curve sweep errors
|
|
187
187
|
GUIDED_SWEEP_FAILED: "GUIDED_SWEEP_FAILED",
|
|
188
|
-
// Face tagging errors
|
|
189
|
-
FACE_TAG_INVALID: "FACE_TAG_INVALID",
|
|
190
188
|
// Surface errors
|
|
191
189
|
SURFACE_GRID_TOO_SMALL: "SURFACE_GRID_TOO_SMALL",
|
|
192
190
|
SURFACE_GRID_JAGGED: "SURFACE_GRID_JAGGED",
|
|
@@ -186,8 +186,6 @@ const BrepErrorCode = {
|
|
|
186
186
|
MULTI_SWEEP_FAILED: "MULTI_SWEEP_FAILED",
|
|
187
187
|
// Guide curve sweep errors
|
|
188
188
|
GUIDED_SWEEP_FAILED: "GUIDED_SWEEP_FAILED",
|
|
189
|
-
// Face tagging errors
|
|
190
|
-
FACE_TAG_INVALID: "FACE_TAG_INVALID",
|
|
191
189
|
// Surface errors
|
|
192
190
|
SURFACE_GRID_TOO_SMALL: "SURFACE_GRID_TOO_SMALL",
|
|
193
191
|
SURFACE_GRID_JAGGED: "SURFACE_GRID_JAGGED",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as getKernel, a as toVec3, d as toOcPnt } from "./occtBoundary-
|
|
2
|
-
import { c as castShape, h as isShape3D$1, m as isWire$1, n as gcWithScope } from "./shapeTypes-
|
|
3
|
-
import { e as err, p as typeCastError, l as ok, a as andThen, u as unwrap } from "./errors-
|
|
1
|
+
import { g as getKernel, a as toVec3, d as toOcPnt } from "./occtBoundary-DvBywHyU.js";
|
|
2
|
+
import { c as castShape, h as isShape3D$1, m as isWire$1, n as gcWithScope } from "./shapeTypes-DnwCo942.js";
|
|
3
|
+
import { e as err, p as typeCastError, l as ok, a as andThen, u as unwrap } from "./errors-DJ92ermb.js";
|
|
4
4
|
let _topoMap = null;
|
|
5
5
|
const asTopo = (entity) => {
|
|
6
6
|
if (!_topoMap) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
4
|
-
const errors = require("./errors-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-Cqfsau2c.cjs");
|
|
3
|
+
const shapeTypes = require("./shapeTypes-CIijJxCz.cjs");
|
|
4
|
+
const errors = require("./errors-NNmTtM5u.cjs");
|
|
5
5
|
let _topoMap = null;
|
|
6
6
|
const asTopo = (entity) => {
|
|
7
7
|
if (!_topoMap) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const result = require("./result.cjs");
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
4
|
-
const errors = require("./errors-
|
|
3
|
+
const shapeTypes = require("./shapeTypes-CIijJxCz.cjs");
|
|
4
|
+
const errors = require("./errors-NNmTtM5u.cjs");
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
|
-
const faceFns = require("./faceFns-
|
|
7
|
-
const measurement = require("./measurement-
|
|
8
|
-
const shapeFns = require("./shapeFns-
|
|
9
|
-
const occtBoundary = require("./occtBoundary-
|
|
6
|
+
const faceFns = require("./faceFns-CxaLWOjc.cjs");
|
|
7
|
+
const measurement = require("./measurement-CecYIt3s.cjs");
|
|
8
|
+
const shapeFns = require("./shapeFns-C785aeVn.cjs");
|
|
9
|
+
const occtBoundary = require("./occtBoundary-Cqfsau2c.cjs");
|
|
10
10
|
const PRECISION_INTERSECTION = 1e-9;
|
|
11
11
|
const PRECISION_OFFSET = 1e-8;
|
|
12
12
|
const PRECISION_POINT = 1e-6;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { bug } from "./result.js";
|
|
2
|
-
import { c as castShape, n as gcWithScope, e as isFace } from "./shapeTypes-
|
|
3
|
-
import { e as err, q as queryError, l as ok, u as unwrap } from "./errors-
|
|
2
|
+
import { c as castShape, n as gcWithScope, e as isFace } from "./shapeTypes-DnwCo942.js";
|
|
3
|
+
import { e as err, q as queryError, l as ok, u as unwrap } from "./errors-DJ92ermb.js";
|
|
4
4
|
import { j as vecNormalize, d as vecDot, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
5
|
-
import { i as iterTopo, d as downcast, g as getSurfaceType, n as normalAt } from "./faceFns-
|
|
6
|
-
import { m as measureArea } from "./measurement-
|
|
7
|
-
import { e as getHashCode, i as isSameShape } from "./shapeFns-
|
|
8
|
-
import { g as getKernel, d as toOcPnt } from "./occtBoundary-
|
|
5
|
+
import { i as iterTopo, d as downcast, g as getSurfaceType, n as normalAt } from "./faceFns-3PDjBeW7.js";
|
|
6
|
+
import { m as measureArea } from "./measurement-DHDLAH7-.js";
|
|
7
|
+
import { e as getHashCode, i as isSameShape } from "./shapeFns-ClpALED4.js";
|
|
8
|
+
import { g as getKernel, d as toOcPnt } from "./occtBoundary-DvBywHyU.js";
|
|
9
9
|
const PRECISION_INTERSECTION = 1e-9;
|
|
10
10
|
const PRECISION_OFFSET = 1e-8;
|
|
11
11
|
const PRECISION_POINT = 1e-6;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objImportFns.d.ts","sourceRoot":"","sources":["../../src/io/objImportFns.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"objImportFns.d.ts","sourceRoot":"","sources":["../../src/io/objImportFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAGzD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAuCrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threemfImportFns.d.ts","sourceRoot":"","sources":["../../src/io/threemfImportFns.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"threemfImportFns.d.ts","sourceRoot":"","sources":["../../src/io/threemfImportFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAmMzD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CA6BzE"}
|
package/dist/io.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const occtBoundary = require("./occtBoundary-
|
|
4
|
-
const shapeTypes = require("./shapeTypes-
|
|
5
|
-
const errors = require("./errors-
|
|
6
|
-
const meshFns = require("./meshFns-
|
|
7
|
-
const Blueprint = require("./Blueprint-
|
|
3
|
+
const occtBoundary = require("./occtBoundary-Cqfsau2c.cjs");
|
|
4
|
+
const shapeTypes = require("./shapeTypes-CIijJxCz.cjs");
|
|
5
|
+
const errors = require("./errors-NNmTtM5u.cjs");
|
|
6
|
+
const meshFns = require("./meshFns-CPNNlpbw.cjs");
|
|
7
|
+
const Blueprint = require("./Blueprint-BmbNUnGI.cjs");
|
|
8
8
|
function vec3At(arr, i) {
|
|
9
9
|
const off = i * 3;
|
|
10
10
|
return [arr[off], arr[off + 1], arr[off + 2]];
|
package/dist/io.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as getKernel,
|
|
2
|
-
import { c as castShape, n as gcWithScope } from "./shapeTypes-
|
|
3
|
-
import { e as err, i as ioError, l as ok } from "./errors-
|
|
4
|
-
import { e, d, f } from "./meshFns-
|
|
5
|
-
import { B as Blueprint, a as make2dSegmentCurve, l as make2dThreePointArc, q as make2dBezierCurve } from "./Blueprint-
|
|
1
|
+
import { g as getKernel, o as uniqueId } from "./occtBoundary-DvBywHyU.js";
|
|
2
|
+
import { c as castShape, n as gcWithScope } from "./shapeTypes-DnwCo942.js";
|
|
3
|
+
import { e as err, i as ioError, l as ok } from "./errors-DJ92ermb.js";
|
|
4
|
+
import { e, d, f } from "./meshFns-DAmWVyEp.js";
|
|
5
|
+
import { B as Blueprint, a as make2dSegmentCurve, l as make2dThreePointArc, q as make2dBezierCurve } from "./Blueprint-C-JJkkwL.js";
|
|
6
6
|
function vec3At(arr, i) {
|
|
7
7
|
const off = i * 3;
|
|
8
8
|
return [arr[off], arr[off + 1], arr[off + 2]];
|
|
@@ -32,6 +32,12 @@ export declare function makeSphere(oc: OpenCascadeInstance, radius: number, cent
|
|
|
32
32
|
* Creates a cone primitive (full cone or frustum).
|
|
33
33
|
*/
|
|
34
34
|
export declare function makeCone(oc: OpenCascadeInstance, radius1: number, radius2: number, height: number, center?: [number, number, number], direction?: [number, number, number]): OcShape;
|
|
35
|
+
/**
|
|
36
|
+
* Build a triangular face from 3 points. Returns null if degenerate.
|
|
37
|
+
*
|
|
38
|
+
* This is a low-level helper used by importers, hull, roof, and surface builders.
|
|
39
|
+
*/
|
|
40
|
+
export declare function makeTriFace(oc: OpenCascadeInstance, a: [number, number, number], b: [number, number, number], c: [number, number, number]): OcShape | null;
|
|
35
41
|
/**
|
|
36
42
|
* Creates a torus primitive.
|
|
37
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructorOps.d.ts","sourceRoot":"","sources":["../../src/kernel/constructorOps.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGvE;;GAEG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,mBAAmB,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAO5F;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,EAAE,EAAE,mBAAmB,EACvB,KAAK,EAAE,MAAM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AAM,CAAa,GAC9C,OAAO,CAWT;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,EAAE,EAAE,mBAAmB,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAa,GAC3C,OAAO,CAOT;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,EAAE,EAAE,mBAAmB,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAa,EAC5C,SAAS,GAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAa,GAC9C,OAAO,CAWT;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,mBAAmB,EACvB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAC3B,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAC3B,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAC1B,OAAO,GAAG,IAAI,CAgChB;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,EAAE,EAAE,mBAAmB,EACvB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,MAAM,GAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAa,EAC5C,SAAS,GAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAa,GAC9C,OAAO,CAWT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hullOps.d.ts","sourceRoot":"","sources":["../../src/kernel/hullOps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"hullOps.d.ts","sourceRoot":"","sources":["../../src/kernel/hullOps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAO/D,UAAU,IAAI;IACZ,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;CACpB;AA+fD;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAkB3F;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,EAAE,EAAE,mBAAmB,EACvB,MAAM,EAAE,IAAI,EAAE,EACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAC/C,SAAS,EAAE,MAAM,GAChB,OAAO,CAGT;AAED,wBAAgB,cAAc,CAC5B,EAAE,EAAE,mBAAmB,EACvB,MAAM,EAAE,IAAI,EAAE,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAYT"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-Cqfsau2c.cjs");
|
|
3
3
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
4
|
-
const faceFns = require("./faceFns-
|
|
5
|
-
const errors = require("./errors-
|
|
6
|
-
const shapeTypes = require("./shapeTypes-
|
|
7
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
4
|
+
const faceFns = require("./faceFns-CxaLWOjc.cjs");
|
|
5
|
+
const errors = require("./errors-NNmTtM5u.cjs");
|
|
6
|
+
const shapeTypes = require("./shapeTypes-CIijJxCz.cjs");
|
|
7
|
+
const surfaceBuilders = require("./surfaceBuilders-CC0ZQGix.cjs");
|
|
8
8
|
function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
|
|
9
9
|
const oc = occtBoundary.getKernel().oc;
|
|
10
10
|
const r = shapeTypes.gcWithScope();
|
|
@@ -305,7 +305,7 @@ function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
|
|
|
305
305
|
const mainSpineEdge = r(surfaceBuilders.makeLine(centerVec, endVec));
|
|
306
306
|
const spine = r(errors.unwrap(surfaceBuilders.assembleWire([mainSpineEdge])));
|
|
307
307
|
const law = profileShape ? r(errors.unwrap(buildLawFromProfile(vecOps.vecLength(normalVec), profileShape))) : null;
|
|
308
|
-
const result = shellMode ? genericSweep(wire, spine, { law }, shellMode) : genericSweep(wire, spine, { law }
|
|
308
|
+
const result = shellMode ? genericSweep(wire, spine, { law }, shellMode) : genericSweep(wire, spine, { law });
|
|
309
309
|
gc();
|
|
310
310
|
return result;
|
|
311
311
|
}
|
|
@@ -321,7 +321,7 @@ function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMod
|
|
|
321
321
|
const radius = 1;
|
|
322
322
|
const auxiliarySpine = r(surfaceBuilders.makeHelix(pitch, extrusionLength, radius, centerVec, normalVec));
|
|
323
323
|
const law = profileShape ? r(errors.unwrap(buildLawFromProfile(extrusionLength, profileShape))) : null;
|
|
324
|
-
const result = shellMode ? genericSweep(wire, spine, { auxiliarySpine, law }, shellMode) : genericSweep(wire, spine, { auxiliarySpine, law }
|
|
324
|
+
const result = shellMode ? genericSweep(wire, spine, { auxiliarySpine, law }, shellMode) : genericSweep(wire, spine, { auxiliarySpine, law });
|
|
325
325
|
gc();
|
|
326
326
|
return result;
|
|
327
327
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as getKernel, d as toOcPnt, c as makeOcAx2, m as makeOcAx1, a as toVec3 } from "./occtBoundary-
|
|
1
|
+
import { g as getKernel, d as toOcPnt, c as makeOcAx2, m as makeOcAx1, a as toVec3 } from "./occtBoundary-DvBywHyU.js";
|
|
2
2
|
import { D as DEG2RAD, v as vecAdd, g as vecLength } from "./vecOps-ZDdZWbwT.js";
|
|
3
|
-
import { c as cast, d as downcast, a as isShape3D$1, b as isWire } from "./faceFns-
|
|
4
|
-
import { e as err, x as validationError, l as ok, u as unwrap, p as typeCastError, a as andThen, o as occtError } from "./errors-
|
|
5
|
-
import { n as gcWithScope, j as isShell, s as createCompound, t as createVertex, u as createSolid, h as isShape3D, k as isSolid, r as localGC } from "./shapeTypes-
|
|
6
|
-
import { a as makeLine, b as assembleWire, c as makeHelix } from "./surfaceBuilders-
|
|
3
|
+
import { c as cast, d as downcast, a as isShape3D$1, b as isWire } from "./faceFns-3PDjBeW7.js";
|
|
4
|
+
import { e as err, x as validationError, l as ok, u as unwrap, p as typeCastError, a as andThen, o as occtError } from "./errors-DJ92ermb.js";
|
|
5
|
+
import { n as gcWithScope, j as isShell, s as createCompound, t as createVertex, u as createSolid, h as isShape3D, k as isSolid, r as localGC } from "./shapeTypes-DnwCo942.js";
|
|
6
|
+
import { a as makeLine, b as assembleWire, c as makeHelix } from "./surfaceBuilders-CrJtFu2a.js";
|
|
7
7
|
function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
|
|
8
8
|
const oc = getKernel().oc;
|
|
9
9
|
const r = gcWithScope();
|
|
@@ -304,7 +304,7 @@ function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
|
|
|
304
304
|
const mainSpineEdge = r(makeLine(centerVec, endVec));
|
|
305
305
|
const spine = r(unwrap(assembleWire([mainSpineEdge])));
|
|
306
306
|
const law = profileShape ? r(unwrap(buildLawFromProfile(vecLength(normalVec), profileShape))) : null;
|
|
307
|
-
const result = shellMode ? genericSweep(wire, spine, { law }, shellMode) : genericSweep(wire, spine, { law }
|
|
307
|
+
const result = shellMode ? genericSweep(wire, spine, { law }, shellMode) : genericSweep(wire, spine, { law });
|
|
308
308
|
gc();
|
|
309
309
|
return result;
|
|
310
310
|
}
|
|
@@ -320,7 +320,7 @@ function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMod
|
|
|
320
320
|
const radius = 1;
|
|
321
321
|
const auxiliarySpine = r(makeHelix(pitch, extrusionLength, radius, centerVec, normalVec));
|
|
322
322
|
const law = profileShape ? r(unwrap(buildLawFromProfile(extrusionLength, profileShape))) : null;
|
|
323
|
-
const result = shellMode ? genericSweep(wire, spine, { auxiliarySpine, law }, shellMode) : genericSweep(wire, spine, { auxiliarySpine, law }
|
|
323
|
+
const result = shellMode ? genericSweep(wire, spine, { auxiliarySpine, law }, shellMode) : genericSweep(wire, spine, { auxiliarySpine, law });
|
|
324
324
|
gc();
|
|
325
325
|
return result;
|
|
326
326
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
4
|
-
const faceFns = require("./faceFns-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-Cqfsau2c.cjs");
|
|
3
|
+
const shapeTypes = require("./shapeTypes-CIijJxCz.cjs");
|
|
4
|
+
const faceFns = require("./faceFns-CxaLWOjc.cjs");
|
|
5
5
|
let cache = /* @__PURE__ */ new WeakMap();
|
|
6
6
|
function getCachedMeasurement(shape, key) {
|
|
7
7
|
return cache.get(shape)?.get(key);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as getKernel, s as surfaceCurvature } from "./occtBoundary-
|
|
2
|
-
import { n as gcWithScope } from "./shapeTypes-
|
|
3
|
-
import { u as uvBounds } from "./faceFns-
|
|
1
|
+
import { g as getKernel, s as surfaceCurvature } from "./occtBoundary-DvBywHyU.js";
|
|
2
|
+
import { n as gcWithScope } from "./shapeTypes-DnwCo942.js";
|
|
3
|
+
import { u as uvBounds } from "./faceFns-3PDjBeW7.js";
|
|
4
4
|
let cache = /* @__PURE__ */ new WeakMap();
|
|
5
5
|
function getCachedMeasurement(shape, key) {
|
|
6
6
|
return cache.get(shape)?.get(key);
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const measurement = require("./measurement-
|
|
3
|
+
const measurement = require("./measurement-CecYIt3s.cjs");
|
|
4
4
|
exports.createDistanceQuery = measurement.createDistanceQuery;
|
|
5
5
|
exports.measureArea = measurement.measureArea;
|
|
6
6
|
exports.measureDistance = measurement.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
-
const errors = require("./errors-
|
|
4
|
-
const shapeFns = require("./shapeFns-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-Cqfsau2c.cjs");
|
|
3
|
+
const errors = require("./errors-NNmTtM5u.cjs");
|
|
4
|
+
const shapeFns = require("./shapeFns-C785aeVn.cjs");
|
|
5
5
|
function buildMeshCacheKey(tolerance, angularTolerance, skipNormals) {
|
|
6
6
|
return `${tolerance}:${angularTolerance}:${skipNormals}`;
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as getKernel, u as uniqueIOFilename } from "./occtBoundary-
|
|
2
|
-
import { l as ok, e as err, i as ioError } from "./errors-
|
|
3
|
-
import { g as getFaceOrigins } from "./shapeFns-
|
|
1
|
+
import { g as getKernel, u as uniqueIOFilename } from "./occtBoundary-DvBywHyU.js";
|
|
2
|
+
import { l as ok, e as err, i as ioError } from "./errors-DJ92ermb.js";
|
|
3
|
+
import { g as getFaceOrigins } from "./shapeFns-ClpALED4.js";
|
|
4
4
|
function buildMeshCacheKey(tolerance, angularTolerance, skipNormals) {
|
|
5
5
|
return `${tolerance}:${angularTolerance}:${skipNormals}`;
|
|
6
6
|
}
|
|
@@ -1105,6 +1105,34 @@ function makeCone(oc, radius1, radius2, height, center = [0, 0, 0], direction =
|
|
|
1105
1105
|
dir.delete();
|
|
1106
1106
|
return solid;
|
|
1107
1107
|
}
|
|
1108
|
+
function makeTriFace(oc, a, b, c) {
|
|
1109
|
+
const gpA = new oc.gp_Pnt_3(a[0], a[1], a[2]);
|
|
1110
|
+
const gpB = new oc.gp_Pnt_3(b[0], b[1], b[2]);
|
|
1111
|
+
const gpC = new oc.gp_Pnt_3(c[0], c[1], c[2]);
|
|
1112
|
+
const e1 = new oc.BRepBuilderAPI_MakeEdge_3(gpA, gpB);
|
|
1113
|
+
const e2 = new oc.BRepBuilderAPI_MakeEdge_3(gpB, gpC);
|
|
1114
|
+
const e3 = new oc.BRepBuilderAPI_MakeEdge_3(gpC, gpA);
|
|
1115
|
+
const wireBuilder = new oc.BRepBuilderAPI_MakeWire_1();
|
|
1116
|
+
wireBuilder.Add_1(e1.Edge());
|
|
1117
|
+
wireBuilder.Add_1(e2.Edge());
|
|
1118
|
+
wireBuilder.Add_1(e3.Edge());
|
|
1119
|
+
let face = null;
|
|
1120
|
+
if (wireBuilder.IsDone()) {
|
|
1121
|
+
const makeFaceBuilder = new oc.BRepBuilderAPI_MakeFace_15(wireBuilder.Wire(), false);
|
|
1122
|
+
if (makeFaceBuilder.IsDone()) {
|
|
1123
|
+
face = makeFaceBuilder.Face();
|
|
1124
|
+
}
|
|
1125
|
+
makeFaceBuilder.delete();
|
|
1126
|
+
}
|
|
1127
|
+
wireBuilder.delete();
|
|
1128
|
+
e1.delete();
|
|
1129
|
+
e2.delete();
|
|
1130
|
+
e3.delete();
|
|
1131
|
+
gpA.delete();
|
|
1132
|
+
gpB.delete();
|
|
1133
|
+
gpC.delete();
|
|
1134
|
+
return face;
|
|
1135
|
+
}
|
|
1108
1136
|
function makeTorus(oc, majorRadius, minorRadius, center = [0, 0, 0], direction = [0, 0, 1]) {
|
|
1109
1137
|
const origin = new oc.gp_Pnt_3(...center);
|
|
1110
1138
|
const dir = new oc.gp_Dir_4(...direction);
|
|
@@ -1746,39 +1774,12 @@ function extractVertices(oc, shapes, tolerance) {
|
|
|
1746
1774
|
}
|
|
1747
1775
|
return vertices;
|
|
1748
1776
|
}
|
|
1749
|
-
function buildTriFace(oc, pa, pb, pc) {
|
|
1750
|
-
const gpA = new oc.gp_Pnt_3(pa.x, pa.y, pa.z);
|
|
1751
|
-
const gpB = new oc.gp_Pnt_3(pb.x, pb.y, pb.z);
|
|
1752
|
-
const gpC = new oc.gp_Pnt_3(pc.x, pc.y, pc.z);
|
|
1753
|
-
const e1 = new oc.BRepBuilderAPI_MakeEdge_3(gpA, gpB);
|
|
1754
|
-
const e2 = new oc.BRepBuilderAPI_MakeEdge_3(gpB, gpC);
|
|
1755
|
-
const e3 = new oc.BRepBuilderAPI_MakeEdge_3(gpC, gpA);
|
|
1756
|
-
const wireBuilder = new oc.BRepBuilderAPI_MakeWire_1();
|
|
1757
|
-
wireBuilder.Add_1(e1.Edge());
|
|
1758
|
-
wireBuilder.Add_1(e2.Edge());
|
|
1759
|
-
wireBuilder.Add_1(e3.Edge());
|
|
1760
|
-
let face = null;
|
|
1761
|
-
if (wireBuilder.IsDone()) {
|
|
1762
|
-
const makeFaceBuilder = new oc.BRepBuilderAPI_MakeFace_15(wireBuilder.Wire(), false);
|
|
1763
|
-
if (makeFaceBuilder.IsDone()) {
|
|
1764
|
-
face = makeFaceBuilder.Face();
|
|
1765
|
-
}
|
|
1766
|
-
makeFaceBuilder.delete();
|
|
1767
|
-
}
|
|
1768
|
-
wireBuilder.delete();
|
|
1769
|
-
e1.delete();
|
|
1770
|
-
e2.delete();
|
|
1771
|
-
e3.delete();
|
|
1772
|
-
gpA.delete();
|
|
1773
|
-
gpB.delete();
|
|
1774
|
-
gpC.delete();
|
|
1775
|
-
return face;
|
|
1776
|
-
}
|
|
1777
1777
|
function reconstructBrep(oc, hullResult, tolerance) {
|
|
1778
1778
|
const { faces: hullFaces, points } = hullResult;
|
|
1779
1779
|
const ocFaces = [];
|
|
1780
1780
|
for (const [ia, ib, ic] of hullFaces) {
|
|
1781
|
-
const
|
|
1781
|
+
const pa = at(points, ia), pb = at(points, ib), pc = at(points, ic);
|
|
1782
|
+
const face = makeTriFace(oc, [pa.x, pa.y, pa.z], [pb.x, pb.y, pb.z], [pc.x, pc.y, pc.z]);
|
|
1782
1783
|
if (face !== null) {
|
|
1783
1784
|
ocFaces.push(face);
|
|
1784
1785
|
}
|
|
@@ -2203,6 +2204,7 @@ exports.initFromOC = initFromOC;
|
|
|
2203
2204
|
exports.makeOcAx1 = makeOcAx1;
|
|
2204
2205
|
exports.makeOcAx2 = makeOcAx2;
|
|
2205
2206
|
exports.makeOcAx3 = makeOcAx3;
|
|
2207
|
+
exports.makeTriFace = makeTriFace;
|
|
2206
2208
|
exports.resolveDirection = resolveDirection;
|
|
2207
2209
|
exports.surfaceCurvature = surfaceCurvature;
|
|
2208
2210
|
exports.toOcPnt = toOcPnt;
|