brepjs 8.8.8 → 8.8.9
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.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-BWLPU0ZC.js → Blueprint-C7JlgasP.js} +2 -2
- package/dist/{Blueprint-CIfiTx-y.cjs → Blueprint-CTrwIDuQ.cjs} +2 -2
- package/dist/{boolean2D-BG9wtSKz.js → boolean2D-CypPzZM1.js} +4 -4
- package/dist/{boolean2D-Bs_OdV2_.cjs → boolean2D-KvkerCI-.cjs} +4 -4
- package/dist/{booleanFns-DHEaBJwW.js → booleanFns-BnLhgDGb.js} +2 -2
- package/dist/{booleanFns-CUxOBNlC.cjs → booleanFns-DEY86xmR.cjs} +2 -2
- package/dist/brepjs.cjs +18 -15
- package/dist/brepjs.js +26 -23
- package/dist/{cornerFinder-DfSdXbxK.js → cornerFinder-BurQenn5.js} +1 -1
- package/dist/{cornerFinder-BijsFhpz.cjs → cornerFinder-DLHDc022.cjs} +1 -1
- package/dist/{drawFns-Df_AbW16.js → drawFns-BY9W9rPP.js} +7 -7
- package/dist/{drawFns-BGGYhul8.cjs → drawFns-ibZFQZkt.cjs} +7 -7
- package/dist/{helpers-Ces6b2wm.cjs → helpers-DQGErXAX.cjs} +1 -1
- package/dist/{helpers-D7hTCTJm.js → helpers-SajoWDKO.js} +1 -1
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/{loft-BpfrTPIR.js → loft-CfKcU3Y1.js} +1 -1
- package/dist/{loft-GLxTzuXU.cjs → loft-hhMumRtt.cjs} +1 -1
- package/dist/{meshFns-BTb2esZJ.cjs → meshFns-CfjNBqS6.cjs} +1 -1
- package/dist/{meshFns-DJx5Yqiy.js → meshFns-Diog9oLS.js} +1 -1
- package/dist/operations/loftFns.d.ts +3 -1
- package/dist/operations/loftFns.d.ts.map +1 -1
- package/dist/{operations-CHIU-aGI.js → operations-BFDNdchq.js} +2 -2
- package/dist/{operations-T5f-v2rF.cjs → operations-CZUFSBuY.cjs} +2 -2
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query.cjs +2 -2
- package/dist/query.js +3 -3
- package/dist/{shapeFns-CbZMmuQA.cjs → shapeFns-D4MYB8um.cjs} +145 -95
- package/dist/{shapeFns-5HlS8wvc.js → shapeFns-DNxuGWvV.js} +146 -96
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{surfaceBuilders-zlVu1d-b.js → surfaceBuilders-DEd0HUri.js} +1 -1
- package/dist/{surfaceBuilders-zWnw2I0j.cjs → surfaceBuilders-DeFCNwZl.cjs} +1 -1
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/surfaceFns.d.ts.map +1 -1
- package/dist/{topology-ZRFxrEEW.cjs → topology-CRPSzNkp.cjs} +3 -3
- package/dist/{topology-CMS8QyJa.js → topology-XD2qFlgc.js} +3 -3
- package/dist/topology.cjs +4 -4
- package/dist/topology.js +4 -4
- package/package.json +2 -3
package/dist/2d.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const Blueprint = require("./Blueprint-
|
|
4
|
-
const boolean2D = require("./boolean2D-
|
|
3
|
+
const Blueprint = require("./Blueprint-CTrwIDuQ.cjs");
|
|
4
|
+
const boolean2D = require("./boolean2D-KvkerCI-.cjs");
|
|
5
5
|
function reverseCurve(curve) {
|
|
6
6
|
const cloned = curve.clone();
|
|
7
7
|
cloned.reverse();
|
package/dist/2d.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Blueprint } from "./Blueprint-
|
|
2
|
-
import { d, C, r } from "./Blueprint-
|
|
3
|
-
import { e, C as C2, f, l, g, n, k, q, o, p, r as r2 } from "./boolean2D-
|
|
1
|
+
import { B as Blueprint } from "./Blueprint-C7JlgasP.js";
|
|
2
|
+
import { d, C, r } from "./Blueprint-C7JlgasP.js";
|
|
3
|
+
import { e, C as C2, f, l, g, n, k, q, o, p, r as r2 } from "./boolean2D-CypPzZM1.js";
|
|
4
4
|
function reverseCurve(curve) {
|
|
5
5
|
const cloned = curve.clone();
|
|
6
6
|
cloned.reverse();
|
|
@@ -49,8 +49,8 @@ import { D as DisposalScope, x as registerForCleanup, y as unregisterFromCleanup
|
|
|
49
49
|
import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-DG4bu-QB.js";
|
|
50
50
|
import { f as findCurveType, g as getOrientation } from "./curveFns-VRW_cski.js";
|
|
51
51
|
import { u as unwrap, l as ok, e as err, b as computationError, x as validationError } from "./errors-CHfaHQSt.js";
|
|
52
|
-
import { z as zip, m as makeFace } from "./surfaceBuilders-
|
|
53
|
-
import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-
|
|
52
|
+
import { z as zip, m as makeFace } from "./surfaceBuilders-DEd0HUri.js";
|
|
53
|
+
import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-SajoWDKO.js";
|
|
54
54
|
import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
55
55
|
import { bug } from "./result.js";
|
|
56
56
|
function makePlane(plane, origin) {
|
|
@@ -50,8 +50,8 @@ const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
|
50
50
|
const faceFns = require("./faceFns-B8xnZw-f.cjs");
|
|
51
51
|
const curveFns = require("./curveFns-D0L3YcH-.cjs");
|
|
52
52
|
const errors = require("./errors-BYb4tL5h.cjs");
|
|
53
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
54
|
-
const helpers = require("./helpers-
|
|
53
|
+
const surfaceBuilders = require("./surfaceBuilders-DeFCNwZl.cjs");
|
|
54
|
+
const helpers = require("./helpers-DQGErXAX.cjs");
|
|
55
55
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
56
56
|
const result = require("./result.cjs");
|
|
57
57
|
function makePlane(plane, origin) {
|
|
@@ -48,13 +48,13 @@ import { l as ok, e as err, b as computationError, u as unwrap, g as isOk } from
|
|
|
48
48
|
import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-DG4bu-QB.js";
|
|
49
49
|
import { g as getKernel, a as toVec3 } from "./occtBoundary-Ct0tN8cs.js";
|
|
50
50
|
import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-ZDdZWbwT.js";
|
|
51
|
-
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-
|
|
51
|
+
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-CfKcU3Y1.js";
|
|
52
52
|
import { D as DisposalScope, s as createFace, q as createWire, r as createEdge } from "./shapeTypes-D34s68Xi.js";
|
|
53
53
|
import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-VRW_cski.js";
|
|
54
|
-
import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-
|
|
54
|
+
import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-DEd0HUri.js";
|
|
55
55
|
import { bug } from "./result.js";
|
|
56
|
-
import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-
|
|
57
|
-
import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as axis2d, s as removeDuplicatePoints } from "./Blueprint-
|
|
56
|
+
import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-SajoWDKO.js";
|
|
57
|
+
import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as axis2d, s as removeDuplicatePoints } from "./Blueprint-C7JlgasP.js";
|
|
58
58
|
function* pointsIteration(intersector) {
|
|
59
59
|
const nPoints = intersector.NbPoints();
|
|
60
60
|
if (!nPoints) return;
|
|
@@ -49,13 +49,13 @@ const errors = require("./errors-BYb4tL5h.cjs");
|
|
|
49
49
|
const faceFns = require("./faceFns-B8xnZw-f.cjs");
|
|
50
50
|
const occtBoundary = require("./occtBoundary-CN_uQJtA.cjs");
|
|
51
51
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
52
|
-
const loft = require("./loft-
|
|
52
|
+
const loft = require("./loft-hhMumRtt.cjs");
|
|
53
53
|
const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
54
54
|
const curveFns = require("./curveFns-D0L3YcH-.cjs");
|
|
55
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
55
|
+
const surfaceBuilders = require("./surfaceBuilders-DeFCNwZl.cjs");
|
|
56
56
|
const result = require("./result.cjs");
|
|
57
|
-
const helpers = require("./helpers-
|
|
58
|
-
const Blueprint = require("./Blueprint-
|
|
57
|
+
const helpers = require("./helpers-DQGErXAX.cjs");
|
|
58
|
+
const Blueprint = require("./Blueprint-CTrwIDuQ.cjs");
|
|
59
59
|
function* pointsIteration(intersector) {
|
|
60
60
|
const nPoints = intersector.NbPoints();
|
|
61
61
|
if (!nPoints) return;
|
|
@@ -48,8 +48,8 @@ import { D as DisposalScope, c as castShape, j as isShape3D } from "./shapeTypes
|
|
|
48
48
|
import { l as ok, d as isErr, e as err, x as validationError, B as BrepErrorCode, p as typeCastError, o as occtError } from "./errors-CHfaHQSt.js";
|
|
49
49
|
import { r as resolvePlane } from "./vectors-Dp5Iu1KH.js";
|
|
50
50
|
import { H as HASH_CODE_MAX, n as vecScale, v as vecAdd } from "./vecOps-ZDdZWbwT.js";
|
|
51
|
-
import { a as getFaces, i as iterOcList, p as propagateOrigins, b as propagateOriginsByHash, c as getWires, d as getEdges, e as getVertices } from "./shapeFns-
|
|
52
|
-
import { m as makeFace } from "./surfaceBuilders-
|
|
51
|
+
import { a as getFaces, i as iterOcList, p as propagateOrigins, b as propagateOriginsByHash, c as getWires, d as getEdges, e as getVertices } from "./shapeFns-DNxuGWvV.js";
|
|
52
|
+
import { m as makeFace } from "./surfaceBuilders-DEd0HUri.js";
|
|
53
53
|
function applyGlue(op, optimisation) {
|
|
54
54
|
const oc = getKernel().oc;
|
|
55
55
|
if (optimisation === "commonFace") {
|
|
@@ -49,8 +49,8 @@ const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
|
49
49
|
const errors = require("./errors-BYb4tL5h.cjs");
|
|
50
50
|
const vectors = require("./vectors-9rrStq8t.cjs");
|
|
51
51
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
52
|
-
const shapeFns = require("./shapeFns-
|
|
53
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
52
|
+
const shapeFns = require("./shapeFns-D4MYB8um.cjs");
|
|
53
|
+
const surfaceBuilders = require("./surfaceBuilders-DeFCNwZl.cjs");
|
|
54
54
|
function applyGlue(op, optimisation) {
|
|
55
55
|
const oc = occtBoundary.getKernel().oc;
|
|
56
56
|
if (optimisation === "commonFace") {
|
package/dist/brepjs.cjs
CHANGED
|
@@ -49,26 +49,26 @@ const occtBoundary = require("./occtBoundary-CN_uQJtA.cjs");
|
|
|
49
49
|
const errors = require("./errors-BYb4tL5h.cjs");
|
|
50
50
|
const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
51
51
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
52
|
-
const Blueprint = require("./Blueprint-
|
|
52
|
+
const Blueprint = require("./Blueprint-CTrwIDuQ.cjs");
|
|
53
53
|
const curveFns = require("./curveFns-D0L3YcH-.cjs");
|
|
54
|
-
const loft$2 = require("./loft-
|
|
55
|
-
const operations = require("./operations-
|
|
56
|
-
const boolean2D = require("./boolean2D-
|
|
54
|
+
const loft$2 = require("./loft-hhMumRtt.cjs");
|
|
55
|
+
const operations = require("./operations-CZUFSBuY.cjs");
|
|
56
|
+
const boolean2D = require("./boolean2D-KvkerCI-.cjs");
|
|
57
57
|
const _2d = require("./2d.cjs");
|
|
58
|
-
const helpers = require("./helpers-
|
|
58
|
+
const helpers = require("./helpers-DQGErXAX.cjs");
|
|
59
59
|
const io = require("./io.cjs");
|
|
60
|
-
const drawFns = require("./drawFns-
|
|
60
|
+
const drawFns = require("./drawFns-ibZFQZkt.cjs");
|
|
61
61
|
const vectors = require("./vectors-9rrStq8t.cjs");
|
|
62
|
-
const shapeFns = require("./shapeFns-
|
|
63
|
-
const booleanFns = require("./booleanFns-
|
|
64
|
-
const topology = require("./topology-
|
|
62
|
+
const shapeFns = require("./shapeFns-D4MYB8um.cjs");
|
|
63
|
+
const booleanFns = require("./booleanFns-DEY86xmR.cjs");
|
|
64
|
+
const topology = require("./topology-CRPSzNkp.cjs");
|
|
65
65
|
const faceFns = require("./faceFns-B8xnZw-f.cjs");
|
|
66
|
-
const meshFns = require("./meshFns-
|
|
66
|
+
const meshFns = require("./meshFns-CfjNBqS6.cjs");
|
|
67
67
|
const measurement = require("./measurement-C4Ofuy_y.cjs");
|
|
68
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
68
|
+
const surfaceBuilders = require("./surfaceBuilders-DeFCNwZl.cjs");
|
|
69
69
|
const query = require("./query.cjs");
|
|
70
70
|
const result = require("./result.cjs");
|
|
71
|
-
const cornerFinder = require("./cornerFinder-
|
|
71
|
+
const cornerFinder = require("./cornerFinder-DLHDc022.cjs");
|
|
72
72
|
const worker = require("./worker.cjs");
|
|
73
73
|
const errorFactories = {
|
|
74
74
|
OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
|
|
@@ -200,6 +200,9 @@ function buildVertexFinder(filters) {
|
|
|
200
200
|
function vertexFinder() {
|
|
201
201
|
return buildVertexFinder([]);
|
|
202
202
|
}
|
|
203
|
+
const REC601_R = 0.299;
|
|
204
|
+
const REC601_G = 0.587;
|
|
205
|
+
const REC601_B = 0.114;
|
|
203
206
|
function surfaceFromGrid(heights, options = {}) {
|
|
204
207
|
if (heights.length < 2) {
|
|
205
208
|
return errors.err(
|
|
@@ -405,7 +408,7 @@ async function surfaceFromImage(blob, options = {}) {
|
|
|
405
408
|
value = b / 255;
|
|
406
409
|
break;
|
|
407
410
|
default:
|
|
408
|
-
value = (
|
|
411
|
+
value = (REC601_R * r + REC601_G * g + REC601_B * b) / 255;
|
|
409
412
|
break;
|
|
410
413
|
}
|
|
411
414
|
row.push(value);
|
|
@@ -2452,7 +2455,7 @@ function isValid(shape2) {
|
|
|
2452
2455
|
function isEmpty(shape2) {
|
|
2453
2456
|
return shapeFns.isEmpty(resolve(shape2));
|
|
2454
2457
|
}
|
|
2455
|
-
function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell = false) {
|
|
2458
|
+
function loft$1(wires, { ruled = true, startPoint, endPoint, tolerance = 1e-6 } = {}, returnShell = false) {
|
|
2456
2459
|
var _stack = [];
|
|
2457
2460
|
try {
|
|
2458
2461
|
if (wires.length === 0 && !startPoint && !endPoint) {
|
|
@@ -2460,7 +2463,7 @@ function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell
|
|
|
2460
2463
|
}
|
|
2461
2464
|
const oc = occtBoundary.getKernel().oc;
|
|
2462
2465
|
const scope = __using(_stack, new shapeTypes.DisposalScope());
|
|
2463
|
-
const builder = scope.register(new oc.BRepOffsetAPI_ThruSections(!returnShell, ruled,
|
|
2466
|
+
const builder = scope.register(new oc.BRepOffsetAPI_ThruSections(!returnShell, ruled, tolerance));
|
|
2464
2467
|
if (startPoint) {
|
|
2465
2468
|
const pnt = scope.register(occtBoundary.toOcPnt(occtBoundary.toVec3(startPoint)));
|
|
2466
2469
|
const vMaker = scope.register(new oc.BRepBuilderAPI_MakeVertex(pnt));
|
package/dist/brepjs.js
CHANGED
|
@@ -51,37 +51,37 @@ import { c as castShape, D as DisposalScope, e as isFace, k as isShell, l as isS
|
|
|
51
51
|
import { t as t3, r as r3, s as s2, a as a2, b as b3, z as z2, u, A, B, g as g2, i as i2, f as f2, h as h3, m as m2, C, w as w3, o, p } from "./shapeTypes-D34s68Xi.js";
|
|
52
52
|
import { c as vecDistance, D as DEG2RAD, H as HASH_CODE_MAX, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
|
|
53
53
|
import { R, v as v2, a as a3, b as b4, d, e, g as g3, h as h4, i as i3, k as k3, l as l2, m as m3, o as o2 } from "./vecOps-ZDdZWbwT.js";
|
|
54
|
-
import { B as B2, d as d2, C as C2, r as r4, t as t4 } from "./Blueprint-
|
|
54
|
+
import { B as B2, d as d2, C as C2, r as r4, t as t4 } from "./Blueprint-C7JlgasP.js";
|
|
55
55
|
import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-VRW_cski.js";
|
|
56
56
|
import { j as j3, k as k4, l as l3, f as f3, m as m4, b as b5, g as g4, n as n3, o as o3 } from "./curveFns-VRW_cski.js";
|
|
57
|
-
import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-
|
|
58
|
-
import { b as b6, g as g5, r as r5 } from "./loft-
|
|
59
|
-
import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-
|
|
60
|
-
import { a as a4, b as b7, d as d3, f as f4, g as g6, h as h5, i as i4, j as j4, k as k5, m as m5, n as n4, o as o4, p as p2, q, t as t5, u as u2, v as v3, x, y, z as z3, A as A2, B as B3, C as C3, D, E } from "./operations-
|
|
61
|
-
import { B as B4, a as a5, e as e2, C as C4, F, S, f as f5, l as l4, g as g7, n as n5, k as k6, q as q2, o as o5, p as p3, r as r6 } from "./boolean2D-
|
|
57
|
+
import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-CfKcU3Y1.js";
|
|
58
|
+
import { b as b6, g as g5, r as r5 } from "./loft-CfKcU3Y1.js";
|
|
59
|
+
import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-BFDNdchq.js";
|
|
60
|
+
import { a as a4, b as b7, d as d3, f as f4, g as g6, h as h5, i as i4, j as j4, k as k5, m as m5, n as n4, o as o4, p as p2, q, t as t5, u as u2, v as v3, x, y, z as z3, A as A2, B as B3, C as C3, D, E } from "./operations-BFDNdchq.js";
|
|
61
|
+
import { B as B4, a as a5, e as e2, C as C4, F, S, f as f5, l as l4, g as g7, n as n5, k as k6, q as q2, o as o5, p as p3, r as r6 } from "./boolean2D-CypPzZM1.js";
|
|
62
62
|
import { createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, getBounds2D, getOrientation2D, isInside2D, mirror2D, reverseCurve, rotate2D, scale2D, sketch2DOnFace, sketch2DOnPlane, stretch2D, toSVGPathD, translate2D } from "./2d.js";
|
|
63
|
-
import { l as createTypedFinder, m as faceFinder } from "./helpers-
|
|
64
|
-
import { g as g8 } from "./helpers-
|
|
63
|
+
import { l as createTypedFinder, m as faceFinder } from "./helpers-SajoWDKO.js";
|
|
64
|
+
import { g as g8 } from "./helpers-SajoWDKO.js";
|
|
65
65
|
import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
|
|
66
|
-
import { C as C5, D as D2, a as a6, S as S2, b as b8, X, Y, c as c2, d as d4, e as e3, f as f6, Z, g as g9, h as h6, i as i5, j as j5, k as k7, l as l5, m as m6, n as n6, o as o6, p as p4, q as q3, r as r7, s as s3, t as t6, u as u3, v as v4, w as w4, x as x2, y as y2, z as z4, _, $, a0, a1, A as A3, a2 as a22, B as B5, E as E2, a3 as a32, F as F2, G, H, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-
|
|
66
|
+
import { C as C5, D as D2, a as a6, S as S2, b as b8, X, Y, c as c2, d as d4, e as e3, f as f6, Z, g as g9, h as h6, i as i5, j as j5, k as k7, l as l5, m as m6, n as n6, o as o6, p as p4, q as q3, r as r7, s as s3, t as t6, u as u3, v as v4, w as w4, x as x2, y as y2, z as z4, _, $, a0, a1, A as A3, a2 as a22, B as B5, E as E2, a3 as a32, F as F2, G, H, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-BY9W9rPP.js";
|
|
67
67
|
import { c as c3, a as a7, p as p5, r as r8, t as t7 } from "./vectors-Dp5Iu1KH.js";
|
|
68
|
-
import { v as vertexPosition, a as getFaces, e as getVertices, d as getEdges, t as translate$1, p as propagateOrigins, j as applyMatrix$1, k as clone$1, l as describe$1, m as isEmpty$1, n as mirror$1, r as rotate$1, s as scale$1, o as simplify$1, q as toBREP$1, u as transformCopy$1, w as getBounds, c as getWires } from "./shapeFns-
|
|
69
|
-
import { x as x3, g as g10, f as f7, y as y3, h as h7, z as z5, A as A4, B as B6, C as C6, D as D3, E as E3 } from "./shapeFns-
|
|
70
|
-
import { p as propagateFaceTags, a as propagateColors, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, b as sectionToFace$1, d as slice$1, e as split$1, g as fuseAll, h as cutAll } from "./booleanFns-
|
|
71
|
-
import { j as j6, k as k8, l as l6, m as m7, n as n7, o as o7, q as q4, r as r9, t as t8, u as u4 } from "./booleanFns-
|
|
72
|
-
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-
|
|
73
|
-
import { a as a8, b as b9, e as e4, f as f8, d as d5, g as g11, j as j7, s as s4, t as t9, k as k9, l as l7, v as v5, w as w5 } from "./topology-
|
|
68
|
+
import { v as vertexPosition, a as getFaces, e as getVertices, d as getEdges, t as translate$1, p as propagateOrigins, j as applyMatrix$1, k as clone$1, l as describe$1, m as isEmpty$1, n as mirror$1, r as rotate$1, s as scale$1, o as simplify$1, q as toBREP$1, u as transformCopy$1, w as getBounds, c as getWires } from "./shapeFns-DNxuGWvV.js";
|
|
69
|
+
import { x as x3, g as g10, f as f7, y as y3, h as h7, z as z5, A as A4, B as B6, C as C6, D as D3, E as E3 } from "./shapeFns-DNxuGWvV.js";
|
|
70
|
+
import { p as propagateFaceTags, a as propagateColors, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, b as sectionToFace$1, d as slice$1, e as split$1, g as fuseAll, h as cutAll } from "./booleanFns-BnLhgDGb.js";
|
|
71
|
+
import { j as j6, k as k8, l as l6, m as m7, n as n7, o as o7, q as q4, r as r9, t as t8, u as u4 } from "./booleanFns-BnLhgDGb.js";
|
|
72
|
+
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-XD2qFlgc.js";
|
|
73
|
+
import { a as a8, b as b9, e as e4, f as f8, d as d5, g as g11, j as j7, s as s4, t as t9, k as k9, l as l7, v as v5, w as w5 } from "./topology-XD2qFlgc.js";
|
|
74
74
|
import { i as iterTopo, e as faceCenter, n as normalAt, j as fromBREP$1, k as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-DG4bu-QB.js";
|
|
75
75
|
import { l as l8, c as c4, m as m8, d as d6, f as f9, q as q5, r as r10, s as s5, p as p6, t as t10, v as v6, u as u5, h as h8 } from "./faceFns-DG4bu-QB.js";
|
|
76
|
-
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-
|
|
77
|
-
import { c as c5, b as b10, e as e5, d as d7, f as f10 } from "./meshFns-
|
|
76
|
+
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-Diog9oLS.js";
|
|
77
|
+
import { c as c5, b as b10, e as e5, d as d7, f as f10 } from "./meshFns-Diog9oLS.js";
|
|
78
78
|
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-DzRb6oYN.js";
|
|
79
79
|
import { d as d8, e as e6, f as f11, g as g12, h as h9, i as i6 } from "./measurement-DzRb6oYN.js";
|
|
80
|
-
import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-
|
|
81
|
-
import { p as p7 } from "./surfaceBuilders-
|
|
80
|
+
import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-DEd0HUri.js";
|
|
81
|
+
import { p as p7 } from "./surfaceBuilders-DEd0HUri.js";
|
|
82
82
|
import { edgeFinder } from "./query.js";
|
|
83
83
|
import { BrepBugError, bug } from "./result.js";
|
|
84
|
-
import { c as c6 } from "./cornerFinder-
|
|
84
|
+
import { c as c6 } from "./cornerFinder-BurQenn5.js";
|
|
85
85
|
import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
|
|
86
86
|
const errorFactories = {
|
|
87
87
|
OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
|
|
@@ -213,6 +213,9 @@ function buildVertexFinder(filters) {
|
|
|
213
213
|
function vertexFinder() {
|
|
214
214
|
return buildVertexFinder([]);
|
|
215
215
|
}
|
|
216
|
+
const REC601_R = 0.299;
|
|
217
|
+
const REC601_G = 0.587;
|
|
218
|
+
const REC601_B = 0.114;
|
|
216
219
|
function surfaceFromGrid(heights, options = {}) {
|
|
217
220
|
if (heights.length < 2) {
|
|
218
221
|
return err(
|
|
@@ -418,7 +421,7 @@ async function surfaceFromImage(blob, options = {}) {
|
|
|
418
421
|
value = b11 / 255;
|
|
419
422
|
break;
|
|
420
423
|
default:
|
|
421
|
-
value = (
|
|
424
|
+
value = (REC601_R * r11 + REC601_G * g13 + REC601_B * b11) / 255;
|
|
422
425
|
break;
|
|
423
426
|
}
|
|
424
427
|
row.push(value);
|
|
@@ -2465,7 +2468,7 @@ function isValid(shape2) {
|
|
|
2465
2468
|
function isEmpty(shape2) {
|
|
2466
2469
|
return isEmpty$1(resolve(shape2));
|
|
2467
2470
|
}
|
|
2468
|
-
function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell = false) {
|
|
2471
|
+
function loft$1(wires, { ruled = true, startPoint, endPoint, tolerance = 1e-6 } = {}, returnShell = false) {
|
|
2469
2472
|
var _stack = [];
|
|
2470
2473
|
try {
|
|
2471
2474
|
if (wires.length === 0 && !startPoint && !endPoint) {
|
|
@@ -2473,7 +2476,7 @@ function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell
|
|
|
2473
2476
|
}
|
|
2474
2477
|
const oc = getKernel().oc;
|
|
2475
2478
|
const scope = __using(_stack, new DisposalScope());
|
|
2476
|
-
const builder = scope.register(new oc.BRepOffsetAPI_ThruSections(!returnShell, ruled,
|
|
2479
|
+
const builder = scope.register(new oc.BRepOffsetAPI_ThruSections(!returnShell, ruled, tolerance));
|
|
2477
2480
|
if (startPoint) {
|
|
2478
2481
|
const pnt = scope.register(toOcPnt(toVec3(startPoint)));
|
|
2479
2482
|
const vMaker = scope.register(new oc.BRepBuilderAPI_MakeVertex(pnt));
|
|
@@ -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-SajoWDKO.js";
|
|
2
2
|
import { D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
3
3
|
const PI_2 = 2 * Math.PI;
|
|
4
4
|
function positiveHalfAngle(angle) {
|
|
@@ -47,18 +47,18 @@ import { u as unwrap, g as isOk, e as err, x as validationError, l as ok } from
|
|
|
47
47
|
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-Dp5Iu1KH.js";
|
|
48
48
|
import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-Ct0tN8cs.js";
|
|
49
49
|
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";
|
|
50
|
-
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-
|
|
50
|
+
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-CypPzZM1.js";
|
|
51
51
|
import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-DG4bu-QB.js";
|
|
52
52
|
import { c as curveTangentAt, a as curveEndPoint, b as getCurveType, o as offsetWire2D } from "./curveFns-VRW_cski.js";
|
|
53
|
-
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-
|
|
53
|
+
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-DEd0HUri.js";
|
|
54
54
|
import { D as DisposalScope, q as createWire, s as createFace, e as isFace, c as castShape } from "./shapeTypes-D34s68Xi.js";
|
|
55
|
-
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-
|
|
55
|
+
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-C7JlgasP.js";
|
|
56
56
|
import { bug } from "./result.js";
|
|
57
|
-
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-
|
|
58
|
-
import { d as getEdges } from "./shapeFns-
|
|
59
|
-
import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-
|
|
57
|
+
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-SajoWDKO.js";
|
|
58
|
+
import { d as getEdges } from "./shapeFns-DNxuGWvV.js";
|
|
59
|
+
import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-CfKcU3Y1.js";
|
|
60
60
|
import opentype from "opentype.js";
|
|
61
|
-
import { c as cornerFinder } from "./cornerFinder-
|
|
61
|
+
import { c as cornerFinder } from "./cornerFinder-BurQenn5.js";
|
|
62
62
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
63
63
|
const startPoints = new Flatbush(curves.length);
|
|
64
64
|
curves.forEach((c) => {
|
|
@@ -48,18 +48,18 @@ const errors = require("./errors-BYb4tL5h.cjs");
|
|
|
48
48
|
const vectors = require("./vectors-9rrStq8t.cjs");
|
|
49
49
|
const occtBoundary = require("./occtBoundary-CN_uQJtA.cjs");
|
|
50
50
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
51
|
-
const boolean2D = require("./boolean2D-
|
|
51
|
+
const boolean2D = require("./boolean2D-KvkerCI-.cjs");
|
|
52
52
|
const faceFns = require("./faceFns-B8xnZw-f.cjs");
|
|
53
53
|
const curveFns = require("./curveFns-D0L3YcH-.cjs");
|
|
54
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
54
|
+
const surfaceBuilders = require("./surfaceBuilders-DeFCNwZl.cjs");
|
|
55
55
|
const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
56
|
-
const Blueprint = require("./Blueprint-
|
|
56
|
+
const Blueprint = require("./Blueprint-CTrwIDuQ.cjs");
|
|
57
57
|
const result = require("./result.cjs");
|
|
58
|
-
const helpers = require("./helpers-
|
|
59
|
-
const shapeFns = require("./shapeFns-
|
|
60
|
-
const loft = require("./loft-
|
|
58
|
+
const helpers = require("./helpers-DQGErXAX.cjs");
|
|
59
|
+
const shapeFns = require("./shapeFns-D4MYB8um.cjs");
|
|
60
|
+
const loft = require("./loft-hhMumRtt.cjs");
|
|
61
61
|
const opentype = require("opentype.js");
|
|
62
|
-
const cornerFinder = require("./cornerFinder-
|
|
62
|
+
const cornerFinder = require("./cornerFinder-DLHDc022.cjs");
|
|
63
63
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
64
64
|
const startPoints = new boolean2D.Flatbush(curves.length);
|
|
65
65
|
curves.forEach((c) => {
|
|
@@ -5,7 +5,7 @@ const errors = require("./errors-BYb4tL5h.cjs");
|
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
6
|
const faceFns = require("./faceFns-B8xnZw-f.cjs");
|
|
7
7
|
const measurement = require("./measurement-C4Ofuy_y.cjs");
|
|
8
|
-
const shapeFns = require("./shapeFns-
|
|
8
|
+
const shapeFns = require("./shapeFns-D4MYB8um.cjs");
|
|
9
9
|
const occtBoundary = require("./occtBoundary-CN_uQJtA.cjs");
|
|
10
10
|
const PRECISION_INTERSECTION = 1e-9;
|
|
11
11
|
const PRECISION_OFFSET = 1e-8;
|
|
@@ -4,7 +4,7 @@ import { e as err, q as queryError, l as ok, u as unwrap } from "./errors-CHfaHQ
|
|
|
4
4
|
import { j as vecNormalize, d as vecDot, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
5
5
|
import { i as iterTopo, d as downcast, g as getSurfaceType, n as normalAt } from "./faceFns-DG4bu-QB.js";
|
|
6
6
|
import { m as measureArea } from "./measurement-DzRb6oYN.js";
|
|
7
|
-
import { f as getHashCode, h as isSameShape } from "./shapeFns-
|
|
7
|
+
import { f as getHashCode, h as isSameShape } from "./shapeFns-DNxuGWvV.js";
|
|
8
8
|
import { g as getKernel, d as toOcPnt } from "./occtBoundary-Ct0tN8cs.js";
|
|
9
9
|
const PRECISION_INTERSECTION = 1e-9;
|
|
10
10
|
const PRECISION_OFFSET = 1e-8;
|
package/dist/io.cjs
CHANGED
|
@@ -48,8 +48,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
48
48
|
const occtBoundary = require("./occtBoundary-CN_uQJtA.cjs");
|
|
49
49
|
const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
50
50
|
const errors = require("./errors-BYb4tL5h.cjs");
|
|
51
|
-
const meshFns = require("./meshFns-
|
|
52
|
-
const Blueprint = require("./Blueprint-
|
|
51
|
+
const meshFns = require("./meshFns-CfjNBqS6.cjs");
|
|
52
|
+
const Blueprint = require("./Blueprint-CTrwIDuQ.cjs");
|
|
53
53
|
function vec3At(arr, i) {
|
|
54
54
|
const off = i * 3;
|
|
55
55
|
return [arr[off], arr[off + 1], arr[off + 2]];
|
package/dist/io.js
CHANGED
|
@@ -46,8 +46,8 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
46
46
|
import { g as getKernel, o as uniqueId } from "./occtBoundary-Ct0tN8cs.js";
|
|
47
47
|
import { D as DisposalScope, c as castShape } from "./shapeTypes-D34s68Xi.js";
|
|
48
48
|
import { e as err, i as ioError, l as ok } from "./errors-CHfaHQSt.js";
|
|
49
|
-
import { e, d, f } from "./meshFns-
|
|
50
|
-
import { B as Blueprint, a as make2dSegmentCurve, l as make2dThreePointArc, q as make2dBezierCurve } from "./Blueprint-
|
|
49
|
+
import { e, d, f } from "./meshFns-Diog9oLS.js";
|
|
50
|
+
import { B as Blueprint, a as make2dSegmentCurve, l as make2dThreePointArc, q as make2dBezierCurve } from "./Blueprint-C7JlgasP.js";
|
|
51
51
|
function vec3At(arr, i) {
|
|
52
52
|
const off = i * 3;
|
|
53
53
|
return [arr[off], arr[off + 1], arr[off + 2]];
|
|
@@ -48,7 +48,7 @@ import { D as DEG2RAD, v as vecAdd, g as vecLength } from "./vecOps-ZDdZWbwT.js"
|
|
|
48
48
|
import { c as cast, d as downcast, a as isShape3D$1, b as isWire } from "./faceFns-DG4bu-QB.js";
|
|
49
49
|
import { e as err, x as validationError, l as ok, u as unwrap, p as typeCastError, a as andThen, o as occtError } from "./errors-CHfaHQSt.js";
|
|
50
50
|
import { D as DisposalScope, k as isShell, t as createCompound, u as createVertex, v as createSolid, j as isShape3D, l as isSolid } from "./shapeTypes-D34s68Xi.js";
|
|
51
|
-
import { a as makeLine, b as assembleWire, c as makeHelix } from "./surfaceBuilders-
|
|
51
|
+
import { a as makeLine, b as assembleWire, c as makeHelix } from "./surfaceBuilders-DEd0HUri.js";
|
|
52
52
|
function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
|
|
53
53
|
var _stack = [];
|
|
54
54
|
try {
|
|
@@ -49,7 +49,7 @@ const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
|
49
49
|
const faceFns = require("./faceFns-B8xnZw-f.cjs");
|
|
50
50
|
const errors = require("./errors-BYb4tL5h.cjs");
|
|
51
51
|
const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
52
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
52
|
+
const surfaceBuilders = require("./surfaceBuilders-DeFCNwZl.cjs");
|
|
53
53
|
function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
|
|
54
54
|
var _stack = [];
|
|
55
55
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const occtBoundary = require("./occtBoundary-CN_uQJtA.cjs");
|
|
3
3
|
const errors = require("./errors-BYb4tL5h.cjs");
|
|
4
|
-
const shapeFns = require("./shapeFns-
|
|
4
|
+
const shapeFns = require("./shapeFns-D4MYB8um.cjs");
|
|
5
5
|
function buildMeshCacheKey(tolerance, angularTolerance, skipNormals) {
|
|
6
6
|
return `${tolerance}:${angularTolerance}:${skipNormals}`;
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as getKernel, u as uniqueIOFilename } from "./occtBoundary-Ct0tN8cs.js";
|
|
2
2
|
import { l as ok, e as err, i as ioError } from "./errors-CHfaHQSt.js";
|
|
3
|
-
import { g as getFaceOrigins } from "./shapeFns-
|
|
3
|
+
import { g as getFaceOrigins } from "./shapeFns-DNxuGWvV.js";
|
|
4
4
|
function buildMeshCacheKey(tolerance, angularTolerance, skipNormals) {
|
|
5
5
|
return `${tolerance}:${angularTolerance}:${skipNormals}`;
|
|
6
6
|
}
|
|
@@ -9,6 +9,8 @@ export interface LoftOptions {
|
|
|
9
9
|
startPoint?: PointInput;
|
|
10
10
|
/** Optional end vertex after the last wire profile. */
|
|
11
11
|
endPoint?: PointInput;
|
|
12
|
+
/** Sewing tolerance for ThruSections builder. Defaults to `1e-6`. */
|
|
13
|
+
tolerance?: number;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* Loft through a set of wire profiles to create a 3D shape.
|
|
@@ -29,5 +31,5 @@ export interface LoftOptions {
|
|
|
29
31
|
*
|
|
30
32
|
* @see {@link loft!loft | loft} for the OOP API equivalent.
|
|
31
33
|
*/
|
|
32
|
-
export declare function loft(wires: Wire[], { ruled, startPoint, endPoint }?: LoftOptions, returnShell?: boolean): Result<Shape3D>;
|
|
34
|
+
export declare function loft(wires: Wire[], { ruled, startPoint, endPoint, tolerance }?: LoftOptions, returnShell?: boolean): Result<Shape3D>;
|
|
33
35
|
//# sourceMappingURL=loftFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loftFns.d.ts","sourceRoot":"","sources":["../../src/operations/loftFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAGzD,uDAAuD;AACvD,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"loftFns.d.ts","sourceRoot":"","sources":["../../src/operations/loftFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAGzD,uDAAuD;AACvD,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,IAAI,CAClB,KAAK,EAAE,IAAI,EAAE,EACb,EAAE,KAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAgB,EAAE,GAAE,WAAgB,EAC1E,WAAW,UAAQ,GAClB,MAAM,CAAC,OAAO,CAAC,CAoCjB"}
|
|
@@ -48,8 +48,8 @@ import { g as vecLength, v as vecAdd, D as DEG2RAD, f as vecIsZero, j as vecNorm
|
|
|
48
48
|
import { b as createOcHandle, c as castShape, j as isShape3D, D as DisposalScope, n as isWire, v as createSolid } from "./shapeTypes-D34s68Xi.js";
|
|
49
49
|
import { d as downcast } from "./faceFns-DG4bu-QB.js";
|
|
50
50
|
import { e as err, x as validationError, u as unwrap, p as typeCastError, l as ok, B as BrepErrorCode, d as isErr, o as occtError, i as ioError, b as computationError } from "./errors-CHfaHQSt.js";
|
|
51
|
-
import { n as buildLawFromProfile } from "./loft-
|
|
52
|
-
import { g as fuseAll } from "./booleanFns-
|
|
51
|
+
import { n as buildLawFromProfile } from "./loft-CfKcU3Y1.js";
|
|
52
|
+
import { g as fuseAll } from "./booleanFns-BnLhgDGb.js";
|
|
53
53
|
function uuidv() {
|
|
54
54
|
return (String([1e7]) + String(-1e3) + String(-4e3) + String(-8e3) + String(-1e11)).replace(
|
|
55
55
|
/[018]/g,
|
|
@@ -49,8 +49,8 @@ const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
|
49
49
|
const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
50
50
|
const faceFns = require("./faceFns-B8xnZw-f.cjs");
|
|
51
51
|
const errors = require("./errors-BYb4tL5h.cjs");
|
|
52
|
-
const loft = require("./loft-
|
|
53
|
-
const booleanFns = require("./booleanFns-
|
|
52
|
+
const loft = require("./loft-hhMumRtt.cjs");
|
|
53
|
+
const booleanFns = require("./booleanFns-DEY86xmR.cjs");
|
|
54
54
|
function uuidv() {
|
|
55
55
|
return (String([1e7]) + String(-1e3) + String(-4e3) + String(-8e3) + String(-1e11)).replace(
|
|
56
56
|
/[018]/g,
|
package/dist/operations.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const operations = require("./operations-
|
|
4
|
-
const loft = require("./loft-
|
|
3
|
+
const operations = require("./operations-CZUFSBuY.cjs");
|
|
4
|
+
const loft = require("./loft-hhMumRtt.cjs");
|
|
5
5
|
exports.addChild = operations.addChild;
|
|
6
6
|
exports.addStep = operations.addStep;
|
|
7
7
|
exports.circularPattern = operations.circularPattern;
|
package/dist/operations.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, b, c, d, f, g, h, i, j, k, m, n, o, p, l, q, t, u, v, x, y, z, A, B, s, C, D, E, w } from "./operations-
|
|
2
|
-
import { b as b2, g as g2, l as l2, r } from "./loft-
|
|
1
|
+
import { a, b, c, d, f, g, h, i, j, k, m, n, o, p, l, q, t, u, v, x, y, z, A, B, s, C, D, E, w } from "./operations-BFDNdchq.js";
|
|
2
|
+
import { b as b2, g as g2, l as l2, r } from "./loft-CfKcU3Y1.js";
|
|
3
3
|
export {
|
|
4
4
|
a as addChild,
|
|
5
5
|
b as addStep,
|
package/dist/query.cjs
CHANGED
|
@@ -45,8 +45,8 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
45
45
|
return next();
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
48
|
-
const helpers = require("./helpers-
|
|
49
|
-
const cornerFinder = require("./cornerFinder-
|
|
48
|
+
const helpers = require("./helpers-DQGErXAX.cjs");
|
|
49
|
+
const cornerFinder = require("./cornerFinder-DLHDc022.cjs");
|
|
50
50
|
const occtBoundary = require("./occtBoundary-CN_uQJtA.cjs");
|
|
51
51
|
const shapeTypes = require("./shapeTypes-sXITvFkF.cjs");
|
|
52
52
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
package/dist/query.js
CHANGED
|
@@ -43,9 +43,9 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
43
43
|
};
|
|
44
44
|
return next();
|
|
45
45
|
};
|
|
46
|
-
import { l as createTypedFinder, o as distanceFromPointFilter, q as resolveDir } from "./helpers-
|
|
47
|
-
import { m, g } from "./helpers-
|
|
48
|
-
import { c } from "./cornerFinder-
|
|
46
|
+
import { l as createTypedFinder, o as distanceFromPointFilter, q as resolveDir } from "./helpers-SajoWDKO.js";
|
|
47
|
+
import { m, g } from "./helpers-SajoWDKO.js";
|
|
48
|
+
import { c } from "./cornerFinder-BurQenn5.js";
|
|
49
49
|
import { g as getKernel } from "./occtBoundary-Ct0tN8cs.js";
|
|
50
50
|
import { D as DisposalScope } from "./shapeTypes-D34s68Xi.js";
|
|
51
51
|
import { j as vecNormalize, d as vecDot, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|