brepjs 18.82.5 → 18.82.6
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 +6 -6
- package/dist/2d.js +6 -6
- package/dist/{blueprint-BBUOweQy.cjs → blueprint-C2gkyxYc.cjs} +7 -7
- package/dist/{blueprint-DjzevNhB.js → blueprint-yJsyEFn_.js} +7 -7
- package/dist/{blueprintFns-CRES_5vP.cjs → blueprintFns-CL4VZzCL.cjs} +2 -2
- package/dist/{blueprintFns-CxSMnMfl.js → blueprintFns-DjpRmsbi.js} +2 -2
- package/dist/{blueprintSketcher-CFa32JZU.cjs → blueprintSketcher-BLXntEIS.cjs} +140 -86
- package/dist/{blueprintSketcher-CIydRzRr.js → blueprintSketcher-BbYPEPMa.js} +140 -86
- package/dist/{boolean2D-Z0KE98a4.cjs → boolean2D-BbvyYF-v.cjs} +4 -4
- package/dist/{boolean2D-BRWPIJhe.js → boolean2D-C3k4iO92.js} +4 -4
- package/dist/brepjs.cjs +25 -25
- package/dist/brepjs.js +25 -25
- package/dist/{cameraFns-B3Wb4Br9.js → cameraFns-BiQGAnPd.js} +2 -2
- package/dist/{cameraFns-Drgka78Q.cjs → cameraFns-BkSHm_Vo.cjs} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-BRYZAgdE.js → cornerFinder-C9zvdkpK.js} +1 -1
- package/dist/{cornerFinder-BuYpqGO8.cjs → cornerFinder-D3lGL_Td.cjs} +1 -1
- package/dist/{curveFns-XSz4F9j3.js → curveFns-B4_om-yp.js} +1 -1
- package/dist/{curveFns-BA5zsoce.cjs → curveFns-Dlbfncal.cjs} +1 -1
- package/dist/{drawFns-C5Mdr0iH.js → drawFns-DaTn2p7M.js} +12 -12
- package/dist/{drawFns-DK3DGHku.cjs → drawFns-lls9IuPY.cjs} +12 -12
- package/dist/{faceFns-BO8IXhhf.js → faceFns-4JEna8n9.js} +2 -2
- package/dist/{faceFns-6AarivqH.cjs → faceFns-Obtamglc.cjs} +2 -2
- package/dist/{healingFns-D3BkAVML.cjs → healingFns-gHxvhsbJ.cjs} +5 -5
- package/dist/{healingFns-C4JZHv8K.js → healingFns-uXLI1vJ7.js} +5 -5
- package/dist/{helpers-CTc8ZbY8.js → helpers-CJV31xig.js} +6 -6
- package/dist/{helpers-DN6s-TLC.cjs → helpers-rAK5qEBu.cjs} +6 -6
- package/dist/{importFns-Cb-cmpGG.cjs → importFns-BJVEly-l.cjs} +2 -2
- package/dist/{importFns-D4Xet5aD.js → importFns-Dcc2KviL.js} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +10 -6
- package/dist/kernel/occtWasm/kernel2dOps.d.ts +8 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/{loftFns-DxhcdpAu.cjs → loftFns-BAM49XJy.cjs} +1 -1
- package/dist/{loftFns-BVbzy6gm.js → loftFns-DF3KNz9-.js} +1 -1
- package/dist/{measureFns-BNHvjShh.cjs → measureFns-Ym_I522s.cjs} +3 -3
- package/dist/{measureFns-7Nz5JklM.js → measureFns-xpevHRLG.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-YXFipjjx.cjs → meshFns-DDhKhVK0.cjs} +3 -3
- package/dist/{meshFns-CWwOpBlM.js → meshFns-soCHj3jp.js} +3 -3
- package/dist/{occtWasmAdapter-BMV179Ji.js → occtWasmAdapter-BK6h0nKd.js} +29 -5
- package/dist/{occtWasmAdapter-5hzzhkME.cjs → occtWasmAdapter-Bfz5Zfmk.cjs} +29 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-DkuLOFkI.js → primitiveFns-BmUIWDC7.js} +4 -4
- package/dist/{primitiveFns-BPfYb_t5.cjs → primitiveFns-SEyCwNra.cjs} +4 -4
- 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/{shapeFns-B6UAiYAx.js → shapeFns-B8REDWBf.js} +2 -2
- package/dist/{shapeFns-sF0x5Zhj.cjs → shapeFns-CE6c_4D4.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-Bb0aQZWz.cjs → shapeRefFns-C3tglb5A.cjs} +4 -4
- package/dist/{shapeRefFns-NdQvPa5J.js → shapeRefFns-O5h8bOr9.js} +4 -4
- package/dist/{shapeTypes-D4Evnmz_.js → shapeTypes-B8d_6R0X.js} +9 -6
- package/dist/{shapeTypes-D1eUDuzl.cjs → shapeTypes-nFeOa7gQ.cjs} +9 -6
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-QUpJdbiK.js → solidBuilders-BSnsqitN.js} +5 -5
- package/dist/{solidBuilders-lDXPwoCz.cjs → solidBuilders-DfGIPlQ2.cjs} +5 -5
- package/dist/{surfaceBuilders-R4DKNFkI.cjs → surfaceBuilders-CDX6sDZz.cjs} +2 -2
- package/dist/{surfaceBuilders-CLMyFimy.js → surfaceBuilders-D5sQZ6ah.js} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-D4pLmVno.cjs → textBlueprints-BwRqV98S.cjs} +7 -7
- package/dist/{textBlueprints-f8cgx9vi.js → textBlueprints-Cqu-mcRD.js} +7 -7
- package/dist/{textMetrics-CQtQI4vF.js → textMetrics-Cikow3vH.js} +1 -1
- package/dist/{textMetrics-DTRuXeXr.cjs → textMetrics-DpCTYcE2.cjs} +1 -1
- package/dist/{threadFns-CvLvKdwB.js → threadFns-BQHEnI7a.js} +6 -6
- package/dist/{threadFns-DvSdQiRw.cjs → threadFns-BzFhh87N.cjs} +6 -6
- package/dist/topology.cjs +8 -8
- package/dist/topology.js +8 -8
- package/dist/{topologyQueryFns-5EeBz6_7.js → topologyQueryFns-BcGLEMvc.js} +1 -1
- package/dist/{topologyQueryFns-Nnu56Ke2.cjs → topologyQueryFns-Bhey0q1G.cjs} +1 -1
- package/package.json +16 -16
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { R as DisposalScope, Y as _usingCtx, Z as getKernel, a as createEdge, o as createFace, u as createWire } from "./shapeTypes-
|
|
1
|
+
import { R as DisposalScope, Y as _usingCtx, Z as getKernel, a as createEdge, o as createFace, u as createWire } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
4
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
4
|
+
import { s as getEdges } from "./topologyQueryFns-BcGLEMvc.js";
|
|
5
5
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
6
6
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
7
7
|
import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
8
8
|
import { a as planeToWorld, o as resolvePlane } from "./planeOps-DSjjtrjg.js";
|
|
9
|
-
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as downcast } from "./faceFns-
|
|
10
|
-
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-
|
|
9
|
+
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as downcast } from "./faceFns-4JEna8n9.js";
|
|
10
|
+
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-B4_om-yp.js";
|
|
11
11
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
12
|
-
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
13
|
-
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-
|
|
14
|
-
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-
|
|
15
|
-
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-
|
|
16
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
17
|
-
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
18
|
-
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-
|
|
19
|
-
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-
|
|
12
|
+
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-D5sQZ6ah.js";
|
|
13
|
+
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-BbYPEPMa.js";
|
|
14
|
+
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-CJV31xig.js";
|
|
15
|
+
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-yJsyEFn_.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-C9zvdkpK.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-C3k4iO92.js";
|
|
18
|
+
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-Cqu-mcRD.js";
|
|
19
|
+
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-BiQGAnPd.js";
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_textBlueprints = require("./textBlueprints-BwRqV98S.cjs");
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.cjs");
|
|
3
3
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
4
4
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
5
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
5
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bhey0q1G.cjs");
|
|
6
6
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
7
7
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
8
8
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
9
9
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
10
|
-
const require_faceFns = require("./faceFns-
|
|
11
|
-
const require_curveFns = require("./curveFns-
|
|
10
|
+
const require_faceFns = require("./faceFns-Obtamglc.cjs");
|
|
11
|
+
const require_curveFns = require("./curveFns-Dlbfncal.cjs");
|
|
12
12
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
13
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
14
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
15
|
-
const require_helpers = require("./helpers-
|
|
16
|
-
const require_blueprint = require("./blueprint-
|
|
17
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
18
|
-
const require_boolean2D = require("./boolean2D-
|
|
19
|
-
const require_cameraFns = require("./cameraFns-
|
|
13
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CDX6sDZz.cjs");
|
|
14
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BLXntEIS.cjs");
|
|
15
|
+
const require_helpers = require("./helpers-rAK5qEBu.cjs");
|
|
16
|
+
const require_blueprint = require("./blueprint-C2gkyxYc.cjs");
|
|
17
|
+
const require_cornerFinder = require("./cornerFinder-D3lGL_Td.cjs");
|
|
18
|
+
const require_boolean2D = require("./boolean2D-BbvyYF-v.cjs");
|
|
19
|
+
const require_cameraFns = require("./cameraFns-BkSHm_Vo.cjs");
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
22
22
|
* Group a flat list of curves into connected chains by matching endpoints.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { a as getCachedSurfaceType } from "./topologyQueryFns-
|
|
3
|
+
import { a as getCachedSurfaceType } from "./topologyQueryFns-BcGLEMvc.js";
|
|
4
4
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bhey0q1G.cjs");
|
|
4
4
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bhey0q1G.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
|
-
const require_faceFns = require("./faceFns-
|
|
6
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
+
const require_faceFns = require("./faceFns-Obtamglc.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-CE6c_4D4.cjs");
|
|
7
7
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
8
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
8
|
+
const require_solidBuilders = require("./solidBuilders-DfGIPlQ2.cjs");
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Z as getKernel, _ as isSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, y as isWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, y as isWire } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { c as getFaces, i as getCachedIsValid, l as getOrCreateCache, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { c as getFaces, i as getCachedIsValid, l as getOrCreateCache, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-BcGLEMvc.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
|
-
import { v as downcast } from "./faceFns-
|
|
6
|
-
import { _ as propagateAllMetadata, g as collectInputFaceHashes } from "./shapeFns-
|
|
5
|
+
import { v as downcast } from "./faceFns-4JEna8n9.js";
|
|
6
|
+
import { _ as propagateAllMetadata, g as collectInputFaceHashes } from "./shapeFns-B8REDWBf.js";
|
|
7
7
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
8
|
-
import { f as cut, h as fuseAll, m as fuse, p as cutAll } from "./solidBuilders-
|
|
8
|
+
import { f as cut, h as fuseAll, m as fuse, p as cutAll } from "./solidBuilders-BSnsqitN.js";
|
|
9
9
|
//#region src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
11
11
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Z as getKernel, p as isFace } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, p as isFace } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { A as ok, T as isOk, b as err, h as bug, o as queryError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-BcGLEMvc.js";
|
|
4
4
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { a as vecDot, d as vecNormalize } from "./vecOps-SKPRvPH-.js";
|
|
6
|
-
import { l as normalAt, s as getSurfaceType } from "./faceFns-
|
|
7
|
-
import { a as isSameShape, n as getHashCode } from "./shapeFns-
|
|
8
|
-
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-
|
|
9
|
-
import { n as measureArea } from "./measureFns-
|
|
6
|
+
import { l as normalAt, s as getSurfaceType } from "./faceFns-4JEna8n9.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-B8REDWBf.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-B4_om-yp.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-xpevHRLG.js";
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bhey0q1G.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const require_shapeFns = require("./shapeFns-
|
|
8
|
-
const require_curveFns = require("./curveFns-
|
|
9
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_faceFns = require("./faceFns-Obtamglc.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-CE6c_4D4.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-Dlbfncal.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-Ym_I522s.cjs");
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-C2gkyxYc.cjs");
|
|
6
6
|
//#region src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { n as wasmIndex, t as vec3At$1 } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
5
|
-
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-yJsyEFn_.js";
|
|
6
6
|
//#region src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
package/dist/io.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_meshFns = require("./meshFns-
|
|
3
|
-
const require_importFns = require("./importFns-
|
|
2
|
+
const require_meshFns = require("./meshFns-DDhKhVK0.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-BJVEly-l.cjs");
|
|
4
4
|
exports.blueprintToDXF = require_importFns.blueprintToDXF;
|
|
5
5
|
exports.exportDXF = require_importFns.exportDXF;
|
|
6
6
|
exports.exportGlb = require_importFns.exportGlb;
|
package/dist/io.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-
|
|
2
|
-
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-
|
|
1
|
+
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-soCHj3jp.js";
|
|
2
|
+
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-Dcc2KviL.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Type-safe interface for the brepkit WASM kernel (`BrepKernel`).
|
|
3
3
|
*
|
|
4
4
|
* AUTO-GENERATED by `npm run sync:brepkit-types`.
|
|
5
|
-
* Synced against `brepkit-wasm@2.
|
|
5
|
+
* Synced against `brepkit-wasm@2.104.1`.
|
|
6
6
|
*
|
|
7
7
|
* Methods not yet referenced in the adapter layer are tagged `@unwired`.
|
|
8
8
|
*
|
|
@@ -215,7 +215,9 @@ export interface BrepkitKernel {
|
|
|
215
215
|
meshEdgesAll(solid: number, deflection: number): BrepkitEdgeLines;
|
|
216
216
|
meshBoolean(positionsA: Float64Array | number[], indicesA: Uint32Array | number[], positionsB: Float64Array | number[], indicesB: Uint32Array | number[], op: string, tolerance: number): BrepkitMesh;
|
|
217
217
|
exportStep(solid: number): Uint8Array;
|
|
218
|
+
/** @unwired */
|
|
218
219
|
exportStl(solid: number, deflection: number): Uint8Array;
|
|
220
|
+
/** @unwired */
|
|
219
221
|
exportStlAscii(solid: number, deflection: number): Uint8Array;
|
|
220
222
|
exportIges(solid: number): Uint8Array;
|
|
221
223
|
export3mf(solid: number, deflection: number): Uint8Array;
|
|
@@ -286,6 +288,8 @@ export interface BrepkitKernel {
|
|
|
286
288
|
/** @unwired */
|
|
287
289
|
getNurbsSurfaceData(face: number): string;
|
|
288
290
|
getNurbsSurfaceDataParity(face: number): string;
|
|
291
|
+
/** @unwired */
|
|
292
|
+
getSolidShells(solid: number): Uint32Array;
|
|
289
293
|
makeCircleEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number): number;
|
|
290
294
|
/** @unwired */
|
|
291
295
|
makeCircleEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, rx: number, ry: number, rz: number): number;
|
|
@@ -298,15 +302,15 @@ export interface BrepkitKernel {
|
|
|
298
302
|
/** @unwired */
|
|
299
303
|
toBrepJson(solid: number): string;
|
|
300
304
|
transformFace(face: number, matrix: Float64Array | number[]): void;
|
|
301
|
-
/** @future Not in brepkit-wasm 2.
|
|
305
|
+
/** @future Not in brepkit-wasm 2.104.1. Referenced with feature detection in adapter. */
|
|
302
306
|
chamferAsymmetric?(solid: number, edgeHandles: Uint32Array | number[], d1: number, d2: number): number;
|
|
303
|
-
/** @future Not in brepkit-wasm 2.
|
|
307
|
+
/** @future Not in brepkit-wasm 2.104.1. Referenced with feature detection in adapter. */
|
|
304
308
|
compoundFuse?(solidIds: Uint32Array | number[]): number;
|
|
305
|
-
/** @future Not in brepkit-wasm 2.
|
|
309
|
+
/** @future Not in brepkit-wasm 2.104.1. Referenced with feature detection in adapter. */
|
|
306
310
|
copyEdge?(edge: number): number;
|
|
307
|
-
/** @future Not in brepkit-wasm 2.
|
|
311
|
+
/** @future Not in brepkit-wasm 2.104.1. Referenced with feature detection in adapter. */
|
|
308
312
|
transformEdge?(edge: number, matrix: Float64Array | number[]): void;
|
|
309
|
-
/** @future Not in brepkit-wasm 2.
|
|
313
|
+
/** @future Not in brepkit-wasm 2.104.1. Referenced with feature detection in adapter. */
|
|
310
314
|
validateSolidDetails?(solid: number): string;
|
|
311
315
|
/** Release the entire arena. */
|
|
312
316
|
free(): void;
|
|
@@ -39,7 +39,14 @@ export declare function rotateCurve2d(curve: Curve2dHandle, angle: number, cx: n
|
|
|
39
39
|
export declare function scaleCurve2d(curve: Curve2dHandle, factor: number, cx: number, cy: number): Curve2dHandle;
|
|
40
40
|
export declare function mirrorCurve2dAtPoint(curve: Curve2dHandle, cx: number, cy: number): Curve2dHandle;
|
|
41
41
|
export declare function mirrorCurve2dAcrossAxis(curve: Curve2dHandle, originX: number, originY: number, dirX: number, dirY: number): Curve2dHandle;
|
|
42
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Directional affinity matching OCCT `gp_GTrsf2d::SetAffinity`: scales the
|
|
44
|
+
* component perpendicular to the axis `(dx, dy)` through `(ox, oy)` by `ratio`,
|
|
45
|
+
* leaving the parallel component fixed. Applied by sampling and refitting as a
|
|
46
|
+
* Bezier, since occt-wasm has no native Geom2d transform.
|
|
47
|
+
*/
|
|
48
|
+
export declare function affinityCurve2d(curve: Curve2dHandle, ox: number, oy: number, dx: number, dy: number, ratio: number): Curve2dHandle;
|
|
49
|
+
export declare function affinityTransform2d(curve: Curve2dHandle, ox: number, oy: number, dx: number, dy: number, ratio: number): Curve2dHandle;
|
|
43
50
|
export declare function createIdentityGTrsf2d(): KernelType;
|
|
44
51
|
export declare function createAffinityGTrsf2d(originX: number, originY: number, dirX: number, dirY: number, ratio: number): KernelType;
|
|
45
52
|
export declare function createTranslationGTrsf2d(dx: number, dy: number): KernelType;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_occtWasmAdapter = require("../../occtWasmAdapter-
|
|
2
|
+
const require_occtWasmAdapter = require("../../occtWasmAdapter-Bfz5Zfmk.cjs");
|
|
3
3
|
exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
|
|
@@ -388,7 +388,7 @@ export declare class OcctWasmAdapter implements KernelAdapter {
|
|
|
388
388
|
scaleCurve2d(curve: Curve2dHandle, factor: number, cx: number, cy: number): Curve2dHandle;
|
|
389
389
|
mirrorCurve2dAtPoint(curve: Curve2dHandle, cx: number, cy: number): Curve2dHandle;
|
|
390
390
|
mirrorCurve2dAcrossAxis(curve: Curve2dHandle, originX: number, originY: number, dirX: number, dirY: number): Curve2dHandle;
|
|
391
|
-
affinityTransform2d(curve: Curve2dHandle,
|
|
391
|
+
affinityTransform2d(curve: Curve2dHandle, axisOriginX: number, axisOriginY: number, axisDirX: number, axisDirY: number, ratio: number): Curve2dHandle;
|
|
392
392
|
createIdentityGTrsf2d(): KernelType;
|
|
393
393
|
createAffinityGTrsf2d(originX: number, originY: number, dirX: number, dirY: number, ratio: number): KernelType;
|
|
394
394
|
createTranslationGTrsf2d(dx: number, dy: number): KernelType;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as OcctWasmAdapter } from "../../occtWasmAdapter-
|
|
1
|
+
import { t as OcctWasmAdapter } from "../../occtWasmAdapter-BK6h0nKd.js";
|
|
2
2
|
export { OcctWasmAdapter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { c as vecLength, d as vecNormalize, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bhey0q1G.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-Obtamglc.cjs");
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Z as getKernel } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { w as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
3
|
+
import { w as kernelCallRaw } from "./topologyQueryFns-BcGLEMvc.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-4JEna8n9.js";
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-Ym_I522s.cjs");
|
|
3
3
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
4
4
|
exports.measureArea = require_measureFns.measureArea;
|
|
5
5
|
exports.measureDistance = require_measureFns.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-
|
|
1
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-xpevHRLG.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bhey0q1G.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-CE6c_4D4.cjs");
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Z as getKernel, gt as qualityDeflection } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, gt as qualityDeflection } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { A as ok, b as err, r as ioError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { d as getSolids, n as getBounds } from "./topologyQueryFns-
|
|
4
|
-
import { O as getFaceOrigins } from "./shapeFns-
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-BcGLEMvc.js";
|
|
4
|
+
import { O as getFaceOrigins } from "./shapeFns-B8REDWBf.js";
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -3636,8 +3636,32 @@ function mirrorCurve2dAtPoint(curve, cx, cy) {
|
|
|
3636
3636
|
function mirrorCurve2dAcrossAxis(curve, originX, originY, dirX, dirY) {
|
|
3637
3637
|
return c2dWrap(mirrorAcrossAxis(c2d(curve), originX, originY, dirX, dirY));
|
|
3638
3638
|
}
|
|
3639
|
-
|
|
3640
|
-
|
|
3639
|
+
/**
|
|
3640
|
+
* Directional affinity matching OCCT `gp_GTrsf2d::SetAffinity`: scales the
|
|
3641
|
+
* component perpendicular to the axis `(dx, dy)` through `(ox, oy)` by `ratio`,
|
|
3642
|
+
* leaving the parallel component fixed. Applied by sampling and refitting as a
|
|
3643
|
+
* Bezier, since occt-wasm has no native Geom2d transform.
|
|
3644
|
+
*/
|
|
3645
|
+
function affinityCurve2d(curve, ox, oy, dx, dy, ratio) {
|
|
3646
|
+
const len = Math.sqrt(dx * dx + dy * dy);
|
|
3647
|
+
if (len < 1e-15) return curve;
|
|
3648
|
+
const px = -dy / len, py = dx / len;
|
|
3649
|
+
const k = ratio - 1;
|
|
3650
|
+
const a = 1 + k * px * px, b = k * px * py, d = k * py * px, e = 1 + k * py * py;
|
|
3651
|
+
const tx = ox - a * ox - b * oy;
|
|
3652
|
+
const ty = oy - d * ox - e * oy;
|
|
3653
|
+
const c = c2d(curve);
|
|
3654
|
+
const bounds = curveBounds(c);
|
|
3655
|
+
const N = 20;
|
|
3656
|
+
const pts = [];
|
|
3657
|
+
for (let i = 0; i <= N; i++) {
|
|
3658
|
+
const [qx, qy] = evaluateCurve2d$1(c, bounds.first + (bounds.last - bounds.first) * i / N);
|
|
3659
|
+
pts.push([a * qx + b * qy + tx, d * qx + e * qy + ty]);
|
|
3660
|
+
}
|
|
3661
|
+
return c2dWrap(makeBezier2d$1(pts));
|
|
3662
|
+
}
|
|
3663
|
+
function affinityTransform2d(curve, ox, oy, dx, dy, ratio) {
|
|
3664
|
+
return affinityCurve2d(curve, ox, oy, dx, dy, ratio);
|
|
3641
3665
|
}
|
|
3642
3666
|
function createIdentityGTrsf2d() {
|
|
3643
3667
|
return {
|
|
@@ -3718,7 +3742,7 @@ function transformCurve2dGeneral(curve, gtrsf) {
|
|
|
3718
3742
|
if (t["type"] === "rotate2d") return rotateCurve2d(curve, Number(t["angle"]) || 0, Number(t["cx"]) || 0, Number(t["cy"]) || 0);
|
|
3719
3743
|
if (t["type"] === "scale2d") return scaleCurve2d(curve, Number(t["sx"]) || 1, Number(t["cx"]) || 0, Number(t["cy"]) || 0);
|
|
3720
3744
|
if (t["type"] === "mirror2d") return mirrorCurve2dAtPoint(curve, Number(t["ox"]) || 0, Number(t["oy"]) || 0);
|
|
3721
|
-
if (t["type"] === "affinity2d") return
|
|
3745
|
+
if (t["type"] === "affinity2d") return affinityCurve2d(curve, Number(t["axOriginX"]) || 0, Number(t["axOriginY"]) || 0, Number(t["axDirX"]) || 0, Number(t["axDirY"]) || 0, Number(t["ratio"]) || 1);
|
|
3722
3746
|
if (Number(t["dx"]) || Number(t["dy"])) return translateCurve2d(curve, Number(t["dx"]) || 0, Number(t["dy"]) || 0);
|
|
3723
3747
|
return curve;
|
|
3724
3748
|
}
|
|
@@ -5063,8 +5087,8 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
5063
5087
|
mirrorCurve2dAcrossAxis(curve, originX, originY, dirX, dirY) {
|
|
5064
5088
|
return mirrorCurve2dAcrossAxis(curve, originX, originY, dirX, dirY);
|
|
5065
5089
|
}
|
|
5066
|
-
affinityTransform2d(curve,
|
|
5067
|
-
return affinityTransform2d(curve);
|
|
5090
|
+
affinityTransform2d(curve, axisOriginX, axisOriginY, axisDirX, axisDirY, ratio) {
|
|
5091
|
+
return affinityTransform2d(curve, axisOriginX, axisOriginY, axisDirX, axisDirY, ratio);
|
|
5068
5092
|
}
|
|
5069
5093
|
createIdentityGTrsf2d() {
|
|
5070
5094
|
return createIdentityGTrsf2d();
|
|
@@ -3636,8 +3636,32 @@ function mirrorCurve2dAtPoint(curve, cx, cy) {
|
|
|
3636
3636
|
function mirrorCurve2dAcrossAxis(curve, originX, originY, dirX, dirY) {
|
|
3637
3637
|
return c2dWrap(mirrorAcrossAxis(c2d(curve), originX, originY, dirX, dirY));
|
|
3638
3638
|
}
|
|
3639
|
-
|
|
3640
|
-
|
|
3639
|
+
/**
|
|
3640
|
+
* Directional affinity matching OCCT `gp_GTrsf2d::SetAffinity`: scales the
|
|
3641
|
+
* component perpendicular to the axis `(dx, dy)` through `(ox, oy)` by `ratio`,
|
|
3642
|
+
* leaving the parallel component fixed. Applied by sampling and refitting as a
|
|
3643
|
+
* Bezier, since occt-wasm has no native Geom2d transform.
|
|
3644
|
+
*/
|
|
3645
|
+
function affinityCurve2d(curve, ox, oy, dx, dy, ratio) {
|
|
3646
|
+
const len = Math.sqrt(dx * dx + dy * dy);
|
|
3647
|
+
if (len < 1e-15) return curve;
|
|
3648
|
+
const px = -dy / len, py = dx / len;
|
|
3649
|
+
const k = ratio - 1;
|
|
3650
|
+
const a = 1 + k * px * px, b = k * px * py, d = k * py * px, e = 1 + k * py * py;
|
|
3651
|
+
const tx = ox - a * ox - b * oy;
|
|
3652
|
+
const ty = oy - d * ox - e * oy;
|
|
3653
|
+
const c = c2d(curve);
|
|
3654
|
+
const bounds = curveBounds(c);
|
|
3655
|
+
const N = 20;
|
|
3656
|
+
const pts = [];
|
|
3657
|
+
for (let i = 0; i <= N; i++) {
|
|
3658
|
+
const [qx, qy] = evaluateCurve2d$1(c, bounds.first + (bounds.last - bounds.first) * i / N);
|
|
3659
|
+
pts.push([a * qx + b * qy + tx, d * qx + e * qy + ty]);
|
|
3660
|
+
}
|
|
3661
|
+
return c2dWrap(makeBezier2d$1(pts));
|
|
3662
|
+
}
|
|
3663
|
+
function affinityTransform2d(curve, ox, oy, dx, dy, ratio) {
|
|
3664
|
+
return affinityCurve2d(curve, ox, oy, dx, dy, ratio);
|
|
3641
3665
|
}
|
|
3642
3666
|
function createIdentityGTrsf2d() {
|
|
3643
3667
|
return {
|
|
@@ -3718,7 +3742,7 @@ function transformCurve2dGeneral(curve, gtrsf) {
|
|
|
3718
3742
|
if (t["type"] === "rotate2d") return rotateCurve2d(curve, Number(t["angle"]) || 0, Number(t["cx"]) || 0, Number(t["cy"]) || 0);
|
|
3719
3743
|
if (t["type"] === "scale2d") return scaleCurve2d(curve, Number(t["sx"]) || 1, Number(t["cx"]) || 0, Number(t["cy"]) || 0);
|
|
3720
3744
|
if (t["type"] === "mirror2d") return mirrorCurve2dAtPoint(curve, Number(t["ox"]) || 0, Number(t["oy"]) || 0);
|
|
3721
|
-
if (t["type"] === "affinity2d") return
|
|
3745
|
+
if (t["type"] === "affinity2d") return affinityCurve2d(curve, Number(t["axOriginX"]) || 0, Number(t["axOriginY"]) || 0, Number(t["axDirX"]) || 0, Number(t["axDirY"]) || 0, Number(t["ratio"]) || 1);
|
|
3722
3746
|
if (Number(t["dx"]) || Number(t["dy"])) return translateCurve2d(curve, Number(t["dx"]) || 0, Number(t["dy"]) || 0);
|
|
3723
3747
|
return curve;
|
|
3724
3748
|
}
|
|
@@ -5063,8 +5087,8 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
5063
5087
|
mirrorCurve2dAcrossAxis(curve, originX, originY, dirX, dirY) {
|
|
5064
5088
|
return mirrorCurve2dAcrossAxis(curve, originX, originY, dirX, dirY);
|
|
5065
5089
|
}
|
|
5066
|
-
affinityTransform2d(curve,
|
|
5067
|
-
return affinityTransform2d(curve);
|
|
5090
|
+
affinityTransform2d(curve, axisOriginX, axisOriginY, axisDirX, axisDirY, ratio) {
|
|
5091
|
+
return affinityTransform2d(curve, axisOriginX, axisOriginY, axisDirX, axisDirY, ratio);
|
|
5068
5092
|
}
|
|
5069
5093
|
createIdentityGTrsf2d() {
|
|
5070
5094
|
return createIdentityGTrsf2d();
|
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-BzFhh87N.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-BAM49XJy.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 findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as gridPattern, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, O as prismaticJoint, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ 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, q as exportAssemblySTEP, 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 createAssemblyNode } from "./threadFns-
|
|
2
|
-
import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as gridPattern, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, O as prismaticJoint, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ 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, q as exportAssemblySTEP, 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 createAssemblyNode } from "./threadFns-BQHEnI7a.js";
|
|
2
|
+
import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-DF3KNz9-.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,9 +1,9 @@
|
|
|
1
|
-
import { Z as getKernel, c as createSolid, x as isClosedWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, c as createSolid, x as isClosedWire } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, v as andThen } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
4
|
-
import { h as translate } from "./shapeFns-
|
|
5
|
-
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-
|
|
4
|
+
import { h as translate } from "./shapeFns-B8REDWBf.js";
|
|
5
|
+
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-D5sQZ6ah.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-BSnsqitN.js";
|
|
7
7
|
//#region src/topology/primitiveFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a box with the given dimensions.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
4
|
+
const require_shapeFns = require("./shapeFns-CE6c_4D4.cjs");
|
|
5
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CDX6sDZz.cjs");
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-DfGIPlQ2.cjs");
|
|
7
7
|
//#region src/topology/primitiveFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a box with the given dimensions.
|
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-BkSHm_Vo.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,2 +1,2 @@
|
|
|
1
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
1
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-BiQGAnPd.js";
|
|
2
2
|
export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
|
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-rAK5qEBu.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-D3lGL_Td.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-CJV31xig.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-C9zvdkpK.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-
|
|
3
|
+
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-BcGLEMvc.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bhey0q1G.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|