brepjs 8.0.0 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d/blueprints/booleanHelpers.d.ts +32 -0
- package/dist/2d/blueprints/booleanHelpers.d.ts.map +1 -0
- package/dist/2d/blueprints/booleanOperations.d.ts +5 -3
- package/dist/2d/blueprints/booleanOperations.d.ts.map +1 -1
- package/dist/2d/blueprints/intersectionSegments.d.ts +12 -0
- package/dist/2d/blueprints/intersectionSegments.d.ts.map +1 -0
- package/dist/2d/blueprints/segmentAssembly.d.ts +31 -0
- package/dist/2d/blueprints/segmentAssembly.d.ts.map +1 -0
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +8 -8
- package/dist/{Blueprint-D3JfGJTz.js → Blueprint-B9fhnpFp.js} +117 -30
- package/dist/{Blueprint-CVctc41Z.cjs → Blueprint-VGbo3izk.cjs} +111 -24
- package/dist/{boolean2D-BdZATaHs.cjs → boolean2D-B1XrGVgx.cjs} +426 -345
- package/dist/{boolean2D-hOw5Qay5.js → boolean2D-_WiqPxWZ.js} +391 -310
- package/dist/{booleanFns-BBSVKhL2.cjs → booleanFns-BxW-N3rP.cjs} +12 -16
- package/dist/{booleanFns-CqehfzcK.js → booleanFns-CkccZ7UL.js} +14 -18
- package/dist/brepjs.cjs +133 -62
- package/dist/brepjs.js +290 -217
- package/dist/{cast-DQaUibmm.js → cast-C4Ff_1Qe.js} +2 -2
- package/dist/{cast-DkB0GKmQ.cjs → cast-DIiyxDLo.cjs} +2 -2
- package/dist/core/disposal.d.ts +1 -1
- package/dist/core/disposal.d.ts.map +1 -1
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/cornerFinder-BndBNtJE.cjs +58 -0
- package/dist/cornerFinder-DzGzfiqb.js +59 -0
- package/dist/curveBuilders-BUoFO1UG.cjs +196 -0
- package/dist/curveBuilders-CBlIWlbU.js +197 -0
- package/dist/{curveFns-BilyYL_s.cjs → curveFns-BrJDkaWi.cjs} +31 -44
- package/dist/{curveFns-CdVE4da7.js → curveFns-BshHA9Ys.js} +31 -44
- package/dist/{drawFns-921SkhDL.js → drawFns-Btmlh_Oz.js} +13 -14
- package/dist/{drawFns-CUyx50gi.cjs → drawFns-D2eDcf4k.cjs} +58 -59
- package/dist/{faceFns-DHu-2JpA.js → faceFns-DDzCECn3.js} +3 -3
- package/dist/{faceFns-BwK7FP7N.cjs → faceFns-NDRFeekj.cjs} +3 -3
- package/dist/helpers-Ck8GJ58k.cjs +203 -0
- package/dist/helpers-jku2V1DY.js +204 -0
- package/dist/io.cjs +4 -4
- package/dist/io.js +4 -4
- package/dist/kernel/occtAdapter.d.ts +1 -0
- package/dist/kernel/occtAdapter.d.ts.map +1 -1
- package/dist/kernel/sweepOps.d.ts +8 -0
- package/dist/kernel/sweepOps.d.ts.map +1 -1
- package/dist/kernel/types.d.ts +1 -0
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/loft-Bk9EM0gZ.js +373 -0
- package/dist/loft-DJXwxV_L.cjs +372 -0
- package/dist/{measurement-C5JGCuUP.js → measurement-DlXaTzKc.js} +3 -3
- package/dist/{measurement-fxm_pW7x.cjs → measurement-LcGh4wV0.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-AqAjTTVl.js → meshFns-Djzdn-CS.js} +1 -1
- package/dist/{meshFns-BhrZGi6w.cjs → meshFns-c8lDKfYy.cjs} +1 -1
- package/dist/{occtBoundary-du8_ex-p.cjs → occtBoundary-6kQSl3cF.cjs} +21 -0
- package/dist/{occtBoundary-CwegMzqc.js → occtBoundary-CqXvDhZY.js} +26 -5
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/extrudeUtils.d.ts +17 -0
- package/dist/operations/extrudeUtils.d.ts.map +1 -1
- package/dist/{operations-C1rWoba2.js → operations-CrQlFDHc.js} +30 -7
- package/dist/{operations-BP1wVDw0.cjs → operations-Do-WZGXc.cjs} +30 -7
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +4 -4
- package/dist/query/cornerFinder.d.ts +48 -0
- package/dist/query/cornerFinder.d.ts.map +1 -0
- package/dist/query/directionUtils.d.ts +6 -0
- package/dist/query/directionUtils.d.ts.map +1 -0
- package/dist/query/edgeFinder.d.ts +15 -0
- package/dist/query/edgeFinder.d.ts.map +1 -0
- package/dist/query/faceFinder.d.ts +15 -0
- package/dist/query/faceFinder.d.ts.map +1 -0
- package/dist/query/finderCore.d.ts +35 -0
- package/dist/query/finderCore.d.ts.map +1 -0
- package/dist/query/finderFns.d.ts +21 -106
- package/dist/query/finderFns.d.ts.map +1 -1
- package/dist/query/shapeDistanceFilter.d.ts +11 -0
- package/dist/query/shapeDistanceFilter.d.ts.map +1 -0
- package/dist/query/vertexFinder.d.ts +16 -0
- package/dist/query/vertexFinder.d.ts.map +1 -0
- package/dist/query/wireFinder.d.ts +10 -0
- package/dist/query/wireFinder.d.ts.map +1 -0
- package/dist/query.cjs +42 -5
- package/dist/query.js +40 -2
- package/dist/{shapeFns-BrF97sKt.js → shapeFns-DQtpzndX.js} +17 -18
- package/dist/{shapeFns-BvOndshS.cjs → shapeFns-cN4qGpbO.cjs} +6 -7
- package/dist/{shapeTypes-DKhwEnUM.cjs → shapeTypes-BJ3Hmskg.cjs} +24 -20
- package/dist/{shapeTypes-BlSElW8z.js → shapeTypes-C9sUsmEW.js} +32 -28
- package/dist/sketching/Sketcher.d.ts.map +1 -1
- package/dist/sketching/Sketcher2d.d.ts +12 -4
- package/dist/sketching/Sketcher2d.d.ts.map +1 -1
- package/dist/sketching/ellipseUtils.d.ts +29 -0
- package/dist/sketching/ellipseUtils.d.ts.map +1 -0
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/curveBuilders.d.ts +75 -0
- package/dist/topology/curveBuilders.d.ts.map +1 -0
- package/dist/topology/curveFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/shapeHelpers.d.ts +6 -173
- package/dist/topology/shapeHelpers.d.ts.map +1 -1
- package/dist/topology/shapeUtils.d.ts +13 -0
- package/dist/topology/shapeUtils.d.ts.map +1 -0
- package/dist/topology/solidBuilders.d.ts +70 -0
- package/dist/topology/solidBuilders.d.ts.map +1 -0
- package/dist/topology/surfaceBuilders.d.ts +35 -0
- package/dist/topology/surfaceBuilders.d.ts.map +1 -0
- package/dist/topology/wrapperFns.d.ts +1 -0
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-tFzqSrGH.js → topology-CtfUZwLR.js} +8 -8
- package/dist/{topology-CIooytHH.cjs → topology-DXq8dLsi.cjs} +8 -8
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +31 -31
- package/dist/{vectors-CBuaMeZv.js → vectors-BVgXsYWl.js} +1 -1
- package/dist/{vectors-ChWEZPwy.cjs → vectors-DK2hEKcI.cjs} +1 -1
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +1 -1
- package/dist/loft-BzWFokmC.cjs +0 -178
- package/dist/loft-CtG5nMq5.js +0 -179
- package/dist/query-V6nV-VfL.js +0 -396
- package/dist/query-hMSmOWJP.cjs +0 -395
- package/dist/shapeHelpers-B2SXz1p4.cjs +0 -488
- package/dist/shapeHelpers-BcoZf2N9.js +0 -489
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-6kQSl3cF.cjs");
|
|
3
|
+
const shapeTypes = require("./shapeTypes-BJ3Hmskg.cjs");
|
|
4
4
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
5
5
|
let CURVE_TYPES_MAP = null;
|
|
6
6
|
const getCurveTypesMap = (refresh) => {
|
|
@@ -41,68 +41,55 @@ function mapParam(adaptor, t) {
|
|
|
41
41
|
return first + (last - first) * t;
|
|
42
42
|
}
|
|
43
43
|
function getCurveType(shape) {
|
|
44
|
-
const
|
|
44
|
+
const r = shapeTypes.gcWithScope();
|
|
45
|
+
const adaptor = r(getAdaptor(shape));
|
|
45
46
|
const technicalType = adaptor.GetType && adaptor.GetType();
|
|
46
|
-
|
|
47
|
-
adaptor.delete();
|
|
48
|
-
return result;
|
|
47
|
+
return errors.unwrap(findCurveType(technicalType));
|
|
49
48
|
}
|
|
50
49
|
function curveStartPoint(shape) {
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
pnt.
|
|
55
|
-
adaptor.delete();
|
|
56
|
-
return result;
|
|
50
|
+
const r = shapeTypes.gcWithScope();
|
|
51
|
+
const adaptor = r(getAdaptor(shape));
|
|
52
|
+
const pnt = r(adaptor.Value(adaptor.FirstParameter()));
|
|
53
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
57
54
|
}
|
|
58
55
|
function curveEndPoint(shape) {
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
pnt.
|
|
63
|
-
adaptor.delete();
|
|
64
|
-
return result;
|
|
56
|
+
const r = shapeTypes.gcWithScope();
|
|
57
|
+
const adaptor = r(getAdaptor(shape));
|
|
58
|
+
const pnt = r(adaptor.Value(adaptor.LastParameter()));
|
|
59
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
65
60
|
}
|
|
66
61
|
function curvePointAt(shape, position = 0.5) {
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
pnt.
|
|
71
|
-
adaptor.delete();
|
|
72
|
-
return result;
|
|
62
|
+
const r = shapeTypes.gcWithScope();
|
|
63
|
+
const adaptor = r(getAdaptor(shape));
|
|
64
|
+
const pnt = r(adaptor.Value(mapParam(adaptor, position)));
|
|
65
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
73
66
|
}
|
|
74
67
|
function curveTangentAt(shape, position = 0.5) {
|
|
75
68
|
const oc = occtBoundary.getKernel().oc;
|
|
76
|
-
const
|
|
69
|
+
const r = shapeTypes.gcWithScope();
|
|
70
|
+
const adaptor = r(getAdaptor(shape));
|
|
77
71
|
const param = mapParam(adaptor, position);
|
|
78
|
-
const tmpPnt = new oc.gp_Pnt_1();
|
|
79
|
-
const tmpVec = new oc.gp_Vec_1();
|
|
72
|
+
const tmpPnt = r(new oc.gp_Pnt_1());
|
|
73
|
+
const tmpVec = r(new oc.gp_Vec_1());
|
|
80
74
|
adaptor.D1(param, tmpPnt, tmpVec);
|
|
81
|
-
|
|
82
|
-
tmpPnt.delete();
|
|
83
|
-
tmpVec.delete();
|
|
84
|
-
adaptor.delete();
|
|
85
|
-
return result;
|
|
75
|
+
return [tmpVec.X(), tmpVec.Y(), tmpVec.Z()];
|
|
86
76
|
}
|
|
87
77
|
function curveLength(shape) {
|
|
88
78
|
const oc = occtBoundary.getKernel().oc;
|
|
89
|
-
const
|
|
79
|
+
const r = shapeTypes.gcWithScope();
|
|
80
|
+
const props = r(new oc.GProp_GProps_1());
|
|
90
81
|
oc.BRepGProp.LinearProperties(shape.wrapped, props, true, false);
|
|
91
|
-
|
|
92
|
-
props.delete();
|
|
93
|
-
return len;
|
|
82
|
+
return props.Mass();
|
|
94
83
|
}
|
|
95
84
|
function curveIsClosed(shape) {
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
adaptor.
|
|
99
|
-
return result;
|
|
85
|
+
const r = shapeTypes.gcWithScope();
|
|
86
|
+
const adaptor = r(getAdaptor(shape));
|
|
87
|
+
return adaptor.IsClosed();
|
|
100
88
|
}
|
|
101
89
|
function curveIsPeriodic(shape) {
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
adaptor.
|
|
105
|
-
return result;
|
|
90
|
+
const r = shapeTypes.gcWithScope();
|
|
91
|
+
const adaptor = r(getAdaptor(shape));
|
|
92
|
+
return adaptor.IsPeriodic();
|
|
106
93
|
}
|
|
107
94
|
function curvePeriod(shape) {
|
|
108
95
|
const adaptor = getAdaptor(shape);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getKernel } from "./occtBoundary-
|
|
2
|
-
import { c as castShape, d as isEdge, m as isWire } from "./shapeTypes-
|
|
1
|
+
import { g as getKernel } from "./occtBoundary-CqXvDhZY.js";
|
|
2
|
+
import { c as castShape, d as isEdge, m as isWire, p as gcWithScope } from "./shapeTypes-C9sUsmEW.js";
|
|
3
3
|
import { e as err, p as typeCastError, l as ok, u as unwrap } from "./errors-wGhcJMpB.js";
|
|
4
4
|
let CURVE_TYPES_MAP = null;
|
|
5
5
|
const getCurveTypesMap = (refresh) => {
|
|
@@ -40,68 +40,55 @@ function mapParam(adaptor, t) {
|
|
|
40
40
|
return first + (last - first) * t;
|
|
41
41
|
}
|
|
42
42
|
function getCurveType(shape) {
|
|
43
|
-
const
|
|
43
|
+
const r = gcWithScope();
|
|
44
|
+
const adaptor = r(getAdaptor(shape));
|
|
44
45
|
const technicalType = adaptor.GetType && adaptor.GetType();
|
|
45
|
-
|
|
46
|
-
adaptor.delete();
|
|
47
|
-
return result;
|
|
46
|
+
return unwrap(findCurveType(technicalType));
|
|
48
47
|
}
|
|
49
48
|
function curveStartPoint(shape) {
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
pnt.
|
|
54
|
-
adaptor.delete();
|
|
55
|
-
return result;
|
|
49
|
+
const r = gcWithScope();
|
|
50
|
+
const adaptor = r(getAdaptor(shape));
|
|
51
|
+
const pnt = r(adaptor.Value(adaptor.FirstParameter()));
|
|
52
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
56
53
|
}
|
|
57
54
|
function curveEndPoint(shape) {
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
pnt.
|
|
62
|
-
adaptor.delete();
|
|
63
|
-
return result;
|
|
55
|
+
const r = gcWithScope();
|
|
56
|
+
const adaptor = r(getAdaptor(shape));
|
|
57
|
+
const pnt = r(adaptor.Value(adaptor.LastParameter()));
|
|
58
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
64
59
|
}
|
|
65
60
|
function curvePointAt(shape, position = 0.5) {
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
pnt.
|
|
70
|
-
adaptor.delete();
|
|
71
|
-
return result;
|
|
61
|
+
const r = gcWithScope();
|
|
62
|
+
const adaptor = r(getAdaptor(shape));
|
|
63
|
+
const pnt = r(adaptor.Value(mapParam(adaptor, position)));
|
|
64
|
+
return [pnt.X(), pnt.Y(), pnt.Z()];
|
|
72
65
|
}
|
|
73
66
|
function curveTangentAt(shape, position = 0.5) {
|
|
74
67
|
const oc = getKernel().oc;
|
|
75
|
-
const
|
|
68
|
+
const r = gcWithScope();
|
|
69
|
+
const adaptor = r(getAdaptor(shape));
|
|
76
70
|
const param = mapParam(adaptor, position);
|
|
77
|
-
const tmpPnt = new oc.gp_Pnt_1();
|
|
78
|
-
const tmpVec = new oc.gp_Vec_1();
|
|
71
|
+
const tmpPnt = r(new oc.gp_Pnt_1());
|
|
72
|
+
const tmpVec = r(new oc.gp_Vec_1());
|
|
79
73
|
adaptor.D1(param, tmpPnt, tmpVec);
|
|
80
|
-
|
|
81
|
-
tmpPnt.delete();
|
|
82
|
-
tmpVec.delete();
|
|
83
|
-
adaptor.delete();
|
|
84
|
-
return result;
|
|
74
|
+
return [tmpVec.X(), tmpVec.Y(), tmpVec.Z()];
|
|
85
75
|
}
|
|
86
76
|
function curveLength(shape) {
|
|
87
77
|
const oc = getKernel().oc;
|
|
88
|
-
const
|
|
78
|
+
const r = gcWithScope();
|
|
79
|
+
const props = r(new oc.GProp_GProps_1());
|
|
89
80
|
oc.BRepGProp.LinearProperties(shape.wrapped, props, true, false);
|
|
90
|
-
|
|
91
|
-
props.delete();
|
|
92
|
-
return len;
|
|
81
|
+
return props.Mass();
|
|
93
82
|
}
|
|
94
83
|
function curveIsClosed(shape) {
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
adaptor.
|
|
98
|
-
return result;
|
|
84
|
+
const r = gcWithScope();
|
|
85
|
+
const adaptor = r(getAdaptor(shape));
|
|
86
|
+
return adaptor.IsClosed();
|
|
99
87
|
}
|
|
100
88
|
function curveIsPeriodic(shape) {
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
adaptor.
|
|
104
|
-
return result;
|
|
89
|
+
const r = gcWithScope();
|
|
90
|
+
const adaptor = r(getAdaptor(shape));
|
|
91
|
+
return adaptor.IsPeriodic();
|
|
105
92
|
}
|
|
106
93
|
function curvePeriod(shape) {
|
|
107
94
|
const adaptor = getAdaptor(shape);
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { u as unwrap, g as isOk, e as err, x as validationError, l as ok } from "./errors-wGhcJMpB.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-CwegMzqc.js";
|
|
2
|
+
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-BVgXsYWl.js";
|
|
3
|
+
import { g as getKernel, a as toVec3, m as makeOcAx2 } from "./occtBoundary-CqXvDhZY.js";
|
|
5
4
|
import { n as vecScale, j as vecNormalize, v as vecAdd, o as vecSub, b as vecCross, m as vecRotate, R as RAD2DEG, g as vecLength, e as vecEquals, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
6
|
-
import { h as Flatbush, j as convertSvgEllipseParams, k as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, b as Blueprints, C as CompoundBlueprint, c as cut2D, l as intersectCurves, f as fuse2D, m as make2dOffset, n as filletCurves, q as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, i as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-
|
|
7
|
-
import { f as faceCenter, n as normalAt, o as outerWire } from "./faceFns-
|
|
8
|
-
import { a as curveTangentAt, d as curveEndPoint, l as getCurveType, o as offsetWire2D } from "./curveFns-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { h as Flatbush, j as convertSvgEllipseParams, k as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, b as Blueprints, C as CompoundBlueprint, c as cut2D, l as intersectCurves, f as fuse2D, m as make2dOffset, n as filletCurves, q as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, i as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-_WiqPxWZ.js";
|
|
6
|
+
import { f as faceCenter, n as normalAt, o as outerWire } from "./faceFns-DDzCECn3.js";
|
|
7
|
+
import { a as curveTangentAt, d as curveEndPoint, l as getCurveType, o as offsetWire2D } from "./curveFns-BshHA9Ys.js";
|
|
8
|
+
import { m as makeLine, i as makeThreePointArc, h as makeTangentArc, g as makeEllipseArc, c as makeBezierCurve, a as assembleWire, e as makeCircle, f as makeEllipse, b as makeHelix, d as makeBSplineApproximation } from "./curveBuilders-CBlIWlbU.js";
|
|
9
|
+
import { n as createWire, t as localGC, u as createFace, e as isFace, p as gcWithScope, c as castShape } from "./shapeTypes-C9sUsmEW.js";
|
|
10
|
+
import { d as downcast, c as cast } from "./cast-C4Ff_1Qe.js";
|
|
11
|
+
import { h as mirror, a as addHolesInFace, m as makeFace, B as Blueprint, C as Curve2D, i as make2dSegmentCurve, j as make2dArcFromCenter, k as approximateAsSvgCompatibleCurve, e as BoundingBox2d, l as edgeToCurve, n as make2dInerpolatedBSplineCurve, o as make2dCircle, p as make2dEllipse, q as deserializeCurve2D } from "./Blueprint-B9fhnpFp.js";
|
|
12
12
|
import { bug } from "./result.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import { d as distance2d, p as polarAngle2d, b as polarToCartesian, P as PRECISION_OFFSET, e as squareDistance2d, s as samePoint$1, h as subtract2d, i as add2d } from "./helpers-jku2V1DY.js";
|
|
14
|
+
import { a as getEdges } from "./shapeFns-DQtpzndX.js";
|
|
15
|
+
import { m as makeCompound, i as basicFaceExtrusion, r as revolution, e as makeSolid, k as complexExtrude, t as twistExtrude } from "./loft-Bk9EM0gZ.js";
|
|
16
16
|
import opentype from "opentype.js";
|
|
17
|
+
import { c as cornerFinder } from "./cornerFinder-DzGzfiqb.js";
|
|
17
18
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
18
19
|
const startPoints = new Flatbush(curves.length);
|
|
19
20
|
curves.forEach((c) => {
|
|
@@ -228,7 +229,6 @@ class Sketcher {
|
|
|
228
229
|
}
|
|
229
230
|
/** Draw an elliptical arc to an absolute end point (SVG-style parameters). */
|
|
230
231
|
ellipseTo(end, horizontalRadius, verticalRadius, rotation = 0, longAxis = false, sweep = false) {
|
|
231
|
-
const [, gc] = localGC();
|
|
232
232
|
const [startX, startY] = planeToLocal(this.plane, this.pointer);
|
|
233
233
|
let rotationAngle = rotation;
|
|
234
234
|
let majorRadius = horizontalRadius;
|
|
@@ -264,7 +264,6 @@ class Sketcher {
|
|
|
264
264
|
}
|
|
265
265
|
this.pendingEdges.push(arc);
|
|
266
266
|
this._updatePointer(planeToWorld(this.plane, end));
|
|
267
|
-
gc();
|
|
268
267
|
return this;
|
|
269
268
|
}
|
|
270
269
|
/** Draw an elliptical arc to a relative end point (SVG-style parameters). */
|