@mlightcad/data-model 1.3.1 → 1.3.4
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/data-model.cjs +4 -4
- package/dist/data-model.js +470 -422
- package/dist/dxf-parser-worker.js +47 -1
- package/lib/converter/AcDbDxfConverter.d.ts.map +1 -1
- package/lib/converter/AcDbDxfConverter.js +13 -6
- package/lib/converter/AcDbDxfConverter.js.map +1 -1
- package/lib/database/AcDbDatabaseConverter.d.ts +1 -1
- package/lib/database/AcDbDatabaseConverter.d.ts.map +1 -1
- package/lib/database/AcDbDatabaseConverter.js +4 -2
- package/lib/database/AcDbDatabaseConverter.js.map +1 -1
- package/lib/database/AcDbDwgVersion.d.ts.map +1 -1
- package/lib/database/AcDbDwgVersion.js +51 -1
- package/lib/database/AcDbDwgVersion.js.map +1 -1
- package/package.json +4 -4
package/dist/data-model.js
CHANGED
|
@@ -834,7 +834,7 @@ var No = { exports: {} };
|
|
|
834
834
|
typeof console !== e && (A.call(this), this[z].apply(this, arguments));
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function P(z, U, F) {
|
|
838
838
|
return g(z) || b.apply(this, arguments);
|
|
839
839
|
}
|
|
840
840
|
function M(z, U) {
|
|
@@ -897,7 +897,7 @@ var No = { exports: {} };
|
|
|
897
897
|
WARN: 3,
|
|
898
898
|
ERROR: 4,
|
|
899
899
|
SILENT: 5
|
|
900
|
-
}, F.methodFactory = U ||
|
|
900
|
+
}, F.methodFactory = U || P, F.getLevel = function() {
|
|
901
901
|
return ot ?? vt ?? dt;
|
|
902
902
|
}, F.setLevel = function(bt, Lt) {
|
|
903
903
|
return ot = Yt(bt), Lt !== !1 && ut(ot), A.call(F);
|
|
@@ -1049,15 +1049,15 @@ let Wh = class Lo {
|
|
|
1049
1049
|
const h = s.unset, c = s.silent, f = [], x = this._changing;
|
|
1050
1050
|
this._changing = !0, x || (this._previousAttributes = Ns(this.attributes), this.changed = {});
|
|
1051
1051
|
const g = this.attributes, A = this.changed, b = this._previousAttributes;
|
|
1052
|
-
for (const
|
|
1053
|
-
e = o[
|
|
1052
|
+
for (const P in o)
|
|
1053
|
+
e = o[P], bs(g[P], e) || f.push(P), bs(b[P], e) ? delete A[P] : A[P] = e, h ? delete g[P] : g[P] = e;
|
|
1054
1054
|
if (!c) {
|
|
1055
1055
|
f.length && (this._pending = s);
|
|
1056
|
-
for (let
|
|
1056
|
+
for (let P = 0; P < f.length; P++)
|
|
1057
1057
|
this.events.attrChanged.dispatch({
|
|
1058
1058
|
object: this,
|
|
1059
|
-
attrName: f[
|
|
1060
|
-
attrValue: g[f[
|
|
1059
|
+
attrName: f[P],
|
|
1060
|
+
attrValue: g[f[P]],
|
|
1061
1061
|
options: s
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
@@ -1230,8 +1230,7 @@ class qh {
|
|
|
1230
1230
|
constructor() {
|
|
1231
1231
|
this.tasks = [], this.onProgress = () => {
|
|
1232
1232
|
}, this.onComplete = () => {
|
|
1233
|
-
}, this.onError = () =>
|
|
1234
|
-
};
|
|
1233
|
+
}, this.onError = () => !1;
|
|
1235
1234
|
}
|
|
1236
1235
|
/**
|
|
1237
1236
|
* Schedules a task to be executed asynchronously.
|
|
@@ -1290,7 +1289,8 @@ class qh {
|
|
|
1290
1289
|
return this.onProgress((o + 1) / e, h), c;
|
|
1291
1290
|
});
|
|
1292
1291
|
} catch (c) {
|
|
1293
|
-
this.onError({ error: c, taskIndex: o, task: h })
|
|
1292
|
+
if (this.onError({ error: c, taskIndex: o, task: h }))
|
|
1293
|
+
break;
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
1296
|
this.onComplete(s);
|
|
@@ -1835,7 +1835,7 @@ const Kh = [
|
|
|
1835
1835
|
"utf-16le",
|
|
1836
1836
|
"windows-1258"
|
|
1837
1837
|
// Vietnamese
|
|
1838
|
-
], $h = (i) => Kh[i],
|
|
1838
|
+
], $h = (i) => Kh[i], Pi = "Continuous", di = "ByLayer", Zh = "ByBlock";
|
|
1839
1839
|
var Mn = /* @__PURE__ */ ((i) => (i[i.EndPoint = 1] = "EndPoint", i[i.MidPoint = 2] = "MidPoint", i[i.Center = 3] = "Center", i[i.Node = 4] = "Node", i[i.Quadrant = 5] = "Quadrant", i[i.Insertion = 7] = "Insertion", i[i.Perpendicular = 8] = "Perpendicular", i[i.Tangent = 9] = "Tangent", i[i.Nearest = 10] = "Nearest", i[i.Centroid = 11] = "Centroid", i))(Mn || {}), Fo = /* @__PURE__ */ ((i) => (i[i.Undefined = 0] = "Undefined", i[i.Inches = 1] = "Inches", i[i.Feet = 2] = "Feet", i[i.Miles = 3] = "Miles", i[i.Millimeters = 4] = "Millimeters", i[i.Centimeters = 5] = "Centimeters", i[i.Meters = 6] = "Meters", i[i.Kilometers = 7] = "Kilometers", i[i.Microinches = 8] = "Microinches", i[i.Mils = 9] = "Mils", i[i.Yards = 10] = "Yards", i[i.Angstroms = 11] = "Angstroms", i[i.Nanometers = 12] = "Nanometers", i[i.Microns = 13] = "Microns", i[i.Decimeters = 14] = "Decimeters", i[i.Dekameters = 15] = "Dekameters", i[i.Hectometers = 16] = "Hectometers", i[i.Gigameters = 17] = "Gigameters", i[i.Astronomical = 18] = "Astronomical", i[i.LightYears = 19] = "LightYears", i[i.Parsecs = 20] = "Parsecs", i[i.USSurveyFeet = 21] = "USSurveyFeet", i[i.USSurveyInch = 22] = "USSurveyInch", i[i.USSurveyYard = 23] = "USSurveyYard", i[i.USSurveyMile = 24] = "USSurveyMile", i[
|
|
1840
1840
|
i.Max = 24
|
|
1841
1841
|
/* USSurveyMile */
|
|
@@ -2147,10 +2147,10 @@ class Uo {
|
|
|
2147
2147
|
t
|
|
2148
2148
|
);
|
|
2149
2149
|
}
|
|
2150
|
-
console.error(
|
|
2150
|
+
return console.error(
|
|
2151
2151
|
`Error occurred in conversion stage '${t.task.name}': `,
|
|
2152
2152
|
t.error
|
|
2153
|
-
), t.task.name
|
|
2153
|
+
), t.task.name === "ENTITY" ? !1 : (this.onFinished(), !0);
|
|
2154
2154
|
}
|
|
2155
2155
|
onFinished() {
|
|
2156
2156
|
this.progress && (this.progress(100, "END", "END"), sn.instance.clear());
|
|
@@ -2232,9 +2232,9 @@ function xt(i, t) {
|
|
|
2232
2232
|
let h = function(x, g = !1) {
|
|
2233
2233
|
return x.reduce((A, b) => {
|
|
2234
2234
|
b.pushContext && A.push({});
|
|
2235
|
-
let
|
|
2235
|
+
let P = A[A.length - 1];
|
|
2236
2236
|
for (let M of typeof b.code == "number" ? [b.code] : b.code) {
|
|
2237
|
-
let O =
|
|
2237
|
+
let O = P[M] ?? (P[M] = []);
|
|
2238
2238
|
b.isMultiple && O.length && g && console.warn(`Snippet ${O[O.length - 1].name} for code(${M}) is shadowed by ${b.name}`), O.push(b);
|
|
2239
2239
|
}
|
|
2240
2240
|
return A;
|
|
@@ -2252,7 +2252,7 @@ function xt(i, t) {
|
|
|
2252
2252
|
break;
|
|
2253
2253
|
}
|
|
2254
2254
|
A.isMultiple || x[e.code].pop();
|
|
2255
|
-
let { name: b, parser:
|
|
2255
|
+
let { name: b, parser: P, isMultiple: M, isReducible: O } = A, z = P == null ? void 0 : P(e, s, o);
|
|
2256
2256
|
if (z === ia) {
|
|
2257
2257
|
s.rewind();
|
|
2258
2258
|
break;
|
|
@@ -2705,11 +2705,11 @@ class hl {
|
|
|
2705
2705
|
}
|
|
2706
2706
|
}
|
|
2707
2707
|
ll(hl, "ForEntityName", "3DFACE");
|
|
2708
|
-
let ul = [{ code: 330, name: "sourceBoundaryObjects", parser: y, isMultiple: !0 }, { code: 97, name: "numberOfSourceBoundaryObjects", parser: y }], Au = [{ code: 11, name: "end", parser: G }, { code: 10, name: "start", parser: G }], Su = [{ code: 73, name: "isCCW", parser: Ft }, { code: 51, name: "endAngle", parser: y }, { code: 50, name: "startAngle", parser: y }, { code: 40, name: "radius", parser: y }, { code: 10, name: "center", parser: G }], Iu = [{ code: 73, name: "isCCW", parser: Ft }, { code: 51, name: "endAngle", parser: y }, { code: 50, name: "startAngle", parser: y }, { code: 40, name: "lengthOfMinorAxis", parser: y }, { code: 11, name: "end", parser: G }, { code: 10, name: "center", parser: G }],
|
|
2708
|
+
let ul = [{ code: 330, name: "sourceBoundaryObjects", parser: y, isMultiple: !0 }, { code: 97, name: "numberOfSourceBoundaryObjects", parser: y }], Au = [{ code: 11, name: "end", parser: G }, { code: 10, name: "start", parser: G }], Su = [{ code: 73, name: "isCCW", parser: Ft }, { code: 51, name: "endAngle", parser: y }, { code: 50, name: "startAngle", parser: y }, { code: 40, name: "radius", parser: y }, { code: 10, name: "center", parser: G }], Iu = [{ code: 73, name: "isCCW", parser: Ft }, { code: 51, name: "endAngle", parser: y }, { code: 50, name: "startAngle", parser: y }, { code: 40, name: "lengthOfMinorAxis", parser: y }, { code: 11, name: "end", parser: G }, { code: 10, name: "center", parser: G }], Eu = [{ code: 13, name: "endTangent", parser: G }, { code: 12, name: "startTangent", parser: G }, { code: 11, name: "fitDatum", isMultiple: !0, parser: G }, { code: 97, name: "numberOfFitData", parser: y }, { code: 10, name: "controlPoints", isMultiple: !0, parser(i, t) {
|
|
2709
2709
|
let e = { ...zt(t), weight: 1 };
|
|
2710
2710
|
return (i = t.next()).code === 42 ? e.weight = i.value : t.rewind(), e;
|
|
2711
|
-
} }, { code: 40, name: "knots", isMultiple: !0, parser: y }, { code: 96, name: "numberOfControlPoints", parser: y }, { code: 95, name: "numberOfKnots", parser: y }, { code: 74, name: "isPeriodic", parser: Ft }, { code: 73, name: "splineFlag", parser: y }, { code: 94, name: "degree", parser: y }],
|
|
2712
|
-
let e = { type: i.value }, s = xt(
|
|
2711
|
+
} }, { code: 40, name: "knots", isMultiple: !0, parser: y }, { code: 96, name: "numberOfControlPoints", parser: y }, { code: 95, name: "numberOfKnots", parser: y }, { code: 74, name: "isPeriodic", parser: Ft }, { code: 73, name: "splineFlag", parser: y }, { code: 94, name: "degree", parser: y }], Pu = { [Cs.Line]: Au, [Cs.Circular]: Su, [Cs.Elliptic]: Iu, [Cs.Spline]: Eu }, ku = [...ul, { code: 72, name: "edges", parser(i, t) {
|
|
2712
|
+
let e = { type: i.value }, s = xt(Pu[e.type]);
|
|
2713
2713
|
if (!s) throw Error(`Invalid edge type ${e.type}`);
|
|
2714
2714
|
return s(i = t.next(), t, e), e;
|
|
2715
2715
|
}, isMultiple: !0 }, { code: 93, name: "numberOfEdges", parser: y }], Mu = [...ul, { code: 10, name: "vertices", parser(i, t) {
|
|
@@ -2873,24 +2873,24 @@ class oa {
|
|
|
2873
2873
|
Il(this, "parser", xt(Ku, Xu));
|
|
2874
2874
|
}
|
|
2875
2875
|
}
|
|
2876
|
-
function
|
|
2876
|
+
function El(i, t, e) {
|
|
2877
2877
|
return t in i ? Object.defineProperty(i, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = e, i;
|
|
2878
2878
|
}
|
|
2879
2879
|
Il(oa, "ForEntityName", "VERTEX");
|
|
2880
2880
|
let $u = { thickness: 0, flag: 0, startWidth: 0, endWidth: 0, meshMVertexCount: 0, meshNVertexCount: 0, surfaceMDensity: 0, surfaceNDensity: 0, smoothType: 0, extrusionDirection: { x: 0, y: 0, z: 1 }, vertices: [] }, Zu = [{ code: 0, name: "vertices", isMultiple: !0, parser: (i, t) => At(i, 0, "VERTEX") ? (i = t.next(), new oa().parseEntity(t, i)) : ia }, { code: 210, name: "extrusionDirection", parser: G }, { code: 75, name: "smoothType", parser: y }, { code: 74, name: "surfaceNDensity", parser: y }, { code: 73, name: "surfaceMDensity", parser: y }, { code: 72, name: "meshNVertexCount", parser: y }, { code: 71, name: "meshMVertexCount", parser: y }, { code: 41, name: "endWidth", parser: y }, { code: 40, name: "startWidth", parser: y }, { code: 70, name: "flag", parser: y }, { code: 39, name: "thickness", parser: y }, { code: 30, name: "elevation", parser: y }, { code: 20 }, { code: 10 }, { code: 66 }, { code: 100, name: "subclassMarker", parser: y }, ...Ut];
|
|
2881
|
-
class
|
|
2881
|
+
class Pl {
|
|
2882
2882
|
parseEntity(t, e) {
|
|
2883
2883
|
let s = {};
|
|
2884
2884
|
return this.parser(e, t, s), s;
|
|
2885
2885
|
}
|
|
2886
2886
|
constructor() {
|
|
2887
|
-
|
|
2887
|
+
El(this, "parser", xt(Zu, $u));
|
|
2888
2888
|
}
|
|
2889
2889
|
}
|
|
2890
2890
|
function kl(i, t, e) {
|
|
2891
2891
|
return t in i ? Object.defineProperty(i, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = e, i;
|
|
2892
2892
|
}
|
|
2893
|
-
Pl
|
|
2893
|
+
El(Pl, "ForEntityName", "POLYLINE");
|
|
2894
2894
|
let Qu = [{ code: 11, name: "direction", parser: G }, { code: 10, name: "position", parser: G }, { code: 100, name: "subclassMarker", parser: y }, ...Ut];
|
|
2895
2895
|
class Ml {
|
|
2896
2896
|
parseEntity(t, e) {
|
|
@@ -3387,7 +3387,7 @@ class Yl {
|
|
|
3387
3387
|
}
|
|
3388
3388
|
}
|
|
3389
3389
|
ql(Yl, "ForEntityName", "MULTILEADER");
|
|
3390
|
-
let mc = Object.fromEntries([Ho, Zo, el, nl, il, Us, ol, hl, pl, gl, vl, xl, Vs, wl, Jo, Yl, Sl,
|
|
3390
|
+
let mc = Object.fromEntries([Ho, Zo, el, nl, il, Us, ol, hl, pl, gl, vl, xl, Vs, wl, Jo, Yl, Sl, Pl, Ml, Nl, Ll, zl, Bl, Dl, js, Ko, Vl, dl, oa, Gs, Gl, Hl].map((i) => [i.ForEntityName, new i()]));
|
|
3391
3391
|
function Xl(i, t) {
|
|
3392
3392
|
let e = [];
|
|
3393
3393
|
for (; !At(i, 0, "EOF"); ) {
|
|
@@ -3506,12 +3506,12 @@ function wc(i, t) {
|
|
|
3506
3506
|
}
|
|
3507
3507
|
let Ln = [{ code: 100, name: "subclassMarker", parser: y }, { code: 330, name: "ownerObjectId", parser: y }, { code: 102, parser(i, t) {
|
|
3508
3508
|
for (; !At(i, 0, "EOF") && !At(i, 102, "}"); ) i = t.next();
|
|
3509
|
-
} }, { code: 5, name: "handle", parser: y }], Ac = xt([{ code: 310, name: "bmpPreview", parser: y }, { code: 281, name: "scalability", parser: y }, { code: 280, name: "explodability", parser: y }, { code: 70, name: "insertionUnits", parser: y }, { code: 340, name: "layoutObjects", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ln]), Sc = [{ name: "DIMPOST", code: 3 }, { name: "DIMAPOST", code: 4 }, { name: "DIMBLK_OBSOLETE", code: 5 }, { name: "DIMBLK1_OBSOLETE", code: 6 }, { name: "DIMBLK2_OBSOLETE", code: 7 }, { name: "DIMSCALE", code: 40, defaultValue: 1 }, { name: "DIMASZ", code: 41, defaultValue: 0.25 }, { name: "DIMEXO", code: 42, defaultValue: 0.625, defaultValueImperial: 0.0625 }, { name: "DIMDLI", code: 43, defaultValue: 3.75, defaultValueImperial: 0.38 }, { name: "DIMEXE", code: 44, defaultValue: 2.25, defaultValueImperial: 0.28 }, { name: "DIMRND", code: 45, defaultValue: 0 }, { name: "DIMDLE", code: 46, defaultValue: 0 }, { name: "DIMTP", code: 47, defaultValue: 0 }, { name: "DIMTM", code: 48, defaultValue: 0 }, { name: "DIMTXT", code: 140, defaultValue: 2.5, defaultValueImperial: 0.28 }, { name: "DIMCEN", code: 141, defaultValue: 2.5, defaultValueImperial: 0.09 }, { name: "DIMTSZ", code: 142, defaultValue: 0 }, { name: "DIMALTF", code: 143, defaultValue: 25.4 }, { name: "DIMLFAC", code: 144, defaultValue: 1 }, { name: "DIMTVP", code: 145, defaultValue: 0 }, { name: "DIMTFAC", code: 146, defaultValue: 1 }, { name: "DIMGAP", code: 147, defaultValue: 0.625, defaultValueImperial: 0.09 }, { name: "DIMALTRND", code: 148, defaultValue: 0 }, { name: "DIMTOL", code: 71, defaultValue: 0, defaultValueImperial: 1 }, { name: "DIMLIM", code: 72, defaultValue: 0 }, { name: "DIMTIH", code: 73, defaultValue: 0, defaultValueImperial: 1 }, { name: "DIMTOH", code: 74, defaultValue: 0, defaultValueImperial: 1 }, { name: "DIMSE1", code: 75, defaultValue: 0 }, { name: "DIMSE2", code: 76, defaultValue: 0 }, { name: "DIMTAD", code: 77, defaultValue: uo.Above, defaultValueImperial: uo.Center }, { name: "DIMZIN", code: 78, defaultValue: In.Trailing, defaultValueImperial: In.Feet }, { name: "DIMAZIN", code: 79, defaultValue: Jh.None }, { name: "DIMALT", code: 170, defaultValue: 0 }, { name: "DIMALTD", code: 171, defaultValue: 3, defaultValueImperial: 2 }, { name: "DIMTOFL", code: 172, defaultValue: 1, defaultValueImperial: 0 }, { name: "DIMSAH", code: 173, defaultValue: 0 }, { name: "DIMTIX", code: 174, defaultValue: 0 }, { name: "DIMSOXD", code: 175, defaultValue: 0 }, { name: "DIMCLRD", code: 176, defaultValue: 0 }, { name: "DIMCLRE", code: 177, defaultValue: 0 }, { name: "DIMCLRT", code: 178, defaultValue: 0 }, { name: "DIMADEC", code: 179 }, { name: "DIMUNIT", code: 270 }, { name: "DIMDEC", code: 271, defaultValue: 2, defaultValueImperial: 4 }, { name: "DIMTDEC", code: 272, defaultValue: 2, defaultValueImperial: 4 }, { name: "DIMALTU", code: 273, defaultValue: 2 }, { name: "DIMALTTD", code: 274, defaultValue: 2, defaultValueImperial: 4 }, { name: "DIMAUNIT", code: 275, defaultValue: 0 }, { name: "DIMFRAC", code: 276, defaultValue: 0 }, { name: "DIMLUNIT", code: 277, defaultValue: 2 }, { name: "DIMDSEP", code: 278, defaultValue: ",", defaultValueImperial: "." }, { name: "DIMJUST", code: 280, defaultValue: tu.Center }, { name: "DIMSD1", code: 281, defaultValue: 0 }, { name: "DIMSD2", code: 282, defaultValue: 0 }, { name: "DIMTOLJ", code: 283, defaultValue: eu.Center }, { name: "DIMTZIN", code: 284, defaultValue: In.Trailing, defaultValueImperial: In.Feet }, { name: "DIMALTZ", code: 285, defaultValue: In.Trailing }, { name: "DIMALTTZ", code: 286, defaultValue: In.Trailing }, { name: "DIMFIT", code: 287 }, { name: "DIMUPT", code: 288, defaultValue: 0 }, { name: "DIMATFIT", code: 289, defaultValue: 3 }, { name: "DIMTXSTY", code: 340 }, { name: "DIMLDRBLK", code: 341 }, { name: "DIMBLK", code: 342 }, { name: "DIMBLK1", code: 343 }, { name: "DIMBLK2", code: 344 }, { name: "DIMLWD", code: 371, defaultValue: -2 }, { name: "DIMLWD", code: 372, defaultValue: -2 }], Ic = xt([...Sc.map((i) => ({ ...i, parser: y })), { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, { code: 105, name: "handle", parser: y }, ...Ln.filter((i) => i.code !== 5)]),
|
|
3509
|
+
} }, { code: 5, name: "handle", parser: y }], Ac = xt([{ code: 310, name: "bmpPreview", parser: y }, { code: 281, name: "scalability", parser: y }, { code: 280, name: "explodability", parser: y }, { code: 70, name: "insertionUnits", parser: y }, { code: 340, name: "layoutObjects", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ln]), Sc = [{ name: "DIMPOST", code: 3 }, { name: "DIMAPOST", code: 4 }, { name: "DIMBLK_OBSOLETE", code: 5 }, { name: "DIMBLK1_OBSOLETE", code: 6 }, { name: "DIMBLK2_OBSOLETE", code: 7 }, { name: "DIMSCALE", code: 40, defaultValue: 1 }, { name: "DIMASZ", code: 41, defaultValue: 0.25 }, { name: "DIMEXO", code: 42, defaultValue: 0.625, defaultValueImperial: 0.0625 }, { name: "DIMDLI", code: 43, defaultValue: 3.75, defaultValueImperial: 0.38 }, { name: "DIMEXE", code: 44, defaultValue: 2.25, defaultValueImperial: 0.28 }, { name: "DIMRND", code: 45, defaultValue: 0 }, { name: "DIMDLE", code: 46, defaultValue: 0 }, { name: "DIMTP", code: 47, defaultValue: 0 }, { name: "DIMTM", code: 48, defaultValue: 0 }, { name: "DIMTXT", code: 140, defaultValue: 2.5, defaultValueImperial: 0.28 }, { name: "DIMCEN", code: 141, defaultValue: 2.5, defaultValueImperial: 0.09 }, { name: "DIMTSZ", code: 142, defaultValue: 0 }, { name: "DIMALTF", code: 143, defaultValue: 25.4 }, { name: "DIMLFAC", code: 144, defaultValue: 1 }, { name: "DIMTVP", code: 145, defaultValue: 0 }, { name: "DIMTFAC", code: 146, defaultValue: 1 }, { name: "DIMGAP", code: 147, defaultValue: 0.625, defaultValueImperial: 0.09 }, { name: "DIMALTRND", code: 148, defaultValue: 0 }, { name: "DIMTOL", code: 71, defaultValue: 0, defaultValueImperial: 1 }, { name: "DIMLIM", code: 72, defaultValue: 0 }, { name: "DIMTIH", code: 73, defaultValue: 0, defaultValueImperial: 1 }, { name: "DIMTOH", code: 74, defaultValue: 0, defaultValueImperial: 1 }, { name: "DIMSE1", code: 75, defaultValue: 0 }, { name: "DIMSE2", code: 76, defaultValue: 0 }, { name: "DIMTAD", code: 77, defaultValue: uo.Above, defaultValueImperial: uo.Center }, { name: "DIMZIN", code: 78, defaultValue: In.Trailing, defaultValueImperial: In.Feet }, { name: "DIMAZIN", code: 79, defaultValue: Jh.None }, { name: "DIMALT", code: 170, defaultValue: 0 }, { name: "DIMALTD", code: 171, defaultValue: 3, defaultValueImperial: 2 }, { name: "DIMTOFL", code: 172, defaultValue: 1, defaultValueImperial: 0 }, { name: "DIMSAH", code: 173, defaultValue: 0 }, { name: "DIMTIX", code: 174, defaultValue: 0 }, { name: "DIMSOXD", code: 175, defaultValue: 0 }, { name: "DIMCLRD", code: 176, defaultValue: 0 }, { name: "DIMCLRE", code: 177, defaultValue: 0 }, { name: "DIMCLRT", code: 178, defaultValue: 0 }, { name: "DIMADEC", code: 179 }, { name: "DIMUNIT", code: 270 }, { name: "DIMDEC", code: 271, defaultValue: 2, defaultValueImperial: 4 }, { name: "DIMTDEC", code: 272, defaultValue: 2, defaultValueImperial: 4 }, { name: "DIMALTU", code: 273, defaultValue: 2 }, { name: "DIMALTTD", code: 274, defaultValue: 2, defaultValueImperial: 4 }, { name: "DIMAUNIT", code: 275, defaultValue: 0 }, { name: "DIMFRAC", code: 276, defaultValue: 0 }, { name: "DIMLUNIT", code: 277, defaultValue: 2 }, { name: "DIMDSEP", code: 278, defaultValue: ",", defaultValueImperial: "." }, { name: "DIMJUST", code: 280, defaultValue: tu.Center }, { name: "DIMSD1", code: 281, defaultValue: 0 }, { name: "DIMSD2", code: 282, defaultValue: 0 }, { name: "DIMTOLJ", code: 283, defaultValue: eu.Center }, { name: "DIMTZIN", code: 284, defaultValue: In.Trailing, defaultValueImperial: In.Feet }, { name: "DIMALTZ", code: 285, defaultValue: In.Trailing }, { name: "DIMALTTZ", code: 286, defaultValue: In.Trailing }, { name: "DIMFIT", code: 287 }, { name: "DIMUPT", code: 288, defaultValue: 0 }, { name: "DIMATFIT", code: 289, defaultValue: 3 }, { name: "DIMTXSTY", code: 340 }, { name: "DIMLDRBLK", code: 341 }, { name: "DIMBLK", code: 342 }, { name: "DIMBLK1", code: 343 }, { name: "DIMBLK2", code: 344 }, { name: "DIMLWD", code: 371, defaultValue: -2 }, { name: "DIMLWD", code: 372, defaultValue: -2 }], Ic = xt([...Sc.map((i) => ({ ...i, parser: y })), { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, { code: 105, name: "handle", parser: y }, ...Ln.filter((i) => i.code !== 5)]), Ec = xt([{ code: 347, name: "materialObjectId", parser: y }, { code: 390, name: "plotStyleNameObjectId", parser: y }, { code: 370, name: "lineweight", parser: y }, { code: 290, name: "isPlotting", parser: Ft }, { code: 6, name: "lineType", parser: y }, { code: 62, name: "colorIndex", parser: y }, { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ln]);
|
|
3510
3510
|
(Sr = {})[Sr.NONE = 0] = "NONE", Sr[Sr.AbsoluteRotation = 1] = "AbsoluteRotation", Sr[Sr.TextEmbedded = 2] = "TextEmbedded", Sr[Sr.ShapeEmbedded = 4] = "ShapeEmbedded";
|
|
3511
|
-
let
|
|
3511
|
+
let Pc = xt([{ code: 9, name: "text", parser: y }, { code: 45, name: "offsetY", parser: y }, { code: 44, name: "offsetX", parser: y }, { code: 50, name: "rotation", parser: y }, { code: 46, name: "scale", parser: y }, { code: 340, name: "styleObjectId", parser: y }, { code: 75, name: "shapeNumber", parser: y }, { code: 74, name: "elementTypeFlag", parser: y }, { code: 49, name: "elementLength", parser: y }], { elementTypeFlag: 0, elementLength: 0 }), kc = xt([{ code: 49, name: "pattern", parser(i, t) {
|
|
3512
3512
|
let e = {};
|
|
3513
|
-
return
|
|
3514
|
-
}, isMultiple: !0 }, { code: 40, name: "totalPatternLength", parser: y }, { code: 73, name: "numberOfLineTypes", parser: y }, { code: 72, parser: y }, { code: 3, name: "description", parser: y }, { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ln]), Mc = xt([{ code: 1e3, name: "extendedFont", parser: y }, { code: 1001 }, { code: 4, name: "bigFont", parser: y }, { code: 3, name: "font", parser: y }, { code: 42, name: "lastHeight", parser: y }, { code: 71, name: "textGenerationFlag", parser: y }, { code: 50, name: "obliqueAngle", parser: y }, { code: 41, name: "widthFactor", parser: y }, { code: 40, name: "fixedTextHeight", parser: y }, { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ln]), Tc = xt([{ code: [63, 421, 431], name: "ambientColor", parser: y }, { code: 142, name: "contrast", parser: y }, { code: 141, name: "brightness", parser: y }, { code: 282, name: "defaultLightingType", parser: y }, { code: 292, name: "isDefaultLightingOn", parser: Ft }, { code: 348, name: "visualStyleObjectId", parser: y }, { code: 333, name: "shadePlotObjectId", parser: y }, { code: 332, name: "backgroundObjectId", parser: y }, { code: 61, name: "majorGridLines", parser: y }, { code: 170, name: "shadePlotSetting", parser: y }, { code: 146, name: "elevation", parser: y }, { code: 79, name: "orthographicType", parser: y }, { code: 112, name: "ucsYAxis", parser: G }, { code: 111, name: "ucsXAxis", parser: G }, { code: 110, name: "ucsOrigin", parser: G }, { code: 74, name: "ucsIconSetting", parser: y }, { code: 71, name: "viewMode", parser: y }, { code: 281, name: "renderMode", parser: y }, { code: 1, name: "styleSheet", parser: y }, { code: [331, 441], name: "frozenLayers", parser: y, isMultiple: !0 }, { code: 72, name: "circleSides", parser: y }, { code: 51, name: "viewTwistAngle", parser: y }, { code: 50, name: "snapRotationAngle", parser: y }, { code: 45, name: "viewHeight", parser: y }, { code: 44, name: "backClippingPlane", parser: y }, { code: 43, name: "frontClippingPlane", parser: y }, { code: 42, name: "lensLength", parser: y }, { code: 17, name: "viewTarget", parser: G }, { code: 16, name: "viewDirectionFromTarget", parser: G }, { code: 15, name: "gridSpacing", parser: G }, { code: 14, name: "snapSpacing", parser: G }, { code: 13, name: "snapBasePoint", parser: G }, { code: 12, name: "center", parser: G }, { code: 11, name: "upperRightCorner", parser: G }, { code: 10, name: "lowerLeftCorner", parser: G }, { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ln]), Nc = { BLOCK_RECORD: Ac, DIMSTYLE: Ic, LAYER:
|
|
3513
|
+
return Pc(i, t, e), e;
|
|
3514
|
+
}, isMultiple: !0 }, { code: 40, name: "totalPatternLength", parser: y }, { code: 73, name: "numberOfLineTypes", parser: y }, { code: 72, parser: y }, { code: 3, name: "description", parser: y }, { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ln]), Mc = xt([{ code: 1e3, name: "extendedFont", parser: y }, { code: 1001 }, { code: 4, name: "bigFont", parser: y }, { code: 3, name: "font", parser: y }, { code: 42, name: "lastHeight", parser: y }, { code: 71, name: "textGenerationFlag", parser: y }, { code: 50, name: "obliqueAngle", parser: y }, { code: 41, name: "widthFactor", parser: y }, { code: 40, name: "fixedTextHeight", parser: y }, { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ln]), Tc = xt([{ code: [63, 421, 431], name: "ambientColor", parser: y }, { code: 142, name: "contrast", parser: y }, { code: 141, name: "brightness", parser: y }, { code: 282, name: "defaultLightingType", parser: y }, { code: 292, name: "isDefaultLightingOn", parser: Ft }, { code: 348, name: "visualStyleObjectId", parser: y }, { code: 333, name: "shadePlotObjectId", parser: y }, { code: 332, name: "backgroundObjectId", parser: y }, { code: 61, name: "majorGridLines", parser: y }, { code: 170, name: "shadePlotSetting", parser: y }, { code: 146, name: "elevation", parser: y }, { code: 79, name: "orthographicType", parser: y }, { code: 112, name: "ucsYAxis", parser: G }, { code: 111, name: "ucsXAxis", parser: G }, { code: 110, name: "ucsOrigin", parser: G }, { code: 74, name: "ucsIconSetting", parser: y }, { code: 71, name: "viewMode", parser: y }, { code: 281, name: "renderMode", parser: y }, { code: 1, name: "styleSheet", parser: y }, { code: [331, 441], name: "frozenLayers", parser: y, isMultiple: !0 }, { code: 72, name: "circleSides", parser: y }, { code: 51, name: "viewTwistAngle", parser: y }, { code: 50, name: "snapRotationAngle", parser: y }, { code: 45, name: "viewHeight", parser: y }, { code: 44, name: "backClippingPlane", parser: y }, { code: 43, name: "frontClippingPlane", parser: y }, { code: 42, name: "lensLength", parser: y }, { code: 17, name: "viewTarget", parser: G }, { code: 16, name: "viewDirectionFromTarget", parser: G }, { code: 15, name: "gridSpacing", parser: G }, { code: 14, name: "snapSpacing", parser: G }, { code: 13, name: "snapBasePoint", parser: G }, { code: 12, name: "center", parser: G }, { code: 11, name: "upperRightCorner", parser: G }, { code: 10, name: "lowerLeftCorner", parser: G }, { code: 70, name: "standardFlag", parser: y }, { code: 2, name: "name", parser: y }, { code: 100, name: "subclassMarker", parser: y }, ...Ln]), Nc = { BLOCK_RECORD: Ac, DIMSTYLE: Ic, LAYER: Ec, LTYPE: kc, STYLE: Mc, VPORT: Tc }, Cc = xt([{ code: 70, name: "maxNumberOfEntries", parser: y }, { code: 100, name: "subclassMarker", parser: y }, { code: 330, name: "ownerObjectId", parser: y }, { code: 102 }, { code: 360, isMultiple: !0 }, { code: 102 }, { code: 5, name: "handle", parser: y }, { code: 2, name: "name", parser: y }]);
|
|
3515
3515
|
function Lc(i, t) {
|
|
3516
3516
|
var s;
|
|
3517
3517
|
let e = {};
|
|
@@ -3635,29 +3635,75 @@ const go = [
|
|
|
3635
3635
|
{ name: "AC2.21", value: 6 },
|
|
3636
3636
|
{ name: "AC2.22", value: 7 },
|
|
3637
3637
|
{ name: "AC1001", value: 8 },
|
|
3638
|
+
/**
|
|
3639
|
+
* AutoCAD 2.5
|
|
3640
|
+
*/
|
|
3638
3641
|
{ name: "AC1002", value: 9 },
|
|
3642
|
+
/**
|
|
3643
|
+
* AutoCAD 2.6
|
|
3644
|
+
*/
|
|
3639
3645
|
{ name: "AC1003", value: 10 },
|
|
3646
|
+
/**
|
|
3647
|
+
* AutoCAD Release 9
|
|
3648
|
+
*/
|
|
3640
3649
|
{ name: "AC1004", value: 11 },
|
|
3641
3650
|
{ name: "AC1005", value: 12 },
|
|
3651
|
+
/**
|
|
3652
|
+
* AutoCAD Release 10
|
|
3653
|
+
*/
|
|
3642
3654
|
{ name: "AC1006", value: 13 },
|
|
3643
3655
|
{ name: "AC1007", value: 14 },
|
|
3644
3656
|
{ name: "AC1008", value: 15 },
|
|
3657
|
+
/**
|
|
3658
|
+
* AutoCAD R11 and R12
|
|
3659
|
+
*/
|
|
3645
3660
|
{ name: "AC1009", value: 16 },
|
|
3646
3661
|
{ name: "AC1010", value: 17 },
|
|
3647
3662
|
{ name: "AC1011", value: 18 },
|
|
3663
|
+
/**
|
|
3664
|
+
* AutoCAD R13
|
|
3665
|
+
*/
|
|
3648
3666
|
{ name: "AC1012", value: 19 },
|
|
3667
|
+
/**
|
|
3668
|
+
* AutoCAD R14 mid version.
|
|
3669
|
+
*/
|
|
3649
3670
|
{ name: "AC1013", value: 20 },
|
|
3671
|
+
/**
|
|
3672
|
+
* AutoCAD R14 final version
|
|
3673
|
+
*/
|
|
3650
3674
|
{ name: "AC1014", value: 21 },
|
|
3675
|
+
/**
|
|
3676
|
+
* AC1500 doesn’t actually correspond to any real DWG file version.
|
|
3677
|
+
* it’s just a legacy or internal placeholder in the enum sequence.
|
|
3678
|
+
*/
|
|
3651
3679
|
{ name: "AC1500", value: 22 },
|
|
3680
|
+
/**
|
|
3681
|
+
* AutoCAD 2000 / 2000i / 2002
|
|
3682
|
+
*/
|
|
3652
3683
|
{ name: "AC1015", value: 23 },
|
|
3653
3684
|
{ name: "AC1800a", value: 24 },
|
|
3654
|
-
|
|
3685
|
+
/**
|
|
3686
|
+
* AutoCAD 2004 / 2005 / 2006
|
|
3687
|
+
*/
|
|
3688
|
+
{ name: "AC1018", value: 25 },
|
|
3655
3689
|
{ name: "AC2100a", value: 26 },
|
|
3690
|
+
/**
|
|
3691
|
+
* AutoCAD 2007 / 2008 / 2009
|
|
3692
|
+
*/
|
|
3656
3693
|
{ name: "AC1021", value: 27 },
|
|
3657
3694
|
{ name: "AC2400a", value: 28 },
|
|
3695
|
+
/**
|
|
3696
|
+
* AutoCAD 2010 / 2011 / 2012
|
|
3697
|
+
*/
|
|
3658
3698
|
{ name: "AC1024", value: 29 },
|
|
3699
|
+
/**
|
|
3700
|
+
* AutoCAD 2013 / 2014 / 2015 / 2016 / 2017
|
|
3701
|
+
*/
|
|
3659
3702
|
{ name: "AC1027", value: 31 },
|
|
3660
3703
|
{ name: "AC3200a", value: 32 },
|
|
3704
|
+
/**
|
|
3705
|
+
* AutoCAD 2018 / 2019 / 2020 / 2021 / 2022 / 2023
|
|
3706
|
+
*/
|
|
3661
3707
|
{ name: "AC1032", value: 33 }
|
|
3662
3708
|
];
|
|
3663
3709
|
class Mi {
|
|
@@ -3704,8 +3750,8 @@ class Rc {
|
|
|
3704
3750
|
const s = new TextDecoder("utf-8");
|
|
3705
3751
|
let o = 0, h = "", c = null, f = null, x = !1;
|
|
3706
3752
|
for (; o < t.byteLength; ) {
|
|
3707
|
-
const
|
|
3708
|
-
o =
|
|
3753
|
+
const P = Math.min(o + 65536, t.byteLength), M = t.slice(o, P);
|
|
3754
|
+
o = P;
|
|
3709
3755
|
const z = (h + s.decode(M, { stream: !0 })).split(/\r?\n/);
|
|
3710
3756
|
h = z.pop() ?? "";
|
|
3711
3757
|
for (let U = 0; U < z.length; U++) {
|
|
@@ -4686,8 +4732,8 @@ const Ni = class rh {
|
|
|
4686
4732
|
* @returns Return this matrix
|
|
4687
4733
|
*/
|
|
4688
4734
|
multiplyMatrices(t, e) {
|
|
4689
|
-
const s = t.elements, o = e.elements, h = this.elements, c = s[0], f = s[3], x = s[6], g = s[1], A = s[4], b = s[7],
|
|
4690
|
-
return h[0] = c * z + f * dt + x * W, h[3] = c * U + f * vt + x * ut, h[6] = c * F + f * ot + x * st, h[1] = g * z + A * dt + b * W, h[4] = g * U + A * vt + b * ut, h[7] = g * F + A * ot + b * st, h[2] =
|
|
4735
|
+
const s = t.elements, o = e.elements, h = this.elements, c = s[0], f = s[3], x = s[6], g = s[1], A = s[4], b = s[7], P = s[2], M = s[5], O = s[8], z = o[0], U = o[3], F = o[6], dt = o[1], vt = o[4], ot = o[7], W = o[2], ut = o[5], st = o[8];
|
|
4736
|
+
return h[0] = c * z + f * dt + x * W, h[3] = c * U + f * vt + x * ut, h[6] = c * F + f * ot + x * st, h[1] = g * z + A * dt + b * W, h[4] = g * U + A * vt + b * ut, h[7] = g * F + A * ot + b * st, h[2] = P * z + M * dt + O * W, h[5] = P * U + M * vt + O * ut, h[8] = P * F + M * ot + O * st, this;
|
|
4691
4737
|
}
|
|
4692
4738
|
/**
|
|
4693
4739
|
* Multiply every component of the matrix by the scalar value s.
|
|
@@ -4712,10 +4758,10 @@ const Ni = class rh {
|
|
|
4712
4758
|
* @returns Return this matrix
|
|
4713
4759
|
*/
|
|
4714
4760
|
invert() {
|
|
4715
|
-
const t = this.elements, e = t[0], s = t[1], o = t[2], h = t[3], c = t[4], f = t[5], x = t[6], g = t[7], A = t[8], b = A * c - f * g,
|
|
4761
|
+
const t = this.elements, e = t[0], s = t[1], o = t[2], h = t[3], c = t[4], f = t[5], x = t[6], g = t[7], A = t[8], b = A * c - f * g, P = f * x - A * h, M = g * h - c * x, O = e * b + s * P + o * M;
|
|
4716
4762
|
if (O === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
4717
4763
|
const z = 1 / O;
|
|
4718
|
-
return t[0] = b * z, t[1] = (o * g - A * s) * z, t[2] = (f * s - o * c) * z, t[3] =
|
|
4764
|
+
return t[0] = b * z, t[1] = (o * g - A * s) * z, t[2] = (f * s - o * c) * z, t[3] = P * z, t[4] = (A * e - o * x) * z, t[5] = (o * h - f * e) * z, t[6] = M * z, t[7] = (s * x - g * e) * z, t[8] = (c * e - s * h) * z, this;
|
|
4719
4765
|
}
|
|
4720
4766
|
/**
|
|
4721
4767
|
* Transpose this matrix in place.
|
|
@@ -4865,7 +4911,7 @@ const Ni = class rh {
|
|
|
4865
4911
|
};
|
|
4866
4912
|
Ni.IDENTITY = Object.freeze(new Ni());
|
|
4867
4913
|
let ha = Ni;
|
|
4868
|
-
const wi = /* @__PURE__ */ new ha(),
|
|
4914
|
+
const wi = /* @__PURE__ */ new ha(), En = 1e-6, se = 2 * Math.PI, u0 = {
|
|
4869
4915
|
x: 0,
|
|
4870
4916
|
y: 0
|
|
4871
4917
|
}, nh = {
|
|
@@ -4878,7 +4924,7 @@ class sh {
|
|
|
4878
4924
|
* Create tolerance class with default tolerance values
|
|
4879
4925
|
*/
|
|
4880
4926
|
constructor() {
|
|
4881
|
-
this.equalPointTol =
|
|
4927
|
+
this.equalPointTol = En, this.equalVectorTol = En;
|
|
4882
4928
|
}
|
|
4883
4929
|
/**
|
|
4884
4930
|
* Return true if two points are equal with the specified tolerance.
|
|
@@ -4901,7 +4947,7 @@ class sh {
|
|
|
4901
4947
|
/**
|
|
4902
4948
|
* Return true if the value is equal to zero with the specified tolerance.
|
|
4903
4949
|
*/
|
|
4904
|
-
static equalToZero(t, e =
|
|
4950
|
+
static equalToZero(t, e = En) {
|
|
4905
4951
|
return t < e && t > -e;
|
|
4906
4952
|
}
|
|
4907
4953
|
/**
|
|
@@ -4912,7 +4958,7 @@ class sh {
|
|
|
4912
4958
|
* @param tol Input the tolerance value
|
|
4913
4959
|
* @returns Return true if two values are equal with the sepcified tolerance
|
|
4914
4960
|
*/
|
|
4915
|
-
static equal(t, e, s =
|
|
4961
|
+
static equal(t, e, s = En) {
|
|
4916
4962
|
return Math.abs(t - e) < s;
|
|
4917
4963
|
}
|
|
4918
4964
|
/**
|
|
@@ -4925,7 +4971,7 @@ class sh {
|
|
|
4925
4971
|
* @returns Return true if the first argument are greater than the second argument with the
|
|
4926
4972
|
* sepcified tolerance.
|
|
4927
4973
|
*/
|
|
4928
|
-
static great(t, e, s =
|
|
4974
|
+
static great(t, e, s = En) {
|
|
4929
4975
|
return t - e > s;
|
|
4930
4976
|
}
|
|
4931
4977
|
/**
|
|
@@ -4938,7 +4984,7 @@ class sh {
|
|
|
4938
4984
|
* @returns Return *true* if the first argument less than the second argument with the specified
|
|
4939
4985
|
* tolerance value
|
|
4940
4986
|
*/
|
|
4941
|
-
static less(t, e, s =
|
|
4987
|
+
static less(t, e, s = En) {
|
|
4942
4988
|
return t - e < s;
|
|
4943
4989
|
}
|
|
4944
4990
|
}
|
|
@@ -4948,9 +4994,9 @@ function ah(i, t, e = !1) {
|
|
|
4948
4994
|
let h = !1;
|
|
4949
4995
|
const c = t.length;
|
|
4950
4996
|
for (let f = 0, x = c - 1; f < c; x = f++) {
|
|
4951
|
-
const g = t[f].x, A = t[f].y, b = t[x].x,
|
|
4952
|
-
let M = A > o !=
|
|
4953
|
-
e && (M = A >= o !=
|
|
4997
|
+
const g = t[f].x, A = t[f].y, b = t[x].x, P = t[x].y;
|
|
4998
|
+
let M = A > o != P > o;
|
|
4999
|
+
e && (M = A >= o != P >= o), M && s < (b - g) * (o - A) / (P - A) + g && (h = !h);
|
|
4954
5000
|
}
|
|
4955
5001
|
return h;
|
|
4956
5002
|
}
|
|
@@ -5003,8 +5049,8 @@ function ad(i, t) {
|
|
|
5003
5049
|
const e = t.length - 1, s = i, o = [0];
|
|
5004
5050
|
let h = 0;
|
|
5005
5051
|
for (let f = 1; f <= e; f++) {
|
|
5006
|
-
const x = t[f][0] - t[f - 1][0], g = t[f][1] - t[f - 1][1], A = t[f][2] - t[f - 1][2], b = Math.sqrt(x * x + g * g + A * A),
|
|
5007
|
-
h +=
|
|
5052
|
+
const x = t[f][0] - t[f - 1][0], g = t[f][1] - t[f - 1][1], A = t[f][2] - t[f - 1][2], b = Math.sqrt(x * x + g * g + A * A), P = Math.sqrt(b);
|
|
5053
|
+
h += P, o.push(h);
|
|
5008
5054
|
}
|
|
5009
5055
|
const c = [];
|
|
5010
5056
|
for (let f = 0; f <= s; f++)
|
|
@@ -5065,8 +5111,8 @@ function od(i, t, e, s) {
|
|
|
5065
5111
|
t,
|
|
5066
5112
|
e,
|
|
5067
5113
|
s
|
|
5068
|
-
),
|
|
5069
|
-
return f += Math.sqrt(
|
|
5114
|
+
), P = b[0] - A[0], M = b[1] - A[1], O = b[2] - A[2];
|
|
5115
|
+
return f += Math.sqrt(P * P + M * M + O * O), f;
|
|
5070
5116
|
}
|
|
5071
5117
|
function c0(i) {
|
|
5072
5118
|
return i.map((t) => [...t]);
|
|
@@ -5094,24 +5140,24 @@ class ln {
|
|
|
5094
5140
|
*/
|
|
5095
5141
|
static slerpFlat(t, e, s, o, h, c, f) {
|
|
5096
5142
|
let x = s[o + 0], g = s[o + 1], A = s[o + 2], b = s[o + 3];
|
|
5097
|
-
const
|
|
5143
|
+
const P = h[c + 0], M = h[c + 1], O = h[c + 2], z = h[c + 3];
|
|
5098
5144
|
if (f === 0) {
|
|
5099
5145
|
t[e + 0] = x, t[e + 1] = g, t[e + 2] = A, t[e + 3] = b;
|
|
5100
5146
|
return;
|
|
5101
5147
|
}
|
|
5102
5148
|
if (f === 1) {
|
|
5103
|
-
t[e + 0] =
|
|
5149
|
+
t[e + 0] = P, t[e + 1] = M, t[e + 2] = O, t[e + 3] = z;
|
|
5104
5150
|
return;
|
|
5105
5151
|
}
|
|
5106
|
-
if (b !== z || x !==
|
|
5152
|
+
if (b !== z || x !== P || g !== M || A !== O) {
|
|
5107
5153
|
let U = 1 - f;
|
|
5108
|
-
const F = x *
|
|
5154
|
+
const F = x * P + g * M + A * O + b * z, dt = F >= 0 ? 1 : -1, vt = 1 - F * F;
|
|
5109
5155
|
if (vt > Number.EPSILON) {
|
|
5110
5156
|
const W = Math.sqrt(vt), ut = Math.atan2(W, F * dt);
|
|
5111
5157
|
U = Math.sin(U * ut) / W, f = Math.sin(f * ut) / W;
|
|
5112
5158
|
}
|
|
5113
5159
|
const ot = f * dt;
|
|
5114
|
-
if (x = x * U +
|
|
5160
|
+
if (x = x * U + P * ot, g = g * U + M * ot, A = A * U + O * ot, b = b * U + z * ot, U === 1 - f) {
|
|
5115
5161
|
const W = 1 / Math.sqrt(x * x + g * g + A * A + b * b);
|
|
5116
5162
|
x *= W, g *= W, A *= W, b *= W;
|
|
5117
5163
|
}
|
|
@@ -5129,8 +5175,8 @@ class ln {
|
|
|
5129
5175
|
* @returns Return an array
|
|
5130
5176
|
*/
|
|
5131
5177
|
static multiplyQuaternionsFlat(t, e, s, o, h, c) {
|
|
5132
|
-
const f = s[o], x = s[o + 1], g = s[o + 2], A = s[o + 3], b = h[c],
|
|
5133
|
-
return t[e] = f * O + A * b + x * M - g *
|
|
5178
|
+
const f = s[o], x = s[o + 1], g = s[o + 2], A = s[o + 3], b = h[c], P = h[c + 1], M = h[c + 2], O = h[c + 3];
|
|
5179
|
+
return t[e] = f * O + A * b + x * M - g * P, t[e + 1] = x * O + A * P + g * b - f * M, t[e + 2] = g * O + A * M + f * P - x * b, t[e + 3] = A * O - f * b - x * P - g * M, t;
|
|
5134
5180
|
}
|
|
5135
5181
|
/**
|
|
5136
5182
|
* X cooridinate
|
|
@@ -5201,25 +5247,25 @@ class ln {
|
|
|
5201
5247
|
* @returns Return this quaternion
|
|
5202
5248
|
*/
|
|
5203
5249
|
setFromEuler(t, e = !0) {
|
|
5204
|
-
const s = t.x, o = t.y, h = t.z, c = t.order, f = Math.cos, x = Math.sin, g = f(s / 2), A = f(o / 2), b = f(h / 2),
|
|
5250
|
+
const s = t.x, o = t.y, h = t.z, c = t.order, f = Math.cos, x = Math.sin, g = f(s / 2), A = f(o / 2), b = f(h / 2), P = x(s / 2), M = x(o / 2), O = x(h / 2);
|
|
5205
5251
|
switch (c) {
|
|
5206
5252
|
case "XYZ":
|
|
5207
|
-
this._x =
|
|
5253
|
+
this._x = P * A * b + g * M * O, this._y = g * M * b - P * A * O, this._z = g * A * O + P * M * b, this._w = g * A * b - P * M * O;
|
|
5208
5254
|
break;
|
|
5209
5255
|
case "YXZ":
|
|
5210
|
-
this._x =
|
|
5256
|
+
this._x = P * A * b + g * M * O, this._y = g * M * b - P * A * O, this._z = g * A * O - P * M * b, this._w = g * A * b + P * M * O;
|
|
5211
5257
|
break;
|
|
5212
5258
|
case "ZXY":
|
|
5213
|
-
this._x =
|
|
5259
|
+
this._x = P * A * b - g * M * O, this._y = g * M * b + P * A * O, this._z = g * A * O + P * M * b, this._w = g * A * b - P * M * O;
|
|
5214
5260
|
break;
|
|
5215
5261
|
case "ZYX":
|
|
5216
|
-
this._x =
|
|
5262
|
+
this._x = P * A * b - g * M * O, this._y = g * M * b + P * A * O, this._z = g * A * O - P * M * b, this._w = g * A * b + P * M * O;
|
|
5217
5263
|
break;
|
|
5218
5264
|
case "YZX":
|
|
5219
|
-
this._x =
|
|
5265
|
+
this._x = P * A * b + g * M * O, this._y = g * M * b + P * A * O, this._z = g * A * O - P * M * b, this._w = g * A * b - P * M * O;
|
|
5220
5266
|
break;
|
|
5221
5267
|
case "XZY":
|
|
5222
|
-
this._x =
|
|
5268
|
+
this._x = P * A * b - g * M * O, this._y = g * M * b - P * A * O, this._z = g * A * O + P * M * b, this._w = g * A * b + P * M * O;
|
|
5223
5269
|
break;
|
|
5224
5270
|
default:
|
|
5225
5271
|
console.warn(
|
|
@@ -5245,9 +5291,9 @@ class ln {
|
|
|
5245
5291
|
* @returns Return this quaternion
|
|
5246
5292
|
*/
|
|
5247
5293
|
setFromRotationMatrix(t) {
|
|
5248
|
-
const e = t.elements, s = e[0], o = e[4], h = e[8], c = e[1], f = e[5], x = e[9], g = e[2], A = e[6], b = e[10],
|
|
5249
|
-
if (
|
|
5250
|
-
const M = 0.5 / Math.sqrt(
|
|
5294
|
+
const e = t.elements, s = e[0], o = e[4], h = e[8], c = e[1], f = e[5], x = e[9], g = e[2], A = e[6], b = e[10], P = s + f + b;
|
|
5295
|
+
if (P > 0) {
|
|
5296
|
+
const M = 0.5 / Math.sqrt(P + 1);
|
|
5251
5297
|
this._w = 0.25 / M, this._x = (A - x) * M, this._y = (h - g) * M, this._z = (c - o) * M;
|
|
5252
5298
|
} else if (s > f && s > b) {
|
|
5253
5299
|
const M = 2 * Math.sqrt(1 + s - f - b);
|
|
@@ -5396,8 +5442,8 @@ class ln {
|
|
|
5396
5442
|
const M = 1 - e;
|
|
5397
5443
|
return this._w = M * c + e * this._w, this._x = M * s + e * this._x, this._y = M * o + e * this._y, this._z = M * h + e * this._z, this.normalize(), this;
|
|
5398
5444
|
}
|
|
5399
|
-
const g = Math.sqrt(x), A = Math.atan2(g, f), b = Math.sin((1 - e) * A) / g,
|
|
5400
|
-
return this._w = c * b + this._w *
|
|
5445
|
+
const g = Math.sqrt(x), A = Math.atan2(g, f), b = Math.sin((1 - e) * A) / g, P = Math.sin(e * A) / g;
|
|
5446
|
+
return this._w = c * b + this._w * P, this._x = s * b + this._x * P, this._y = o * b + this._y * P, this._z = h * b + this._z * P, this._onChangeCallback(), this;
|
|
5401
5447
|
}
|
|
5402
5448
|
/**
|
|
5403
5449
|
* Perform a spherical linear interpolation between the given quaternions and stores the result in
|
|
@@ -6128,8 +6174,8 @@ const Ai = /* @__PURE__ */ new Z(), vo = /* @__PURE__ */ new ln(), Li = class lh
|
|
|
6128
6174
|
* @param n43 Input element in the forth row and the third column
|
|
6129
6175
|
* @param n44 Input element in the forth row and the forth column
|
|
6130
6176
|
*/
|
|
6131
|
-
constructor(t, e, s, o, h, c, f, x, g, A, b,
|
|
6132
|
-
this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], t != null && e != null && s != null && o != null && h != null && c != null && f != null && x != null && g != null && A != null && b != null &&
|
|
6177
|
+
constructor(t, e, s, o, h, c, f, x, g, A, b, P, M, O, z, U) {
|
|
6178
|
+
this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], t != null && e != null && s != null && o != null && h != null && c != null && f != null && x != null && g != null && A != null && b != null && P != null && M != null && O != null && z != null && U != null && this.set(
|
|
6133
6179
|
t,
|
|
6134
6180
|
e,
|
|
6135
6181
|
s,
|
|
@@ -6141,7 +6187,7 @@ const Ai = /* @__PURE__ */ new Z(), vo = /* @__PURE__ */ new ln(), Li = class lh
|
|
|
6141
6187
|
g,
|
|
6142
6188
|
A,
|
|
6143
6189
|
b,
|
|
6144
|
-
|
|
6190
|
+
P,
|
|
6145
6191
|
M,
|
|
6146
6192
|
O,
|
|
6147
6193
|
z,
|
|
@@ -6169,9 +6215,9 @@ const Ai = /* @__PURE__ */ new Z(), vo = /* @__PURE__ */ new ln(), Li = class lh
|
|
|
6169
6215
|
* @param n44 Input element in the forth row and the forth column
|
|
6170
6216
|
* @returns Return this matrix
|
|
6171
6217
|
*/
|
|
6172
|
-
set(t, e, s, o, h, c, f, x, g, A, b,
|
|
6218
|
+
set(t, e, s, o, h, c, f, x, g, A, b, P, M, O, z, U) {
|
|
6173
6219
|
const F = this.elements;
|
|
6174
|
-
return F[0] = t, F[4] = e, F[8] = s, F[12] = o, F[1] = h, F[5] = c, F[9] = f, F[13] = x, F[2] = g, F[6] = A, F[10] = b, F[14] =
|
|
6220
|
+
return F[0] = t, F[4] = e, F[8] = s, F[12] = o, F[1] = h, F[5] = c, F[9] = f, F[13] = x, F[2] = g, F[6] = A, F[10] = b, F[14] = P, F[3] = M, F[7] = O, F[11] = z, F[15] = U, this;
|
|
6175
6221
|
}
|
|
6176
6222
|
/**
|
|
6177
6223
|
* Reset this matrix to the identity matrix.
|
|
@@ -6303,7 +6349,7 @@ const Ai = /* @__PURE__ */ new Z(), vo = /* @__PURE__ */ new ln(), Li = class lh
|
|
|
6303
6349
|
* @returns Return this matrix
|
|
6304
6350
|
*/
|
|
6305
6351
|
extractRotation(t) {
|
|
6306
|
-
const e = this.elements, s = t.elements, o = 1 /
|
|
6352
|
+
const e = this.elements, s = t.elements, o = 1 / Pn.setFromMatrixColumn(t, 0).length(), h = 1 / Pn.setFromMatrixColumn(t, 1).length(), c = 1 / Pn.setFromMatrixColumn(t, 2).length();
|
|
6307
6353
|
return e[0] = s[0] * o, e[1] = s[1] * o, e[2] = s[2] * o, e[3] = 0, e[4] = s[4] * h, e[5] = s[5] * h, e[6] = s[6] * h, e[7] = 0, e[8] = s[8] * c, e[9] = s[9] * c, e[10] = s[10] * c, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, this;
|
|
6308
6354
|
}
|
|
6309
6355
|
// makeRotationFromEuler(euler) {
|
|
@@ -6455,8 +6501,8 @@ const Ai = /* @__PURE__ */ new Z(), vo = /* @__PURE__ */ new ln(), Li = class lh
|
|
|
6455
6501
|
* @returns Return this matrix
|
|
6456
6502
|
*/
|
|
6457
6503
|
multiplyMatrices(t, e) {
|
|
6458
|
-
const s = t.elements, o = e.elements, h = this.elements, c = s[0], f = s[4], x = s[8], g = s[12], A = s[1], b = s[5],
|
|
6459
|
-
return h[0] = c * ut + f * Wt + x * me + g * Q, h[4] = c * st + f * bt + x *
|
|
6504
|
+
const s = t.elements, o = e.elements, h = this.elements, c = s[0], f = s[4], x = s[8], g = s[12], A = s[1], b = s[5], P = s[9], M = s[13], O = s[2], z = s[6], U = s[10], F = s[14], dt = s[3], vt = s[7], ot = s[11], W = s[15], ut = o[0], st = o[4], Vt = o[8], Yt = o[12], Wt = o[1], bt = o[5], Lt = o[9], de = o[13], me = o[2], Ee = o[6], Jt = o[10], ie = o[14], Q = o[3], Mt = o[7], ae = o[11], lr = o[15];
|
|
6505
|
+
return h[0] = c * ut + f * Wt + x * me + g * Q, h[4] = c * st + f * bt + x * Ee + g * Mt, h[8] = c * Vt + f * Lt + x * Jt + g * ae, h[12] = c * Yt + f * de + x * ie + g * lr, h[1] = A * ut + b * Wt + P * me + M * Q, h[5] = A * st + b * bt + P * Ee + M * Mt, h[9] = A * Vt + b * Lt + P * Jt + M * ae, h[13] = A * Yt + b * de + P * ie + M * lr, h[2] = O * ut + z * Wt + U * me + F * Q, h[6] = O * st + z * bt + U * Ee + F * Mt, h[10] = O * Vt + z * Lt + U * Jt + F * ae, h[14] = O * Yt + z * de + U * ie + F * lr, h[3] = dt * ut + vt * Wt + ot * me + W * Q, h[7] = dt * st + vt * bt + ot * Ee + W * Mt, h[11] = dt * Vt + vt * Lt + ot * Jt + W * ae, h[15] = dt * Yt + vt * de + ot * ie + W * lr, this;
|
|
6460
6506
|
}
|
|
6461
6507
|
/**
|
|
6462
6508
|
* Multiply every component of the matrix by a scalar value s.
|
|
@@ -6472,8 +6518,8 @@ const Ai = /* @__PURE__ */ new Z(), vo = /* @__PURE__ */ new ln(), Li = class lh
|
|
|
6472
6518
|
* @returns Return the determinant of this matrix.
|
|
6473
6519
|
*/
|
|
6474
6520
|
determinant() {
|
|
6475
|
-
const t = this.elements, e = t[0], s = t[4], o = t[8], h = t[12], c = t[1], f = t[5], x = t[9], g = t[13], A = t[2], b = t[6],
|
|
6476
|
-
return O * (+h * x * b - o * g * b - h * f *
|
|
6521
|
+
const t = this.elements, e = t[0], s = t[4], o = t[8], h = t[12], c = t[1], f = t[5], x = t[9], g = t[13], A = t[2], b = t[6], P = t[10], M = t[14], O = t[3], z = t[7], U = t[11], F = t[15];
|
|
6522
|
+
return O * (+h * x * b - o * g * b - h * f * P + s * g * P + o * f * M - s * x * M) + z * (+e * x * M - e * g * P + h * c * P - o * c * M + o * g * A - h * x * A) + U * (+e * g * b - e * f * M - h * c * b + s * c * M + h * f * A - s * g * A) + F * (-o * f * A - e * x * b + e * f * P + o * c * b - s * c * P + s * x * A);
|
|
6477
6523
|
}
|
|
6478
6524
|
/**
|
|
6479
6525
|
* Transposes this matrix.
|
|
@@ -6501,11 +6547,11 @@ const Ai = /* @__PURE__ */ new Z(), vo = /* @__PURE__ */ new ln(), Li = class lh
|
|
|
6501
6547
|
* @returns Return this matrix
|
|
6502
6548
|
*/
|
|
6503
6549
|
invert() {
|
|
6504
|
-
const t = this.elements, e = t[0], s = t[1], o = t[2], h = t[3], c = t[4], f = t[5], x = t[6], g = t[7], A = t[8], b = t[9],
|
|
6550
|
+
const t = this.elements, e = t[0], s = t[1], o = t[2], h = t[3], c = t[4], f = t[5], x = t[6], g = t[7], A = t[8], b = t[9], P = t[10], M = t[11], O = t[12], z = t[13], U = t[14], F = t[15], dt = b * U * g - z * P * g + z * x * M - f * U * M - b * x * F + f * P * F, vt = O * P * g - A * U * g - O * x * M + c * U * M + A * x * F - c * P * F, ot = A * z * g - O * b * g + O * f * M - c * z * M - A * f * F + c * b * F, W = O * b * x - A * z * x - O * f * P + c * z * P + A * f * U - c * b * U, ut = e * dt + s * vt + o * ot + h * W;
|
|
6505
6551
|
if (ut === 0)
|
|
6506
6552
|
return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
6507
6553
|
const st = 1 / ut;
|
|
6508
|
-
return t[0] = dt * st, t[1] = (z *
|
|
6554
|
+
return t[0] = dt * st, t[1] = (z * P * h - b * U * h - z * o * M + s * U * M + b * o * F - s * P * F) * st, t[2] = (f * U * h - z * x * h + z * o * g - s * U * g - f * o * F + s * x * F) * st, t[3] = (b * x * h - f * P * h - b * o * g + s * P * g + f * o * M - s * x * M) * st, t[4] = vt * st, t[5] = (A * U * h - O * P * h + O * o * M - e * U * M - A * o * F + e * P * F) * st, t[6] = (O * x * h - c * U * h - O * o * g + e * U * g + c * o * F - e * x * F) * st, t[7] = (c * P * h - A * x * h + A * o * g - e * P * g - c * o * M + e * x * M) * st, t[8] = ot * st, t[9] = (O * b * h - A * z * h - O * s * M + e * z * M + A * s * F - e * b * F) * st, t[10] = (c * z * h - O * f * h + O * s * g - e * z * g - c * s * F + e * f * F) * st, t[11] = (A * f * h - c * b * h - A * s * g + e * b * g + c * s * M - e * f * M) * st, t[12] = W * st, t[13] = (A * z * o - O * b * o + O * s * P - e * z * P - A * s * U + e * b * U) * st, t[14] = (O * f * o - c * z * o - O * s * x + e * z * x + c * s * U - e * f * U) * st, t[15] = (c * b * o - A * f * o + A * s * x - e * b * x - c * s * P + e * f * P) * st, this;
|
|
6509
6555
|
}
|
|
6510
6556
|
/**
|
|
6511
6557
|
* Multiply the columns of this matrix by vector v.
|
|
@@ -6619,8 +6665,8 @@ const Ai = /* @__PURE__ */ new Z(), vo = /* @__PURE__ */ new ln(), Li = class lh
|
|
|
6619
6665
|
* @returns Return this matrix
|
|
6620
6666
|
*/
|
|
6621
6667
|
compose(t, e, s) {
|
|
6622
|
-
const o = this.elements, h = e.x, c = e.y, f = e.z, x = e.w, g = h + h, A = c + c, b = f + f,
|
|
6623
|
-
return o[0] = (1 - (z + F)) * W, o[1] = (M + ot) * W, o[2] = (O - vt) * W, o[3] = 0, o[4] = (M - ot) * ut, o[5] = (1 - (
|
|
6668
|
+
const o = this.elements, h = e.x, c = e.y, f = e.z, x = e.w, g = h + h, A = c + c, b = f + f, P = h * g, M = h * A, O = h * b, z = c * A, U = c * b, F = f * b, dt = x * g, vt = x * A, ot = x * b, W = s.x, ut = s.y, st = s.z;
|
|
6669
|
+
return o[0] = (1 - (z + F)) * W, o[1] = (M + ot) * W, o[2] = (O - vt) * W, o[3] = 0, o[4] = (M - ot) * ut, o[5] = (1 - (P + F)) * ut, o[6] = (U + dt) * ut, o[7] = 0, o[8] = (O + vt) * st, o[9] = (U - dt) * st, o[10] = (1 - (P + z)) * st, o[11] = 0, o[12] = t.x, o[13] = t.y, o[14] = t.z, o[15] = 1, this;
|
|
6624
6670
|
}
|
|
6625
6671
|
/**
|
|
6626
6672
|
* Decompose this matrix into its position, quaternion and scale components.
|
|
@@ -6635,8 +6681,8 @@ const Ai = /* @__PURE__ */ new Z(), vo = /* @__PURE__ */ new ln(), Li = class lh
|
|
|
6635
6681
|
*/
|
|
6636
6682
|
decompose(t, e, s) {
|
|
6637
6683
|
const o = this.elements;
|
|
6638
|
-
let h =
|
|
6639
|
-
const c =
|
|
6684
|
+
let h = Pn.set(o[0], o[1], o[2]).length();
|
|
6685
|
+
const c = Pn.set(o[4], o[5], o[6]).length(), f = Pn.set(o[8], o[9], o[10]).length();
|
|
6640
6686
|
this.determinant() < 0 && (h = -h), t.x = o[12], t.y = o[13], t.z = o[14], rr.copy(this);
|
|
6641
6687
|
const x = 1 / h, g = 1 / c, A = 1 / f;
|
|
6642
6688
|
return rr.elements[0] *= x, rr.elements[1] *= x, rr.elements[2] *= x, rr.elements[4] *= g, rr.elements[5] *= g, rr.elements[6] *= g, rr.elements[8] *= A, rr.elements[9] *= A, rr.elements[10] *= A, e.setFromRotationMatrix(rr), s.x = h, s.y = c, s.z = f, this;
|
|
@@ -6767,7 +6813,7 @@ const Ai = /* @__PURE__ */ new Z(), vo = /* @__PURE__ */ new ln(), Li = class lh
|
|
|
6767
6813
|
};
|
|
6768
6814
|
Li.IDENTITY = Object.freeze(new Li());
|
|
6769
6815
|
let Cn = Li;
|
|
6770
|
-
const
|
|
6816
|
+
const Pn = /* @__PURE__ */ new Z(), rr = /* @__PURE__ */ new Cn(), ld = /* @__PURE__ */ new Z(0, 0, 0), hd = /* @__PURE__ */ new Z(1, 1, 1), Fr = /* @__PURE__ */ new Z(), Ls = /* @__PURE__ */ new Z(), Be = /* @__PURE__ */ new Z();
|
|
6771
6817
|
class Bt {
|
|
6772
6818
|
/**
|
|
6773
6819
|
* Create a 3d box bounded by min and max.
|
|
@@ -6996,7 +7042,7 @@ class Bt {
|
|
|
6996
7042
|
* @returns Return this box
|
|
6997
7043
|
*/
|
|
6998
7044
|
applyMatrix4(t) {
|
|
6999
|
-
return this.isEmpty() ? this : (
|
|
7045
|
+
return this.isEmpty() ? this : (Er[0].set(this.min.x, this.min.y, this.min.z).applyMatrix3d(t), Er[1].set(this.min.x, this.min.y, this.max.z).applyMatrix3d(t), Er[2].set(this.min.x, this.max.y, this.min.z).applyMatrix3d(t), Er[3].set(this.min.x, this.max.y, this.max.z).applyMatrix3d(t), Er[4].set(this.max.x, this.min.y, this.min.z).applyMatrix3d(t), Er[5].set(this.max.x, this.min.y, this.max.z).applyMatrix3d(t), Er[6].set(this.max.x, this.max.y, this.min.z).applyMatrix3d(t), Er[7].set(this.max.x, this.max.y, this.max.z).applyMatrix3d(t), this.setFromPoints(Er), this);
|
|
7000
7046
|
}
|
|
7001
7047
|
/**
|
|
7002
7048
|
* Add offset to both the upper and lower bounds of this box, effectively moving this box offset units
|
|
@@ -7016,7 +7062,7 @@ class Bt {
|
|
|
7016
7062
|
return t.min.equals(this.min) && t.max.equals(this.max);
|
|
7017
7063
|
}
|
|
7018
7064
|
}
|
|
7019
|
-
const
|
|
7065
|
+
const Er = [
|
|
7020
7066
|
/* @__PURE__ */ new Z(),
|
|
7021
7067
|
/* @__PURE__ */ new Z(),
|
|
7022
7068
|
/* @__PURE__ */ new Z(),
|
|
@@ -7541,25 +7587,25 @@ const bo = /* @__PURE__ */ new Cn(), wo = /* @__PURE__ */ new ln(), hh = class O
|
|
|
7541
7587
|
* @returns Return this euler
|
|
7542
7588
|
*/
|
|
7543
7589
|
setFromRotationMatrix(t, e = this._order, s = !0) {
|
|
7544
|
-
const o = t.elements, h = o[0], c = o[4], f = o[8], x = o[1], g = o[5], A = o[9], b = o[2],
|
|
7590
|
+
const o = t.elements, h = o[0], c = o[4], f = o[8], x = o[1], g = o[5], A = o[9], b = o[2], P = o[6], M = o[10];
|
|
7545
7591
|
switch (e) {
|
|
7546
7592
|
case "XYZ":
|
|
7547
|
-
this._y = Math.asin(Ur(f, -1, 1)), Math.abs(f) < 0.9999999 ? (this._x = Math.atan2(-A, M), this._z = Math.atan2(-c, h)) : (this._x = Math.atan2(
|
|
7593
|
+
this._y = Math.asin(Ur(f, -1, 1)), Math.abs(f) < 0.9999999 ? (this._x = Math.atan2(-A, M), this._z = Math.atan2(-c, h)) : (this._x = Math.atan2(P, g), this._z = 0);
|
|
7548
7594
|
break;
|
|
7549
7595
|
case "YXZ":
|
|
7550
7596
|
this._x = Math.asin(-Ur(A, -1, 1)), Math.abs(A) < 0.9999999 ? (this._y = Math.atan2(f, M), this._z = Math.atan2(x, g)) : (this._y = Math.atan2(-b, h), this._z = 0);
|
|
7551
7597
|
break;
|
|
7552
7598
|
case "ZXY":
|
|
7553
|
-
this._x = Math.asin(Ur(
|
|
7599
|
+
this._x = Math.asin(Ur(P, -1, 1)), Math.abs(P) < 0.9999999 ? (this._y = Math.atan2(-b, M), this._z = Math.atan2(-c, g)) : (this._y = 0, this._z = Math.atan2(x, h));
|
|
7554
7600
|
break;
|
|
7555
7601
|
case "ZYX":
|
|
7556
|
-
this._y = Math.asin(-Ur(b, -1, 1)), Math.abs(b) < 0.9999999 ? (this._x = Math.atan2(
|
|
7602
|
+
this._y = Math.asin(-Ur(b, -1, 1)), Math.abs(b) < 0.9999999 ? (this._x = Math.atan2(P, M), this._z = Math.atan2(x, h)) : (this._x = 0, this._z = Math.atan2(-c, g));
|
|
7557
7603
|
break;
|
|
7558
7604
|
case "YZX":
|
|
7559
7605
|
this._z = Math.asin(Ur(x, -1, 1)), Math.abs(x) < 0.9999999 ? (this._x = Math.atan2(-A, g), this._y = Math.atan2(-b, h)) : (this._x = 0, this._y = Math.atan2(f, M));
|
|
7560
7606
|
break;
|
|
7561
7607
|
case "XZY":
|
|
7562
|
-
this._z = Math.asin(-Ur(c, -1, 1)), Math.abs(c) < 0.9999999 ? (this._x = Math.atan2(
|
|
7608
|
+
this._z = Math.asin(-Ur(c, -1, 1)), Math.abs(c) < 0.9999999 ? (this._x = Math.atan2(P, g), this._y = Math.atan2(f, h)) : (this._x = Math.atan2(-A, M), this._y = 0);
|
|
7563
7609
|
break;
|
|
7564
7610
|
default:
|
|
7565
7611
|
console.warn(
|
|
@@ -7736,9 +7782,9 @@ class ua extends ch {
|
|
|
7736
7782
|
const f = { index: -1, children: [] };
|
|
7737
7783
|
for (let x = 0; x < c; x++) {
|
|
7738
7784
|
const g = o[x], A = e[g], b = s[g];
|
|
7739
|
-
let
|
|
7740
|
-
for (;
|
|
7741
|
-
const M = o[
|
|
7785
|
+
let P = x + 1;
|
|
7786
|
+
for (; P < c; P++) {
|
|
7787
|
+
const M = o[P], O = e[M];
|
|
7742
7788
|
if (s[M].containsBox(b) && nd.isPointInPolygon(
|
|
7743
7789
|
A[kt.randInt(0, A.length - 1)],
|
|
7744
7790
|
O
|
|
@@ -7747,7 +7793,7 @@ class ua extends ch {
|
|
|
7747
7793
|
break;
|
|
7748
7794
|
}
|
|
7749
7795
|
}
|
|
7750
|
-
|
|
7796
|
+
P === c && f.children.push(h.get(g));
|
|
7751
7797
|
}
|
|
7752
7798
|
return f;
|
|
7753
7799
|
}
|
|
@@ -7782,7 +7828,7 @@ class ua extends ch {
|
|
|
7782
7828
|
}), s;
|
|
7783
7829
|
}
|
|
7784
7830
|
}
|
|
7785
|
-
class
|
|
7831
|
+
class Es extends ch {
|
|
7786
7832
|
constructor() {
|
|
7787
7833
|
super(), this.arcLengthDivisions = 100;
|
|
7788
7834
|
}
|
|
@@ -7888,8 +7934,8 @@ class Ps extends ch {
|
|
|
7888
7934
|
}
|
|
7889
7935
|
if (o = x, s[o] === c)
|
|
7890
7936
|
return o / (h - 1);
|
|
7891
|
-
const A = s[o], b = s[o + 1] - A,
|
|
7892
|
-
return (o +
|
|
7937
|
+
const A = s[o], b = s[o + 1] - A, P = (c - A) / b;
|
|
7938
|
+
return (o + P) / (h - 1);
|
|
7893
7939
|
}
|
|
7894
7940
|
/**
|
|
7895
7941
|
* Return a unit vector tangent at `t`. If the derived curve does not implement its tangent derivation,
|
|
@@ -7916,7 +7962,7 @@ class Ps extends ch {
|
|
|
7916
7962
|
return this.getTangent(e);
|
|
7917
7963
|
}
|
|
7918
7964
|
}
|
|
7919
|
-
class ws extends
|
|
7965
|
+
class ws extends Es {
|
|
7920
7966
|
constructor(t, e, s, o, h) {
|
|
7921
7967
|
super();
|
|
7922
7968
|
const c = +(t !== void 0) + +(e !== void 0) + +(s !== void 0) + +(o !== void 0) + +(h !== void 0);
|
|
@@ -7946,10 +7992,10 @@ class ws extends Ps {
|
|
|
7946
7992
|
const o = (st, Vt) => ({
|
|
7947
7993
|
x: (st.x + Vt.x) / 2,
|
|
7948
7994
|
y: (st.y + Vt.y) / 2
|
|
7949
|
-
}), h = (st, Vt) => (Vt.y - st.y) / (Vt.x - st.x), c = (st) => -1 / st, f = o(t, e), x = o(e, s), g = h(t, e), A = h(e, s), b = c(g),
|
|
7995
|
+
}), h = (st, Vt) => (Vt.y - st.y) / (Vt.x - st.x), c = (st) => -1 / st, f = o(t, e), x = o(e, s), g = h(t, e), A = h(e, s), b = c(g), P = c(A), M = (st, Vt, Yt, Wt) => {
|
|
7950
7996
|
const bt = (Wt - Vt) / (st - Yt), Lt = st * bt + Vt;
|
|
7951
7997
|
return { x: bt, y: Lt };
|
|
7952
|
-
}, O = f.y - b * f.x, z = x.y -
|
|
7998
|
+
}, O = f.y - b * f.x, z = x.y - P * x.x, U = M(b, O, P, z), F = Math.sqrt(
|
|
7953
7999
|
Math.pow(t.x - U.x, 2) + Math.pow(t.y - U.y, 2)
|
|
7954
8000
|
), dt = (st, Vt) => Math.atan2(st.y - Vt.y, st.x - Vt.x), vt = dt(t, U), ot = dt(e, U), W = dt(s, U), ut = W > vt && W < ot || vt > W && vt < ot || ot > W && ot < vt;
|
|
7955
8001
|
this.center = U, this.radius = F, this._clockwise = !ut, this._startAngle = vt, this._endAngle = W;
|
|
@@ -7969,21 +8015,21 @@ class ws extends Ps {
|
|
|
7969
8015
|
let o, h, c;
|
|
7970
8016
|
s < 0 ? (o = Math.atan(-s) * 4, h = new Zt(t), c = new Zt(e)) : (o = Math.atan(s) * 4, h = new Zt(e), c = new Zt(t));
|
|
7971
8017
|
const f = new Zt().subVectors(c, h), x = f.length(), g = new Zt().addVectors(h, f.multiplyScalar(0.5)), A = Math.abs(x / 2 / Math.tan(o / 2)), b = f.normalize();
|
|
7972
|
-
let
|
|
8018
|
+
let P;
|
|
7973
8019
|
if (o < Math.PI) {
|
|
7974
8020
|
const M = new Zt(
|
|
7975
8021
|
b.x * Math.cos(Math.PI / 2) - b.y * Math.sin(Math.PI / 2),
|
|
7976
8022
|
b.y * Math.cos(Math.PI / 2) + b.x * Math.sin(Math.PI / 2)
|
|
7977
8023
|
);
|
|
7978
|
-
|
|
8024
|
+
P = g.add(M.multiplyScalar(-A));
|
|
7979
8025
|
} else {
|
|
7980
8026
|
const M = new Zt(
|
|
7981
8027
|
b.x * Math.cos(Math.PI / 2) - b.y * Math.sin(Math.PI / 2),
|
|
7982
8028
|
b.y * Math.cos(Math.PI / 2) + b.x * Math.sin(Math.PI / 2)
|
|
7983
8029
|
);
|
|
7984
|
-
|
|
8030
|
+
P = g.add(M.multiplyScalar(A));
|
|
7985
8031
|
}
|
|
7986
|
-
s < 0 ? (this._startAngle = Math.atan2(h.y -
|
|
8032
|
+
s < 0 ? (this._startAngle = Math.atan2(h.y - P.y, h.x - P.x), this._endAngle = Math.atan2(c.y - P.y, c.x - P.x)) : (this._startAngle = Math.atan2(c.y - P.y, c.x - P.x), this._endAngle = Math.atan2(h.y - P.y, h.x - P.x)), this._clockwise = s < 0, this.center = P, this.radius = c.sub(P).length();
|
|
7987
8033
|
}
|
|
7988
8034
|
/**
|
|
7989
8035
|
* Center of circular arc
|
|
@@ -8177,9 +8223,9 @@ class md extends uh {
|
|
|
8177
8223
|
return (this._box == null || this._boundingBoxNeedsUpdate) && (this._box = this.calculateBoundingBox(), this._boundingBoxNeedsUpdate = !1), this._box;
|
|
8178
8224
|
}
|
|
8179
8225
|
}
|
|
8180
|
-
class
|
|
8226
|
+
class Ps extends md {
|
|
8181
8227
|
}
|
|
8182
|
-
class hn extends
|
|
8228
|
+
class hn extends Ps {
|
|
8183
8229
|
/**
|
|
8184
8230
|
* This constructor initializes the line object to use start as the start point, and end
|
|
8185
8231
|
* as the endpoint. Both points must be in WCS coordinates.
|
|
@@ -8389,7 +8435,7 @@ class hn extends Es {
|
|
|
8389
8435
|
}
|
|
8390
8436
|
}
|
|
8391
8437
|
const rn = /* @__PURE__ */ new Z(), Ao = /* @__PURE__ */ new Z(), Os = /* @__PURE__ */ new Z();
|
|
8392
|
-
class Tn extends
|
|
8438
|
+
class Tn extends Ps {
|
|
8393
8439
|
/**
|
|
8394
8440
|
* Compute center point of the arc given three points
|
|
8395
8441
|
* @param startPoint Input start point of the arc
|
|
@@ -8401,7 +8447,7 @@ class Tn extends Es {
|
|
|
8401
8447
|
const o = new Z().addVectors(t, e).multiplyScalar(0.5), h = new Z().addVectors(t, s).multiplyScalar(0.5), c = new Z().subVectors(e, t), f = new Z().subVectors(s, t), x = new Z().crossVectors(c, f).normalize();
|
|
8402
8448
|
if (x.lengthSq() === 0)
|
|
8403
8449
|
return console.error("Points are collinear and cannot form a valid arc."), null;
|
|
8404
|
-
const g = new Z().crossVectors(c, x).normalize(), A = new Z().crossVectors(f, x).normalize(), b = g.clone().multiplyScalar(Number.MAX_SAFE_INTEGER),
|
|
8450
|
+
const g = new Z().crossVectors(c, x).normalize(), A = new Z().crossVectors(f, x).normalize(), b = g.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), P = A.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), M = new hn(o, o.clone().add(b)), O = new hn(h, h.clone().add(P)), z = new Z();
|
|
8405
8451
|
return M.closestPointToPoint(O.startPoint, !0, z) ? z : (console.error("Cannot find a valid center for the arc."), null);
|
|
8406
8452
|
}
|
|
8407
8453
|
/**
|
|
@@ -8631,7 +8677,7 @@ class Tn extends Es {
|
|
|
8631
8677
|
}
|
|
8632
8678
|
}
|
|
8633
8679
|
const Ii = /* @__PURE__ */ new Z();
|
|
8634
|
-
class ca extends
|
|
8680
|
+
class ca extends Es {
|
|
8635
8681
|
/**
|
|
8636
8682
|
* Construct an instance of the ellipse arc.
|
|
8637
8683
|
* @param center Center point of the ellipse.
|
|
@@ -8790,7 +8836,7 @@ class ca extends Ps {
|
|
|
8790
8836
|
);
|
|
8791
8837
|
}
|
|
8792
8838
|
}
|
|
8793
|
-
class da extends
|
|
8839
|
+
class da extends Ps {
|
|
8794
8840
|
/**
|
|
8795
8841
|
* Construct an instance of the ellipse arc.
|
|
8796
8842
|
* @param center Center point of the ellipse.
|
|
@@ -9035,7 +9081,7 @@ class da extends Es {
|
|
|
9035
9081
|
return new ei(this.normal, t);
|
|
9036
9082
|
}
|
|
9037
9083
|
}
|
|
9038
|
-
class ri extends
|
|
9084
|
+
class ri extends Es {
|
|
9039
9085
|
constructor(t = null, e = !1) {
|
|
9040
9086
|
super(), this._vertices = t || new Array(), this._closed = e;
|
|
9041
9087
|
}
|
|
@@ -9172,7 +9218,7 @@ class ri extends Ps {
|
|
|
9172
9218
|
return e;
|
|
9173
9219
|
}
|
|
9174
9220
|
}
|
|
9175
|
-
class ma extends
|
|
9221
|
+
class ma extends Es {
|
|
9176
9222
|
/**
|
|
9177
9223
|
* This constructor initializes the line object to use start as the start point, and end
|
|
9178
9224
|
* as the endpoint. Both points must be in WCS coordinates.
|
|
@@ -9251,7 +9297,7 @@ class ma extends Ps {
|
|
|
9251
9297
|
return new ma(this._start.clone(), this._end.clone());
|
|
9252
9298
|
}
|
|
9253
9299
|
}
|
|
9254
|
-
class pd extends
|
|
9300
|
+
class pd extends Es {
|
|
9255
9301
|
/**
|
|
9256
9302
|
* Create one loop by connected curves
|
|
9257
9303
|
* @param curves Input one array of connected curves
|
|
@@ -9365,7 +9411,7 @@ var dh = { exports: {} };
|
|
|
9365
9411
|
}
|
|
9366
9412
|
return function(x, g, A) {
|
|
9367
9413
|
g.geom = g.geom || {}, g.exe = g.exe || {}, g.eval = g.eval || {}, g.core = g.core || {}, g.promhx = g.promhx || {};
|
|
9368
|
-
var b = {},
|
|
9414
|
+
var b = {}, P = function() {
|
|
9369
9415
|
return Mt.__string_rec(this, "");
|
|
9370
9416
|
};
|
|
9371
9417
|
function M(r, n) {
|
|
@@ -9483,13 +9529,13 @@ var dh = { exports: {} };
|
|
|
9483
9529
|
return r.charCodeAt(n);
|
|
9484
9530
|
};
|
|
9485
9531
|
var W = b.ValueType = { __ename__: ["ValueType"], __constructs__: ["TNull", "TInt", "TFloat", "TBool", "TObject", "TFunction", "TClass", "TEnum", "TUnknown"] };
|
|
9486
|
-
W.TNull = ["TNull", 0], W.TNull.toString =
|
|
9532
|
+
W.TNull = ["TNull", 0], W.TNull.toString = P, W.TNull.__enum__ = W, W.TInt = ["TInt", 1], W.TInt.toString = P, W.TInt.__enum__ = W, W.TFloat = ["TFloat", 2], W.TFloat.toString = P, W.TFloat.__enum__ = W, W.TBool = ["TBool", 3], W.TBool.toString = P, W.TBool.__enum__ = W, W.TObject = ["TObject", 4], W.TObject.toString = P, W.TObject.__enum__ = W, W.TFunction = ["TFunction", 5], W.TFunction.toString = P, W.TFunction.__enum__ = W, W.TClass = function(r) {
|
|
9487
9533
|
var n = ["TClass", 6, r];
|
|
9488
|
-
return n.__enum__ = W, n.toString =
|
|
9534
|
+
return n.__enum__ = W, n.toString = P, n;
|
|
9489
9535
|
}, W.TEnum = function(r) {
|
|
9490
9536
|
var n = ["TEnum", 7, r];
|
|
9491
|
-
return n.__enum__ = W, n.toString =
|
|
9492
|
-
}, W.TUnknown = ["TUnknown", 8], W.TUnknown.toString =
|
|
9537
|
+
return n.__enum__ = W, n.toString = P, n;
|
|
9538
|
+
}, W.TUnknown = ["TUnknown", 8], W.TUnknown.toString = P, W.TUnknown.__enum__ = W;
|
|
9493
9539
|
var ut = function() {
|
|
9494
9540
|
};
|
|
9495
9541
|
b.Type = ut, ut.__name__ = ["Type"], ut.getClassName = function(r) {
|
|
@@ -9624,8 +9670,8 @@ var dh = { exports: {} };
|
|
|
9624
9670
|
case U:
|
|
9625
9671
|
this.buf.b += "l";
|
|
9626
9672
|
for (var w = r, I = w.h, S = null; I != null; ) {
|
|
9627
|
-
var
|
|
9628
|
-
S = I[0], I = I[1],
|
|
9673
|
+
var E;
|
|
9674
|
+
S = I[0], I = I[1], E = S, this.serialize(E);
|
|
9629
9675
|
}
|
|
9630
9676
|
this.buf.b += "h";
|
|
9631
9677
|
break;
|
|
@@ -9657,7 +9703,7 @@ var dh = { exports: {} };
|
|
|
9657
9703
|
}
|
|
9658
9704
|
this.buf.b += "h";
|
|
9659
9705
|
break;
|
|
9660
|
-
case
|
|
9706
|
+
case Ee:
|
|
9661
9707
|
for (var j = r, K = 0, tt = j.length - 2, et = new vt(), it = Yt.BASE64; K < tt; ) {
|
|
9662
9708
|
var ht = j.get(K++), at = j.get(K++), ct = j.get(K++);
|
|
9663
9709
|
et.add(it.charAt(ht >> 2)), et.add(it.charAt((ht << 4 | at >> 4) & 63)), et.add(it.charAt((at << 2 | ct >> 6) & 63)), et.add(it.charAt(ct & 63));
|
|
@@ -9837,8 +9883,8 @@ var dh = { exports: {} };
|
|
|
9837
9883
|
var S = ut.createEmptyInstance(I);
|
|
9838
9884
|
return this.cache.push(S), this.unserializeObject(S), S;
|
|
9839
9885
|
case 119:
|
|
9840
|
-
var
|
|
9841
|
-
if (k == null) throw new Q("Enum not found " +
|
|
9886
|
+
var E = this.unserialize(), k = this.resolver.resolveEnum(E);
|
|
9887
|
+
if (k == null) throw new Q("Enum not found " + E);
|
|
9842
9888
|
var T = this.unserializeEnum(k, this.unserialize());
|
|
9843
9889
|
return this.cache.push(T), T;
|
|
9844
9890
|
case 106:
|
|
@@ -9893,7 +9939,7 @@ var dh = { exports: {} };
|
|
|
9893
9939
|
X == null && (X = Wt.initCodes(), Wt.CODES = X);
|
|
9894
9940
|
var ft = this.pos, It = nt & 3, Gt;
|
|
9895
9941
|
Gt = (nt >> 2) * 3 + (It >= 2 ? It - 1 : 0);
|
|
9896
|
-
for (var Xt = ft + (nt - It), Dt =
|
|
9942
|
+
for (var Xt = ft + (nt - It), Dt = Ee.alloc(Gt), Kt = 0; ft < Xt; ) {
|
|
9897
9943
|
var Ae = X[ot.fastCodeAt(mt, ft++)], Ve = X[ot.fastCodeAt(mt, ft++)];
|
|
9898
9944
|
Dt.set(Kt++, Ae << 2 | Ve >> 4);
|
|
9899
9945
|
var _e = X[ot.fastCodeAt(mt, ft++)];
|
|
@@ -9965,8 +10011,8 @@ var dh = { exports: {} };
|
|
|
9965
10011
|
var de = b["haxe.ds.Option"] = { __ename__: ["haxe", "ds", "Option"], __constructs__: ["Some", "None"] };
|
|
9966
10012
|
de.Some = function(r) {
|
|
9967
10013
|
var n = ["Some", 0, r];
|
|
9968
|
-
return n.__enum__ = de, n.toString =
|
|
9969
|
-
}, de.None = ["None", 1], de.None.toString =
|
|
10014
|
+
return n.__enum__ = de, n.toString = P, n;
|
|
10015
|
+
}, de.None = ["None", 1], de.None.toString = P, de.None.__enum__ = de;
|
|
9970
10016
|
var me = function() {
|
|
9971
10017
|
this.h = {};
|
|
9972
10018
|
};
|
|
@@ -9998,24 +10044,24 @@ var dh = { exports: {} };
|
|
|
9998
10044
|
},
|
|
9999
10045
|
__class__: me
|
|
10000
10046
|
};
|
|
10001
|
-
var
|
|
10047
|
+
var Ee = function(r) {
|
|
10002
10048
|
this.length = r.byteLength, this.b = new ai(r), this.b.bufferValue = r, r.hxBytes = this, r.bytes = this.b;
|
|
10003
10049
|
};
|
|
10004
|
-
b["haxe.io.Bytes"] =
|
|
10005
|
-
return new
|
|
10006
|
-
},
|
|
10050
|
+
b["haxe.io.Bytes"] = Ee, Ee.__name__ = ["haxe", "io", "Bytes"], Ee.alloc = function(r) {
|
|
10051
|
+
return new Ee(new Ts(r));
|
|
10052
|
+
}, Ee.prototype = {
|
|
10007
10053
|
get: function(r) {
|
|
10008
10054
|
return this.b[r];
|
|
10009
10055
|
},
|
|
10010
10056
|
set: function(r, n) {
|
|
10011
10057
|
this.b[r] = n & 255;
|
|
10012
10058
|
},
|
|
10013
|
-
__class__:
|
|
10059
|
+
__class__: Ee
|
|
10014
10060
|
};
|
|
10015
10061
|
var Jt = b["haxe.io.Error"] = { __ename__: ["haxe", "io", "Error"], __constructs__: ["Blocked", "Overflow", "OutsideBounds", "Custom"] };
|
|
10016
|
-
Jt.Blocked = ["Blocked", 0], Jt.Blocked.toString =
|
|
10062
|
+
Jt.Blocked = ["Blocked", 0], Jt.Blocked.toString = P, Jt.Blocked.__enum__ = Jt, Jt.Overflow = ["Overflow", 1], Jt.Overflow.toString = P, Jt.Overflow.__enum__ = Jt, Jt.OutsideBounds = ["OutsideBounds", 2], Jt.OutsideBounds.toString = P, Jt.OutsideBounds.__enum__ = Jt, Jt.Custom = function(r) {
|
|
10017
10063
|
var n = ["Custom", 3, r];
|
|
10018
|
-
return n.__enum__ = Jt, n.toString =
|
|
10064
|
+
return n.__enum__ = Jt, n.toString = P, n;
|
|
10019
10065
|
};
|
|
10020
10066
|
var ie = function() {
|
|
10021
10067
|
};
|
|
@@ -10093,8 +10139,8 @@ var dh = { exports: {} };
|
|
|
10093
10139
|
return C instanceof Q && (C = C.val), "???";
|
|
10094
10140
|
}
|
|
10095
10141
|
if (S != null && S != Object.toString && typeof S == "function") {
|
|
10096
|
-
var
|
|
10097
|
-
if (
|
|
10142
|
+
var E = r.toString();
|
|
10143
|
+
if (E != "[object Object]") return E;
|
|
10098
10144
|
}
|
|
10099
10145
|
var k = null, T = `{
|
|
10100
10146
|
`;
|
|
@@ -10277,27 +10323,27 @@ var dh = { exports: {} };
|
|
|
10277
10323
|
var a = this, l = nr._new(a.slice(r, n));
|
|
10278
10324
|
return l.byteOffset = r, l;
|
|
10279
10325
|
};
|
|
10280
|
-
var
|
|
10281
|
-
this._resolved = !1, this._pending = !1, this._errorPending = !1, this._fulfilled = !1, this._update = [], this._error = [], this._errored = !1, r != null &&
|
|
10326
|
+
var Pt = function(r) {
|
|
10327
|
+
this._resolved = !1, this._pending = !1, this._errorPending = !1, this._fulfilled = !1, this._update = [], this._error = [], this._errored = !1, r != null && Pt.link(r, this, function(n) {
|
|
10282
10328
|
return n;
|
|
10283
10329
|
});
|
|
10284
10330
|
};
|
|
10285
|
-
b["promhx.base.AsyncBase"] =
|
|
10331
|
+
b["promhx.base.AsyncBase"] = Pt, Pt.__name__ = ["promhx", "base", "AsyncBase"], Pt.link = function(r, n, a) {
|
|
10286
10332
|
r._update.push({
|
|
10287
10333
|
async: n,
|
|
10288
10334
|
linkf: function(l) {
|
|
10289
10335
|
n.handleResolve(a(l));
|
|
10290
10336
|
}
|
|
10291
|
-
}),
|
|
10292
|
-
},
|
|
10337
|
+
}), Pt.immediateLinkUpdate(r, n, a);
|
|
10338
|
+
}, Pt.immediateLinkUpdate = function(r, n, a) {
|
|
10293
10339
|
if (r._errored && !r._errorPending && !(r._error.length > 0) && n.handleError(r._errorVal), r._resolved && !r._pending) try {
|
|
10294
10340
|
n.handleResolve(a(r._val));
|
|
10295
10341
|
} catch (l) {
|
|
10296
10342
|
l instanceof Q && (l = l.val), n.handleError(l);
|
|
10297
10343
|
}
|
|
10298
|
-
},
|
|
10344
|
+
}, Pt.linkAll = function(r, n) {
|
|
10299
10345
|
for (var a = function(d, p, _) {
|
|
10300
|
-
if (d.length == 0 ||
|
|
10346
|
+
if (d.length == 0 || Pt.allFulfilled(d)) {
|
|
10301
10347
|
for (var v, w = [], I = Xe(r)(); I.hasNext(); ) {
|
|
10302
10348
|
var S = I.next();
|
|
10303
10349
|
w.push(S == p ? _ : S._val);
|
|
@@ -10321,19 +10367,19 @@ var dh = { exports: {} };
|
|
|
10321
10367
|
}(), u)
|
|
10322
10368
|
});
|
|
10323
10369
|
}
|
|
10324
|
-
|
|
10370
|
+
Pt.allFulfilled(r) && n.handleResolve(function(d) {
|
|
10325
10371
|
for (var p, _ = [], v = Xe(r)(); v.hasNext(); ) {
|
|
10326
10372
|
var w = v.next();
|
|
10327
10373
|
_.push(w._val);
|
|
10328
10374
|
}
|
|
10329
10375
|
return p = _, p;
|
|
10330
10376
|
}());
|
|
10331
|
-
},
|
|
10377
|
+
}, Pt.pipeLink = function(r, n, a) {
|
|
10332
10378
|
var l = !1, u = function(d) {
|
|
10333
10379
|
if (!l) {
|
|
10334
10380
|
l = !0;
|
|
10335
10381
|
var p = a(d);
|
|
10336
|
-
p._update.push({ async: n, linkf: Me(n, n.handleResolve) }),
|
|
10382
|
+
p._update.push({ async: n, linkf: Me(n, n.handleResolve) }), Pt.immediateLinkUpdate(p, n, function(_) {
|
|
10337
10383
|
return _;
|
|
10338
10384
|
});
|
|
10339
10385
|
}
|
|
@@ -10343,19 +10389,19 @@ var dh = { exports: {} };
|
|
|
10343
10389
|
} catch (d) {
|
|
10344
10390
|
d instanceof Q && (d = d.val), n.handleError(d);
|
|
10345
10391
|
}
|
|
10346
|
-
},
|
|
10392
|
+
}, Pt.allResolved = function(r) {
|
|
10347
10393
|
for (var n = Xe(r)(); n.hasNext(); ) {
|
|
10348
10394
|
var a = n.next();
|
|
10349
10395
|
if (!a._resolved) return !1;
|
|
10350
10396
|
}
|
|
10351
10397
|
return !0;
|
|
10352
|
-
},
|
|
10398
|
+
}, Pt.allFulfilled = function(r) {
|
|
10353
10399
|
for (var n = Xe(r)(); n.hasNext(); ) {
|
|
10354
10400
|
var a = n.next();
|
|
10355
10401
|
if (!a._fulfilled) return !1;
|
|
10356
10402
|
}
|
|
10357
10403
|
return !0;
|
|
10358
|
-
},
|
|
10404
|
+
}, Pt.prototype = {
|
|
10359
10405
|
catchError: function(r) {
|
|
10360
10406
|
return this._error.push(r), this;
|
|
10361
10407
|
},
|
|
@@ -10431,8 +10477,8 @@ var dh = { exports: {} };
|
|
|
10431
10477
|
}), St.continueOnNextLoop());
|
|
10432
10478
|
},
|
|
10433
10479
|
then: function(r) {
|
|
10434
|
-
var n = new
|
|
10435
|
-
return
|
|
10480
|
+
var n = new Pt(null);
|
|
10481
|
+
return Pt.link(this, n, r), n;
|
|
10436
10482
|
},
|
|
10437
10483
|
unlink: function(r) {
|
|
10438
10484
|
var n = this;
|
|
@@ -10449,12 +10495,12 @@ var dh = { exports: {} };
|
|
|
10449
10495
|
}
|
|
10450
10496
|
return n;
|
|
10451
10497
|
},
|
|
10452
|
-
__class__:
|
|
10498
|
+
__class__: Pt
|
|
10453
10499
|
};
|
|
10454
10500
|
var dn = g.promhx.Deferred = function() {
|
|
10455
|
-
|
|
10501
|
+
Pt.call(this);
|
|
10456
10502
|
};
|
|
10457
|
-
b["promhx.Deferred"] = dn, dn.__name__ = ["promhx", "Deferred"], dn.__super__ =
|
|
10503
|
+
b["promhx.Deferred"] = dn, dn.__name__ = ["promhx", "Deferred"], dn.__super__ = Pt, dn.prototype = M(Pt.prototype, {
|
|
10458
10504
|
resolve: function(r) {
|
|
10459
10505
|
this.handleResolve(r);
|
|
10460
10506
|
},
|
|
@@ -10473,15 +10519,15 @@ var dh = { exports: {} };
|
|
|
10473
10519
|
__class__: dn
|
|
10474
10520
|
});
|
|
10475
10521
|
var pe = g.promhx.Promise = function(r) {
|
|
10476
|
-
|
|
10522
|
+
Pt.call(this, r), this._rejected = !1;
|
|
10477
10523
|
};
|
|
10478
10524
|
b["promhx.Promise"] = pe, pe.__name__ = ["promhx", "Promise"], pe.whenAll = function(r) {
|
|
10479
10525
|
var n = new pe(null);
|
|
10480
|
-
return
|
|
10526
|
+
return Pt.linkAll(r, n), n;
|
|
10481
10527
|
}, pe.promise = function(r) {
|
|
10482
10528
|
var n = new pe();
|
|
10483
10529
|
return n.handleResolve(r), n;
|
|
10484
|
-
}, pe.__super__ =
|
|
10530
|
+
}, pe.__super__ = Pt, pe.prototype = M(Pt.prototype, {
|
|
10485
10531
|
isRejected: function() {
|
|
10486
10532
|
return this._rejected;
|
|
10487
10533
|
},
|
|
@@ -10497,7 +10543,7 @@ var dh = { exports: {} };
|
|
|
10497
10543
|
},
|
|
10498
10544
|
then: function(r) {
|
|
10499
10545
|
var n = new pe(null);
|
|
10500
|
-
return
|
|
10546
|
+
return Pt.link(this, n, r), n;
|
|
10501
10547
|
},
|
|
10502
10548
|
unlink: function(r) {
|
|
10503
10549
|
var n = this;
|
|
@@ -10517,7 +10563,7 @@ var dh = { exports: {} };
|
|
|
10517
10563
|
},
|
|
10518
10564
|
pipe: function(r) {
|
|
10519
10565
|
var n = new pe(null);
|
|
10520
|
-
return
|
|
10566
|
+
return Pt.pipeLink(this, n, r), n;
|
|
10521
10567
|
},
|
|
10522
10568
|
errorPipe: function(r) {
|
|
10523
10569
|
var n = new pe();
|
|
@@ -10529,7 +10575,7 @@ var dh = { exports: {} };
|
|
|
10529
10575
|
__class__: pe
|
|
10530
10576
|
});
|
|
10531
10577
|
var Ht = g.promhx.Stream = function(r) {
|
|
10532
|
-
|
|
10578
|
+
Pt.call(this, r), this._end_promise = new pe();
|
|
10533
10579
|
};
|
|
10534
10580
|
b["promhx.Stream"] = Ht, Ht.__name__ = ["promhx", "Stream"], Ht.foreach = function(r) {
|
|
10535
10581
|
for (var n = new Ht(null), a = Xe(r)(); a.hasNext(); ) {
|
|
@@ -10539,7 +10585,7 @@ var dh = { exports: {} };
|
|
|
10539
10585
|
return n.end(), n;
|
|
10540
10586
|
}, Ht.wheneverAll = function(r) {
|
|
10541
10587
|
var n = new Ht(null);
|
|
10542
|
-
return
|
|
10588
|
+
return Pt.linkAll(r, n), n;
|
|
10543
10589
|
}, Ht.concatAll = function(r) {
|
|
10544
10590
|
for (var n = new Ht(null), a = Xe(r)(); a.hasNext(); ) {
|
|
10545
10591
|
var l = a.next();
|
|
@@ -10555,10 +10601,10 @@ var dh = { exports: {} };
|
|
|
10555
10601
|
}, Ht.stream = function(r) {
|
|
10556
10602
|
var n = new Ht(null);
|
|
10557
10603
|
return n.handleResolve(r), n;
|
|
10558
|
-
}, Ht.__super__ =
|
|
10604
|
+
}, Ht.__super__ = Pt, Ht.prototype = M(Pt.prototype, {
|
|
10559
10605
|
then: function(r) {
|
|
10560
10606
|
var n = new Ht(null);
|
|
10561
|
-
return
|
|
10607
|
+
return Pt.link(this, n, r), this._end_promise._update.push({
|
|
10562
10608
|
async: n._end_promise,
|
|
10563
10609
|
linkf: function(a) {
|
|
10564
10610
|
n.end();
|
|
@@ -10588,7 +10634,7 @@ var dh = { exports: {} };
|
|
|
10588
10634
|
},
|
|
10589
10635
|
pipe: function(r) {
|
|
10590
10636
|
var n = new Ht(null);
|
|
10591
|
-
return
|
|
10637
|
+
return Pt.pipeLink(this, n, r), this._end_promise.then(function(a) {
|
|
10592
10638
|
n.end();
|
|
10593
10639
|
}), n;
|
|
10594
10640
|
},
|
|
@@ -10624,13 +10670,13 @@ var dh = { exports: {} };
|
|
|
10624
10670
|
linkf: function(a) {
|
|
10625
10671
|
r(a) && n.handleResolve(a);
|
|
10626
10672
|
}
|
|
10627
|
-
}),
|
|
10673
|
+
}), Pt.immediateLinkUpdate(this, n, function(a) {
|
|
10628
10674
|
return a;
|
|
10629
10675
|
}), n;
|
|
10630
10676
|
},
|
|
10631
10677
|
concat: function(r) {
|
|
10632
10678
|
var n = new Ht(null);
|
|
10633
|
-
return this._update.push({ async: n, linkf: Me(n, n.handleResolve) }),
|
|
10679
|
+
return this._update.push({ async: n, linkf: Me(n, n.handleResolve) }), Pt.immediateLinkUpdate(this, n, function(a) {
|
|
10634
10680
|
return a;
|
|
10635
10681
|
}), this._end_promise.then(function(a) {
|
|
10636
10682
|
r.pipe(function(l) {
|
|
@@ -10642,9 +10688,9 @@ var dh = { exports: {} };
|
|
|
10642
10688
|
},
|
|
10643
10689
|
merge: function(r) {
|
|
10644
10690
|
var n = new Ht(null);
|
|
10645
|
-
return this._update.push({ async: n, linkf: Me(n, n.handleResolve) }), r._update.push({ async: n, linkf: Me(n, n.handleResolve) }),
|
|
10691
|
+
return this._update.push({ async: n, linkf: Me(n, n.handleResolve) }), r._update.push({ async: n, linkf: Me(n, n.handleResolve) }), Pt.immediateLinkUpdate(this, n, function(a) {
|
|
10646
10692
|
return a;
|
|
10647
|
-
}),
|
|
10693
|
+
}), Pt.immediateLinkUpdate(r, n, function(a) {
|
|
10648
10694
|
return a;
|
|
10649
10695
|
}), n;
|
|
10650
10696
|
},
|
|
@@ -10692,10 +10738,10 @@ var dh = { exports: {} };
|
|
|
10692
10738
|
var mn = b["promhx.error.PromiseError"] = { __ename__: ["promhx", "error", "PromiseError"], __constructs__: ["AlreadyResolved", "DownstreamNotFullfilled"] };
|
|
10693
10739
|
mn.AlreadyResolved = function(r) {
|
|
10694
10740
|
var n = ["AlreadyResolved", 0, r];
|
|
10695
|
-
return n.__enum__ = mn, n.toString =
|
|
10741
|
+
return n.__enum__ = mn, n.toString = P, n;
|
|
10696
10742
|
}, mn.DownstreamNotFullfilled = function(r) {
|
|
10697
10743
|
var n = ["DownstreamNotFullfilled", 1, r];
|
|
10698
|
-
return n.__enum__ = mn, n.toString =
|
|
10744
|
+
return n.__enum__ = mn, n.toString = P, n;
|
|
10699
10745
|
};
|
|
10700
10746
|
var ks = function() {
|
|
10701
10747
|
};
|
|
@@ -10773,18 +10819,18 @@ var dh = { exports: {} };
|
|
|
10773
10819
|
}, Rt.memoize = function(r, n, a) {
|
|
10774
10820
|
Rt.memo.h.hasOwnProperty(r) || Rt.memo.set(r, new bt()), Rt.memo.h[r].h[n] = a;
|
|
10775
10821
|
};
|
|
10776
|
-
var
|
|
10822
|
+
var Pe = g.core.BoundingBox = function(r) {
|
|
10777
10823
|
this.max = null, this.min = null, this.dim = 3, this.initialized = !1, r != null && this.addRange(r);
|
|
10778
10824
|
};
|
|
10779
|
-
b["verb.core.BoundingBox"] =
|
|
10825
|
+
b["verb.core.BoundingBox"] = Pe, Pe.__name__ = ["verb", "core", "BoundingBox"], Pe.intervalsOverlap = function(r, n, a, l, u) {
|
|
10780
10826
|
u == null && (u = -1);
|
|
10781
10827
|
var d;
|
|
10782
10828
|
u < -0.5 ? d = rt.TOLERANCE : d = u;
|
|
10783
10829
|
var p = Math.min(r, n) - d, _ = Math.max(r, n) + d, v = Math.min(a, l) - d, w = Math.max(a, l) + d;
|
|
10784
10830
|
return p >= v && p <= w || _ >= v && _ <= w || v >= p && v <= _ || w >= p && w <= _;
|
|
10785
|
-
},
|
|
10831
|
+
}, Pe.prototype = {
|
|
10786
10832
|
fromPoint: function(r) {
|
|
10787
|
-
return new
|
|
10833
|
+
return new Pe([r]);
|
|
10788
10834
|
},
|
|
10789
10835
|
add: function(r) {
|
|
10790
10836
|
if (!this.initialized)
|
|
@@ -10803,13 +10849,13 @@ var dh = { exports: {} };
|
|
|
10803
10849
|
return this;
|
|
10804
10850
|
},
|
|
10805
10851
|
contains: function(r, n) {
|
|
10806
|
-
return n == null && (n = -1), this.initialized ? this.intersects(new
|
|
10852
|
+
return n == null && (n = -1), this.initialized ? this.intersects(new Pe([r]), n) : !1;
|
|
10807
10853
|
},
|
|
10808
10854
|
intersects: function(r, n) {
|
|
10809
10855
|
if (n == null && (n = -1), !this.initialized || !r.initialized) return !1;
|
|
10810
10856
|
for (var a = this.min, l = this.max, u = r.min, d = r.max, p = 0, _ = this.dim; p < _; ) {
|
|
10811
10857
|
var v = p++;
|
|
10812
|
-
if (!
|
|
10858
|
+
if (!Pe.intervalsOverlap(a[v], l[v], u[v], d[v], n)) return !1;
|
|
10813
10859
|
}
|
|
10814
10860
|
return !0;
|
|
10815
10861
|
},
|
|
@@ -10834,9 +10880,9 @@ var dh = { exports: {} };
|
|
|
10834
10880
|
var I = v++;
|
|
10835
10881
|
p.push(Math.min(l[I], d[I])), _.push(Math.max(a[I], u[I]));
|
|
10836
10882
|
}
|
|
10837
|
-
return new
|
|
10883
|
+
return new Pe([_, p]);
|
|
10838
10884
|
},
|
|
10839
|
-
__class__:
|
|
10885
|
+
__class__: Pe
|
|
10840
10886
|
};
|
|
10841
10887
|
var rt = g.core.Constants = function() {
|
|
10842
10888
|
};
|
|
@@ -10978,7 +11024,7 @@ var dh = { exports: {} };
|
|
|
10978
11024
|
return -S.item1;
|
|
10979
11025
|
}), d, p = null;
|
|
10980
11026
|
p = function(S) {
|
|
10981
|
-
for (var
|
|
11027
|
+
for (var E, k = S.dimension, T = l.distanceFunction(r, S.kdPoint.point), L, C = [], B = 0, R = l.dim; B < R; )
|
|
10982
11028
|
B++, C.push(0);
|
|
10983
11029
|
L = C;
|
|
10984
11030
|
for (var D, V, q = function(K, tt) {
|
|
@@ -10991,7 +11037,7 @@ var dh = { exports: {} };
|
|
|
10991
11037
|
(u.size() < n || T < u.peek().item1) && q(S, T);
|
|
10992
11038
|
return;
|
|
10993
11039
|
}
|
|
10994
|
-
S.right == null ?
|
|
11040
|
+
S.right == null ? E = S.left : S.left == null ? E = S.right : r[k] < S.kdPoint.point[k] ? E = S.left : E = S.right, p(E), (u.size() < n || T < u.peek().item1) && q(S, T), (u.size() < n || Math.abs(D) < u.peek().item1) && (E == S.left ? V = S.right : V = S.left, V != null && p(V));
|
|
10995
11041
|
}, d = p;
|
|
10996
11042
|
for (var _ = 0; _ < n; )
|
|
10997
11043
|
_++, u.push(new ee(null, a));
|
|
@@ -11084,7 +11130,7 @@ var dh = { exports: {} };
|
|
|
11084
11130
|
return new ee(new sr(l[0], this._knotTol), new sr(l[1], this._knotTol));
|
|
11085
11131
|
},
|
|
11086
11132
|
boundingBox: function() {
|
|
11087
|
-
return this._boundingBox == null && (this._boundingBox = new
|
|
11133
|
+
return this._boundingBox == null && (this._boundingBox = new Pe(N.dehomogenize1d(this._curve.controlPoints))), this._boundingBox;
|
|
11088
11134
|
},
|
|
11089
11135
|
yield: function() {
|
|
11090
11136
|
return this._curve;
|
|
@@ -11135,7 +11181,7 @@ var dh = { exports: {} };
|
|
|
11135
11181
|
return new ee(new ar(this._polyline, l), new ar(this._polyline, u));
|
|
11136
11182
|
},
|
|
11137
11183
|
boundingBox: function() {
|
|
11138
|
-
return this._boundingBox == null && (this._boundingBox = new
|
|
11184
|
+
return this._boundingBox == null && (this._boundingBox = new Pe(this._polyline.points)), this._boundingBox;
|
|
11139
11185
|
},
|
|
11140
11186
|
yield: function() {
|
|
11141
11187
|
return this._interval.min;
|
|
@@ -11160,7 +11206,7 @@ var dh = { exports: {} };
|
|
|
11160
11206
|
},
|
|
11161
11207
|
boundingBox: function() {
|
|
11162
11208
|
if (this._boundingBox == null) {
|
|
11163
|
-
this._boundingBox = new
|
|
11209
|
+
this._boundingBox = new Pe();
|
|
11164
11210
|
for (var r = 0, n = this._surface.controlPoints; r < n.length; ) {
|
|
11165
11211
|
var a = n[r];
|
|
11166
11212
|
++r, this._boundingBox.addRange(N.dehomogenize1d(a));
|
|
@@ -11190,11 +11236,11 @@ var dh = { exports: {} };
|
|
|
11190
11236
|
}, Ct.mult = function(r, n) {
|
|
11191
11237
|
var a, l, u, d, p, _, v, w;
|
|
11192
11238
|
a = r.length, l = n.length, u = n[0].length, d = [];
|
|
11193
|
-
for (var I = a - 1, S = 0,
|
|
11194
|
-
for (p = [], _ = r[I],
|
|
11195
|
-
for (v = _[l - 1] * n[l - 1][
|
|
11196
|
-
w = S - 1, v += _[S] * n[S][
|
|
11197
|
-
S == 0 && (v += _[0] * n[0][
|
|
11239
|
+
for (var I = a - 1, S = 0, E = 0; I >= 0; ) {
|
|
11240
|
+
for (p = [], _ = r[I], E = u - 1; E >= 0; ) {
|
|
11241
|
+
for (v = _[l - 1] * n[l - 1][E], S = l - 2; S >= 1; )
|
|
11242
|
+
w = S - 1, v += _[S] * n[S][E] + _[w] * n[w][E], S -= 2;
|
|
11243
|
+
S == 0 && (v += _[0] * n[0][E]), p[E] = v, E--;
|
|
11198
11244
|
}
|
|
11199
11245
|
d[I] = p, I--;
|
|
11200
11246
|
}
|
|
@@ -11260,7 +11306,7 @@ var dh = { exports: {} };
|
|
|
11260
11306
|
}
|
|
11261
11307
|
return p;
|
|
11262
11308
|
}, Ct.LU = function(r) {
|
|
11263
|
-
for (var n, a, l, u, d, p, _, v, w, I = [], S = 0,
|
|
11309
|
+
for (var n, a, l, u, d, p, _, v, w, I = [], S = 0, E = r.length; S < E; ) {
|
|
11264
11310
|
var k = S++;
|
|
11265
11311
|
I.push(r[k].slice());
|
|
11266
11312
|
}
|
|
@@ -11292,7 +11338,7 @@ var dh = { exports: {} };
|
|
|
11292
11338
|
var a = r[n[0]], l = r[n[1]], u = r[n[2]], d = m.sub(l, a), p = m.sub(u, a), _ = m.cross(d, p);
|
|
11293
11339
|
return m.mul(1 / m.norm(_), _);
|
|
11294
11340
|
}, re.makeMeshAabb = function(r, n) {
|
|
11295
|
-
for (var a = new
|
|
11341
|
+
for (var a = new Pe(), l = 0; l < n.length; ) {
|
|
11296
11342
|
var u = n[l];
|
|
11297
11343
|
++l, a.add(r.points[r.faces[u][0]]), a.add(r.points[r.faces[u][1]]), a.add(r.points[r.faces[u][2]]);
|
|
11298
11344
|
}
|
|
@@ -11304,8 +11350,8 @@ var dh = { exports: {} };
|
|
|
11304
11350
|
var _ = re.getMinCoordOnAxis(n.points, n.faces[p], l);
|
|
11305
11351
|
u.push(new ee(_, p));
|
|
11306
11352
|
}
|
|
11307
|
-
u.sort(function(
|
|
11308
|
-
var T =
|
|
11353
|
+
u.sort(function(E, k) {
|
|
11354
|
+
var T = E.item0, L = k.item0;
|
|
11309
11355
|
return T == L ? 0 : T > L ? 1 : -1;
|
|
11310
11356
|
});
|
|
11311
11357
|
for (var v = [], w = 0, I = u.length; w < I; ) {
|
|
@@ -11331,7 +11377,7 @@ var dh = { exports: {} };
|
|
|
11331
11377
|
}
|
|
11332
11378
|
return a;
|
|
11333
11379
|
}, re.triangleUVFromPoint = function(r, n, a) {
|
|
11334
|
-
var l = r.faces[n], u = r.points[l[0]], d = r.points[l[1]], p = r.points[l[2]], _ = r.uvs[l[0]], v = r.uvs[l[1]], w = r.uvs[l[2]], I = m.sub(u, a), S = m.sub(d, a),
|
|
11380
|
+
var l = r.faces[n], u = r.points[l[0]], d = r.points[l[1]], p = r.points[l[2]], _ = r.uvs[l[0]], v = r.uvs[l[1]], w = r.uvs[l[2]], I = m.sub(u, a), S = m.sub(d, a), E = m.sub(p, a), k = m.norm(m.cross(m.sub(u, d), m.sub(u, p))), T = m.norm(m.cross(S, E)) / k, L = m.norm(m.cross(E, I)) / k, C = m.norm(m.cross(I, S)) / k;
|
|
11335
11381
|
return m.add(m.mul(T, _), m.add(m.mul(L, v), m.mul(C, w)));
|
|
11336
11382
|
};
|
|
11337
11383
|
var Nr = function(r, n) {
|
|
@@ -11379,13 +11425,13 @@ var dh = { exports: {} };
|
|
|
11379
11425
|
var d = n.length, p = r(n), _ = p, v;
|
|
11380
11426
|
if (isNaN(p)) throw new Q("uncmin: f(x0) is a NaN!");
|
|
11381
11427
|
a = Math.max(a, rt.EPSILON);
|
|
11382
|
-
var w, I, S,
|
|
11428
|
+
var w, I, S, E = Ct.identity(d), k = 0, T = [], L, C, B, R, D, V, q = "";
|
|
11383
11429
|
for (I = l(n); k < u; ) {
|
|
11384
11430
|
if (!m.all(m.finite(I))) {
|
|
11385
11431
|
q = "Gradient has Infinity or NaN";
|
|
11386
11432
|
break;
|
|
11387
11433
|
}
|
|
11388
|
-
if (w = m.neg(Ct.dot(
|
|
11434
|
+
if (w = m.neg(Ct.dot(E, I)), !m.all(m.finite(w))) {
|
|
11389
11435
|
q = "Search direction has Infinity or NaN";
|
|
11390
11436
|
break;
|
|
11391
11437
|
}
|
|
@@ -11408,20 +11454,20 @@ var dh = { exports: {} };
|
|
|
11408
11454
|
q = "maxit reached during line search";
|
|
11409
11455
|
break;
|
|
11410
11456
|
}
|
|
11411
|
-
S = l(L), C = m.sub(S, I), R = m.dot(C, T), B = Ct.dot(
|
|
11457
|
+
S = l(L), C = m.sub(S, I), R = m.dot(C, T), B = Ct.dot(E, C), E = Ct.sub(Ct.add(E, Ct.mul((R + m.dot(C, B)) / (R * R), Ye.tensor(T, T))), Ct.div(Ct.add(Ye.tensor(B, T), Ye.tensor(T, B)), R)), n = L, p = _, I = S, ++k;
|
|
11412
11458
|
}
|
|
11413
|
-
return new qn(n, p, I,
|
|
11459
|
+
return new qn(n, p, I, E, k, q);
|
|
11414
11460
|
}, Ye.numericalGradient = function(r, n) {
|
|
11415
11461
|
var a = n.length, l = r(n);
|
|
11416
11462
|
if (l == NaN) throw new Q("gradient: f(x) is a NaN!");
|
|
11417
|
-
for (var u = n.slice(0), d, p, _ = [], v, w = 1e-3, I, S,
|
|
11463
|
+
for (var u = n.slice(0), d, p, _ = [], v, w = 1e-3, I, S, E, k = 0, T, L, C, B = 0; B < a; )
|
|
11418
11464
|
for (var R = B++, D = Math.max(1e-6 * l, 1e-8); ; ) {
|
|
11419
11465
|
if (++k, k > 20) throw new Q("Numerical gradient fails");
|
|
11420
11466
|
if (u[R] = n[R] + D, d = r(u), u[R] = n[R] - D, p = r(u), u[R] = n[R], isNaN(d) || isNaN(p)) {
|
|
11421
11467
|
D /= 16;
|
|
11422
11468
|
continue;
|
|
11423
11469
|
}
|
|
11424
|
-
if (_[R] = (d - p) / (2 * D), I = n[R] - D, S = n[R],
|
|
11470
|
+
if (_[R] = (d - p) / (2 * D), I = n[R] - D, S = n[R], E = n[R] + D, T = (d - l) / D, L = (l - p) / D, C = m.max([Math.abs(_[R]), Math.abs(l), Math.abs(d), Math.abs(p), Math.abs(I), Math.abs(S), Math.abs(E), 1e-8]), v = Math.min(m.max([Math.abs(T - _[R]), Math.abs(L - _[R]), Math.abs(T - L)]) / C, D / C), v > w) D /= 16;
|
|
11425
11471
|
else break;
|
|
11426
11472
|
}
|
|
11427
11473
|
return _;
|
|
@@ -11690,7 +11736,7 @@ var dh = { exports: {} };
|
|
|
11690
11736
|
var a = yt.rationalSurfaceClosestParam(r, n);
|
|
11691
11737
|
return N.rationalSurfacePoint(r, a[0], a[1]);
|
|
11692
11738
|
}, yt.rationalSurfaceClosestParam = function(r, n) {
|
|
11693
|
-
for (var a = 5, l = 0, u, d = 1e-4, p = 5e-4, _, v = r.knotsU[0], w = $.last(r.knotsU), I = r.knotsV[0], S = $.last(r.knotsV),
|
|
11739
|
+
for (var a = 5, l = 0, u, d = 1e-4, p = 5e-4, _, v = r.knotsU[0], w = $.last(r.knotsU), I = r.knotsV[0], S = $.last(r.knotsV), E = yt.isRationalSurfaceClosed(r), k = yt.isRationalSurfaceClosed(r, !1), T, L = Ot.rationalSurfaceAdaptive(r, new Cr()), C = 1 / 0, B = 0, R = L.points.length; B < R; ) {
|
|
11694
11740
|
var D = B++, V = L.points[D], q = m.normSquared(m.sub(n, V));
|
|
11695
11741
|
q < C && (C = q, T = L.uvs[D]);
|
|
11696
11742
|
}
|
|
@@ -11704,7 +11750,7 @@ var dh = { exports: {} };
|
|
|
11704
11750
|
var j = m.norm(_), K = m.dot(u[1][0], _), tt = m.norm(u[1][0]) * j, et = m.dot(u[0][1], _), it = m.norm(u[0][1]) * j, ht = K / tt, at = et / it, ct = j < d, nt = ht < p, mt = at < p;
|
|
11705
11751
|
if (ct && nt && mt) return T;
|
|
11706
11752
|
var X = H(T, u, _);
|
|
11707
|
-
X[0] < v ?
|
|
11753
|
+
X[0] < v ? E ? X = [w - (X[0] - v), X[1]] : X = [v + rt.EPSILON, X[1]] : X[0] > w && (E ? X = [v + (X[0] - w), X[1]] : X = [w - rt.EPSILON, X[1]]), X[1] < I ? k ? X = [X[0], S - (X[1] - I)] : X = [X[0], I + rt.EPSILON] : X[1] > S && (k ? X = [X[0], I + (X[0] - S)] : X = [X[0], S - rt.EPSILON]);
|
|
11708
11754
|
var ft = m.norm(m.mul(X[0] - T[0], u[1][0])), It = m.norm(m.mul(X[1] - T[1], u[0][1]));
|
|
11709
11755
|
if (ft + It < d) return T;
|
|
11710
11756
|
T = X, l++;
|
|
@@ -11714,8 +11760,8 @@ var dh = { exports: {} };
|
|
|
11714
11760
|
return N.rationalCurvePoint(r, yt.rationalCurveClosestParam(r, n));
|
|
11715
11761
|
}, yt.rationalCurveClosestParam = function(r, n) {
|
|
11716
11762
|
for (var a = 1 / 0, l = 0, u = Ot.rationalCurveRegularSample(r, r.controlPoints.length * r.degree, !0), d = 0, p = u.length - 1; d < p; ) {
|
|
11717
|
-
var _ = d++, v = u[_][0], w = u[_ + 1][0], I = u[_].slice(1), S = u[_ + 1].slice(1),
|
|
11718
|
-
k < a && (a = k, l =
|
|
11763
|
+
var _ = d++, v = u[_][0], w = u[_ + 1][0], I = u[_].slice(1), S = u[_ + 1].slice(1), E = ke.segmentClosestPoint(n, I, S, v, w), k = m.norm(m.sub(n, E.pt));
|
|
11764
|
+
k < a && (a = k, l = E.u);
|
|
11719
11765
|
}
|
|
11720
11766
|
for (var T = 5, L = 0, C, B = 1e-4, R = 5e-4, D, V = r.knots[0], q = $.last(r.knots), J = m.normSquared(m.sub(r.controlPoints[0], $.last(r.controlPoints))) < rt.EPSILON, H = l, j = function(X) {
|
|
11721
11767
|
return N.rationalCurveDerivatives(r, X, 2);
|
|
@@ -11830,11 +11876,11 @@ var dh = { exports: {} };
|
|
|
11830
11876
|
for (var p, _ = [], v = 0, w = u + 1; v < w; )
|
|
11831
11877
|
v++, _.push(n);
|
|
11832
11878
|
p = _;
|
|
11833
|
-
for (var I = [], S = [],
|
|
11879
|
+
for (var I = [], S = [], E = N.knotSpan(u, n, l), k = null, T = 0; T < d.length; ) {
|
|
11834
11880
|
var L = d[T];
|
|
11835
|
-
++T, k = gt.curveKnotRefine(new jt(u, l, L), p), I.push(k.controlPoints.slice(0,
|
|
11881
|
+
++T, k = gt.curveKnotRefine(new jt(u, l, L), p), I.push(k.controlPoints.slice(0, E + 1)), S.push(k.controlPoints.slice(E + 1));
|
|
11836
11882
|
}
|
|
11837
|
-
var C = k.knots.slice(0,
|
|
11883
|
+
var C = k.knots.slice(0, E + u + 2), B = k.knots.slice(E + 1);
|
|
11838
11884
|
return a ? [new te(r.degreeU, u, r.knotsU.slice(), C, I), new te(r.degreeU, u, r.knotsU.slice(), B, S)] : (I = Ct.transpose(I), S = Ct.transpose(S), [new te(u, r.degreeV, C, r.knotsV.slice(), I), new te(u, r.degreeV, B, r.knotsV.slice(), S)]);
|
|
11839
11885
|
}, oe.curveSplit = function(r, n) {
|
|
11840
11886
|
var a = r.degree;
|
|
@@ -11842,14 +11888,14 @@ var dh = { exports: {} };
|
|
|
11842
11888
|
for (var l = r.knots, u, d = [], p = 0, _ = a + 1; p < _; )
|
|
11843
11889
|
p++, d.push(n);
|
|
11844
11890
|
u = d;
|
|
11845
|
-
var v = gt.curveKnotRefine(r, u), w = N.knotSpan(a, n, l), I = v.knots.slice(0, w + a + 2), S = v.knots.slice(w + 1),
|
|
11846
|
-
return [new jt(a, I,
|
|
11891
|
+
var v = gt.curveKnotRefine(r, u), w = N.knotSpan(a, n, l), I = v.knots.slice(0, w + a + 2), S = v.knots.slice(w + 1), E = v.controlPoints.slice(0, w + 1), k = v.controlPoints.slice(w + 1);
|
|
11892
|
+
return [new jt(a, I, E), new jt(a, S, k)];
|
|
11847
11893
|
}, oe.rationalCurveByEqualArcLength = function(r, n) {
|
|
11848
11894
|
var a = yt.rationalCurveArcLength(r), l = a / n;
|
|
11849
11895
|
return oe.rationalCurveByArcLength(r, l);
|
|
11850
11896
|
}, oe.rationalCurveByArcLength = function(r, n) {
|
|
11851
|
-
var a = gt.decomposeCurveIntoBeziers(r), l = a.map(function(
|
|
11852
|
-
return yt.rationalBezierCurveArcLength(
|
|
11897
|
+
var a = gt.decomposeCurveIntoBeziers(r), l = a.map(function(E) {
|
|
11898
|
+
return yt.rationalBezierCurveArcLength(E);
|
|
11853
11899
|
}), u = m.sum(l), d = [new xn(r.knots[0], 0)];
|
|
11854
11900
|
if (n > u) return d;
|
|
11855
11901
|
for (var p = n, _ = 0, v = p, w = 0, I = 0, S; _ < a.length; ) {
|
|
@@ -11878,8 +11924,8 @@ var dh = { exports: {} };
|
|
|
11878
11924
|
for (var u = N.surfaceDerivatives(r, n, a, l), d = N.rational2d(u), p = N.weight2d(u), _ = [], v = d[0][0].length, w = 0, I = l + 1; w < I; ) {
|
|
11879
11925
|
var S = w++;
|
|
11880
11926
|
_.push([]);
|
|
11881
|
-
for (var
|
|
11882
|
-
for (var T =
|
|
11927
|
+
for (var E = 0, k = l - S + 1; E < k; ) {
|
|
11928
|
+
for (var T = E++, L = d[S][T], C = 1, B = T + 1; C < B; ) {
|
|
11883
11929
|
var R = C++;
|
|
11884
11930
|
m.subMulMutate(L, Rt.get(T, R) * p[0][R], _[S][T - R]);
|
|
11885
11931
|
}
|
|
@@ -11901,7 +11947,7 @@ var dh = { exports: {} };
|
|
|
11901
11947
|
}, N.rationalCurveDerivatives = function(r, n, a) {
|
|
11902
11948
|
a == null && (a = 1);
|
|
11903
11949
|
for (var l = N.curveDerivatives(r, n, a), u = N.rational1d(l), d = N.weight1d(l), p = [], _ = 0, v = a + 1; _ < v; ) {
|
|
11904
|
-
for (var w = _++, I = u[w], S = 1,
|
|
11950
|
+
for (var w = _++, I = u[w], S = 1, E = w + 1; S < E; ) {
|
|
11905
11951
|
var k = S++;
|
|
11906
11952
|
m.subMulMutate(I, Rt.get(w, k) * d[k], p[w - k]);
|
|
11907
11953
|
}
|
|
@@ -11916,11 +11962,11 @@ var dh = { exports: {} };
|
|
|
11916
11962
|
}, N.surfaceDerivativesGivenNM = function(r, n, a, l, u, d) {
|
|
11917
11963
|
var p = a.degreeU, _ = a.degreeV, v = a.controlPoints, w = a.knotsU, I = a.knotsV;
|
|
11918
11964
|
if (!N.areValidRelations(p, v.length, w.length) || !N.areValidRelations(_, v[0].length, I.length)) throw new Q("Invalid relations between control points, knot vector, and n");
|
|
11919
|
-
var S = v[0][0].length,
|
|
11920
|
-
d < p ?
|
|
11965
|
+
var S = v[0][0].length, E;
|
|
11966
|
+
d < p ? E = d : E = p;
|
|
11921
11967
|
var k;
|
|
11922
11968
|
d < _ ? k = d : k = _;
|
|
11923
|
-
for (var T = m.zeros3d(d + 1, d + 1, S), L = N.knotSpanGivenN(r, p, l, w), C = N.knotSpanGivenN(n, _, u, I), B = N.derivativeBasisFunctionsGivenNI(L, l, p, r, w), R = N.derivativeBasisFunctionsGivenNI(C, u, _, n, I), D = m.zeros2d(_ + 1, S), V = 0, q = 0, J =
|
|
11969
|
+
for (var T = m.zeros3d(d + 1, d + 1, S), L = N.knotSpanGivenN(r, p, l, w), C = N.knotSpanGivenN(n, _, u, I), B = N.derivativeBasisFunctionsGivenNI(L, l, p, r, w), R = N.derivativeBasisFunctionsGivenNI(C, u, _, n, I), D = m.zeros2d(_ + 1, S), V = 0, q = 0, J = E + 1; q < J; ) {
|
|
11924
11970
|
for (var H = q++, j = 0, K = _ + 1; j < K; ) {
|
|
11925
11971
|
var tt = j++;
|
|
11926
11972
|
D[tt] = m.zeros1d(S);
|
|
@@ -11947,9 +11993,9 @@ var dh = { exports: {} };
|
|
|
11947
11993
|
}, N.surfacePointGivenNM = function(r, n, a, l, u) {
|
|
11948
11994
|
var d = a.degreeU, p = a.degreeV, _ = a.controlPoints, v = a.knotsU, w = a.knotsV;
|
|
11949
11995
|
if (!N.areValidRelations(d, _.length, v.length) || !N.areValidRelations(p, _[0].length, w.length)) throw new Q("Invalid relations between control points, knot vector, and n");
|
|
11950
|
-
for (var I = _[0][0].length, S = N.knotSpanGivenN(r, d, l, v),
|
|
11996
|
+
for (var I = _[0][0].length, S = N.knotSpanGivenN(r, d, l, v), E = N.knotSpanGivenN(n, p, u, w), k = N.basisFunctionsGivenKnotSpanIndex(S, l, d, v), T = N.basisFunctionsGivenKnotSpanIndex(E, u, p, w), L = S - d, C = E, B = m.zeros1d(I), R = m.zeros1d(I), D = 0, V = p + 1; D < V; ) {
|
|
11951
11997
|
var q = D++;
|
|
11952
|
-
R = m.zeros1d(I), C =
|
|
11998
|
+
R = m.zeros1d(I), C = E - p + q;
|
|
11953
11999
|
for (var J = 0, H = d + 1; J < H; ) {
|
|
11954
12000
|
var j = J++;
|
|
11955
12001
|
m.addMulMutate(R, k[j], _[L + j][C]);
|
|
@@ -11958,19 +12004,19 @@ var dh = { exports: {} };
|
|
|
11958
12004
|
}
|
|
11959
12005
|
return B;
|
|
11960
12006
|
}, N.curveRegularSamplePoints = function(r, n) {
|
|
11961
|
-
for (var a = N.curveDerivatives(r, r.knots[0], r.degree), l = 1 / n, u = l * l, d = a[0], p = m.mul(l, a[1]), _ = m.mul(u * 0.5, a[2]), v = m.mul(u * l * 0.5, a[3]), w = m.add(_, _), I = m.add(v, v), S = m.mul(0.3333333333333333, v),
|
|
11962
|
-
k++,
|
|
11963
|
-
return
|
|
12007
|
+
for (var a = N.curveDerivatives(r, r.knots[0], r.degree), l = 1 / n, u = l * l, d = a[0], p = m.mul(l, a[1]), _ = m.mul(u * 0.5, a[2]), v = m.mul(u * l * 0.5, a[3]), w = m.add(_, _), I = m.add(v, v), S = m.mul(0.3333333333333333, v), E = [], k = 0, T = n + 1; k < T; )
|
|
12008
|
+
k++, E.push(N.dehomogenize(d)), m.addAllMutate([d, p, _, S]), m.addAllMutate([p, w, v]), m.addAllMutate([w, I]), m.addAllMutate([_, v]);
|
|
12009
|
+
return E;
|
|
11964
12010
|
}, N.curveRegularSamplePoints2 = function(r, n) {
|
|
11965
|
-
for (var a = N.curveDerivatives(r, r.knots[0], r.degree), l = 1 / n, u = l * l, d = a[0], p = m.mul(l, a[1]), _ = m.mul(u * 0.5, a[2]), v = m.mul(u * l * 0.5, a[3]), w = m.add(_, _), I = m.add(v, v), S = m.mul(0.3333333333333333, v),
|
|
11966
|
-
k++,
|
|
11967
|
-
return
|
|
12011
|
+
for (var a = N.curveDerivatives(r, r.knots[0], r.degree), l = 1 / n, u = l * l, d = a[0], p = m.mul(l, a[1]), _ = m.mul(u * 0.5, a[2]), v = m.mul(u * l * 0.5, a[3]), w = m.add(_, _), I = m.add(v, v), S = m.mul(0.3333333333333333, v), E = [], k = 0, T = n + 1; k < T; )
|
|
12012
|
+
k++, E.push(N.dehomogenize(d)), m.addAllMutate([d, p, _, S]), m.addAllMutate([p, w, v]), m.addAllMutate([w, I]), m.addAllMutate([_, v]);
|
|
12013
|
+
return E;
|
|
11968
12014
|
}, N.rationalSurfaceRegularSampleDerivatives = function(r, n, a, l) {
|
|
11969
12015
|
for (var u = N.surfaceRegularSampleDerivatives(r, n, a, l), d = [], p = n + 1, _ = a + 1, v = l + 1, w = 0; w < p; ) {
|
|
11970
12016
|
var I = w++, S = [];
|
|
11971
12017
|
d.push(S);
|
|
11972
|
-
for (var
|
|
11973
|
-
for (var k =
|
|
12018
|
+
for (var E = 0; E < _; ) {
|
|
12019
|
+
for (var k = E++, T = u[I][k], L = N.rational2d(T), C = N.weight2d(T), B = [], R = L[0][0].length, D = 0; D < v; ) {
|
|
11974
12020
|
var V = D++;
|
|
11975
12021
|
B.push([]);
|
|
11976
12022
|
for (var q = 0, J = v - V; q < J; ) {
|
|
@@ -11997,12 +12043,12 @@ var dh = { exports: {} };
|
|
|
11997
12043
|
}, N.surfaceRegularSampleDerivatives = function(r, n, a, l) {
|
|
11998
12044
|
var u = r.degreeU, d = r.degreeV, p = r.controlPoints, _ = r.knotsU, v = r.knotsV, w = p[0][0].length;
|
|
11999
12045
|
($.last(_) - _[0]) / n, ($.last(v) - v[0]) / a;
|
|
12000
|
-
for (var I = N.regularlySpacedDerivativeBasisFunctions(u, _, n), S = I.item0,
|
|
12046
|
+
for (var I = N.regularlySpacedDerivativeBasisFunctions(u, _, n), S = I.item0, E = I.item1, k = N.regularlySpacedDerivativeBasisFunctions(d, v, a), T = k.item0, L = k.item1, C = [], B = n + 1, R = a + 1, D = 0; D < B; ) {
|
|
12001
12047
|
var V = D++, q = [];
|
|
12002
12048
|
C.push(q);
|
|
12003
12049
|
for (var J = 0; J < R; ) {
|
|
12004
12050
|
var H = J++;
|
|
12005
|
-
q.push(N.surfaceDerivativesGivenBasesKnotSpans(u, d, p, S[V], T[H],
|
|
12051
|
+
q.push(N.surfaceDerivativesGivenBasesKnotSpans(u, d, p, S[V], T[H], E[V], L[H], w, l));
|
|
12006
12052
|
}
|
|
12007
12053
|
}
|
|
12008
12054
|
return C;
|
|
@@ -12011,7 +12057,7 @@ var dh = { exports: {} };
|
|
|
12011
12057
|
}, N.surfaceRegularSamplePoints = function(r, n, a) {
|
|
12012
12058
|
var l = r.degreeU, u = r.degreeV, d = r.controlPoints, p = r.knotsU, _ = r.knotsV, v = d[0][0].length;
|
|
12013
12059
|
($.last(p) - p[0]) / n, ($.last(_) - _[0]) / a;
|
|
12014
|
-
for (var w = N.regularlySpacedBasisFunctions(l, p, n), I = w.item0, S = w.item1,
|
|
12060
|
+
for (var w = N.regularlySpacedBasisFunctions(l, p, n), I = w.item0, S = w.item1, E = N.regularlySpacedBasisFunctions(u, _, a), k = E.item0, T = E.item1, L = [], C = n + 1, B = a + 1, R = 0; R < C; ) {
|
|
12015
12061
|
var D = R++, V = [];
|
|
12016
12062
|
L.push(V);
|
|
12017
12063
|
for (var q = 0; q < B; ) {
|
|
@@ -12033,8 +12079,8 @@ var dh = { exports: {} };
|
|
|
12033
12079
|
}
|
|
12034
12080
|
return new ee(p, d);
|
|
12035
12081
|
}, N.surfacePointGivenBasesKnotSpans = function(r, n, a, l, u, d, p, _) {
|
|
12036
|
-
for (var v = m.zeros1d(_), w, I = l - r, S = u - n,
|
|
12037
|
-
var T =
|
|
12082
|
+
for (var v = m.zeros1d(_), w, I = l - r, S = u - n, E = 0, k = n + 1; E < k; ) {
|
|
12083
|
+
var T = E++;
|
|
12038
12084
|
w = m.zeros1d(_);
|
|
12039
12085
|
for (var L = 0, C = r + 1; L < C; ) {
|
|
12040
12086
|
var B = L++;
|
|
@@ -12048,7 +12094,7 @@ var dh = { exports: {} };
|
|
|
12048
12094
|
v < r ? I = v : I = r;
|
|
12049
12095
|
var S;
|
|
12050
12096
|
v < n ? S = v : S = n;
|
|
12051
|
-
for (var
|
|
12097
|
+
for (var E = m.zeros3d(I + 1, S + 1, w), k = m.zeros2d(n + 1, w), T = 0, L = 0, C = I + 1; L < C; ) {
|
|
12052
12098
|
for (var B = L++, R = 0, D = n + 1; R < D; ) {
|
|
12053
12099
|
var V = R++;
|
|
12054
12100
|
k[V] = m.zeros1d(w);
|
|
@@ -12061,14 +12107,14 @@ var dh = { exports: {} };
|
|
|
12061
12107
|
j < S ? T = j : T = S;
|
|
12062
12108
|
for (var K = 0, tt = T + 1; K < tt; ) {
|
|
12063
12109
|
var et = K++;
|
|
12064
|
-
|
|
12110
|
+
E[B][et] = m.zeros1d(w);
|
|
12065
12111
|
for (var it = 0, ht = n + 1; it < ht; ) {
|
|
12066
12112
|
var at = it++;
|
|
12067
|
-
m.addMulMutate(
|
|
12113
|
+
m.addMulMutate(E[B][et], p[et][at], k[at]);
|
|
12068
12114
|
}
|
|
12069
12115
|
}
|
|
12070
12116
|
}
|
|
12071
|
-
return
|
|
12117
|
+
return E;
|
|
12072
12118
|
}, N.curveDerivatives = function(r, n, a) {
|
|
12073
12119
|
var l = r.knots.length - r.degree - 2;
|
|
12074
12120
|
return N.curveDerivativesGivenN(l, r, n, a);
|
|
@@ -12077,8 +12123,8 @@ var dh = { exports: {} };
|
|
|
12077
12123
|
if (!N.areValidRelations(u, d.length, p.length)) throw new Q("Invalid relations between control points, knot vector, and n");
|
|
12078
12124
|
var _ = d[0].length, v;
|
|
12079
12125
|
l < u ? v = l : v = u;
|
|
12080
|
-
for (var w = m.zeros2d(l + 1, _), I = N.knotSpanGivenN(r, u, a, p), S = N.derivativeBasisFunctionsGivenNI(I, a, u, v, p),
|
|
12081
|
-
for (var T =
|
|
12126
|
+
for (var w = m.zeros2d(l + 1, _), I = N.knotSpanGivenN(r, u, a, p), S = N.derivativeBasisFunctionsGivenNI(I, a, u, v, p), E = 0, k = v + 1; E < k; )
|
|
12127
|
+
for (var T = E++, L = 0, C = u + 1; L < C; ) {
|
|
12082
12128
|
var B = L++;
|
|
12083
12129
|
m.addMulMutate(w[T], S[T][B], d[I - u + B]);
|
|
12084
12130
|
}
|
|
@@ -12102,7 +12148,7 @@ var dh = { exports: {} };
|
|
|
12102
12148
|
return N.volumePointGivenNML(r, u, d, p, n, a, l);
|
|
12103
12149
|
}, N.volumePointGivenNML = function(r, n, a, l, u, d, p) {
|
|
12104
12150
|
if (!N.areValidRelations(r.degreeU, r.controlPoints.length, r.knotsU.length) || !N.areValidRelations(r.degreeV, r.controlPoints[0].length, r.knotsV.length) || !N.areValidRelations(r.degreeW, r.controlPoints[0][0].length, r.knotsW.length)) throw new Q("Invalid relations between control points and knot vector");
|
|
12105
|
-
for (var _ = r.controlPoints, v = r.degreeU, w = r.degreeV, I = r.degreeW, S = r.knotsU,
|
|
12151
|
+
for (var _ = r.controlPoints, v = r.degreeU, w = r.degreeV, I = r.degreeW, S = r.knotsU, E = r.knotsV, k = r.knotsW, T = _[0][0][0].length, L = N.knotSpanGivenN(n, v, u, S), C = N.knotSpanGivenN(a, w, d, E), B = N.knotSpanGivenN(l, I, p, k), R = N.basisFunctionsGivenKnotSpanIndex(L, u, v, S), D = N.basisFunctionsGivenKnotSpanIndex(C, d, w, E), V = N.basisFunctionsGivenKnotSpanIndex(B, p, I, k), q = L - v, J = m.zeros1d(T), H = m.zeros1d(T), j = m.zeros1d(T), K = 0, tt = I + 1; K < tt; ) {
|
|
12106
12152
|
var et = K++;
|
|
12107
12153
|
j = m.zeros1d(T);
|
|
12108
12154
|
for (var it = B - I + et, ht = 0, at = w + 1; ht < at; ) {
|
|
@@ -12124,13 +12170,13 @@ var dh = { exports: {} };
|
|
|
12124
12170
|
var d = m.zeros2d(a + 1, a + 1), p = m.zeros1d(a + 1), _ = m.zeros1d(a + 1), v = 0, w = 0;
|
|
12125
12171
|
d[0][0] = 1;
|
|
12126
12172
|
for (var I = 1, S = a + 1; I < S; ) {
|
|
12127
|
-
var
|
|
12128
|
-
p[
|
|
12129
|
-
for (var k = 0; k <
|
|
12173
|
+
var E = I++;
|
|
12174
|
+
p[E] = n - u[r + 1 - E], _[E] = u[r + E] - n, v = 0;
|
|
12175
|
+
for (var k = 0; k < E; ) {
|
|
12130
12176
|
var T = k++;
|
|
12131
|
-
d[
|
|
12177
|
+
d[E][T] = _[T + 1] + p[E - T], w = d[T][E - 1] / d[E][T], d[T][E] = v + _[T + 1] * w, v = p[E - T] * w;
|
|
12132
12178
|
}
|
|
12133
|
-
d[
|
|
12179
|
+
d[E][E] = v;
|
|
12134
12180
|
}
|
|
12135
12181
|
for (var L = m.zeros2d(l + 1, a + 1), C = m.zeros2d(2, a + 1), B = 0, R = 1, D = 0, V = 0, q = 0, J = 0, H = 0, j = 0, K = a + 1; j < K; ) {
|
|
12136
12182
|
var tt = j++;
|
|
@@ -12168,8 +12214,8 @@ var dh = { exports: {} };
|
|
|
12168
12214
|
for (var w = 1, I = a + 1; w < I; ) {
|
|
12169
12215
|
var S = w++;
|
|
12170
12216
|
d[S] = n - l[r + 1 - S], p[S] = l[r + S] - n, _ = 0;
|
|
12171
|
-
for (var
|
|
12172
|
-
var k =
|
|
12217
|
+
for (var E = 0; E < S; ) {
|
|
12218
|
+
var k = E++;
|
|
12173
12219
|
v = u[k] / (p[k + 1] + d[S - k]), u[k] = _ + p[k + 1] * v, _ = d[S - k] * v;
|
|
12174
12220
|
}
|
|
12175
12221
|
u[S] = _;
|
|
@@ -12214,8 +12260,8 @@ var dh = { exports: {} };
|
|
|
12214
12260
|
var w = v++, I = [];
|
|
12215
12261
|
p = r[w], d = _[w];
|
|
12216
12262
|
for (var S = 0; S < l; ) {
|
|
12217
|
-
var
|
|
12218
|
-
I.push(p[
|
|
12263
|
+
var E = S++;
|
|
12264
|
+
I.push(p[E] * d);
|
|
12219
12265
|
}
|
|
12220
12266
|
I.push(d), u.push(I);
|
|
12221
12267
|
}
|
|
@@ -12248,12 +12294,12 @@ var dh = { exports: {} };
|
|
|
12248
12294
|
}), 3);
|
|
12249
12295
|
});
|
|
12250
12296
|
}, lt.surfacesAtPointWithEstimate = function(r, n, a, l, u) {
|
|
12251
|
-
var d, p, _, v, w, I, S,
|
|
12297
|
+
var d, p, _, v, w, I, S, E, k, T, L, C, B, R = 5, D = 0;
|
|
12252
12298
|
do {
|
|
12253
|
-
if (d = N.rationalSurfaceDerivatives(r, a[0], a[1], 1), p = d[0][0], v = d[1][0], w = d[0][1], _ = m.normalized(m.cross(v, w)), I = m.dot(_, p), S = N.rationalSurfaceDerivatives(n, l[0], l[1], 1),
|
|
12299
|
+
if (d = N.rationalSurfaceDerivatives(r, a[0], a[1], 1), p = d[0][0], v = d[1][0], w = d[0][1], _ = m.normalized(m.cross(v, w)), I = m.dot(_, p), S = N.rationalSurfaceDerivatives(n, l[0], l[1], 1), E = S[0][0], T = S[1][0], L = S[0][1], k = m.normalized(m.cross(T, L)), C = m.dot(k, E), B = m.distSquared(p, E), B < u * u) break;
|
|
12254
12300
|
var V = m.normalized(m.cross(_, k)), q = m.dot(V, p), J = lt.threePlanes(_, I, k, C, V, q);
|
|
12255
12301
|
if (J == null) throw new Q("panic!");
|
|
12256
|
-
var H = m.sub(J, p), j = m.sub(J,
|
|
12302
|
+
var H = m.sub(J, p), j = m.sub(J, E), K = m.cross(v, _), tt = m.cross(w, _), et = m.cross(T, k), it = m.cross(L, k), ht = m.dot(tt, H) / m.dot(tt, v), at = m.dot(K, H) / m.dot(K, w), ct = m.dot(it, j) / m.dot(it, T), nt = m.dot(et, j) / m.dot(et, L);
|
|
12257
12303
|
a = m.add([ht, at], a), l = m.add([ct, nt], l), D++;
|
|
12258
12304
|
} while (D < R);
|
|
12259
12305
|
return new Vn(a, l, p, B);
|
|
@@ -12266,14 +12312,14 @@ var dh = { exports: {} };
|
|
|
12266
12312
|
}).filter(function(p) {
|
|
12267
12313
|
return m.distSquared(p.min.point, p.max.point) > rt.EPSILON;
|
|
12268
12314
|
}), function(p, _) {
|
|
12269
|
-
var v = m.sub(p.min.uv0, _.min.uv0), w = m.dot(v, v), I = m.sub(p.max.uv0, _.max.uv0), S = m.dot(I, I),
|
|
12315
|
+
var v = m.sub(p.min.uv0, _.min.uv0), w = m.dot(v, v), I = m.sub(p.max.uv0, _.max.uv0), S = m.dot(I, I), E = m.sub(p.min.uv0, _.max.uv0), k = m.dot(E, E), T = m.sub(p.max.uv0, _.min.uv0), L = m.dot(T, T);
|
|
12270
12316
|
return w < rt.EPSILON && S < rt.EPSILON || k < rt.EPSILON && L < rt.EPSILON;
|
|
12271
12317
|
});
|
|
12272
12318
|
return lt.makeMeshIntersectionPolylines(d);
|
|
12273
12319
|
}, lt.meshSlices = function(r, n, a, l) {
|
|
12274
|
-
for (var u = new Nr(r), d = u.boundingBox(), p = d.min[0], _ = d.min[1], v = d.max[0], w = d.max[1], I = m.span(n, a, l), S = [],
|
|
12275
|
-
var k = I[
|
|
12276
|
-
++
|
|
12320
|
+
for (var u = new Nr(r), d = u.boundingBox(), p = d.min[0], _ = d.min[1], v = d.max[0], w = d.max[1], I = m.span(n, a, l), S = [], E = 0; E < I.length; ) {
|
|
12321
|
+
var k = I[E];
|
|
12322
|
+
++E;
|
|
12277
12323
|
var T = [[p, _, k], [v, _, k], [v, w, k], [p, w, k]], L = [[0, 0], [1, 0], [1, 1], [0, 1]], C = [[0, 1, 2], [0, 2, 3]], B = new qe(C, T, null, L);
|
|
12278
12324
|
S.push(lt.meshes(r, B, u));
|
|
12279
12325
|
}
|
|
@@ -12299,14 +12345,14 @@ var dh = { exports: {} };
|
|
|
12299
12345
|
return R.adj == null;
|
|
12300
12346
|
});
|
|
12301
12347
|
I.length == 0 && (I = u);
|
|
12302
|
-
for (var S = [],
|
|
12348
|
+
for (var S = [], E = 0, k = !1; I.length != 0; ) {
|
|
12303
12349
|
var T = I.pop();
|
|
12304
12350
|
if (!T.visited) {
|
|
12305
|
-
for (var L = [], C = T; C != null && !(C.visited || (C.visited = !0, C.opp.visited = !0, L.push(C),
|
|
12351
|
+
for (var L = [], C = T; C != null && !(C.visited || (C.visited = !0, C.opp.visited = !0, L.push(C), E += 2, C = C.opp.adj, C == T)); )
|
|
12306
12352
|
;
|
|
12307
12353
|
L.length > 0 && (L.push(L[L.length - 1].opp), S.push(L));
|
|
12308
12354
|
}
|
|
12309
|
-
if (I.length == 0 && u.length > 0 && (k ||
|
|
12355
|
+
if (I.length == 0 && u.length > 0 && (k || E < u.length)) {
|
|
12310
12356
|
k = !0;
|
|
12311
12357
|
var B = u.pop();
|
|
12312
12358
|
I.push(B);
|
|
@@ -12330,7 +12376,7 @@ var dh = { exports: {} };
|
|
|
12330
12376
|
a == null && (a = 1e-3), l != null ? l = l : l = new sr(r), u != null ? u = u : u = new Tr(n);
|
|
12331
12377
|
var d = lt.boundingBoxTrees(l, u, a);
|
|
12332
12378
|
return $.unique(d.map(function(p) {
|
|
12333
|
-
var _ = p.item0, v = p.item1, w = $.first(_.knots), I = $.last(_.knots), S = (w + I) / 2,
|
|
12379
|
+
var _ = p.item0, v = p.item1, w = $.first(_.knots), I = $.last(_.knots), S = (w + I) / 2, E = $.first(v.knotsU), k = $.last(v.knotsU), T = $.first(v.knotsV), L = $.last(v.knotsV), C = [(E + k) / 2, (T + L) / 2];
|
|
12334
12380
|
return lt.curveAndSurfaceWithEstimate(_, v, [S].concat(C), a);
|
|
12335
12381
|
}).filter(function(p) {
|
|
12336
12382
|
return m.distSquared(p.curvePoint, p.surfacePoint) < a * a;
|
|
@@ -12343,8 +12389,8 @@ var dh = { exports: {} };
|
|
|
12343
12389
|
var w = N.rationalCurvePoint(r, v[0]), I = N.rationalSurfacePoint(n, v[1], v[2]), S = m.sub(w, I);
|
|
12344
12390
|
return m.dot(S, S);
|
|
12345
12391
|
}, d = function(v) {
|
|
12346
|
-
var w = N.rationalCurveDerivatives(r, v[0], 1), I = N.rationalSurfaceDerivatives(n, v[1], v[2], 1), S = m.sub(I[0][0], w[0]),
|
|
12347
|
-
return [2 * m.dot(
|
|
12392
|
+
var w = N.rationalCurveDerivatives(r, v[0], 1), I = N.rationalSurfaceDerivatives(n, v[1], v[2], 1), S = m.sub(I[0][0], w[0]), E = m.mul(-1, w[1]), k = I[1][0], T = I[0][1];
|
|
12393
|
+
return [2 * m.dot(E, S), 2 * m.dot(k, S), 2 * m.dot(T, S)];
|
|
12348
12394
|
}, p = Ye.uncmin(u, a, l * l, d), _ = p.solution;
|
|
12349
12395
|
return new Dn(_[0], [_[1], _[2]], N.rationalCurvePoint(r, _[0]), N.rationalSurfacePoint(n, _[1], _[2]));
|
|
12350
12396
|
}, lt.polylineAndMesh = function(r, n, a) {
|
|
@@ -12353,8 +12399,8 @@ var dh = { exports: {} };
|
|
|
12353
12399
|
++d;
|
|
12354
12400
|
var _ = p.item0, v = p.item1, w = lt.segmentWithTriangle(r.points[_], r.points[_ + 1], n.points, n.faces[v]);
|
|
12355
12401
|
if (w != null) {
|
|
12356
|
-
var I = w.point, S = m.lerp(w.p, [r.params[_]], [r.params[_ + 1]])[0],
|
|
12357
|
-
u.push(new Un(I, S,
|
|
12402
|
+
var I = w.point, S = m.lerp(w.p, [r.params[_]], [r.params[_ + 1]])[0], E = re.triangleUVFromPoint(n, v, I);
|
|
12403
|
+
u.push(new Un(I, S, E, _, v));
|
|
12358
12404
|
}
|
|
12359
12405
|
}
|
|
12360
12406
|
return u;
|
|
@@ -12378,8 +12424,8 @@ var dh = { exports: {} };
|
|
|
12378
12424
|
l.push(S.item1), u.push(_), l.push(S.item0), u.push(_);
|
|
12379
12425
|
continue;
|
|
12380
12426
|
}
|
|
12381
|
-
var
|
|
12382
|
-
l.push(
|
|
12427
|
+
var E = p.split(), k = _.split();
|
|
12428
|
+
l.push(E.item1), u.push(k.item1), l.push(E.item1), u.push(k.item0), l.push(E.item0), u.push(k.item1), l.push(E.item0), u.push(k.item0);
|
|
12383
12429
|
}
|
|
12384
12430
|
}
|
|
12385
12431
|
return d;
|
|
@@ -12393,11 +12439,11 @@ var dh = { exports: {} };
|
|
|
12393
12439
|
return Math.abs(u.u0 - d.u0) < a * 5;
|
|
12394
12440
|
});
|
|
12395
12441
|
}, lt.curvesWithEstimate = function(r, n, a, l, u) {
|
|
12396
|
-
var d = function(
|
|
12397
|
-
var k = N.rationalCurvePoint(r,
|
|
12442
|
+
var d = function(E) {
|
|
12443
|
+
var k = N.rationalCurvePoint(r, E[0]), T = N.rationalCurvePoint(n, E[1]), L = m.sub(k, T);
|
|
12398
12444
|
return m.dot(L, L);
|
|
12399
|
-
}, p = function(
|
|
12400
|
-
var k = N.rationalCurveDerivatives(r,
|
|
12445
|
+
}, p = function(E) {
|
|
12446
|
+
var k = N.rationalCurveDerivatives(r, E[0], 1), T = N.rationalCurveDerivatives(n, E[1], 1), L = m.sub(k[0], T[0]), C = k[1], B = m.mul(-1, T[1]);
|
|
12401
12447
|
return [2 * m.dot(C, L), 2 * m.dot(B, L)];
|
|
12402
12448
|
}, _ = Ye.uncmin(d, [a, l], u * u, p), v = _.solution[0], w = _.solution[1], I = N.rationalCurvePoint(r, v), S = N.rationalCurvePoint(n, w);
|
|
12403
12449
|
return new Gr(I, S, v, w);
|
|
@@ -12406,13 +12452,13 @@ var dh = { exports: {} };
|
|
|
12406
12452
|
if (I == null) return null;
|
|
12407
12453
|
var S = lt.clipRayInCoplanarTriangle(I, r, n);
|
|
12408
12454
|
if (S == null) return null;
|
|
12409
|
-
var
|
|
12410
|
-
if (
|
|
12411
|
-
var k = lt.mergeTriangleClipIntervals(S,
|
|
12455
|
+
var E = lt.clipRayInCoplanarTriangle(I, a, l);
|
|
12456
|
+
if (E == null) return null;
|
|
12457
|
+
var k = lt.mergeTriangleClipIntervals(S, E, r, n, a, l);
|
|
12412
12458
|
return k == null ? null : new we(new Mr(k.min.uv0, k.min.uv1, k.min.point, n, l), new Mr(k.max.uv0, k.max.uv1, k.max.point, n, l));
|
|
12413
12459
|
}, lt.clipRayInCoplanarTriangle = function(r, n, a) {
|
|
12414
|
-
for (var l = n.faces[a], u = [n.points[l[0]], n.points[l[1]], n.points[l[2]]], d = [n.uvs[l[0]], n.uvs[l[1]], n.uvs[l[2]]], p = [m.sub(d[1], d[0]), m.sub(d[2], d[1]), m.sub(d[0], d[2])], _ = [m.sub(u[1], u[0]), m.sub(u[2], u[1]), m.sub(u[0], u[2])], v = _.map(m.normalized), w = _.map(m.norm), I = null, S = null,
|
|
12415
|
-
var k =
|
|
12460
|
+
for (var l = n.faces[a], u = [n.points[l[0]], n.points[l[1]], n.points[l[2]]], d = [n.uvs[l[0]], n.uvs[l[1]], n.uvs[l[2]]], p = [m.sub(d[1], d[0]), m.sub(d[2], d[1]), m.sub(d[0], d[2])], _ = [m.sub(u[1], u[0]), m.sub(u[2], u[1]), m.sub(u[0], u[2])], v = _.map(m.normalized), w = _.map(m.norm), I = null, S = null, E = 0; E < 3; ) {
|
|
12461
|
+
var k = E++, T = u[k], L = v[k], C = lt.rays(T, L, r.origin, r.dir);
|
|
12416
12462
|
if (C != null) {
|
|
12417
12463
|
var B = C.u0, R = C.u1;
|
|
12418
12464
|
B < -rt.EPSILON || B > w[k] + rt.EPSILON || ((I == null || R < I.u) && (I = new fn(R, m.onRay(r.origin, r.dir, R), m.onRay(d[k], p[k], B / w[k]))), (S == null || R > S.u) && (S = new fn(R, m.onRay(r.origin, r.dir, R), m.onRay(d[k], p[k], B / w[k]))));
|
|
@@ -12432,9 +12478,9 @@ var dh = { exports: {} };
|
|
|
12432
12478
|
if (m.dot(u, u) < rt.EPSILON) return null;
|
|
12433
12479
|
var d = 0, p = Math.abs(u[0]), _ = Math.abs(u[1]), v = Math.abs(u[2]);
|
|
12434
12480
|
_ > p && (d = 1, p = _), v > p && (d = 2, p = v);
|
|
12435
|
-
var w, I, S,
|
|
12436
|
-
d == 0 ? (w = n[1], I = n[2], S = l[1],
|
|
12437
|
-
var k = -m.dot(r, n), T = -m.dot(a, l), L = w *
|
|
12481
|
+
var w, I, S, E;
|
|
12482
|
+
d == 0 ? (w = n[1], I = n[2], S = l[1], E = l[2]) : d == 1 ? (w = n[0], I = n[2], S = l[0], E = l[2]) : (w = n[0], I = n[1], S = l[0], E = l[1]);
|
|
12483
|
+
var k = -m.dot(r, n), T = -m.dot(a, l), L = w * E - I * S, C = (I * T - k * E) / L, B = (k * S - w * T) / L, R;
|
|
12438
12484
|
return d == 0 ? R = [0, C, B] : d == 1 ? R = [C, 0, B] : R = [C, B, 0], new pn(R, m.normalized(u));
|
|
12439
12485
|
}, lt.threePlanes = function(r, n, a, l, u, d) {
|
|
12440
12486
|
var p = m.cross(a, u), _ = m.dot(r, p);
|
|
@@ -12452,19 +12498,19 @@ var dh = { exports: {} };
|
|
|
12452
12498
|
}, lt.segments = function(r, n, a, l, u) {
|
|
12453
12499
|
var d = m.sub(n, r), p = Math.sqrt(m.dot(d, d)), _ = m.mul(1 / p, d), v = m.sub(l, a), w = Math.sqrt(m.dot(v, v)), I = m.mul(1 / w, v), S = lt.rays(r, _, a, I);
|
|
12454
12500
|
if (S != null) {
|
|
12455
|
-
var
|
|
12456
|
-
if (C < u * u) return new Gr(T, L,
|
|
12501
|
+
var E = Math.min(Math.max(0, S.u0 / p), 1), k = Math.min(Math.max(0, S.u1 / w), 1), T = m.onRay(r, d, E), L = m.onRay(a, v, k), C = m.distSquared(T, L);
|
|
12502
|
+
if (C < u * u) return new Gr(T, L, E, k);
|
|
12457
12503
|
}
|
|
12458
12504
|
return null;
|
|
12459
12505
|
}, lt.rays = function(r, n, a, l) {
|
|
12460
12506
|
var u = m.dot(n, l), d = m.dot(n, a), p = m.dot(n, r), _ = m.dot(l, a), v = m.dot(l, r), w = m.dot(n, n), I = m.dot(l, l), S = w * I - u * u;
|
|
12461
12507
|
if (Math.abs(S) < rt.EPSILON) return null;
|
|
12462
|
-
var
|
|
12508
|
+
var E = u * (d - p) - w * (_ - v), k = E / S, T = (d - p + k * u) / w, L = m.onRay(r, n, T), C = m.onRay(a, l, k);
|
|
12463
12509
|
return new Gr(L, C, T, k);
|
|
12464
12510
|
}, lt.segmentWithTriangle = function(r, n, a, l) {
|
|
12465
|
-
var u = a[l[0]], d = a[l[1]], p = a[l[2]], _ = m.sub(d, u), v = m.sub(p, u), w = m.cross(_, v), I = m.sub(n, r), S = m.sub(r, u),
|
|
12511
|
+
var u = a[l[0]], d = a[l[1]], p = a[l[2]], _ = m.sub(d, u), v = m.sub(p, u), w = m.cross(_, v), I = m.sub(n, r), S = m.sub(r, u), E = -m.dot(w, S), k = m.dot(w, I);
|
|
12466
12512
|
if (Math.abs(k) < rt.EPSILON) return null;
|
|
12467
|
-
var T =
|
|
12513
|
+
var T = E / k;
|
|
12468
12514
|
if (T < 0 || T > 1) return null;
|
|
12469
12515
|
var L = m.add(r, m.mul(T, I)), C = m.dot(_, v), B = m.dot(_, _), R = m.dot(v, v), D = m.sub(L, u), V = m.dot(D, _), q = m.dot(D, v), J = C * C - B * R;
|
|
12470
12516
|
if (Math.abs(J) < rt.EPSILON) return null;
|
|
@@ -12504,22 +12550,22 @@ var dh = { exports: {} };
|
|
|
12504
12550
|
p >= 0 && (I = I - d[p].mult);
|
|
12505
12551
|
var S;
|
|
12506
12552
|
I > 0 ? S = gt.surfaceKnotRefine(r, m.rep(I, n), a) : S = r;
|
|
12507
|
-
var
|
|
12508
|
-
return Math.abs(n - $.first(l)) < rt.EPSILON ?
|
|
12553
|
+
var E = N.knotSpan(u, n, l);
|
|
12554
|
+
return Math.abs(n - $.first(l)) < rt.EPSILON ? E = 0 : Math.abs(n - $.last(l)) < rt.EPSILON && (E = (a ? S.controlPoints[0].length : S.controlPoints.length) - 1), a ? new jt(S.degreeU, S.knotsU, function(k) {
|
|
12509
12555
|
for (var T, L = [], C = 0, B = S.controlPoints; C < B.length; ) {
|
|
12510
12556
|
var R = B[C];
|
|
12511
|
-
++C, L.push(R[
|
|
12557
|
+
++C, L.push(R[E]);
|
|
12512
12558
|
}
|
|
12513
12559
|
return T = L, T;
|
|
12514
|
-
}()) : new jt(S.degreeV, S.knotsV, S.controlPoints[
|
|
12560
|
+
}()) : new jt(S.degreeV, S.knotsV, S.controlPoints[E]);
|
|
12515
12561
|
}, pt.loftedSurface = function(r, n) {
|
|
12516
12562
|
r = gt.unifyCurveKnotVectors(r);
|
|
12517
12563
|
var a = r[0].degree;
|
|
12518
12564
|
n == null && (n = 3), n > r.length - 1 && (n = r.length - 1);
|
|
12519
12565
|
for (var l = r[0].knots, u = [], d = [], p = 0, _ = r[0].controlPoints.length; p < _; ) {
|
|
12520
12566
|
var v = [p++], w = r.map(/* @__PURE__ */ function(S) {
|
|
12521
|
-
return function(
|
|
12522
|
-
return
|
|
12567
|
+
return function(E) {
|
|
12568
|
+
return E.controlPoints[S[0]];
|
|
12523
12569
|
};
|
|
12524
12570
|
}(v)), I = pt.rationalInterpCurve(w, n, !0);
|
|
12525
12571
|
d.push(I.controlPoints), u = I.knots;
|
|
@@ -12538,7 +12584,7 @@ var dh = { exports: {} };
|
|
|
12538
12584
|
}, pt.fourPointSurface = function(r, n, a, l, u) {
|
|
12539
12585
|
u == null && (u = 3);
|
|
12540
12586
|
for (var d = u, p = [], _ = 0, v = u + 1; _ < v; ) {
|
|
12541
|
-
for (var w = _++, I = [], S = 0,
|
|
12587
|
+
for (var w = _++, I = [], S = 0, E = u + 1; S < E; ) {
|
|
12542
12588
|
var k = S++, T = 1 - w / d, L = m.lerp(T, r, n), C = m.lerp(T, l, a), B = m.lerp(1 - k / d, L, C);
|
|
12543
12589
|
B.push(1), I.push(B);
|
|
12544
12590
|
}
|
|
@@ -12551,15 +12597,15 @@ var dh = { exports: {} };
|
|
|
12551
12597
|
n = m.normalized(n), a = m.normalized(a), u < l && (u = 2 * Math.PI + l);
|
|
12552
12598
|
var _ = u - l, v = 0;
|
|
12553
12599
|
_ <= Math.PI / 2 ? v = 1 : _ <= Math.PI ? v = 2 : _ <= 3 * Math.PI / 2 ? v = 3 : v = 4;
|
|
12554
|
-
var w = _ / v, I = Math.cos(w / 2), S = m.add(r, m.add(m.mul(d * Math.cos(l), n), m.mul(p * Math.sin(l), a))),
|
|
12600
|
+
var w = _ / v, I = Math.cos(w / 2), S = m.add(r, m.add(m.mul(d * Math.cos(l), n), m.mul(p * Math.sin(l), a))), E = m.sub(m.mul(Math.cos(l), a), m.mul(Math.sin(l), n)), k = [], T = m.zeros1d(2 * v + 3), L = 0, C = l, B = m.zeros1d(v * 2);
|
|
12555
12601
|
k[0] = S, B[0] = 1;
|
|
12556
12602
|
for (var R = 1, D = v + 1; R < D; ) {
|
|
12557
12603
|
var V = R++;
|
|
12558
12604
|
C += w;
|
|
12559
12605
|
var q = m.add(r, m.add(m.mul(d * Math.cos(C), n), m.mul(p * Math.sin(C), a)));
|
|
12560
12606
|
B[L + 2] = 1, k[L + 2] = q;
|
|
12561
|
-
var J = m.sub(m.mul(Math.cos(C), a), m.mul(Math.sin(C), n)), H = lt.rays(S, m.mul(1 / m.norm(
|
|
12562
|
-
B[L + 1] = I, k[L + 1] = j, L += 2, V < v && (S = q,
|
|
12607
|
+
var J = m.sub(m.mul(Math.cos(C), a), m.mul(Math.sin(C), n)), H = lt.rays(S, m.mul(1 / m.norm(E), E), q, m.mul(1 / m.norm(J), J)), j = m.add(S, m.mul(H.u0, E));
|
|
12608
|
+
B[L + 1] = I, k[L + 1] = j, L += 2, V < v && (S = q, E = J);
|
|
12563
12609
|
}
|
|
12564
12610
|
for (var K = 2 * v + 1, tt = 0; tt < 3; ) {
|
|
12565
12611
|
var et = tt++;
|
|
@@ -12604,7 +12650,7 @@ var dh = { exports: {} };
|
|
|
12604
12650
|
var S = I++;
|
|
12605
12651
|
_[S] = 0, _[w + S] = 1;
|
|
12606
12652
|
}
|
|
12607
|
-
for (var
|
|
12653
|
+
for (var E = Math.cos(v / 2), k = 0, T = m.zeros1d(p + 1), L = m.zeros1d(p + 1), C = m.zeros3d(2 * p + 1, u.length, 3), B = m.zeros2d(2 * p + 1, u.length), R = 1, D = p + 1; R < D; ) {
|
|
12608
12654
|
var V = R++;
|
|
12609
12655
|
k += v, L[V] = Math.cos(k), T[V] = Math.sin(k);
|
|
12610
12656
|
}
|
|
@@ -12622,7 +12668,7 @@ var dh = { exports: {} };
|
|
|
12622
12668
|
var It = lt.rays(it, m.mul(1 / m.norm(ht), ht), X, m.mul(1 / m.norm(ft), ft)), Gt = m.add(it, m.mul(It.u0, ht));
|
|
12623
12669
|
C[at + 1][H] = Gt;
|
|
12624
12670
|
}
|
|
12625
|
-
B[at + 1][H] =
|
|
12671
|
+
B[at + 1][H] = E * d[H], at += 2, mt < p && (it = X, ht = ft);
|
|
12626
12672
|
}
|
|
12627
12673
|
}
|
|
12628
12674
|
return new te(2, r.degree, _, r.knots, N.homogenize2d(C, B));
|
|
@@ -12638,8 +12684,8 @@ var dh = { exports: {} };
|
|
|
12638
12684
|
var v = p++, w = m.norm(m.sub(r[v], r[v - 1])), I = d[d.length - 1];
|
|
12639
12685
|
d.push(I + w);
|
|
12640
12686
|
}
|
|
12641
|
-
for (var S = d[d.length - 1],
|
|
12642
|
-
var T =
|
|
12687
|
+
for (var S = d[d.length - 1], E = 0, k = d.length; E < k; ) {
|
|
12688
|
+
var T = E++;
|
|
12643
12689
|
d[T] = d[T] / S;
|
|
12644
12690
|
}
|
|
12645
12691
|
var L = m.rep(n + 1, 0), C = l != null && u != null, B;
|
|
@@ -12726,12 +12772,12 @@ var dh = { exports: {} };
|
|
|
12726
12772
|
}
|
|
12727
12773
|
d = p;
|
|
12728
12774
|
for (var w = 0, I = r.length; w < I; ) {
|
|
12729
|
-
var S = w++,
|
|
12775
|
+
var S = w++, E = [d[S].min];
|
|
12730
12776
|
r[S].knots = r[S].knots.map(/* @__PURE__ */ function(j) {
|
|
12731
12777
|
return function(K) {
|
|
12732
12778
|
return K - j[0];
|
|
12733
12779
|
};
|
|
12734
|
-
}(
|
|
12780
|
+
}(E));
|
|
12735
12781
|
}
|
|
12736
12782
|
for (var k = d.map(function(j) {
|
|
12737
12783
|
return j.max - j.min;
|
|
@@ -12758,7 +12804,7 @@ var dh = { exports: {} };
|
|
|
12758
12804
|
return r > n ? r : n;
|
|
12759
12805
|
}, gt.curveElevateDegree = function(r, n) {
|
|
12760
12806
|
if (n <= r.degree) return r;
|
|
12761
|
-
var a = r.knots.length - r.degree - 2, l = r.degree, u = r.knots, d = r.controlPoints, p = n - r.degree, _ = r.controlPoints[0].length, v = m.zeros2d(l + p + 1, l + 1), w = [], I = [], S = [],
|
|
12807
|
+
var a = r.knots.length - r.degree - 2, l = r.degree, u = r.knots, d = r.controlPoints, p = n - r.degree, _ = r.controlPoints[0].length, v = m.zeros2d(l + p + 1, l + 1), w = [], I = [], S = [], E = a + l + 1, k = n, T = Math.floor(k / 2), L = [], C = [];
|
|
12762
12808
|
v[0][0] = 1, v[k][l] = 1;
|
|
12763
12809
|
for (var B = 1, R = T + 1; B < R; )
|
|
12764
12810
|
for (var D = B++, V = 1 / Rt.get(k, D), q = gt.imin(l, D), J = gt.imax(0, D - p), H = q + 1; J < H; ) {
|
|
@@ -12780,8 +12826,8 @@ var dh = { exports: {} };
|
|
|
12780
12826
|
var Ve = Kt++;
|
|
12781
12827
|
w[Ve] = d[Ve];
|
|
12782
12828
|
}
|
|
12783
|
-
for (; X <
|
|
12784
|
-
for (var _e = X; X <
|
|
12829
|
+
for (; X < E; ) {
|
|
12830
|
+
for (var _e = X; X < E && u[X] == u[X + 1]; ) X = X + 1;
|
|
12785
12831
|
var fe = X - _e + 1, Se = u[X], Te = nt;
|
|
12786
12832
|
nt = l - fe;
|
|
12787
12833
|
var Ke;
|
|
@@ -12799,7 +12845,7 @@ var dh = { exports: {} };
|
|
|
12799
12845
|
for (var Za = Ke, Ih = k + 1; Za < Ih; ) {
|
|
12800
12846
|
var Sn = Za++;
|
|
12801
12847
|
I[Sn] = m.zeros1d(_);
|
|
12802
|
-
for (var
|
|
12848
|
+
for (var Eh = gt.imin(l, Sn), Qa = gt.imax(0, Sn - p), Ph = Eh + 1; Qa < Ph; ) {
|
|
12803
12849
|
var Ja = Qa++;
|
|
12804
12850
|
I[Sn] = m.add(I[Sn], m.mul(v[Sn][Ja], w[Ja]));
|
|
12805
12851
|
}
|
|
@@ -12828,7 +12874,7 @@ var dh = { exports: {} };
|
|
|
12828
12874
|
var Lh = no++;
|
|
12829
12875
|
L[ft] = I[Lh], ft = ft + 1;
|
|
12830
12876
|
}
|
|
12831
|
-
if (X <
|
|
12877
|
+
if (X < E) {
|
|
12832
12878
|
for (var so = 0; so < nt; ) {
|
|
12833
12879
|
var io = so++;
|
|
12834
12880
|
w[io] = S[io];
|
|
@@ -12876,15 +12922,15 @@ var dh = { exports: {} };
|
|
|
12876
12922
|
}
|
|
12877
12923
|
}
|
|
12878
12924
|
l.length / d - 1;
|
|
12879
|
-
for (var I = d * 2, S = [],
|
|
12880
|
-
var k = l.slice(
|
|
12881
|
-
S.push(new jt(n, k, T)),
|
|
12925
|
+
for (var I = d * 2, S = [], E = 0; E < a.length; ) {
|
|
12926
|
+
var k = l.slice(E, E + I), T = a.slice(E, E + d);
|
|
12927
|
+
S.push(new jt(n, k, T)), E += d;
|
|
12882
12928
|
}
|
|
12883
12929
|
return S;
|
|
12884
12930
|
}, gt.curveKnotRefine = function(r, n) {
|
|
12885
12931
|
if (n.length == 0) return pt.clonedCurve(r);
|
|
12886
|
-
for (var a = r.degree, l = r.controlPoints, u = r.knots, d = l.length - 1, p = d + a + 1, _ = n.length - 1, v = N.knotSpan(a, n[0], u), w = N.knotSpan(a, n[_], u), I = [], S = [],
|
|
12887
|
-
var T =
|
|
12932
|
+
for (var a = r.degree, l = r.controlPoints, u = r.knots, d = l.length - 1, p = d + a + 1, _ = n.length - 1, v = N.knotSpan(a, n[0], u), w = N.knotSpan(a, n[_], u), I = [], S = [], E = 0, k = v - a + 1; E < k; ) {
|
|
12933
|
+
var T = E++;
|
|
12888
12934
|
I[T] = l[T];
|
|
12889
12935
|
}
|
|
12890
12936
|
for (var L = w - 1, C = d + 1; L < C; ) {
|
|
@@ -12911,8 +12957,8 @@ var dh = { exports: {} };
|
|
|
12911
12957
|
}
|
|
12912
12958
|
return new jt(a, S, I);
|
|
12913
12959
|
}, gt.curveKnotInsert = function(r, n, a) {
|
|
12914
|
-
for (var l = r.degree, u = r.controlPoints, d = r.knots, p = 0, _ = u.length, v = N.knotSpan(l, n, d), w = [], I = [], S = [],
|
|
12915
|
-
var T =
|
|
12960
|
+
for (var l = r.degree, u = r.controlPoints, d = r.knots, p = 0, _ = u.length, v = N.knotSpan(l, n, d), w = [], I = [], S = [], E = 1, k = v + 1; E < k; ) {
|
|
12961
|
+
var T = E++;
|
|
12916
12962
|
I[T] = d[T];
|
|
12917
12963
|
}
|
|
12918
12964
|
for (var L = 1, C = a + 1; L < C; ) {
|
|
@@ -12975,13 +13021,13 @@ var dh = { exports: {} };
|
|
|
12975
13021
|
}, Ot.rationalCurveAdaptiveSampleRange = function(r, n, a, l, u) {
|
|
12976
13022
|
var d = N.rationalCurvePoint(r, n), p = N.rationalCurvePoint(r, a), _ = 0.5 + 0.2 * Math.random(), v = n + (a - n) * _, w = N.rationalCurvePoint(r, v), I = m.sub(d, p), S = m.sub(d, w);
|
|
12977
13023
|
if (m.dot(I, I) < l && m.dot(S, S) > l || !ke.threePointsAreFlat(d, w, p, l)) {
|
|
12978
|
-
var
|
|
13024
|
+
var E = n + (a - n) * 0.5, k = Ot.rationalCurveAdaptiveSampleRange(r, n, E, l, u), T = Ot.rationalCurveAdaptiveSampleRange(r, E, a, l, u);
|
|
12979
13025
|
return k.slice(0, -1).concat(T);
|
|
12980
13026
|
} else return u ? [[n].concat(d), [a].concat(p)] : [d, p];
|
|
12981
13027
|
}, Ot.rationalSurfaceNaive = function(r, n, a) {
|
|
12982
13028
|
n < 1 && (n = 1), a < 1 && (a = 1), r.degreeU, r.degreeV, r.controlPoints;
|
|
12983
|
-
for (var l = r.knotsU, u = r.knotsV, d = $.last(l) - l[0], p = $.last(u) - u[0], _ = d / n, v = p / a, w = [], I = [], S = [],
|
|
12984
|
-
for (var T =
|
|
13029
|
+
for (var l = r.knotsU, u = r.knotsV, d = $.last(l) - l[0], p = $.last(u) - u[0], _ = d / n, v = p / a, w = [], I = [], S = [], E = 0, k = n + 1; E < k; )
|
|
13030
|
+
for (var T = E++, L = 0, C = a + 1; L < C; ) {
|
|
12985
13031
|
var B = L++, R = T * _, D = B * v;
|
|
12986
13032
|
I.push([R, D]);
|
|
12987
13033
|
var V = N.rationalSurfaceDerivatives(r, R, D, 1), q = V[0][0];
|
|
@@ -13001,7 +13047,7 @@ var dh = { exports: {} };
|
|
|
13001
13047
|
n.minDivsU > a ? u = n.minDivsU = n.minDivsU : u = n.minDivsU = a;
|
|
13002
13048
|
var d;
|
|
13003
13049
|
n.minDivsV > l ? d = n.minDivsV = n.minDivsV : d = n.minDivsV = l;
|
|
13004
|
-
for (var p = $.last(r.knotsU), _ = r.knotsU[0], v = $.last(r.knotsV), w = r.knotsV[0], I = (p - _) / u, S = (v - w) / d,
|
|
13050
|
+
for (var p = $.last(r.knotsU), _ = r.knotsU[0], v = $.last(r.knotsV), w = r.knotsV[0], I = (p - _) / u, S = (v - w) / d, E = [], k = [], T = 0, L = d + 1; T < L; ) {
|
|
13005
13051
|
for (var C = T++, B = [], R = 0, D = u + 1; R < D; ) {
|
|
13006
13052
|
var V = R++, q = _ + I * V, J = w + S * C, H = N.rationalSurfaceDerivatives(r, q, J, 1), j = m.normalized(m.cross(H[0][1], H[1][0]));
|
|
13007
13053
|
B.push(new De(H[0][0], j, [q, J], -1, m.isZero(j)));
|
|
@@ -13011,15 +13057,15 @@ var dh = { exports: {} };
|
|
|
13011
13057
|
for (var K = 0; K < d; )
|
|
13012
13058
|
for (var tt = K++, et = 0; et < u; ) {
|
|
13013
13059
|
var it = et++, ht = [k[d - tt - 1][it], k[d - tt - 1][it + 1], k[d - tt][it + 1], k[d - tt][it]];
|
|
13014
|
-
|
|
13060
|
+
E.push(new ur(r, ht));
|
|
13015
13061
|
}
|
|
13016
|
-
if (!n.refine) return
|
|
13062
|
+
if (!n.refine) return E;
|
|
13017
13063
|
for (var at = 0; at < d; )
|
|
13018
13064
|
for (var ct = at++, nt = 0; nt < u; ) {
|
|
13019
|
-
var mt = nt++, X = ct * u + mt, ft = Ot.north(X, ct, mt, u, d,
|
|
13020
|
-
|
|
13065
|
+
var mt = nt++, X = ct * u + mt, ft = Ot.north(X, ct, mt, u, d, E), It = Ot.east(X, ct, mt, u, d, E), Gt = Ot.south(X, ct, mt, u, d, E), Xt = Ot.west(X, ct, mt, u, d, E);
|
|
13066
|
+
E[X].neighbors = [Gt, It, ft, Xt], E[X].divide(n);
|
|
13021
13067
|
}
|
|
13022
|
-
return
|
|
13068
|
+
return E;
|
|
13023
13069
|
}, Ot.north = function(r, n, a, l, u, d) {
|
|
13024
13070
|
return n == 0 ? null : d[r - l];
|
|
13025
13071
|
}, Ot.south = function(r, n, a, l, u, d) {
|
|
@@ -13182,12 +13228,12 @@ var dh = { exports: {} };
|
|
|
13182
13228
|
}
|
|
13183
13229
|
}
|
|
13184
13230
|
for (var S = 0; S < a.length; ) {
|
|
13185
|
-
var
|
|
13186
|
-
if (++S,
|
|
13187
|
-
l.push(
|
|
13231
|
+
var E = a[S];
|
|
13232
|
+
if (++S, E.id != -1) {
|
|
13233
|
+
l.push(E.id);
|
|
13188
13234
|
continue;
|
|
13189
13235
|
}
|
|
13190
|
-
r.uvs.push(
|
|
13236
|
+
r.uvs.push(E.uv), r.points.push(E.point), r.normals.push(E.normal), E.id = n, l.push(n), n++;
|
|
13191
13237
|
}
|
|
13192
13238
|
if (a.length == 4)
|
|
13193
13239
|
return r.faces.push([l[0], l[3], l[1]]), r.faces.push([l[3], l[2], l[1]]), r;
|
|
@@ -13427,22 +13473,22 @@ var dh = { exports: {} };
|
|
|
13427
13473
|
b["verb.geom.ISurface"] = wn, wn.__name__ = ["verb", "geom", "ISurface"], wn.__interfaces__ = [vn], wn.prototype = {
|
|
13428
13474
|
__class__: wn
|
|
13429
13475
|
};
|
|
13430
|
-
var
|
|
13476
|
+
var Et = g.geom.NurbsSurface = function(r) {
|
|
13431
13477
|
this._data = Ue.isValidNurbsSurfaceData(r);
|
|
13432
13478
|
};
|
|
13433
|
-
b["verb.geom.NurbsSurface"] =
|
|
13434
|
-
return new
|
|
13435
|
-
},
|
|
13436
|
-
return new
|
|
13437
|
-
},
|
|
13438
|
-
return new
|
|
13479
|
+
b["verb.geom.NurbsSurface"] = Et, Et.__name__ = ["verb", "geom", "NurbsSurface"], Et.__interfaces__ = [wn], Et.byKnotsControlPointsWeights = function(r, n, a, l, u, d) {
|
|
13480
|
+
return new Et(new te(r, n, a, l, N.homogenize2d(u, d)));
|
|
13481
|
+
}, Et.byCorners = function(r, n, a, l) {
|
|
13482
|
+
return new Et(pt.fourPointSurface(r, n, a, l));
|
|
13483
|
+
}, Et.byLoftingCurves = function(r, n) {
|
|
13484
|
+
return new Et(pt.loftedSurface(function(a) {
|
|
13439
13485
|
for (var l, u = [], d = 0; d < r.length; ) {
|
|
13440
13486
|
var p = r[d];
|
|
13441
13487
|
++d, u.push(p.asNurbs());
|
|
13442
13488
|
}
|
|
13443
13489
|
return l = u, l;
|
|
13444
13490
|
}(), n));
|
|
13445
|
-
},
|
|
13491
|
+
}, Et.__super__ = $t, Et.prototype = M($t.prototype, {
|
|
13446
13492
|
degreeU: function() {
|
|
13447
13493
|
return this._data.degreeU;
|
|
13448
13494
|
},
|
|
@@ -13465,7 +13511,7 @@ var dh = { exports: {} };
|
|
|
13465
13511
|
return new te(this.degreeU(), this.degreeV(), this.knotsU(), this.knotsV(), N.homogenize2d(this.controlPoints(), this.weights()));
|
|
13466
13512
|
},
|
|
13467
13513
|
clone: function() {
|
|
13468
|
-
return new
|
|
13514
|
+
return new Et(this.asNurbs());
|
|
13469
13515
|
},
|
|
13470
13516
|
domainU: function() {
|
|
13471
13517
|
return new we($.first(this._data.knotsU), $.last(this._data.knotsU));
|
|
@@ -13505,22 +13551,22 @@ var dh = { exports: {} };
|
|
|
13505
13551
|
},
|
|
13506
13552
|
split: function(r, n) {
|
|
13507
13553
|
return n == null && (n = !1), oe.surfaceSplit(this._data, r, n).map(function(a) {
|
|
13508
|
-
return new
|
|
13554
|
+
return new Et(a);
|
|
13509
13555
|
});
|
|
13510
13556
|
},
|
|
13511
13557
|
splitAsync: function(r, n) {
|
|
13512
13558
|
return n == null && (n = !1), wt.dispatchMethod(oe, "surfaceSplit", [this._data, r, n]).then(function(a) {
|
|
13513
13559
|
return a.map(function(l) {
|
|
13514
|
-
return new
|
|
13560
|
+
return new Et(l);
|
|
13515
13561
|
});
|
|
13516
13562
|
});
|
|
13517
13563
|
},
|
|
13518
13564
|
reverse: function(r) {
|
|
13519
|
-
return r == null && (r = !1), new
|
|
13565
|
+
return r == null && (r = !1), new Et(gt.surfaceReverse(this._data, r));
|
|
13520
13566
|
},
|
|
13521
13567
|
reverseAsync: function(r) {
|
|
13522
13568
|
return r == null && (r = !1), wt.dispatchMethod(gt, "surfaceReverse", [this._data, r]).then(function(n) {
|
|
13523
|
-
return new
|
|
13569
|
+
return new Et(n);
|
|
13524
13570
|
});
|
|
13525
13571
|
},
|
|
13526
13572
|
isocurve: function(r, n) {
|
|
@@ -13550,19 +13596,19 @@ var dh = { exports: {} };
|
|
|
13550
13596
|
return wt.dispatchMethod(Ot, "rationalSurfaceAdaptive", [this._data, r]);
|
|
13551
13597
|
},
|
|
13552
13598
|
transform: function(r) {
|
|
13553
|
-
return new
|
|
13599
|
+
return new Et(gt.rationalSurfaceTransform(this._data, r));
|
|
13554
13600
|
},
|
|
13555
13601
|
transformAsync: function(r) {
|
|
13556
13602
|
return wt.dispatchMethod(gt, "rationalSurfaceTransform", [this._data, r]).then(function(n) {
|
|
13557
|
-
return new
|
|
13603
|
+
return new Et(n);
|
|
13558
13604
|
});
|
|
13559
13605
|
},
|
|
13560
|
-
__class__:
|
|
13606
|
+
__class__: Et
|
|
13561
13607
|
});
|
|
13562
13608
|
var Kn = g.geom.ConicalSurface = function(r, n, a, l, u) {
|
|
13563
|
-
|
|
13609
|
+
Et.call(this, pt.conicalSurface(r, n, a, l, u)), this._axis = r, this._xaxis = n, this._base = a, this._height = l, this._radius = u;
|
|
13564
13610
|
};
|
|
13565
|
-
b["verb.geom.ConicalSurface"] = Kn, Kn.__name__ = ["verb", "geom", "ConicalSurface"], Kn.__super__ =
|
|
13611
|
+
b["verb.geom.ConicalSurface"] = Kn, Kn.__name__ = ["verb", "geom", "ConicalSurface"], Kn.__super__ = Et, Kn.prototype = M(Et.prototype, {
|
|
13566
13612
|
axis: function() {
|
|
13567
13613
|
return this._axis;
|
|
13568
13614
|
},
|
|
@@ -13581,9 +13627,9 @@ var dh = { exports: {} };
|
|
|
13581
13627
|
__class__: Kn
|
|
13582
13628
|
});
|
|
13583
13629
|
var $n = g.geom.CylindricalSurface = function(r, n, a, l, u) {
|
|
13584
|
-
|
|
13630
|
+
Et.call(this, pt.cylindricalSurface(r, n, a, l, u)), this._axis = r, this._xaxis = n, this._base = a, this._height = l, this._radius = u;
|
|
13585
13631
|
};
|
|
13586
|
-
b["verb.geom.CylindricalSurface"] = $n, $n.__name__ = ["verb", "geom", "CylindricalSurface"], $n.__super__ =
|
|
13632
|
+
b["verb.geom.CylindricalSurface"] = $n, $n.__name__ = ["verb", "geom", "CylindricalSurface"], $n.__super__ = Et, $n.prototype = M(Et.prototype, {
|
|
13587
13633
|
axis: function() {
|
|
13588
13634
|
return this._axis;
|
|
13589
13635
|
},
|
|
@@ -13629,9 +13675,9 @@ var dh = { exports: {} };
|
|
|
13629
13675
|
__class__: Zn
|
|
13630
13676
|
});
|
|
13631
13677
|
var Qn = g.geom.ExtrudedSurface = function(r, n) {
|
|
13632
|
-
|
|
13678
|
+
Et.call(this, pt.extrudedSurface(m.normalized(n), m.norm(n), r.asNurbs())), this._profile = r, this._direction = n;
|
|
13633
13679
|
};
|
|
13634
|
-
b["verb.geom.ExtrudedSurface"] = Qn, Qn.__name__ = ["verb", "geom", "ExtrudedSurface"], Qn.__super__ =
|
|
13680
|
+
b["verb.geom.ExtrudedSurface"] = Qn, Qn.__name__ = ["verb", "geom", "ExtrudedSurface"], Qn.__super__ = Et, Qn.prototype = M(Et.prototype, {
|
|
13635
13681
|
profile: function() {
|
|
13636
13682
|
return this._profile;
|
|
13637
13683
|
},
|
|
@@ -13674,9 +13720,9 @@ var dh = { exports: {} };
|
|
|
13674
13720
|
__class__: Jn
|
|
13675
13721
|
});
|
|
13676
13722
|
var ts = g.geom.RevolvedSurface = function(r, n, a, l) {
|
|
13677
|
-
|
|
13723
|
+
Et.call(this, pt.revolvedSurface(r.asNurbs(), n, a, l)), this._profile = r, this._center = n, this._axis = a, this._angle = l;
|
|
13678
13724
|
};
|
|
13679
|
-
b["verb.geom.RevolvedSurface"] = ts, ts.__name__ = ["verb", "geom", "RevolvedSurface"], ts.__super__ =
|
|
13725
|
+
b["verb.geom.RevolvedSurface"] = ts, ts.__name__ = ["verb", "geom", "RevolvedSurface"], ts.__super__ = Et, ts.prototype = M(Et.prototype, {
|
|
13680
13726
|
profile: function() {
|
|
13681
13727
|
return this._profile;
|
|
13682
13728
|
},
|
|
@@ -13692,9 +13738,9 @@ var dh = { exports: {} };
|
|
|
13692
13738
|
__class__: ts
|
|
13693
13739
|
});
|
|
13694
13740
|
var es = g.geom.SphericalSurface = function(r, n) {
|
|
13695
|
-
|
|
13741
|
+
Et.call(this, pt.sphericalSurface(r, [0, 0, 1], [1, 0, 0], n)), this._center = r, this._radius = n;
|
|
13696
13742
|
};
|
|
13697
|
-
b["verb.geom.SphericalSurface"] = es, es.__name__ = ["verb", "geom", "SphericalSurface"], es.__super__ =
|
|
13743
|
+
b["verb.geom.SphericalSurface"] = es, es.__name__ = ["verb", "geom", "SphericalSurface"], es.__super__ = Et, es.prototype = M(Et.prototype, {
|
|
13698
13744
|
center: function() {
|
|
13699
13745
|
return this._center;
|
|
13700
13746
|
},
|
|
@@ -13704,9 +13750,9 @@ var dh = { exports: {} };
|
|
|
13704
13750
|
__class__: es
|
|
13705
13751
|
});
|
|
13706
13752
|
var rs = g.geom.SweptSurface = function(r, n) {
|
|
13707
|
-
|
|
13753
|
+
Et.call(this, pt.rationalTranslationalSurface(r.asNurbs(), n.asNurbs())), this._profile = r, this._rail = n;
|
|
13708
13754
|
};
|
|
13709
|
-
b["verb.geom.SweptSurface"] = rs, rs.__name__ = ["verb", "geom", "SweptSurface"], rs.__super__ =
|
|
13755
|
+
b["verb.geom.SweptSurface"] = rs, rs.__name__ = ["verb", "geom", "SweptSurface"], rs.__super__ = Et, rs.prototype = M(Et.prototype, {
|
|
13710
13756
|
profile: function() {
|
|
13711
13757
|
return this._profile;
|
|
13712
13758
|
},
|
|
@@ -13788,7 +13834,7 @@ var dh = { exports: {} };
|
|
|
13788
13834
|
return process.nextTick(v(w, R)), R;
|
|
13789
13835
|
};
|
|
13790
13836
|
}
|
|
13791
|
-
function
|
|
13837
|
+
function E() {
|
|
13792
13838
|
if (r.postMessage && !r.importScripts) {
|
|
13793
13839
|
var R = !0, D = r.onmessage;
|
|
13794
13840
|
return r.onmessage = function() {
|
|
@@ -13831,7 +13877,7 @@ var dh = { exports: {} };
|
|
|
13831
13877
|
};
|
|
13832
13878
|
}
|
|
13833
13879
|
var B = Object.getPrototypeOf && Object.getPrototypeOf(r);
|
|
13834
|
-
B = B && B.setTimeout ? B : r, {}.toString.call(r.process) === "[object process]" ? S() :
|
|
13880
|
+
B = B && B.setTimeout ? B : r, {}.toString.call(r.process) === "[object process]" ? S() : E() ? k() : r.MessageChannel ? T() : d && "onreadystatechange" in d.createElement("script") ? L() : C(), B.setImmediate = p, B.clearImmediate = I;
|
|
13835
13881
|
})(new Function("return this")()), Yt.USE_CACHE = !1, Yt.USE_ENUM_INDEX = !1, Yt.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:", Wt.DEFAULT_RESOLVER = ut, Wt.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:", Lt.count = 0, ie.i64tmp = function(r) {
|
|
13836
13882
|
var n, a = new Vt(0, 0);
|
|
13837
13883
|
return n = a, n;
|
|
@@ -13842,7 +13888,7 @@ var dh = { exports: {} };
|
|
|
13842
13888
|
})(dh);
|
|
13843
13889
|
var gd = dh.exports;
|
|
13844
13890
|
const kn = /* @__PURE__ */ fd(gd);
|
|
13845
|
-
class
|
|
13891
|
+
class Ei {
|
|
13846
13892
|
constructor() {
|
|
13847
13893
|
this.c0 = 0, this.c1 = 0, this.c2 = 0, this.c3 = 0;
|
|
13848
13894
|
}
|
|
@@ -13878,7 +13924,7 @@ class Pi {
|
|
|
13878
13924
|
return this.c0 + this.c1 * t + this.c2 * e + this.c3 * s;
|
|
13879
13925
|
}
|
|
13880
13926
|
}
|
|
13881
|
-
class _d extends
|
|
13927
|
+
class _d extends Ps {
|
|
13882
13928
|
/**
|
|
13883
13929
|
* Constructs a new Catmull-Rom curve.
|
|
13884
13930
|
*
|
|
@@ -13888,7 +13934,7 @@ class _d extends Es {
|
|
|
13888
13934
|
* @param tension - Tension of the curve.
|
|
13889
13935
|
*/
|
|
13890
13936
|
constructor(t = [], e = !1, s = "centripetal", o = 0.5) {
|
|
13891
|
-
super(), this.isCatmullRomCurve3d = !0, this.type = "CatmullRomCurve3d", this._tmp = new Z(), this._px = new
|
|
13937
|
+
super(), this.isCatmullRomCurve3d = !0, this.type = "CatmullRomCurve3d", this._tmp = new Z(), this._px = new Ei(), this._py = new Ei(), this._pz = new Ei(), this._points = t.map((h) => new Y(h)), this._closed = e, this._curveType = s, this._tension = o;
|
|
13892
13938
|
}
|
|
13893
13939
|
/**
|
|
13894
13940
|
* An array of 3D points defining the curve.
|
|
@@ -13956,12 +14002,12 @@ class _d extends Es {
|
|
|
13956
14002
|
this._closed ? f += f > 0 ? 0 : (Math.floor(Math.abs(f) / h) + 1) * h : x === 0 && f === h - 1 && (f = h - 2, x = 1);
|
|
13957
14003
|
let g, A;
|
|
13958
14004
|
this._closed || f > 0 ? g = o[(f - 1) % h] : (this._tmp.subVectors(o[0], o[1]).add(o[0]), g = new Y(this._tmp.x, this._tmp.y, this._tmp.z));
|
|
13959
|
-
const b = o[f % h],
|
|
14005
|
+
const b = o[f % h], P = o[(f + 1) % h];
|
|
13960
14006
|
if (this._closed || f + 2 < h ? A = o[(f + 2) % h] : (this._tmp.subVectors(o[h - 1], o[h - 2]).add(o[h - 1]), A = new Y(this._tmp.x, this._tmp.y, this._tmp.z)), this._curveType === "centripetal" || this._curveType === "chordal") {
|
|
13961
14007
|
const M = this._curveType === "chordal" ? 0.5 : 0.25;
|
|
13962
|
-
let O = Math.pow(g.distanceToSquared(b), M), z = Math.pow(b.distanceToSquared(
|
|
13963
|
-
z < 1e-4 && (z = 1), O < 1e-4 && (O = z), U < 1e-4 && (U = z), this._px.initNonuniformCatmullRom(g.x, b.x,
|
|
13964
|
-
} else this._curveType === "catmullrom" && (this._px.initCatmullRom(g.x, b.x,
|
|
14008
|
+
let O = Math.pow(g.distanceToSquared(b), M), z = Math.pow(b.distanceToSquared(P), M), U = Math.pow(P.distanceToSquared(A), M);
|
|
14009
|
+
z < 1e-4 && (z = 1), O < 1e-4 && (O = z), U < 1e-4 && (U = z), this._px.initNonuniformCatmullRom(g.x, b.x, P.x, A.x, O, z, U), this._py.initNonuniformCatmullRom(g.y, b.y, P.y, A.y, O, z, U), this._pz.initNonuniformCatmullRom(g.z, b.z, P.z, A.z, O, z, U);
|
|
14010
|
+
} else this._curveType === "catmullrom" && (this._px.initCatmullRom(g.x, b.x, P.x, A.x, this._tension), this._py.initCatmullRom(g.y, b.y, P.y, A.y, this._tension), this._pz.initCatmullRom(g.z, b.z, P.z, A.z, this._tension));
|
|
13965
14011
|
return s.set(
|
|
13966
14012
|
this._px.calc(x),
|
|
13967
14013
|
this._py.calc(x),
|
|
@@ -14158,7 +14204,7 @@ class Nn {
|
|
|
14158
14204
|
return Nn.byPoints(o, e, s);
|
|
14159
14205
|
}
|
|
14160
14206
|
}
|
|
14161
|
-
class un extends
|
|
14207
|
+
class un extends Ps {
|
|
14162
14208
|
constructor(t, e, s, o, h) {
|
|
14163
14209
|
super();
|
|
14164
14210
|
const c = arguments.length;
|
|
@@ -14910,8 +14956,8 @@ const va = class va extends cn {
|
|
|
14910
14956
|
if (this.lineType == di) {
|
|
14911
14957
|
const t = this.database.tables.layerTable.getAt(this.layer);
|
|
14912
14958
|
if (t && t.linetype) return t.linetype;
|
|
14913
|
-
} else return this.lineType == Zh ?
|
|
14914
|
-
return
|
|
14959
|
+
} else return this.lineType == Zh ? Pi : this.lineType;
|
|
14960
|
+
return Pi;
|
|
14915
14961
|
}
|
|
14916
14962
|
/**
|
|
14917
14963
|
* Gets the color of the layer this entity belongs to.
|
|
@@ -16102,7 +16148,7 @@ const Ia = class Ia extends We {
|
|
|
16102
16148
|
Ia.typeName = "Hatch";
|
|
16103
16149
|
let Di = Ia;
|
|
16104
16150
|
var bd = /* @__PURE__ */ ((i) => (i[i.MText = 0] = "MText", i[i.Fcf = 1] = "Fcf", i[i.BlockReference = 2] = "BlockReference", i[i.NoAnnotation = 3] = "NoAnnotation", i))(bd || {});
|
|
16105
|
-
const
|
|
16151
|
+
const Ea = class Ea extends He {
|
|
16106
16152
|
/**
|
|
16107
16153
|
* Creates a new leader entity.
|
|
16108
16154
|
*
|
|
@@ -16330,9 +16376,9 @@ const Pa = class Pa extends He {
|
|
|
16330
16376
|
this.isSplined && this.numVertices >= 2 && (this._splineGeo == null || this._updated) && (this._splineGeo = new un(this._vertices, "Uniform"), this._updated = !1);
|
|
16331
16377
|
}
|
|
16332
16378
|
};
|
|
16333
|
-
|
|
16334
|
-
let Ui =
|
|
16335
|
-
const
|
|
16379
|
+
Ea.typeName = "Leader";
|
|
16380
|
+
let Ui = Ea;
|
|
16381
|
+
const Pa = class Pa extends He {
|
|
16336
16382
|
/**
|
|
16337
16383
|
* Creates a new line entity.
|
|
16338
16384
|
*
|
|
@@ -16552,8 +16598,8 @@ const Ea = class Ea extends He {
|
|
|
16552
16598
|
return t.lines(o, this.lineStyle);
|
|
16553
16599
|
}
|
|
16554
16600
|
};
|
|
16555
|
-
|
|
16556
|
-
let Vi =
|
|
16601
|
+
Pa.typeName = "Line";
|
|
16602
|
+
let Vi = Pa;
|
|
16557
16603
|
var ph = /* @__PURE__ */ ((i) => (i.ClosedFilled = "", i.Dot = "_DOT", i.DotSmall = "_DOTSMALL", i.DotBlank = "_DOTBLANK", i.Origin = "_ORIGIN", i.Origin2 = "_ORIGIN2", i.Open = "_OPEN", i.Open90 = "_OPEN90", i.Open30 = "_OPEN30", i.Closed = "_CLOSED", i.Small = "_SMALL", i.None = "_NONE", i.Oblique = "_OBLIQUE", i.BoxFilled = "_BOXFILLED", i.Box = "_BOXBLANK", i.ClosedBlank = "_CLOSEDBLANK", i.DatumBlank = "_DATUMBLANK", i.DatumFilled = "_DATUMFILLED", i.Integral = "_INTEGRAL", i.ArchTick = "_ARCHTICK", i))(ph || {}), pa = /* @__PURE__ */ ((i) => (i[i.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", i[i.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", i[i.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", i[i.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", i[i.BY_STYLE = 5] = "BY_STYLE", i))(pa || {}), As = /* @__PURE__ */ ((i) => (i[i.TopLeft = 1] = "TopLeft", i[i.TopCenter = 2] = "TopCenter", i[i.TopRight = 3] = "TopRight", i[i.MiddleLeft = 4] = "MiddleLeft", i[i.MiddleCenter = 5] = "MiddleCenter", i[i.MiddleRight = 6] = "MiddleRight", i[i.BottomLeft = 7] = "BottomLeft", i[i.BottomCenter = 8] = "BottomCenter", i[i.BottomRight = 9] = "BottomRight", i))(As || {}), fh = /* @__PURE__ */ ((i) => (i[i.OPTIMIZED_2D = 0] = "OPTIMIZED_2D", i[i.WIREFRAME = 1] = "WIREFRAME", i[i.HIDDEN_LINE = 2] = "HIDDEN_LINE", i[i.FLAT_SHADED = 3] = "FLAT_SHADED", i[i.GOURAUD_SHADED = 4] = "GOURAUD_SHADED", i[i.FLAT_SHADED_WITH_WIREFRAME = 5] = "FLAT_SHADED_WITH_WIREFRAME", i[i.GOURAUD_SHADED_WITH_WIREFRAME = 6] = "GOURAUD_SHADED_WITH_WIREFRAME", i))(fh || {}), gh = /* @__PURE__ */ ((i) => (i[i.NON_ORTHOGRAPHIC = 0] = "NON_ORTHOGRAPHIC", i[i.TOP = 1] = "TOP", i[i.BOTTOM = 2] = "BOTTOM", i[i.FRONT = 3] = "FRONT", i[i.BACK = 4] = "BACK", i[i.LEFT = 5] = "LEFT", i[i.RIGHT = 6] = "RIGHT", i))(gh || {}), _h = /* @__PURE__ */ ((i) => (i[i.ONE_DISTANT_LIGHT = 0] = "ONE_DISTANT_LIGHT", i[i.TWO_DISTANT_LIGHTS = 1] = "TWO_DISTANT_LIGHTS", i))(_h || {});
|
|
16558
16604
|
class fa {
|
|
16559
16605
|
constructor() {
|
|
@@ -17227,8 +17273,8 @@ const wd = /* @__PURE__ */ new Z(), Ta = class Ta extends Ks {
|
|
|
17227
17273
|
(this.numColumns + 1) * (this.numRows + 1) * 3
|
|
17228
17274
|
);
|
|
17229
17275
|
let c = 0;
|
|
17230
|
-
for (let
|
|
17231
|
-
e -=
|
|
17276
|
+
for (let P = 0; P <= this.numRows; P++) {
|
|
17277
|
+
e -= P > 0 ? this.rowHeight(P - 1) : 0, s = 0;
|
|
17232
17278
|
for (let M = 0; M <= this.numColumns; M++)
|
|
17233
17279
|
s += M > 0 ? this.columnWidth(M - 1) : 0, h[c++] = s, h[c++] = e, h[c++] = 0;
|
|
17234
17280
|
}
|
|
@@ -17237,12 +17283,12 @@ const wd = /* @__PURE__ */ new Z(), Ta = class Ta extends Ks {
|
|
|
17237
17283
|
);
|
|
17238
17284
|
s = 0, c = 0;
|
|
17239
17285
|
let g = 0;
|
|
17240
|
-
for (let
|
|
17241
|
-
s +=
|
|
17286
|
+
for (let P = 0; P < this.numColumns; P++) {
|
|
17287
|
+
s += P > 0 ? this.columnWidth(P - 1) : 0, e = 0;
|
|
17242
17288
|
for (let M = 0; M < this.numRows; M++) {
|
|
17243
17289
|
e += M > 0 ? this.rowHeight(M - 1) : 0;
|
|
17244
|
-
const O = this.cell(M * this.numColumns +
|
|
17245
|
-
if (g = M * this.numColumns +
|
|
17290
|
+
const O = this.cell(M * this.numColumns + P);
|
|
17291
|
+
if (g = M * this.numColumns + P, O && !x[g]) {
|
|
17246
17292
|
const z = O.borderWidth ?? 1, U = O.borderHeight ?? 1;
|
|
17247
17293
|
this.fillVisited(
|
|
17248
17294
|
x,
|
|
@@ -17250,11 +17296,11 @@ const wd = /* @__PURE__ */ new Z(), Ta = class Ta extends Ks {
|
|
|
17250
17296
|
this.numColumns,
|
|
17251
17297
|
z,
|
|
17252
17298
|
U
|
|
17253
|
-
), o[c++] =
|
|
17254
|
-
const F = h[o[c - 1] * 3] - s, dt =
|
|
17255
|
-
|
|
17299
|
+
), o[c++] = P + M * (this.numColumns + 1), o[c++] = P + M * (this.numColumns + 1) + z;
|
|
17300
|
+
const F = h[o[c - 1] * 3] - s, dt = P + (M + U) * (this.numColumns + 1) + z;
|
|
17301
|
+
P + z == this.numColumns && (o[c++] = P + M * (this.numColumns + 1) + z, o[c++] = dt);
|
|
17256
17302
|
const vt = -h[dt * 3 + 1] - e;
|
|
17257
|
-
if (M + U == this.numRows && (o[c++] =
|
|
17303
|
+
if (M + U == this.numRows && (o[c++] = P + (M + U) * (this.numColumns + 1) + U, o[c++] = P + (M + U) * (this.numColumns + 1)), o[c++] = P + (M + U) * (this.numColumns + 1), o[c++] = P + M * (this.numColumns + 1), O.text) {
|
|
17258
17304
|
const ot = O.attachmentPoint || this.attachmentPoint || As.MiddleCenter, W = this.getTableTextOffset(
|
|
17259
17305
|
ot,
|
|
17260
17306
|
F,
|
|
@@ -18259,7 +18305,7 @@ const Oa = class Oa extends We {
|
|
|
18259
18305
|
};
|
|
18260
18306
|
Oa.typeName = "Point";
|
|
18261
18307
|
let Yi = Oa;
|
|
18262
|
-
var Id = /* @__PURE__ */ ((i) => (i[i.Invalid = 0] = "Invalid", i[i.Rect = 1] = "Rect", i[i.Poly = 2] = "Poly", i))(Id || {}),
|
|
18308
|
+
var Id = /* @__PURE__ */ ((i) => (i[i.Invalid = 0] = "Invalid", i[i.Rect = 1] = "Rect", i[i.Poly = 2] = "Poly", i))(Id || {}), Ed = /* @__PURE__ */ ((i) => (i[i.Show = 1] = "Show", i[i.ShowUnAligned = 2] = "ShowUnAligned", i[i.Clip = 4] = "Clip", i[i.Transparent = 8] = "Transparent", i))(Ed || {});
|
|
18263
18309
|
const za = class za extends We {
|
|
18264
18310
|
/**
|
|
18265
18311
|
* Creates a new raster image entity.
|
|
@@ -18489,9 +18535,9 @@ const za = class za extends We {
|
|
|
18489
18535
|
this._position.z
|
|
18490
18536
|
)
|
|
18491
18537
|
), t.push(this._position.clone().setY(this._position.y + this._height)), this._rotation > 0) {
|
|
18492
|
-
|
|
18538
|
+
Eo.copy(t[1]);
|
|
18493
18539
|
for (let e = 1; e < 4; e++)
|
|
18494
|
-
Rs.copy(t[e]), Rs.rotateAround(
|
|
18540
|
+
Rs.copy(t[e]), Rs.rotateAround(Eo, this._rotation), t[e].setX(Rs.x), t[e].setY(Rs.y);
|
|
18495
18541
|
}
|
|
18496
18542
|
t.push(t[0]);
|
|
18497
18543
|
}
|
|
@@ -18500,7 +18546,7 @@ const za = class za extends We {
|
|
|
18500
18546
|
};
|
|
18501
18547
|
za.typeName = "RasterImage";
|
|
18502
18548
|
let Zs = za;
|
|
18503
|
-
const
|
|
18549
|
+
const Eo = /* @__PURE__ */ new Nt(), Rs = /* @__PURE__ */ new Nt(), Ra = class Ra extends He {
|
|
18504
18550
|
/**
|
|
18505
18551
|
* Creates a new ray entity.
|
|
18506
18552
|
*
|
|
@@ -19076,7 +19122,7 @@ const Da = class Da extends He {
|
|
|
19076
19122
|
};
|
|
19077
19123
|
Da.typeName = "Xline";
|
|
19078
19124
|
let Zi = Da;
|
|
19079
|
-
var
|
|
19125
|
+
var Pd = /* @__PURE__ */ ((i) => (i[i.AtLeast = 1] = "AtLeast", i[i.Exactly = 2] = "Exactly", i))(Pd || {});
|
|
19080
19126
|
const Ua = class Ua extends We {
|
|
19081
19127
|
/**
|
|
19082
19128
|
* Creates a new dimension entity.
|
|
@@ -19820,7 +19866,7 @@ const Ga = class Ga extends jr {
|
|
|
19820
19866
|
}
|
|
19821
19867
|
};
|
|
19822
19868
|
Ga.typeName = "ArcDimension";
|
|
19823
|
-
let
|
|
19869
|
+
let Po = Ga;
|
|
19824
19870
|
const Wa = class Wa extends jr {
|
|
19825
19871
|
/**
|
|
19826
19872
|
* Creates a new diametric dimension.
|
|
@@ -20477,15 +20523,15 @@ class ko {
|
|
|
20477
20523
|
} else if (g.type == 3) {
|
|
20478
20524
|
const A = g;
|
|
20479
20525
|
new Zt().subVectors(A.end, A.center);
|
|
20480
|
-
const
|
|
20526
|
+
const P = Math.sqrt(
|
|
20481
20527
|
Math.pow(A.end.x, 2) + Math.pow(A.end.y, 2)
|
|
20482
|
-
), M =
|
|
20528
|
+
), M = P * A.lengthOfMinorAxis;
|
|
20483
20529
|
let O = kt.degToRad(A.startAngle || 0), z = kt.degToRad(A.endAngle || 0);
|
|
20484
20530
|
const U = Math.atan2(A.end.y, A.end.x);
|
|
20485
20531
|
A.isCCW || (O = Math.PI * 2 - O, z = Math.PI * 2 - z), x.add(
|
|
20486
20532
|
new ca(
|
|
20487
20533
|
{ ...A.center, z: 0 },
|
|
20488
|
-
|
|
20534
|
+
P,
|
|
20489
20535
|
M,
|
|
20490
20536
|
O,
|
|
20491
20537
|
z,
|
|
@@ -20503,19 +20549,19 @@ class ko {
|
|
|
20503
20549
|
z: 0
|
|
20504
20550
|
})
|
|
20505
20551
|
);
|
|
20506
|
-
let
|
|
20507
|
-
const M = A.controlPoints.map((O) => (O.weight == null && (
|
|
20552
|
+
let P = !0;
|
|
20553
|
+
const M = A.controlPoints.map((O) => (O.weight == null && (P = !1), O.weight || 1));
|
|
20508
20554
|
x.add(
|
|
20509
20555
|
new un(
|
|
20510
20556
|
b,
|
|
20511
20557
|
A.knots,
|
|
20512
|
-
|
|
20558
|
+
P ? M : void 0
|
|
20513
20559
|
)
|
|
20514
20560
|
);
|
|
20515
20561
|
} else if (A.numberOfFitData > 0) {
|
|
20516
|
-
const b = A.fitDatum.map((
|
|
20517
|
-
x:
|
|
20518
|
-
y:
|
|
20562
|
+
const b = A.fitDatum.map((P) => ({
|
|
20563
|
+
x: P.x,
|
|
20564
|
+
y: P.y,
|
|
20519
20565
|
z: 0
|
|
20520
20566
|
}));
|
|
20521
20567
|
x.add(new un(b, "Uniform"));
|
|
@@ -21245,8 +21291,8 @@ class Nd {
|
|
|
21245
21291
|
timeout: x
|
|
21246
21292
|
});
|
|
21247
21293
|
const g = (b) => {
|
|
21248
|
-
const { id:
|
|
21249
|
-
if (
|
|
21294
|
+
const { id: P, success: M, data: O, error: z } = b.data;
|
|
21295
|
+
if (P !== t) return;
|
|
21250
21296
|
this.cleanupTask(t);
|
|
21251
21297
|
const U = Date.now() - o;
|
|
21252
21298
|
h(M ? {
|
|
@@ -21426,12 +21472,14 @@ class Od extends Uo {
|
|
|
21426
21472
|
// One concurrent worker needed for parser
|
|
21427
21473
|
maxConcurrentWorkers: 1
|
|
21428
21474
|
}), s = await e.execute(t);
|
|
21429
|
-
|
|
21430
|
-
|
|
21431
|
-
|
|
21432
|
-
|
|
21433
|
-
|
|
21434
|
-
|
|
21475
|
+
if (e.destroy(), s.success)
|
|
21476
|
+
return {
|
|
21477
|
+
model: s.data,
|
|
21478
|
+
data: {
|
|
21479
|
+
unknownEntityCount: 0
|
|
21480
|
+
}
|
|
21481
|
+
};
|
|
21482
|
+
throw new Error(`Failed to parse drawing due to error: '${s.error}'`);
|
|
21435
21483
|
} else
|
|
21436
21484
|
return {
|
|
21437
21485
|
model: new Rc().parse(t),
|
|
@@ -21536,14 +21584,14 @@ class Od extends Uo {
|
|
|
21536
21584
|
);
|
|
21537
21585
|
this.config.convertByEntityType && (f = this.groupAndFlattenByType(f));
|
|
21538
21586
|
const A = e.tables.blockTable.modelSpace;
|
|
21539
|
-
await g.processChunk(async (b,
|
|
21540
|
-
let M = [], O = b <
|
|
21541
|
-
for (let z = b; z <
|
|
21587
|
+
await g.processChunk(async (b, P) => {
|
|
21588
|
+
let M = [], O = b < P ? f[b].type : "";
|
|
21589
|
+
for (let z = b; z < P; z++) {
|
|
21542
21590
|
const U = f[z], F = c.convert(U);
|
|
21543
21591
|
F && (this.config.convertByEntityType && U.type !== O && (A.appendEntity(M), M = [], O = U.type), M.push(F));
|
|
21544
21592
|
}
|
|
21545
21593
|
if (A.appendEntity(M), h) {
|
|
21546
|
-
let z = o.value +
|
|
21594
|
+
let z = o.value + P / x * (100 - o.value);
|
|
21547
21595
|
z > 100 && (z = 100), await h(z, "ENTITY", "IN-PROGRESS");
|
|
21548
21596
|
}
|
|
21549
21597
|
});
|
|
@@ -21945,12 +21993,12 @@ class zd extends Uo {
|
|
|
21945
21993
|
this.config.convertByEntityType && (c = this.groupAndFlattenByType(c));
|
|
21946
21994
|
const g = e.tables.blockTable.modelSpace;
|
|
21947
21995
|
await x.processChunk(async (A, b) => {
|
|
21948
|
-
let
|
|
21996
|
+
let P = [], M = A < b ? c[A].type : "";
|
|
21949
21997
|
for (let O = A; O < b; O++) {
|
|
21950
21998
|
const z = c[O];
|
|
21951
|
-
this.config.convertByEntityType && z.type !== M && (this.triggerEvents(g,
|
|
21999
|
+
this.config.convertByEntityType && z.type !== M && (this.triggerEvents(g, P), P = [], M = z.type), P.push(z);
|
|
21952
22000
|
}
|
|
21953
|
-
if (this.triggerEvents(g,
|
|
22001
|
+
if (this.triggerEvents(g, P), h) {
|
|
21954
22002
|
let O = o.value + b / f * (100 - o.value);
|
|
21955
22003
|
O > 100 && (O = 100), await h(O, "ENTITY", "IN-PROGRESS");
|
|
21956
22004
|
}
|
|
@@ -22054,7 +22102,7 @@ class zd extends Uo {
|
|
|
22054
22102
|
}
|
|
22055
22103
|
}
|
|
22056
22104
|
var qs = /* @__PURE__ */ ((i) => (i.DXF = "dxf", i.DWG = "dwg", i))(qs || {});
|
|
22057
|
-
class
|
|
22105
|
+
class Pr {
|
|
22058
22106
|
/**
|
|
22059
22107
|
* Private constructor to enforce singleton pattern.
|
|
22060
22108
|
*
|
|
@@ -22079,7 +22127,7 @@ class Er {
|
|
|
22079
22127
|
* ```
|
|
22080
22128
|
*/
|
|
22081
22129
|
static createInstance() {
|
|
22082
|
-
return
|
|
22130
|
+
return Pr._instance == null && (Pr._instance = new Pr()), this._instance;
|
|
22083
22131
|
}
|
|
22084
22132
|
/**
|
|
22085
22133
|
* Gets the singleton instance of this class.
|
|
@@ -22092,7 +22140,7 @@ class Er {
|
|
|
22092
22140
|
* ```
|
|
22093
22141
|
*/
|
|
22094
22142
|
static get instance() {
|
|
22095
|
-
return
|
|
22143
|
+
return Pr._instance || (Pr._instance = new Pr()), Pr._instance;
|
|
22096
22144
|
}
|
|
22097
22145
|
/**
|
|
22098
22146
|
* Gets all registered file types.
|
|
@@ -22980,7 +23028,7 @@ class Fd extends zn {
|
|
|
22980
23028
|
const s = new _a({
|
|
22981
23029
|
name: "0",
|
|
22982
23030
|
standardFlags: 0,
|
|
22983
|
-
linetype:
|
|
23031
|
+
linetype: Pi,
|
|
22984
23032
|
lineWeight: 1,
|
|
22985
23033
|
isOff: !1,
|
|
22986
23034
|
color: e,
|
|
@@ -24605,7 +24653,7 @@ class m0 extends cn {
|
|
|
24605
24653
|
* ```
|
|
24606
24654
|
*/
|
|
24607
24655
|
async read(t, e, s = qs.DXF) {
|
|
24608
|
-
const o =
|
|
24656
|
+
const o = Pr.instance.get(s);
|
|
24609
24657
|
if (o == null)
|
|
24610
24658
|
throw new Error(
|
|
24611
24659
|
`Database converter for file type '${s}' isn't registered and can can't read this file!`
|
|
@@ -24638,7 +24686,7 @@ class m0 extends cn {
|
|
|
24638
24686
|
* @param options Input options to read drawing data
|
|
24639
24687
|
*/
|
|
24640
24688
|
async openUri(t, e) {
|
|
24641
|
-
var
|
|
24689
|
+
var P;
|
|
24642
24690
|
this.events.openProgress.dispatch({
|
|
24643
24691
|
database: this,
|
|
24644
24692
|
percentage: 0,
|
|
@@ -24657,7 +24705,7 @@ class m0 extends cn {
|
|
|
24657
24705
|
);
|
|
24658
24706
|
const o = s.headers.get("content-length"), h = o ? parseInt(o, 10) : null;
|
|
24659
24707
|
let c = 0;
|
|
24660
|
-
const f = (
|
|
24708
|
+
const f = (P = s.body) == null ? void 0 : P.getReader();
|
|
24661
24709
|
if (!f)
|
|
24662
24710
|
throw new Error("Failed to get response reader");
|
|
24663
24711
|
const x = [];
|
|
@@ -25302,7 +25350,7 @@ export {
|
|
|
25302
25350
|
Ji as AcDbAlignedDimension,
|
|
25303
25351
|
Ro as AcDbAngleUnits,
|
|
25304
25352
|
zi as AcDbArc,
|
|
25305
|
-
|
|
25353
|
+
Po as AcDbArcDimension,
|
|
25306
25354
|
d0 as AcDbBaseWorker,
|
|
25307
25355
|
zo as AcDbBatchProcessing,
|
|
25308
25356
|
Ks as AcDbBlockReference,
|
|
@@ -25313,7 +25361,7 @@ export {
|
|
|
25313
25361
|
He as AcDbCurve,
|
|
25314
25362
|
m0 as AcDbDatabase,
|
|
25315
25363
|
Uo as AcDbDatabaseConverter,
|
|
25316
|
-
|
|
25364
|
+
Pr as AcDbDatabaseConverterManager,
|
|
25317
25365
|
ta as AcDbDiametricDimension,
|
|
25318
25366
|
vh as AcDbDictionary,
|
|
25319
25367
|
Qh as AcDbDimArrowType,
|
|
@@ -25343,7 +25391,7 @@ export {
|
|
|
25343
25391
|
Ui as AcDbLeader,
|
|
25344
25392
|
bd as AcDbLeaderAnnotationType,
|
|
25345
25393
|
Vi as AcDbLine,
|
|
25346
|
-
|
|
25394
|
+
Pd as AcDbLineSpacingStyle,
|
|
25347
25395
|
Dd as AcDbLinetypeTable,
|
|
25348
25396
|
Ys as AcDbLinetypeTableRecord,
|
|
25349
25397
|
ji as AcDbMText,
|
|
@@ -25357,7 +25405,7 @@ export {
|
|
|
25357
25405
|
Zs as AcDbRasterImage,
|
|
25358
25406
|
Id as AcDbRasterImageClipBoundaryType,
|
|
25359
25407
|
Md as AcDbRasterImageDef,
|
|
25360
|
-
|
|
25408
|
+
Ed as AcDbRasterImageImageDisplayOpt,
|
|
25361
25409
|
Xi as AcDbRay,
|
|
25362
25410
|
zd as AcDbRegenerator,
|
|
25363
25411
|
sn as AcDbRenderingCache,
|
|
@@ -25385,7 +25433,7 @@ export {
|
|
|
25385
25433
|
_d as AcGeCatmullRomCurve3d,
|
|
25386
25434
|
ws as AcGeCircArc2d,
|
|
25387
25435
|
Tn as AcGeCircArc3d,
|
|
25388
|
-
|
|
25436
|
+
Es as AcGeCurve2d,
|
|
25389
25437
|
ca as AcGeEllipseArc2d,
|
|
25390
25438
|
da as AcGeEllipseArc3d,
|
|
25391
25439
|
dd as AcGeEuler,
|
|
@@ -25418,11 +25466,11 @@ export {
|
|
|
25418
25466
|
Zh as ByBlock,
|
|
25419
25467
|
di as ByLayer,
|
|
25420
25468
|
Jd as DEBUG_MODE,
|
|
25421
|
-
|
|
25469
|
+
Pi as DEFAULT_LINE_TYPE,
|
|
25422
25470
|
ih as DEFAULT_TOL,
|
|
25423
25471
|
$l as DEG2RAD,
|
|
25424
25472
|
Xh as DefaultLoadingManager,
|
|
25425
|
-
|
|
25473
|
+
En as FLOAT_TOL,
|
|
25426
25474
|
u0 as ORIGIN_POINT_2D,
|
|
25427
25475
|
nh as ORIGIN_POINT_3D,
|
|
25428
25476
|
Zl as RAD2DEG,
|