@mlightcad/data-model 1.3.5 → 1.3.7
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 +3 -3
- package/dist/data-model.js +223 -147
- package/lib/converter/AcDbDxfConverter.d.ts.map +1 -1
- package/lib/converter/AcDbDxfConverter.js.map +1 -1
- package/lib/converter/AcDbEntitiyConverter.d.ts.map +1 -1
- package/lib/converter/AcDbEntitiyConverter.js +5 -0
- package/lib/converter/AcDbEntitiyConverter.js.map +1 -1
- package/lib/entity/AcDb2dPolyline.js +1 -1
- package/lib/entity/AcDb2dPolyline.js.map +1 -1
- package/lib/entity/AcDb2dVertex.d.ts.map +1 -1
- package/lib/entity/AcDb2dVertex.js +1 -1
- package/lib/entity/AcDb2dVertex.js.map +1 -1
- package/lib/entity/AcDb3dPolyline.js +1 -1
- package/lib/entity/AcDb3dPolyline.js.map +1 -1
- package/lib/entity/AcDb3dVertex.d.ts.map +1 -1
- package/lib/entity/AcDb3dVertex.js +1 -1
- package/lib/entity/AcDb3dVertex.js.map +1 -1
- package/lib/entity/AcDbBlockReference.d.ts +2 -2
- package/lib/entity/AcDbBlockReference.d.ts.map +1 -1
- package/lib/entity/AcDbBlockReference.js.map +1 -1
- package/lib/entity/dimension/AcDbDimension.d.ts +61 -1
- package/lib/entity/dimension/AcDbDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbDimension.js +77 -2
- package/lib/entity/dimension/AcDbDimension.js.map +1 -1
- package/package.json +3 -3
package/dist/data-model.js
CHANGED
|
@@ -1836,7 +1836,7 @@ const au = [
|
|
|
1836
1836
|
"windows-1258"
|
|
1837
1837
|
// Vietnamese
|
|
1838
1838
|
], ou = (i) => au[i], Ti = "Continuous", gi = "ByLayer", lu = "ByBlock";
|
|
1839
|
-
var
|
|
1839
|
+
var Tn = /* @__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))(Tn || {}), Ko = /* @__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 */
|
|
1842
1842
|
] = "Max", i))(Ko || {});
|
|
@@ -2198,7 +2198,7 @@ var le, is, Qt, ne, as, Je, ve, mr, tr, Xr, os, ls, Kr, $r, hs, us, cs, Le, pr,
|
|
|
2198
2198
|
(Qt = {})[Qt.Rotated = 0] = "Rotated", Qt[Qt.Aligned = 1] = "Aligned", Qt[Qt.Angular = 2] = "Angular", Qt[Qt.Diameter = 3] = "Diameter", Qt[Qt.Radius = 4] = "Radius", Qt[Qt.Angular3Point = 5] = "Angular3Point", Qt[Qt.Ordinate = 6] = "Ordinate", Qt[Qt.ReferenceIsExclusive = 32] = "ReferenceIsExclusive", Qt[Qt.IsOrdinateXTypeFlag = 64] = "IsOrdinateXTypeFlag", Qt[Qt.IsCustomTextPositionFlag = 128] = "IsCustomTextPositionFlag";
|
|
2199
2199
|
(ne = {})[ne.TopLeft = 1] = "TopLeft", ne[ne.TopCenter = 2] = "TopCenter", ne[ne.TopRight = 3] = "TopRight", ne[ne.MiddleLeft = 4] = "MiddleLeft", ne[ne.MiddleCenter = 5] = "MiddleCenter", ne[ne.MiddleRight = 6] = "MiddleRight", ne[ne.BottomLeft = 7] = "BottomLeft", ne[ne.BottomCenter = 8] = "BottomCenter", ne[ne.BottomRight = 9] = "BottomRight";
|
|
2200
2200
|
(as = {})[as.AtLeast = 1] = "AtLeast", as[as.Exact = 2] = "Exact";
|
|
2201
|
-
var xo = ((Je = {})[Je.Center = 0] = "Center", Je[Je.Above = 1] = "Above", Je[Je.Outside = 2] = "Outside", Je[Je.JIS = 3] = "JIS", Je[Je.Below = 4] = "Below", Je),
|
|
2201
|
+
var xo = ((Je = {})[Je.Center = 0] = "Center", Je[Je.Above = 1] = "Above", Je[Je.Outside = 2] = "Outside", Je[Je.JIS = 3] = "JIS", Je[Je.Below = 4] = "Below", Je), Pn = ((ve = {})[ve.Feet = 0] = "Feet", ve[ve.None = 1] = "None", ve[ve.Inch = 2] = "Inch", ve[ve.FeetAndInch = 3] = "FeetAndInch", ve[ve.Leading = 4] = "Leading", ve[ve.Trailing = 8] = "Trailing", ve[ve.LeadingAndTrailing = 12] = "LeadingAndTrailing", ve), uu = ((mr = {})[mr.None = 0] = "None", mr[mr.Leading = 1] = "Leading", mr[mr.Trailing = 2] = "Trailing", mr[mr.LeadingAndTrailing = 3] = "LeadingAndTrailing", mr), cu = ((tr = {})[tr.Center = 0] = "Center", tr[tr.Left = 1] = "Left", tr[tr.Right = 2] = "Right", tr[tr.OverFirst = 3] = "OverFirst", tr[tr.OverSecond = 4] = "OverSecond", tr), du = ((Xr = {})[Xr.Bottom = 0] = "Bottom", Xr[Xr.Center = 1] = "Center", Xr[Xr.Top = 2] = "Top", Xr);
|
|
2202
2202
|
(os = {})[os.PatternFill = 0] = "PatternFill", os[os.SolidFill = 1] = "SolidFill";
|
|
2203
2203
|
(ls = {})[ls.NonAssociative = 0] = "NonAssociative", ls[ls.Associative = 1] = "Associative";
|
|
2204
2204
|
(Kr = {})[Kr.Normal = 0] = "Normal", Kr[Kr.Outer = 1] = "Outer", Kr[Kr.Ignore = 2] = "Ignore";
|
|
@@ -3505,7 +3505,7 @@ function Oc(i, t) {
|
|
|
3505
3505
|
}
|
|
3506
3506
|
let Ln = [{ code: 100, name: "subclassMarker", parser: y }, { code: 330, name: "ownerObjectId", parser: y }, { code: 102, parser(i, t) {
|
|
3507
3507
|
for (; !St(i, 0, "EOF") && !St(i, 102, "}"); ) i = t.next();
|
|
3508
|
-
} }, { code: 5, name: "handle", parser: y }], zc = 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]), Rc = [{ 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: xo.Above, defaultValueImperial: xo.Center }, { name: "DIMZIN", code: 78, defaultValue:
|
|
3508
|
+
} }, { code: 5, name: "handle", parser: y }], zc = 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]), Rc = [{ 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: xo.Above, defaultValueImperial: xo.Center }, { name: "DIMZIN", code: 78, defaultValue: Pn.Trailing, defaultValueImperial: Pn.Feet }, { name: "DIMAZIN", code: 79, defaultValue: uu.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: cu.Center }, { name: "DIMSD1", code: 281, defaultValue: 0 }, { name: "DIMSD2", code: 282, defaultValue: 0 }, { name: "DIMTOLJ", code: 283, defaultValue: du.Center }, { name: "DIMTZIN", code: 284, defaultValue: Pn.Trailing, defaultValueImperial: Pn.Feet }, { name: "DIMALTZ", code: 285, defaultValue: Pn.Trailing }, { name: "DIMALTTZ", code: 286, defaultValue: Pn.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 }], Bc = xt([...Rc.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)]), Fc = 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]);
|
|
3509
3509
|
(Ar = {})[Ar.NONE = 0] = "NONE", Ar[Ar.AbsoluteRotation = 1] = "AbsoluteRotation", Ar[Ar.TextEmbedded = 2] = "TextEmbedded", Ar[Ar.ShapeEmbedded = 4] = "ShapeEmbedded";
|
|
3510
3510
|
let Dc = 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 }), Uc = xt([{ code: 49, name: "pattern", parser(i, t) {
|
|
3511
3511
|
let e = {};
|
|
@@ -4910,7 +4910,7 @@ const Oi = class mh {
|
|
|
4910
4910
|
};
|
|
4911
4911
|
Oi.IDENTITY = Object.freeze(new Oi());
|
|
4912
4912
|
let pa = Oi;
|
|
4913
|
-
const Ii = /* @__PURE__ */ new pa(),
|
|
4913
|
+
const Ii = /* @__PURE__ */ new pa(), En = 1e-6, se = 2 * Math.PI, A0 = {
|
|
4914
4914
|
x: 0,
|
|
4915
4915
|
y: 0
|
|
4916
4916
|
}, ph = {
|
|
@@ -4923,7 +4923,7 @@ class gh {
|
|
|
4923
4923
|
* Create tolerance class with default tolerance values
|
|
4924
4924
|
*/
|
|
4925
4925
|
constructor() {
|
|
4926
|
-
this.equalPointTol =
|
|
4926
|
+
this.equalPointTol = En, this.equalVectorTol = En;
|
|
4927
4927
|
}
|
|
4928
4928
|
/**
|
|
4929
4929
|
* Return true if two points are equal with the specified tolerance.
|
|
@@ -4946,7 +4946,7 @@ class gh {
|
|
|
4946
4946
|
/**
|
|
4947
4947
|
* Return true if the value is equal to zero with the specified tolerance.
|
|
4948
4948
|
*/
|
|
4949
|
-
static equalToZero(t, e =
|
|
4949
|
+
static equalToZero(t, e = En) {
|
|
4950
4950
|
return t < e && t > -e;
|
|
4951
4951
|
}
|
|
4952
4952
|
/**
|
|
@@ -4957,7 +4957,7 @@ class gh {
|
|
|
4957
4957
|
* @param tol Input the tolerance value
|
|
4958
4958
|
* @returns Return true if two values are equal with the sepcified tolerance
|
|
4959
4959
|
*/
|
|
4960
|
-
static equal(t, e, s =
|
|
4960
|
+
static equal(t, e, s = En) {
|
|
4961
4961
|
return Math.abs(t - e) < s;
|
|
4962
4962
|
}
|
|
4963
4963
|
/**
|
|
@@ -4970,7 +4970,7 @@ class gh {
|
|
|
4970
4970
|
* @returns Return true if the first argument are greater than the second argument with the
|
|
4971
4971
|
* sepcified tolerance.
|
|
4972
4972
|
*/
|
|
4973
|
-
static great(t, e, s =
|
|
4973
|
+
static great(t, e, s = En) {
|
|
4974
4974
|
return t - e > s;
|
|
4975
4975
|
}
|
|
4976
4976
|
/**
|
|
@@ -4983,7 +4983,7 @@ class gh {
|
|
|
4983
4983
|
* @returns Return *true* if the first argument less than the second argument with the specified
|
|
4984
4984
|
* tolerance value
|
|
4985
4985
|
*/
|
|
4986
|
-
static less(t, e, s =
|
|
4986
|
+
static less(t, e, s = En) {
|
|
4987
4987
|
return t - e < s;
|
|
4988
4988
|
}
|
|
4989
4989
|
}
|
|
@@ -6348,7 +6348,7 @@ const Pi = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new ln(), Ri = class yh
|
|
|
6348
6348
|
* @returns Return this matrix
|
|
6349
6349
|
*/
|
|
6350
6350
|
extractRotation(t) {
|
|
6351
|
-
const e = this.elements, s = t.elements, o = 1 /
|
|
6351
|
+
const e = this.elements, s = t.elements, o = 1 / kn.setFromMatrixColumn(t, 0).length(), h = 1 / kn.setFromMatrixColumn(t, 1).length(), c = 1 / kn.setFromMatrixColumn(t, 2).length();
|
|
6352
6352
|
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;
|
|
6353
6353
|
}
|
|
6354
6354
|
// makeRotationFromEuler(euler) {
|
|
@@ -6680,8 +6680,8 @@ const Pi = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new ln(), Ri = class yh
|
|
|
6680
6680
|
*/
|
|
6681
6681
|
decompose(t, e, s) {
|
|
6682
6682
|
const o = this.elements;
|
|
6683
|
-
let h =
|
|
6684
|
-
const c =
|
|
6683
|
+
let h = kn.set(o[0], o[1], o[2]).length();
|
|
6684
|
+
const c = kn.set(o[4], o[5], o[6]).length(), g = kn.set(o[8], o[9], o[10]).length();
|
|
6685
6685
|
this.determinant() < 0 && (h = -h), t.x = o[12], t.y = o[13], t.z = o[14], rr.copy(this);
|
|
6686
6686
|
const x = 1 / h, f = 1 / c, S = 1 / g;
|
|
6687
6687
|
return rr.elements[0] *= x, rr.elements[1] *= x, rr.elements[2] *= x, rr.elements[4] *= f, rr.elements[5] *= f, rr.elements[6] *= f, rr.elements[8] *= S, rr.elements[9] *= S, rr.elements[10] *= S, e.setFromRotationMatrix(rr), s.x = h, s.y = c, s.z = g, this;
|
|
@@ -6811,8 +6811,8 @@ const Pi = /* @__PURE__ */ new Z(), Eo = /* @__PURE__ */ new ln(), Ri = class yh
|
|
|
6811
6811
|
}
|
|
6812
6812
|
};
|
|
6813
6813
|
Ri.IDENTITY = Object.freeze(new Ri());
|
|
6814
|
-
let
|
|
6815
|
-
const
|
|
6814
|
+
let hn = Ri;
|
|
6815
|
+
const kn = /* @__PURE__ */ new Z(), rr = /* @__PURE__ */ new hn(), xd = /* @__PURE__ */ new Z(0, 0, 0), bd = /* @__PURE__ */ new Z(1, 1, 1), Fr = /* @__PURE__ */ new Z(), Rs = /* @__PURE__ */ new Z(), De = /* @__PURE__ */ new Z();
|
|
6816
6816
|
class Ct {
|
|
6817
6817
|
/**
|
|
6818
6818
|
* Create a 3d box bounded by min and max.
|
|
@@ -7494,7 +7494,7 @@ class q extends Z {
|
|
|
7494
7494
|
}), o;
|
|
7495
7495
|
}
|
|
7496
7496
|
}
|
|
7497
|
-
const To = /* @__PURE__ */ new
|
|
7497
|
+
const To = /* @__PURE__ */ new hn(), No = /* @__PURE__ */ new ln(), xh = class Bi {
|
|
7498
7498
|
/**
|
|
7499
7499
|
* Create one instance of this class
|
|
7500
7500
|
* @param x (optional) the angle of the x axis in radians. Default is 0.
|
|
@@ -8211,7 +8211,7 @@ class Id extends bh {
|
|
|
8211
8211
|
* Translation vector may be also defined by a pair of numbers.
|
|
8212
8212
|
*/
|
|
8213
8213
|
translate(t) {
|
|
8214
|
-
return this.transform(new
|
|
8214
|
+
return this.transform(new hn().makeTranslation(t.x, t.y, t.z));
|
|
8215
8215
|
}
|
|
8216
8216
|
/**
|
|
8217
8217
|
* The bounding box of this shape. Because it is a time-consuming operation to calculate the bounding
|
|
@@ -8224,7 +8224,7 @@ class Id extends bh {
|
|
|
8224
8224
|
}
|
|
8225
8225
|
class Ms extends Id {
|
|
8226
8226
|
}
|
|
8227
|
-
class
|
|
8227
|
+
class un extends Ms {
|
|
8228
8228
|
/**
|
|
8229
8229
|
* This constructor initializes the line object to use start as the start point, and end
|
|
8230
8230
|
* as the endpoint. Both points must be in WCS coordinates.
|
|
@@ -8430,11 +8430,11 @@ class hn extends Ms {
|
|
|
8430
8430
|
* @inheritdoc
|
|
8431
8431
|
*/
|
|
8432
8432
|
clone() {
|
|
8433
|
-
return new
|
|
8433
|
+
return new un(this._start.clone(), this._end.clone());
|
|
8434
8434
|
}
|
|
8435
8435
|
}
|
|
8436
8436
|
const rn = /* @__PURE__ */ new Z(), Co = /* @__PURE__ */ new Z(), Bs = /* @__PURE__ */ new Z();
|
|
8437
|
-
class
|
|
8437
|
+
class Nn extends Ms {
|
|
8438
8438
|
/**
|
|
8439
8439
|
* Compute center point of the arc given three points
|
|
8440
8440
|
* @param startPoint Input start point of the arc
|
|
@@ -8446,7 +8446,7 @@ class Tn extends Ms {
|
|
|
8446
8446
|
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), g = new Z().subVectors(s, t), x = new Z().crossVectors(c, g).normalize();
|
|
8447
8447
|
if (x.lengthSq() === 0)
|
|
8448
8448
|
return console.error("Points are collinear and cannot form a valid arc."), null;
|
|
8449
|
-
const f = new Z().crossVectors(c, x).normalize(), S = new Z().crossVectors(g, x).normalize(), b = f.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), E = S.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), M = new
|
|
8449
|
+
const f = new Z().crossVectors(c, x).normalize(), S = new Z().crossVectors(g, x).normalize(), b = f.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), E = S.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), M = new un(o, o.clone().add(b)), O = new un(h, h.clone().add(E)), z = new Z();
|
|
8450
8450
|
return M.closestPointToPoint(O.startPoint, !0, z) ? z : (console.error("Cannot find a valid center for the arc."), null);
|
|
8451
8451
|
}
|
|
8452
8452
|
/**
|
|
@@ -8456,14 +8456,14 @@ class Tn extends Ms {
|
|
|
8456
8456
|
* @param pointOnArc Input one point between the start point and the end point
|
|
8457
8457
|
*/
|
|
8458
8458
|
static createByThreePoints(t, e, s) {
|
|
8459
|
-
const o =
|
|
8459
|
+
const o = Nn.computeCenterPoint(
|
|
8460
8460
|
t,
|
|
8461
8461
|
e,
|
|
8462
8462
|
s
|
|
8463
8463
|
);
|
|
8464
8464
|
if (o) {
|
|
8465
8465
|
const h = o.distanceTo(t), c = new Z().subVectors(t, o), g = new Z().subVectors(e, o), x = Math.atan2(c.y, c.x), f = Math.atan2(g.y, g.x);
|
|
8466
|
-
return new
|
|
8466
|
+
return new Nn(
|
|
8467
8467
|
o,
|
|
8468
8468
|
h,
|
|
8469
8469
|
x,
|
|
@@ -8631,7 +8631,7 @@ class Tn extends Ms {
|
|
|
8631
8631
|
* @inheritdoc
|
|
8632
8632
|
*/
|
|
8633
8633
|
clone() {
|
|
8634
|
-
return new
|
|
8634
|
+
return new Nn(
|
|
8635
8635
|
this.center.clone(),
|
|
8636
8636
|
this.radius,
|
|
8637
8637
|
this.startAngle,
|
|
@@ -9965,8 +9965,8 @@ var Sh = { exports: {} };
|
|
|
9965
9965
|
if (cr == null) throw new Q("Class not found " + Qe);
|
|
9966
9966
|
return cr;
|
|
9967
9967
|
case 66:
|
|
9968
|
-
var
|
|
9969
|
-
if (Hr == null) throw new Q("Enum not found " +
|
|
9968
|
+
var An = this.unserialize(), Hr = this.resolver.resolveEnum(An);
|
|
9969
|
+
if (Hr == null) throw new Q("Enum not found " + An);
|
|
9970
9970
|
return Hr;
|
|
9971
9971
|
}
|
|
9972
9972
|
throw this.pos--, new Q("Invalid char " + this.buf.charAt(this.pos) + " at position " + this.pos);
|
|
@@ -10496,10 +10496,10 @@ var Sh = { exports: {} };
|
|
|
10496
10496
|
},
|
|
10497
10497
|
__class__: Et
|
|
10498
10498
|
};
|
|
10499
|
-
var
|
|
10499
|
+
var mn = f.promhx.Deferred = function() {
|
|
10500
10500
|
Et.call(this);
|
|
10501
10501
|
};
|
|
10502
|
-
b["promhx.Deferred"] =
|
|
10502
|
+
b["promhx.Deferred"] = mn, mn.__name__ = ["promhx", "Deferred"], mn.__super__ = Et, mn.prototype = M(Et.prototype, {
|
|
10503
10503
|
resolve: function(r) {
|
|
10504
10504
|
this.handleResolve(r);
|
|
10505
10505
|
},
|
|
@@ -10515,7 +10515,7 @@ var Sh = { exports: {} };
|
|
|
10515
10515
|
publicStream: function() {
|
|
10516
10516
|
return new kr(this);
|
|
10517
10517
|
},
|
|
10518
|
-
__class__:
|
|
10518
|
+
__class__: mn
|
|
10519
10519
|
});
|
|
10520
10520
|
var pe = f.promhx.Promise = function(r) {
|
|
10521
10521
|
Et.call(this, r), this._rejected = !1;
|
|
@@ -10536,7 +10536,7 @@ var Sh = { exports: {} };
|
|
|
10536
10536
|
handleResolve: function(r) {
|
|
10537
10537
|
if (this._resolved) {
|
|
10538
10538
|
var n = "Promise has already been resolved";
|
|
10539
|
-
throw new Q(
|
|
10539
|
+
throw new Q(pn.AlreadyResolved(n));
|
|
10540
10540
|
}
|
|
10541
10541
|
this._resolve(r);
|
|
10542
10542
|
},
|
|
@@ -10553,7 +10553,7 @@ var Sh = { exports: {} };
|
|
|
10553
10553
|
});
|
|
10554
10554
|
else {
|
|
10555
10555
|
var a = "Downstream Promise is not fullfilled";
|
|
10556
|
-
n.handleError(
|
|
10556
|
+
n.handleError(pn.DownstreamNotFullfilled(a));
|
|
10557
10557
|
}
|
|
10558
10558
|
}), At.continueOnNextLoop();
|
|
10559
10559
|
},
|
|
@@ -10734,13 +10734,13 @@ var Sh = { exports: {} };
|
|
|
10734
10734
|
}, At.continueOnNextLoop = function() {
|
|
10735
10735
|
At.nextLoop != null ? At.nextLoop(At.f) : setImmediate(At.f);
|
|
10736
10736
|
};
|
|
10737
|
-
var
|
|
10738
|
-
|
|
10737
|
+
var pn = b["promhx.error.PromiseError"] = { __ename__: ["promhx", "error", "PromiseError"], __constructs__: ["AlreadyResolved", "DownstreamNotFullfilled"] };
|
|
10738
|
+
pn.AlreadyResolved = function(r) {
|
|
10739
10739
|
var n = ["AlreadyResolved", 0, r];
|
|
10740
|
-
return n.__enum__ =
|
|
10741
|
-
},
|
|
10740
|
+
return n.__enum__ = pn, n.toString = E, n;
|
|
10741
|
+
}, pn.DownstreamNotFullfilled = function(r) {
|
|
10742
10742
|
var n = ["DownstreamNotFullfilled", 1, r];
|
|
10743
|
-
return n.__enum__ =
|
|
10743
|
+
return n.__enum__ = pn, n.toString = E, n;
|
|
10744
10744
|
};
|
|
10745
10745
|
var Ts = function() {
|
|
10746
10746
|
};
|
|
@@ -10901,11 +10901,11 @@ var Sh = { exports: {} };
|
|
|
10901
10901
|
b["verb.core.Plane"] = Bn, Bn.__name__ = ["verb", "core", "Plane"], Bn.__super__ = $t, Bn.prototype = M($t.prototype, {
|
|
10902
10902
|
__class__: Bn
|
|
10903
10903
|
});
|
|
10904
|
-
var
|
|
10904
|
+
var gn = f.core.Ray = function(r, n) {
|
|
10905
10905
|
this.origin = r, this.dir = n;
|
|
10906
10906
|
};
|
|
10907
|
-
b["verb.core.Ray"] =
|
|
10908
|
-
__class__:
|
|
10907
|
+
b["verb.core.Ray"] = gn, gn.__name__ = ["verb", "core", "Ray"], gn.__super__ = $t, gn.prototype = M($t.prototype, {
|
|
10908
|
+
__class__: gn
|
|
10909
10909
|
});
|
|
10910
10910
|
var Gt = f.core.NurbsCurveData = function(r, n, a) {
|
|
10911
10911
|
this.degree = r, this.controlPoints = a, this.knots = n;
|
|
@@ -10987,11 +10987,11 @@ var Sh = { exports: {} };
|
|
|
10987
10987
|
b["verb.core.TriSegmentIntersection"] = jn, jn.__name__ = ["verb", "core", "TriSegmentIntersection"], jn.prototype = {
|
|
10988
10988
|
__class__: jn
|
|
10989
10989
|
};
|
|
10990
|
-
var
|
|
10990
|
+
var fn = f.core.CurveTriPoint = function(r, n, a) {
|
|
10991
10991
|
this.u = r, this.point = n, this.uv = a;
|
|
10992
10992
|
};
|
|
10993
|
-
b["verb.core.CurveTriPoint"] =
|
|
10994
|
-
__class__:
|
|
10993
|
+
b["verb.core.CurveTriPoint"] = fn, fn.__name__ = ["verb", "core", "CurveTriPoint"], fn.prototype = {
|
|
10994
|
+
__class__: fn
|
|
10995
10995
|
};
|
|
10996
10996
|
var Ve = function(r, n, a, l, u) {
|
|
10997
10997
|
u == null && (u = !1), l == null && (l = -1), this.uv = a, this.point = r, this.normal = n, this.id = l, this.degen = u;
|
|
@@ -11013,10 +11013,10 @@ var Sh = { exports: {} };
|
|
|
11013
11013
|
b["verb.core.KdTree"] = Wn, Wn.__name__ = ["verb", "core", "KdTree"], Wn.prototype = {
|
|
11014
11014
|
buildTree: function(r, n, a) {
|
|
11015
11015
|
var l = n % this.dim, u, d;
|
|
11016
|
-
return r.length == 0 ? null : r.length == 1 ? new
|
|
11016
|
+
return r.length == 0 ? null : r.length == 1 ? new vn(r[0], l, a) : (r.sort(function(p, _) {
|
|
11017
11017
|
var v = p.point[l] - _.point[l];
|
|
11018
11018
|
return v == 0 ? 0 : v > 0 ? 1 : -1;
|
|
11019
|
-
}), u = Math.floor(r.length / 2), d = new
|
|
11019
|
+
}), u = Math.floor(r.length / 2), d = new vn(r[u], l, a), d.left = this.buildTree(r.slice(0, u), n + 1, d), d.right = this.buildTree(r.slice(u + 1), n + 1, d), d);
|
|
11020
11020
|
},
|
|
11021
11021
|
nearest: function(r, n, a) {
|
|
11022
11022
|
var l = this, u = new Hn(function(A) {
|
|
@@ -11103,17 +11103,17 @@ var Sh = { exports: {} };
|
|
|
11103
11103
|
},
|
|
11104
11104
|
__class__: Hn
|
|
11105
11105
|
};
|
|
11106
|
-
var
|
|
11106
|
+
var _n = f.core.KdPoint = function(r, n) {
|
|
11107
11107
|
this.point = r, this.obj = n;
|
|
11108
11108
|
};
|
|
11109
|
-
b["verb.core.KdPoint"] =
|
|
11110
|
-
__class__:
|
|
11109
|
+
b["verb.core.KdPoint"] = _n, _n.__name__ = ["verb", "core", "KdPoint"], _n.prototype = {
|
|
11110
|
+
__class__: _n
|
|
11111
11111
|
};
|
|
11112
|
-
var
|
|
11112
|
+
var vn = f.core.KdNode = function(r, n, a) {
|
|
11113
11113
|
this.kdPoint = r, this.left = null, this.right = null, this.parent = a, this.dimension = n;
|
|
11114
11114
|
};
|
|
11115
|
-
b["verb.core.KdNode"] =
|
|
11116
|
-
__class__:
|
|
11115
|
+
b["verb.core.KdNode"] = vn, vn.__name__ = ["verb", "core", "KdNode"], vn.prototype = {
|
|
11116
|
+
__class__: vn
|
|
11117
11117
|
};
|
|
11118
11118
|
var hr = function() {
|
|
11119
11119
|
};
|
|
@@ -11487,10 +11487,10 @@ var Sh = { exports: {} };
|
|
|
11487
11487
|
b["verb.core.MinimizationResult"] = Yn, Yn.__name__ = ["verb", "core", "MinimizationResult"], Yn.prototype = {
|
|
11488
11488
|
__class__: Yn
|
|
11489
11489
|
};
|
|
11490
|
-
var
|
|
11490
|
+
var yn = function() {
|
|
11491
11491
|
};
|
|
11492
|
-
b["verb.core.ISerializable"] =
|
|
11493
|
-
__class__:
|
|
11492
|
+
b["verb.core.ISerializable"] = yn, yn.__name__ = ["verb", "core", "ISerializable"], yn.prototype = {
|
|
11493
|
+
__class__: yn
|
|
11494
11494
|
};
|
|
11495
11495
|
var ai = f.core.Deserializer = function() {
|
|
11496
11496
|
};
|
|
@@ -11717,9 +11717,9 @@ var Sh = { exports: {} };
|
|
|
11717
11717
|
var yt = f.eval.Analyze = function() {
|
|
11718
11718
|
};
|
|
11719
11719
|
b["verb.eval.Analyze"] = yt, yt.__name__ = ["verb", "eval", "Analyze"], yt.knotMultiplicities = function(r) {
|
|
11720
|
-
for (var n = [new
|
|
11720
|
+
for (var n = [new xn(r[0], 0)], a = n[0], l = 0; l < r.length; ) {
|
|
11721
11721
|
var u = r[l];
|
|
11722
|
-
++l, Math.abs(u - a.knot) > rt.EPSILON && (a = new
|
|
11722
|
+
++l, Math.abs(u - a.knot) > rt.EPSILON && (a = new xn(u, 0), n.push(a)), a.inc();
|
|
11723
11723
|
}
|
|
11724
11724
|
return n;
|
|
11725
11725
|
}, yt.isRationalSurfaceClosed = function(r, n) {
|
|
@@ -11742,7 +11742,7 @@ var Sh = { exports: {} };
|
|
|
11742
11742
|
for (var J = function(jt) {
|
|
11743
11743
|
return N.rationalSurfaceDerivatives(r, jt[0], jt[1], 2);
|
|
11744
11744
|
}, H = function(jt, Xt, Dt) {
|
|
11745
|
-
var Kt = Xt[1][0], Se = Xt[0][1], je = Xt[2][0], _e = Xt[0][2], ge = Xt[1][1], Ae = Xt[1][1], Ce = m.dot(Kt, Dt), Ke = m.dot(Se, Dt), or = [-Ce, -Ke], $e = m.dot(Kt, Kt) + m.dot(je, Dt), Ze = m.dot(Kt, Se) + m.dot(ge, Dt), Qe = m.dot(Kt, Se) + m.dot(Ae, Dt), cr = m.dot(Se, Se) + m.dot(_e, Dt),
|
|
11745
|
+
var Kt = Xt[1][0], Se = Xt[0][1], je = Xt[2][0], _e = Xt[0][2], ge = Xt[1][1], Ae = Xt[1][1], Ce = m.dot(Kt, Dt), Ke = m.dot(Se, Dt), or = [-Ce, -Ke], $e = m.dot(Kt, Kt) + m.dot(je, Dt), Ze = m.dot(Kt, Se) + m.dot(ge, Dt), Qe = m.dot(Kt, Se) + m.dot(Ae, Dt), cr = m.dot(Se, Se) + m.dot(_e, Dt), An = [[$e, Ze], [Qe, cr]], Hr = Lt.solve(An, or);
|
|
11746
11746
|
return m.add(Hr, jt);
|
|
11747
11747
|
}; l < a; ) {
|
|
11748
11748
|
u = J(T), _ = m.sub(u[0][0], n);
|
|
@@ -11815,14 +11815,14 @@ var Sh = { exports: {} };
|
|
|
11815
11815
|
}
|
|
11816
11816
|
return u * d;
|
|
11817
11817
|
};
|
|
11818
|
-
var
|
|
11818
|
+
var xn = f.eval.KnotMultiplicity = function(r, n) {
|
|
11819
11819
|
this.knot = r, this.mult = n;
|
|
11820
11820
|
};
|
|
11821
|
-
b["verb.eval.KnotMultiplicity"] =
|
|
11821
|
+
b["verb.eval.KnotMultiplicity"] = xn, xn.__name__ = ["verb", "eval", "KnotMultiplicity"], xn.prototype = {
|
|
11822
11822
|
inc: function() {
|
|
11823
11823
|
this.mult++;
|
|
11824
11824
|
},
|
|
11825
|
-
__class__:
|
|
11825
|
+
__class__: xn
|
|
11826
11826
|
};
|
|
11827
11827
|
var Ge = f.eval.Check = function() {
|
|
11828
11828
|
};
|
|
@@ -11895,20 +11895,20 @@ var Sh = { exports: {} };
|
|
|
11895
11895
|
}, oe.rationalCurveByArcLength = function(r, n) {
|
|
11896
11896
|
var a = ft.decomposeCurveIntoBeziers(r), l = a.map(function(P) {
|
|
11897
11897
|
return yt.rationalBezierCurveArcLength(P);
|
|
11898
|
-
}), u = m.sum(l), d = [new
|
|
11898
|
+
}), u = m.sum(l), d = [new bn(r.knots[0], 0)];
|
|
11899
11899
|
if (n > u) return d;
|
|
11900
11900
|
for (var p = n, _ = 0, v = p, w = 0, I = 0, A; _ < a.length; ) {
|
|
11901
11901
|
for (w += l[_]; v < w + rt.EPSILON; )
|
|
11902
|
-
A = yt.rationalBezierCurveParamAtArcLength(a[_], v - I, rt.TOLERANCE, l[_]), d.push(new
|
|
11902
|
+
A = yt.rationalBezierCurveParamAtArcLength(a[_], v - I, rt.TOLERANCE, l[_]), d.push(new bn(A, v)), v += p;
|
|
11903
11903
|
I += l[_], _++;
|
|
11904
11904
|
}
|
|
11905
11905
|
return d;
|
|
11906
11906
|
};
|
|
11907
|
-
var
|
|
11907
|
+
var bn = f.eval.CurveLengthSample = function(r, n) {
|
|
11908
11908
|
this.u = r, this.len = n;
|
|
11909
11909
|
};
|
|
11910
|
-
b["verb.eval.CurveLengthSample"] =
|
|
11911
|
-
__class__:
|
|
11910
|
+
b["verb.eval.CurveLengthSample"] = bn, bn.__name__ = ["verb", "eval", "CurveLengthSample"], bn.prototype = {
|
|
11911
|
+
__class__: bn
|
|
11912
11912
|
};
|
|
11913
11913
|
var N = f.eval.Eval = function() {
|
|
11914
11914
|
};
|
|
@@ -12361,7 +12361,7 @@ var Sh = { exports: {} };
|
|
|
12361
12361
|
}, lt.kdTreeFromSegments = function(r) {
|
|
12362
12362
|
for (var n = [], a = 0; a < r.length; ) {
|
|
12363
12363
|
var l = r[a];
|
|
12364
|
-
++a, n.push(new
|
|
12364
|
+
++a, n.push(new _n(l.min.point, l.min)), n.push(new _n(l.max.point, l.max));
|
|
12365
12365
|
}
|
|
12366
12366
|
return new Wn(n, m.distSquared);
|
|
12367
12367
|
}, lt.lookupAdjacentSegment = function(r, n, a) {
|
|
@@ -12460,7 +12460,7 @@ var Sh = { exports: {} };
|
|
|
12460
12460
|
var k = P++, T = u[k], L = v[k], C = lt.rays(T, L, r.origin, r.dir);
|
|
12461
12461
|
if (C != null) {
|
|
12462
12462
|
var B = C.u0, R = C.u1;
|
|
12463
|
-
B < -rt.EPSILON || B > w[k] + rt.EPSILON || ((I == null || R < I.u) && (I = new
|
|
12463
|
+
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]))), (A == null || R > A.u) && (A = new fn(R, m.onRay(r.origin, r.dir, R), m.onRay(d[k], p[k], B / w[k]))));
|
|
12464
12464
|
}
|
|
12465
12465
|
}
|
|
12466
12466
|
return A == null || I == null ? null : new we(I, A);
|
|
@@ -12480,7 +12480,7 @@ var Sh = { exports: {} };
|
|
|
12480
12480
|
var w, I, A, P;
|
|
12481
12481
|
d == 0 ? (w = n[1], I = n[2], A = l[1], P = l[2]) : d == 1 ? (w = n[0], I = n[2], A = l[0], P = l[2]) : (w = n[0], I = n[1], A = l[0], P = l[1]);
|
|
12482
12482
|
var k = -m.dot(r, n), T = -m.dot(a, l), L = w * P - I * A, C = (I * T - k * P) / L, B = (k * A - w * T) / L, R;
|
|
12483
|
-
return d == 0 ? R = [0, C, B] : d == 1 ? R = [C, 0, B] : R = [C, B, 0], new
|
|
12483
|
+
return d == 0 ? R = [0, C, B] : d == 1 ? R = [C, 0, B] : R = [C, B, 0], new gn(R, m.normalized(u));
|
|
12484
12484
|
}, lt.threePlanes = function(r, n, a, l, u, d) {
|
|
12485
12485
|
var p = m.cross(a, u), _ = m.dot(r, p);
|
|
12486
12486
|
if (Math.abs(_) < rt.EPSILON) return null;
|
|
@@ -12835,18 +12835,18 @@ var Sh = { exports: {} };
|
|
|
12835
12835
|
if (nt > 0 ? or = Math.floor(k - (nt + 1) / 2) : or = k, nt > 0) {
|
|
12836
12836
|
for (var $e = Ae - It, Ze = [], Qe = l; Qe > ge; )
|
|
12837
12837
|
Ze[Qe - ge - 1] = $e / (u[mt + Qe] - It), Qe--;
|
|
12838
|
-
for (var cr = 1,
|
|
12838
|
+
for (var cr = 1, An = nt + 1; cr < An; ) {
|
|
12839
12839
|
for (var Hr = cr++, zh = nt - Hr, ui = ge + Hr, qr = l; qr >= ui; )
|
|
12840
12840
|
w[qr] = m.add(m.mul(Ze[qr - ui], w[qr]), m.mul(1 - Ze[qr - ui], w[qr - 1])), qr--;
|
|
12841
12841
|
A[zh] = w[l];
|
|
12842
12842
|
}
|
|
12843
12843
|
}
|
|
12844
12844
|
for (var ao = Ke, Rh = k + 1; ao < Rh; ) {
|
|
12845
|
-
var
|
|
12846
|
-
I[
|
|
12847
|
-
for (var Bh = ft.imin(l,
|
|
12845
|
+
var In = ao++;
|
|
12846
|
+
I[In] = m.zeros1d(_);
|
|
12847
|
+
for (var Bh = ft.imin(l, In), oo = ft.imax(0, In - p), Fh = Bh + 1; oo < Fh; ) {
|
|
12848
12848
|
var lo = oo++;
|
|
12849
|
-
I[
|
|
12849
|
+
I[In] = m.add(I[In], m.mul(v[In][lo], w[lo]));
|
|
12850
12850
|
}
|
|
12851
12851
|
}
|
|
12852
12852
|
if (Ce > 1)
|
|
@@ -13254,7 +13254,7 @@ var Sh = { exports: {} };
|
|
|
13254
13254
|
wt._init || (wt._workerPool = new Lr(wt.THREADS), wt._init = !0);
|
|
13255
13255
|
}, wt.dispatchMethod = function(r, n, a) {
|
|
13256
13256
|
wt.init();
|
|
13257
|
-
var l = new
|
|
13257
|
+
var l = new mn(), u = function(d) {
|
|
13258
13258
|
l.resolve(d);
|
|
13259
13259
|
};
|
|
13260
13260
|
return wt._workerPool.addWork(ut.getClassName(r), n, a, u), new pe(l);
|
|
@@ -13301,15 +13301,15 @@ var Sh = { exports: {} };
|
|
|
13301
13301
|
b["verb.exe._WorkerPool.Work"] = Wr, Wr.__name__ = ["verb", "exe", "_WorkerPool", "Work"], Wr.prototype = {
|
|
13302
13302
|
__class__: Wr
|
|
13303
13303
|
};
|
|
13304
|
-
var
|
|
13304
|
+
var wn = function() {
|
|
13305
13305
|
};
|
|
13306
|
-
b["verb.geom.ICurve"] =
|
|
13307
|
-
__class__:
|
|
13306
|
+
b["verb.geom.ICurve"] = wn, wn.__name__ = ["verb", "geom", "ICurve"], wn.__interfaces__ = [yn], wn.prototype = {
|
|
13307
|
+
__class__: wn
|
|
13308
13308
|
};
|
|
13309
13309
|
var Tt = f.geom.NurbsCurve = function(r) {
|
|
13310
13310
|
this._data = Ge.isValidNurbsCurveData(r);
|
|
13311
13311
|
};
|
|
13312
|
-
b["verb.geom.NurbsCurve"] = Tt, Tt.__name__ = ["verb", "geom", "NurbsCurve"], Tt.__interfaces__ = [
|
|
13312
|
+
b["verb.geom.NurbsCurve"] = Tt, Tt.__name__ = ["verb", "geom", "NurbsCurve"], Tt.__interfaces__ = [wn], Tt.byKnotsControlPointsWeights = function(r, n, a, l) {
|
|
13313
13313
|
return new Tt(new Gt(r, n.slice(), N.homogenize1d(a, l)));
|
|
13314
13314
|
}, Tt.byPoints = function(r, n) {
|
|
13315
13315
|
return n == null && (n = 3), new Tt(pt.rationalInterpCurve(r, n));
|
|
@@ -13467,15 +13467,15 @@ var Sh = { exports: {} };
|
|
|
13467
13467
|
b["verb.geom.Circle"] = Kn, Kn.__name__ = ["verb", "geom", "Circle"], Kn.__super__ = Or, Kn.prototype = M(Or.prototype, {
|
|
13468
13468
|
__class__: Kn
|
|
13469
13469
|
});
|
|
13470
|
-
var
|
|
13470
|
+
var Sn = function() {
|
|
13471
13471
|
};
|
|
13472
|
-
b["verb.geom.ISurface"] =
|
|
13473
|
-
__class__:
|
|
13472
|
+
b["verb.geom.ISurface"] = Sn, Sn.__name__ = ["verb", "geom", "ISurface"], Sn.__interfaces__ = [yn], Sn.prototype = {
|
|
13473
|
+
__class__: Sn
|
|
13474
13474
|
};
|
|
13475
13475
|
var Pt = f.geom.NurbsSurface = function(r) {
|
|
13476
13476
|
this._data = Ge.isValidNurbsSurfaceData(r);
|
|
13477
13477
|
};
|
|
13478
|
-
b["verb.geom.NurbsSurface"] = Pt, Pt.__name__ = ["verb", "geom", "NurbsSurface"], Pt.__interfaces__ = [
|
|
13478
|
+
b["verb.geom.NurbsSurface"] = Pt, Pt.__name__ = ["verb", "geom", "NurbsSurface"], Pt.__interfaces__ = [Sn], Pt.byKnotsControlPointsWeights = function(r, n, a, l, u, d) {
|
|
13479
13479
|
return new Pt(new te(r, n, a, l, N.homogenize2d(u, d)));
|
|
13480
13480
|
}, Pt.byCorners = function(r, n, a, l) {
|
|
13481
13481
|
return new Pt(pt.fourPointSurface(r, n, a, l));
|
|
@@ -13886,7 +13886,7 @@ var Sh = { exports: {} };
|
|
|
13886
13886
|
});
|
|
13887
13887
|
})(Sh);
|
|
13888
13888
|
var kd = Sh.exports;
|
|
13889
|
-
const
|
|
13889
|
+
const Mn = /* @__PURE__ */ Ed(kd);
|
|
13890
13890
|
class Mi {
|
|
13891
13891
|
constructor() {
|
|
13892
13892
|
this.c0 = 0, this.c1 = 0, this.c2 = 0, this.c3 = 0;
|
|
@@ -14076,7 +14076,7 @@ class Md extends Ms {
|
|
|
14076
14076
|
}), t;
|
|
14077
14077
|
}
|
|
14078
14078
|
}
|
|
14079
|
-
class
|
|
14079
|
+
class Cn {
|
|
14080
14080
|
constructor(t, e, s, o) {
|
|
14081
14081
|
this._degree = t, this._knots = [...e], this._controlPoints = s.map((h) => ({ x: h.x, y: h.y, z: h.z })), this._weights = o ? [...o] : new Array(s.length).fill(1);
|
|
14082
14082
|
}
|
|
@@ -14133,7 +14133,7 @@ class Nn {
|
|
|
14133
14133
|
* Create a NURBS curve from control points and knots
|
|
14134
14134
|
*/
|
|
14135
14135
|
static byKnotsControlPointsWeights(t, e, s, o) {
|
|
14136
|
-
return new
|
|
14136
|
+
return new Cn(t, e, s, o);
|
|
14137
14137
|
}
|
|
14138
14138
|
/**
|
|
14139
14139
|
* Create a NURBS curve from fit points using interpolation
|
|
@@ -14153,7 +14153,7 @@ class Nn {
|
|
|
14153
14153
|
break;
|
|
14154
14154
|
}
|
|
14155
14155
|
const h = t.map((g) => ({ x: g[0], y: g[1], z: g[2] })), c = new Array(h.length).fill(1);
|
|
14156
|
-
return new
|
|
14156
|
+
return new Cn(e, o, h, c);
|
|
14157
14157
|
}
|
|
14158
14158
|
/**
|
|
14159
14159
|
* Get the valid parameter range for this curve
|
|
@@ -14200,10 +14200,10 @@ class Nn {
|
|
|
14200
14200
|
*/
|
|
14201
14201
|
static createClosedCurve(t, e, s = "Chord") {
|
|
14202
14202
|
const o = this.createFitPointsForClosedCurve(t).map((h) => [h.x, h.y, h.z]);
|
|
14203
|
-
return
|
|
14203
|
+
return Cn.byPoints(o, e, s);
|
|
14204
14204
|
}
|
|
14205
14205
|
}
|
|
14206
|
-
class
|
|
14206
|
+
class cn extends Ms {
|
|
14207
14207
|
constructor(t, e, s, o, h) {
|
|
14208
14208
|
super();
|
|
14209
14209
|
const c = arguments.length;
|
|
@@ -14215,7 +14215,7 @@ class un extends Ms {
|
|
|
14215
14215
|
if (c >= 3 && (Array.isArray(s) ? (g = s, c >= 4 && (x = o || 3), c >= 5 && (f = h)) : s !== void 0 && (x = s || 3, c >= 4 && (f = o))), s === void 0 && c >= 4 && (x = o || 3, c >= 5 && (f = h)), this._degree = x, this._closed = f, this._controlPoints.length < this._degree + 1)
|
|
14216
14216
|
throw He.ILLEGAL_PARAMETERS;
|
|
14217
14217
|
const S = this.toVerbPoints(this._controlPoints);
|
|
14218
|
-
this._nurbsCurve =
|
|
14218
|
+
this._nurbsCurve = Mn.geom.NurbsCurve.byKnotsControlPointsWeights(
|
|
14219
14219
|
this._degree,
|
|
14220
14220
|
e,
|
|
14221
14221
|
S,
|
|
@@ -14225,7 +14225,7 @@ class un extends Ms {
|
|
|
14225
14225
|
if (this._fitPoints = t, this._knotParameterization = e, c >= 3 && (this._degree = s || 3), c >= 4 && (this._closed = o), this._fitPoints.length < this._degree + 1)
|
|
14226
14226
|
throw He.ILLEGAL_PARAMETERS;
|
|
14227
14227
|
const g = this.toNurbsPoints(this._fitPoints);
|
|
14228
|
-
this._nurbsCurve =
|
|
14228
|
+
this._nurbsCurve = Mn.geom.NurbsCurve.byPoints(g, this._degree), this._controlPoints = this.toGePoints(this._nurbsCurve.controlPoints());
|
|
14229
14229
|
}
|
|
14230
14230
|
}
|
|
14231
14231
|
/**
|
|
@@ -14234,24 +14234,24 @@ class un extends Ms {
|
|
|
14234
14234
|
buildCurve() {
|
|
14235
14235
|
if (this._fitPoints && this._knotParameterization) {
|
|
14236
14236
|
if (this._closed) {
|
|
14237
|
-
const t =
|
|
14237
|
+
const t = Cn.createFitPointsForClosedCurve(
|
|
14238
14238
|
this._fitPoints
|
|
14239
14239
|
), e = this.toNurbsPoints(t);
|
|
14240
|
-
this._nurbsCurve =
|
|
14240
|
+
this._nurbsCurve = Mn.geom.NurbsCurve.byPoints(e, this._degree);
|
|
14241
14241
|
} else {
|
|
14242
14242
|
const t = this.toNurbsPoints(this._fitPoints);
|
|
14243
|
-
this._nurbsCurve =
|
|
14243
|
+
this._nurbsCurve = Mn.geom.NurbsCurve.byPoints(t, this._degree);
|
|
14244
14244
|
}
|
|
14245
14245
|
this._controlPoints = this.toGePoints(this._nurbsCurve.controlPoints());
|
|
14246
14246
|
} else if (this._controlPoints)
|
|
14247
14247
|
if (this._closed) {
|
|
14248
|
-
const t =
|
|
14248
|
+
const t = Cn.createFitPointsForClosedCurve(
|
|
14249
14249
|
this._controlPoints
|
|
14250
14250
|
), e = this.toNurbsPoints(t);
|
|
14251
|
-
this._nurbsCurve =
|
|
14251
|
+
this._nurbsCurve = Mn.geom.NurbsCurve.byPoints(e, this._degree), this._controlPoints = this.toGePoints(this._nurbsCurve.controlPoints());
|
|
14252
14252
|
} else {
|
|
14253
14253
|
const t = this._nurbsCurve.knots(), e = this._nurbsCurve.weights(), s = this.toVerbPoints(this._controlPoints);
|
|
14254
|
-
this._nurbsCurve =
|
|
14254
|
+
this._nurbsCurve = Mn.geom.NurbsCurve.byKnotsControlPointsWeights(
|
|
14255
14255
|
this._degree,
|
|
14256
14256
|
t,
|
|
14257
14257
|
s,
|
|
@@ -14404,7 +14404,7 @@ class un extends Ms {
|
|
|
14404
14404
|
throw new Error(
|
|
14405
14405
|
`At least ${s + 1} points are required for a degree ${s} closed spline`
|
|
14406
14406
|
);
|
|
14407
|
-
return new
|
|
14407
|
+
return new cn(t, e, s, !0);
|
|
14408
14408
|
}
|
|
14409
14409
|
}
|
|
14410
14410
|
var nn = 256, Ah = [], Lo = 256, Fs;
|
|
@@ -14416,7 +14416,7 @@ function Td(i) {
|
|
|
14416
14416
|
Fs += Ah[Math.random() * 256 | 0];
|
|
14417
14417
|
return Fs.substring(nn, nn++ + e);
|
|
14418
14418
|
}
|
|
14419
|
-
class
|
|
14419
|
+
class dn {
|
|
14420
14420
|
/**
|
|
14421
14421
|
* Creates a new AcDbObject instance.
|
|
14422
14422
|
*
|
|
@@ -14610,7 +14610,7 @@ class cn {
|
|
|
14610
14610
|
close() {
|
|
14611
14611
|
}
|
|
14612
14612
|
}
|
|
14613
|
-
const Sa = class Sa extends
|
|
14613
|
+
const Sa = class Sa extends dn {
|
|
14614
14614
|
constructor() {
|
|
14615
14615
|
super(...arguments), this._layer = "0", this._color = new on(), this._lineType = gi, this._lineWeight = 1, this._linetypeScale = -1, this._visibility = !0, this._transparency = 0;
|
|
14616
14616
|
}
|
|
@@ -15145,9 +15145,9 @@ const Pa = class Pa extends Pe {
|
|
|
15145
15145
|
super(), this._position = new q(), this._bulge = 0, this._startWidth = 0, this._endWidth = 0, this._vertexType = 0;
|
|
15146
15146
|
}
|
|
15147
15147
|
/**
|
|
15148
|
-
* Gets the position value of the vertex. The position point value must be in OCS coordinates
|
|
15149
|
-
* (the OCS of the polyline containing the vertex), not WCS. The Z coordinate is kept in the
|
|
15150
|
-
* owning AcDb2dPolyline only for historical purposes.
|
|
15148
|
+
* Gets the position value of the vertex. The position point value must be in OCS coordinates
|
|
15149
|
+
* (the OCS of the polyline containing the vertex), not WCS. The Z coordinate is kept in the
|
|
15150
|
+
* owning AcDb2dPolyline only for historical purposes.
|
|
15151
15151
|
*
|
|
15152
15152
|
* @returns The position value of the vertex
|
|
15153
15153
|
*/
|
|
@@ -15155,9 +15155,9 @@ const Pa = class Pa extends Pe {
|
|
|
15155
15155
|
return this._position;
|
|
15156
15156
|
}
|
|
15157
15157
|
/**
|
|
15158
|
-
* Sets the position value of the vertex. The position point value must be in OCS coordinates
|
|
15159
|
-
* (the OCS of the polyline containing the vertex), not WCS. The Z coordinate is kept in the
|
|
15160
|
-
* owning AcDb2dPolyline only for historical purposes.
|
|
15158
|
+
* Sets the position value of the vertex. The position point value must be in OCS coordinates
|
|
15159
|
+
* (the OCS of the polyline containing the vertex), not WCS. The Z coordinate is kept in the
|
|
15160
|
+
* owning AcDb2dPolyline only for historical purposes.
|
|
15161
15161
|
*
|
|
15162
15162
|
* @param value - The position value of the vertex
|
|
15163
15163
|
*/
|
|
@@ -15181,7 +15181,7 @@ const Pa = class Pa extends Pe {
|
|
|
15181
15181
|
this._bulge = t;
|
|
15182
15182
|
}
|
|
15183
15183
|
/**
|
|
15184
|
-
* Gets the start width for the vertex. The start width is used as the width at this vertex
|
|
15184
|
+
* Gets the start width for the vertex. The start width is used as the width at this vertex
|
|
15185
15185
|
* for the polyline segment from this vertex to the next vertex.
|
|
15186
15186
|
*
|
|
15187
15187
|
* @returns The start width for the vertex
|
|
@@ -15190,7 +15190,7 @@ const Pa = class Pa extends Pe {
|
|
|
15190
15190
|
return this._startWidth;
|
|
15191
15191
|
}
|
|
15192
15192
|
/**
|
|
15193
|
-
* Sets the start width for the vertex. The start width is used as the width at this vertex
|
|
15193
|
+
* Sets the start width for the vertex. The start width is used as the width at this vertex
|
|
15194
15194
|
* for the polyline segment from this vertex to the next vertex.
|
|
15195
15195
|
*
|
|
15196
15196
|
* @param value - The start width for the vertex
|
|
@@ -15374,7 +15374,7 @@ const ka = class ka extends Pe {
|
|
|
15374
15374
|
super(), this._position = new q(), this._vertexType = 0;
|
|
15375
15375
|
}
|
|
15376
15376
|
/**
|
|
15377
|
-
* Gets the WCS point value of this vertex.
|
|
15377
|
+
* Gets the WCS point value of this vertex.
|
|
15378
15378
|
*
|
|
15379
15379
|
* @returns The WCS point value of this vertex.
|
|
15380
15380
|
*/
|
|
@@ -15382,7 +15382,7 @@ const ka = class ka extends Pe {
|
|
|
15382
15382
|
return this._position;
|
|
15383
15383
|
}
|
|
15384
15384
|
/**
|
|
15385
|
-
* Sets WCS point value of this vertex.
|
|
15385
|
+
* Sets WCS point value of this vertex.
|
|
15386
15386
|
*
|
|
15387
15387
|
* @param value - The WCS point value of this vertex.
|
|
15388
15388
|
*/
|
|
@@ -15473,7 +15473,7 @@ const Ma = class Ma extends Ee {
|
|
|
15473
15473
|
* ```
|
|
15474
15474
|
*/
|
|
15475
15475
|
constructor(t, e, s, o) {
|
|
15476
|
-
super(), this._geo = new
|
|
15476
|
+
super(), this._geo = new Nn(
|
|
15477
15477
|
t,
|
|
15478
15478
|
e,
|
|
15479
15479
|
s,
|
|
@@ -15878,7 +15878,7 @@ const Ta = class Ta extends Pe {
|
|
|
15878
15878
|
}
|
|
15879
15879
|
const s = new ln().setFromEuler(
|
|
15880
15880
|
new Ad(this.rotation, 0, 0)
|
|
15881
|
-
), o = new
|
|
15881
|
+
), o = new hn();
|
|
15882
15882
|
return o.compose(this.position, s, this.scaleFactors), t.applyMatrix4(o), t;
|
|
15883
15883
|
}
|
|
15884
15884
|
/**
|
|
@@ -15903,7 +15903,7 @@ const Ta = class Ta extends Pe {
|
|
|
15903
15903
|
}
|
|
15904
15904
|
computeTransformMatrix() {
|
|
15905
15905
|
const t = new ln();
|
|
15906
|
-
return t.setFromAxisAngle(Z.Z_AXIS, this.rotation), new
|
|
15906
|
+
return t.setFromAxisAngle(Z.Z_AXIS, this.rotation), new hn().compose(
|
|
15907
15907
|
this._position,
|
|
15908
15908
|
t,
|
|
15909
15909
|
this._scaleFactors
|
|
@@ -15941,7 +15941,7 @@ const Na = class Na extends Ee {
|
|
|
15941
15941
|
* ```
|
|
15942
15942
|
*/
|
|
15943
15943
|
constructor(t, e, s = Z.Z_AXIS) {
|
|
15944
|
-
super(), this._geo = new
|
|
15944
|
+
super(), this._geo = new Nn(
|
|
15945
15945
|
t,
|
|
15946
15946
|
e,
|
|
15947
15947
|
0,
|
|
@@ -16810,7 +16810,7 @@ const za = class za extends Ee {
|
|
|
16810
16810
|
return this.createSplineIfNeeded(), this._splineGeo;
|
|
16811
16811
|
}
|
|
16812
16812
|
createSplineIfNeeded() {
|
|
16813
|
-
this.isSplined && this.numVertices >= 2 && (this._splineGeo == null || this._updated) && (this._splineGeo = new
|
|
16813
|
+
this.isSplined && this.numVertices >= 2 && (this._splineGeo == null || this._updated) && (this._splineGeo = new cn(this._vertices, "Uniform"), this._updated = !1);
|
|
16814
16814
|
}
|
|
16815
16815
|
};
|
|
16816
16816
|
za.typeName = "Leader";
|
|
@@ -16834,7 +16834,7 @@ const Ra = class Ra extends Ee {
|
|
|
16834
16834
|
* ```
|
|
16835
16835
|
*/
|
|
16836
16836
|
constructor(t, e) {
|
|
16837
|
-
super(), this._geo = new
|
|
16837
|
+
super(), this._geo = new un(t, e);
|
|
16838
16838
|
}
|
|
16839
16839
|
/**
|
|
16840
16840
|
* Gets the starting point of this line.
|
|
@@ -16971,25 +16971,25 @@ const Ra = class Ra extends Ee {
|
|
|
16971
16971
|
subGetOsnapPoints(t, e, s, o, h) {
|
|
16972
16972
|
const c = this.startPoint, g = this.endPoint;
|
|
16973
16973
|
switch (t) {
|
|
16974
|
-
case
|
|
16974
|
+
case Tn.EndPoint:
|
|
16975
16975
|
h.push(c), h.push(g);
|
|
16976
16976
|
break;
|
|
16977
|
-
case
|
|
16977
|
+
case Tn.MidPoint:
|
|
16978
16978
|
h.push(this.midPoint);
|
|
16979
16979
|
break;
|
|
16980
|
-
case
|
|
16980
|
+
case Tn.Nearest:
|
|
16981
16981
|
{
|
|
16982
16982
|
const x = this._geo.project(s);
|
|
16983
16983
|
h.push(x);
|
|
16984
16984
|
}
|
|
16985
16985
|
break;
|
|
16986
|
-
case
|
|
16986
|
+
case Tn.Perpendicular:
|
|
16987
16987
|
{
|
|
16988
16988
|
const x = this._geo.perpPoint(s);
|
|
16989
16989
|
h.push(x);
|
|
16990
16990
|
}
|
|
16991
16991
|
break;
|
|
16992
|
-
case
|
|
16992
|
+
case Tn.Tangent:
|
|
16993
16993
|
h.push(c);
|
|
16994
16994
|
break;
|
|
16995
16995
|
}
|
|
@@ -17439,12 +17439,12 @@ const Fa = class Fa extends Ee {
|
|
|
17439
17439
|
const c = +(t !== void 0) + +(e !== void 0) + +(s !== void 0) + +(o !== void 0) + +(h !== void 0);
|
|
17440
17440
|
if (c < 2 || c > 5)
|
|
17441
17441
|
throw He.ILLEGAL_PARAMETERS;
|
|
17442
|
-
!Array.isArray(e) ? this._geo = new
|
|
17442
|
+
!Array.isArray(e) ? this._geo = new cn(
|
|
17443
17443
|
t,
|
|
17444
17444
|
e,
|
|
17445
17445
|
s,
|
|
17446
17446
|
o
|
|
17447
|
-
) : this._geo = new
|
|
17447
|
+
) : this._geo = new cn(
|
|
17448
17448
|
t,
|
|
17449
17449
|
e,
|
|
17450
17450
|
s,
|
|
@@ -17845,7 +17845,7 @@ const Rd = /* @__PURE__ */ new Z(), Da = class Da extends Js {
|
|
|
17845
17845
|
};
|
|
17846
17846
|
Da.typeName = "Table";
|
|
17847
17847
|
let Xi = Da;
|
|
17848
|
-
const Ro = /* @__PURE__ */ new
|
|
17848
|
+
const Ro = /* @__PURE__ */ new hn();
|
|
17849
17849
|
var Bd = /* @__PURE__ */ ((i) => (i[i.LEFT = 0] = "LEFT", i[i.CENTER = 1] = "CENTER", i[i.RIGHT = 2] = "RIGHT", i[i.ALIGNED = 3] = "ALIGNED", i[i.MIDDLE = 4] = "MIDDLE", i[i.FIT = 5] = "FIT", i))(Bd || {}), Fd = /* @__PURE__ */ ((i) => (i[i.BASELINE = 0] = "BASELINE", i[i.BOTTOM = 1] = "BOTTOM", i[i.MIDDLE = 2] = "MIDDLE", i[i.TOP = 3] = "TOP", i))(Fd || {});
|
|
17850
17850
|
const Ua = class Ua extends Pe {
|
|
17851
17851
|
/**
|
|
@@ -19575,7 +19575,7 @@ const Ka = class Ka extends Pe {
|
|
|
19575
19575
|
* ```
|
|
19576
19576
|
*/
|
|
19577
19577
|
constructor() {
|
|
19578
|
-
super(), this._dimBlockId = null, this._dimensionStyleName = null, this._dimensionText = null, this._textLineSpacingFactor = 1, this._textLineSpacingStyle = 1, this._textPosition = new q(), this._textRotation = 0;
|
|
19578
|
+
super(), this._dimBlockId = null, this._dimBlockPosition = new q(), this._dimensionStyleName = null, this._dimensionText = null, this._textLineSpacingFactor = 1, this._textLineSpacingStyle = 1, this._textPosition = new q(), this._textRotation = 0, this._normal = new Z(0, 0, 1);
|
|
19579
19579
|
}
|
|
19580
19580
|
/**
|
|
19581
19581
|
* Gets the block table record ID containing the entities that this dimension displays.
|
|
@@ -19604,6 +19604,54 @@ const Ka = class Ka extends Pe {
|
|
|
19604
19604
|
set dimBlockId(t) {
|
|
19605
19605
|
this._dimBlockId = t;
|
|
19606
19606
|
}
|
|
19607
|
+
/**
|
|
19608
|
+
* Gets the relative position point of the block referenced by the dimension (in WCS coordinates).
|
|
19609
|
+
* The block position is the insertion point of the block referenced by the dimension, relative to
|
|
19610
|
+
* the primary definition point (DXF group code 10) of the dimension itself.
|
|
19611
|
+
*
|
|
19612
|
+
* The block position (in WCS) is added to the dimension primary definition point (also in WCS) to
|
|
19613
|
+
* get the actual insertion point for the anonymous block that is referenced by the dimension. So,
|
|
19614
|
+
* for example, changing a dimension's block position from (0,0,0) to (0,0,1) (in WCS) will cause
|
|
19615
|
+
* the dimension to display as though it has been moved 1 unit along the WCS Z axis.
|
|
19616
|
+
*
|
|
19617
|
+
* For a dimension newly created via any dimension command, the block position will be (0,0,0).
|
|
19618
|
+
* For copies of existing dimensions, or if a dimension is moved, the block position will be the
|
|
19619
|
+
* offset vector (in WCS) from where the original dimension was located. For example, moving a
|
|
19620
|
+
* dimension 1 unit down the WCS Y axis will cause AutoCAD to update the block position value from
|
|
19621
|
+
* (0,0,0) to (0,-1,0) (in WCS coordinates).
|
|
19622
|
+
*
|
|
19623
|
+
* The position point is used for DXF group code 12.
|
|
19624
|
+
*
|
|
19625
|
+
* @returns The relative position point of the block referenced by the dimension.
|
|
19626
|
+
*
|
|
19627
|
+
*/
|
|
19628
|
+
get dimBlockPosition() {
|
|
19629
|
+
return this._dimBlockPosition;
|
|
19630
|
+
}
|
|
19631
|
+
/**
|
|
19632
|
+
* Sets the relative position point of the block referenced by the dimension (in WCS coordinates).
|
|
19633
|
+
* The block position is the insertion point of the block referenced by the dimension, relative to
|
|
19634
|
+
* the primary definition point (DXF group code 10) of the dimension itself.
|
|
19635
|
+
*
|
|
19636
|
+
* The block position (in WCS) is added to the dimension primary definition point (also in WCS) to
|
|
19637
|
+
* get the actual insertion point for the anonymous block that is referenced by the dimension. So,
|
|
19638
|
+
* for example, changing a dimension's block position from (0,0,0) to (0,0,1) (in WCS) will cause
|
|
19639
|
+
* the dimension to display as though it has been moved 1 unit along the WCS Z axis.
|
|
19640
|
+
*
|
|
19641
|
+
* For a dimension newly created via any dimension command, the block position will be (0,0,0).
|
|
19642
|
+
* For copies of existing dimensions, or if a dimension is moved, the block position will be the
|
|
19643
|
+
* offset vector (in WCS) from where the original dimension was located. For example, moving a
|
|
19644
|
+
* dimension 1 unit down the WCS Y axis will cause AutoCAD to update the block position value from
|
|
19645
|
+
* (0,0,0) to (0,-1,0) (in WCS coordinates).
|
|
19646
|
+
*
|
|
19647
|
+
* The position point is used for DXF group code 12.
|
|
19648
|
+
*
|
|
19649
|
+
* @param value - The relative position point of the block referenced by the dimension.
|
|
19650
|
+
|
|
19651
|
+
*/
|
|
19652
|
+
set dimBlockPosition(t) {
|
|
19653
|
+
this._dimBlockPosition.copy(t);
|
|
19654
|
+
}
|
|
19607
19655
|
/**
|
|
19608
19656
|
* Gets the dimension style name used by this dimension.
|
|
19609
19657
|
*
|
|
@@ -19727,6 +19775,22 @@ const Ka = class Ka extends Pe {
|
|
|
19727
19775
|
set textRotation(t) {
|
|
19728
19776
|
this._textRotation = t;
|
|
19729
19777
|
}
|
|
19778
|
+
/**
|
|
19779
|
+
* Gets the normal vector of the plane containing the dimension.
|
|
19780
|
+
*
|
|
19781
|
+
* @returns The normal vector
|
|
19782
|
+
*/
|
|
19783
|
+
get normal() {
|
|
19784
|
+
return this._normal;
|
|
19785
|
+
}
|
|
19786
|
+
/**
|
|
19787
|
+
* Sets the normal vector of the plane containing the dimension.
|
|
19788
|
+
*
|
|
19789
|
+
* @param value - The new normal vector
|
|
19790
|
+
*/
|
|
19791
|
+
set normal(t) {
|
|
19792
|
+
this._normal.copy(t).normalize();
|
|
19793
|
+
}
|
|
19730
19794
|
/**
|
|
19731
19795
|
* @inheritdoc
|
|
19732
19796
|
*/
|
|
@@ -19736,13 +19800,15 @@ const Ka = class Ka extends Pe {
|
|
|
19736
19800
|
this.dimBlockId
|
|
19737
19801
|
);
|
|
19738
19802
|
if (s) {
|
|
19739
|
-
const o = sn.instance.draw(
|
|
19803
|
+
const o = new hn().makeTranslation(this.dimBlockPosition), h = sn.instance.draw(
|
|
19740
19804
|
t,
|
|
19741
19805
|
s,
|
|
19742
19806
|
this.rgbColor,
|
|
19743
|
-
!1
|
|
19807
|
+
!1,
|
|
19808
|
+
o,
|
|
19809
|
+
this.normal
|
|
19744
19810
|
);
|
|
19745
|
-
return this.attachEntityInfo(
|
|
19811
|
+
return this.attachEntityInfo(h), h;
|
|
19746
19812
|
}
|
|
19747
19813
|
}
|
|
19748
19814
|
const e = t.group([]);
|
|
@@ -20186,12 +20252,12 @@ const Za = class Za extends Gr {
|
|
|
20186
20252
|
), h = this.findIntersectionPoint(
|
|
20187
20253
|
s,
|
|
20188
20254
|
this._dimLinePoint
|
|
20189
|
-
), c = new
|
|
20255
|
+
), c = new un(o, h);
|
|
20190
20256
|
return t.push(c), e.endPoint = o, this.adjustExtensionLine(e), t.push(e), s.endPoint = h, this.adjustExtensionLine(s), t.push(s), t;
|
|
20191
20257
|
}
|
|
20192
20258
|
createExtensionLine(t) {
|
|
20193
20259
|
const e = this.rotation + Math.PI / 2, s = this.findPointOnLine2(t, e, 100);
|
|
20194
|
-
return new
|
|
20260
|
+
return new un(t, { ...s, z: t.z });
|
|
20195
20261
|
}
|
|
20196
20262
|
/**
|
|
20197
20263
|
* Compute the intersection point between a line 'line1' and a line 'line2' that passes through
|
|
@@ -20921,7 +20987,15 @@ class Do {
|
|
|
20921
20987
|
return t.flag & 4 && (t.smoothType == zs.CUBIC ? c = Ks.CubicSplinePoly : t.smoothType == zs.QUADRATIC && (c = Ks.QuadSplinePoly)), new Di(c, o, e);
|
|
20922
20988
|
} else {
|
|
20923
20989
|
let c = ws.SimplePoly;
|
|
20924
|
-
return t.flag & 2 ? c = ws.FitCurvePoly : t.flag & 4 && (t.smoothType == zs.CUBIC ? c = ws.CubicSplinePoly : t.smoothType == zs.QUADRATIC && (c = ws.QuadSplinePoly)), new Fi(
|
|
20990
|
+
return t.flag & 2 ? c = ws.FitCurvePoly : t.flag & 4 && (t.smoothType == zs.CUBIC ? c = ws.CubicSplinePoly : t.smoothType == zs.QUADRATIC && (c = ws.QuadSplinePoly)), new Fi(
|
|
20991
|
+
c,
|
|
20992
|
+
o,
|
|
20993
|
+
0,
|
|
20994
|
+
e,
|
|
20995
|
+
t.startWidth,
|
|
20996
|
+
t.endWidth,
|
|
20997
|
+
h
|
|
20998
|
+
);
|
|
20925
20999
|
}
|
|
20926
21000
|
}
|
|
20927
21001
|
convertLWPolyline(t) {
|
|
@@ -21005,7 +21079,7 @@ class Do {
|
|
|
21005
21079
|
let E = !0;
|
|
21006
21080
|
const M = S.controlPoints.map((O) => (O.weight == null && (E = !1), O.weight || 1));
|
|
21007
21081
|
x.add(
|
|
21008
|
-
new
|
|
21082
|
+
new cn(
|
|
21009
21083
|
b,
|
|
21010
21084
|
S.knots,
|
|
21011
21085
|
E ? M : void 0
|
|
@@ -21017,7 +21091,7 @@ class Do {
|
|
|
21017
21091
|
y: E.y,
|
|
21018
21092
|
z: 0
|
|
21019
21093
|
}));
|
|
21020
|
-
x.add(new
|
|
21094
|
+
x.add(new cn(b, "Uniform"));
|
|
21021
21095
|
}
|
|
21022
21096
|
}
|
|
21023
21097
|
}), e.add(x);
|
|
@@ -21059,7 +21133,7 @@ class Do {
|
|
|
21059
21133
|
e.subDefinitionPoint2,
|
|
21060
21134
|
e.definitionPoint
|
|
21061
21135
|
);
|
|
21062
|
-
return s.rotation = kt.degToRad(e.rotationAngle || 0), this.processDimensionCommonAttrs(t, s), s;
|
|
21136
|
+
return e.insertionPoint && (s.dimBlockPosition = { ...e.insertionPoint, z: 0 }), s.rotation = kt.degToRad(e.rotationAngle || 0), this.processDimensionCommonAttrs(t, s), s;
|
|
21063
21137
|
} else if (t.subclassMarker == "AcDb3PointAngularDimension") {
|
|
21064
21138
|
const e = t, s = new na(
|
|
21065
21139
|
e.centerPoint,
|
|
@@ -21136,7 +21210,7 @@ class Do {
|
|
|
21136
21210
|
), e;
|
|
21137
21211
|
}
|
|
21138
21212
|
processDimensionCommonAttrs(t, e) {
|
|
21139
|
-
e.dimBlockId = t.name, e.textPosition.copy(t.textPoint), e.textRotation = t.textRotation || 0, t.textLineSpacingFactor && (e.textLineSpacingFactor = t.textLineSpacingFactor), t.textLineSpacingStyle && (e.textLineSpacingStyle = t.textLineSpacingStyle), e.dimensionStyleName = t.styleName, e.dimensionText = t.text || "", e.measurement = t.measurement;
|
|
21213
|
+
e.dimBlockId = t.name, e.textPosition.copy(t.textPoint), e.textRotation = t.textRotation || 0, t.textLineSpacingFactor && (e.textLineSpacingFactor = t.textLineSpacingFactor), t.textLineSpacingStyle && (e.textLineSpacingStyle = t.textLineSpacingStyle), e.dimensionStyleName = t.styleName, e.dimensionText = t.text || "", e.measurement = t.measurement, e.normal.copy(t.extrusionDirection ?? { x: 0, y: 0, z: 1 });
|
|
21140
21214
|
}
|
|
21141
21215
|
/**
|
|
21142
21216
|
* Processes common attributes from a DXF entity to an AcDbEntity.
|
|
@@ -21189,7 +21263,7 @@ class Do {
|
|
|
21189
21263
|
return h;
|
|
21190
21264
|
}
|
|
21191
21265
|
}
|
|
21192
|
-
class ba extends
|
|
21266
|
+
class ba extends dn {
|
|
21193
21267
|
/**
|
|
21194
21268
|
* Creates a new AcDbLayout instance.
|
|
21195
21269
|
*
|
|
@@ -21375,7 +21449,7 @@ class ba extends cn {
|
|
|
21375
21449
|
this._extents.copy(t);
|
|
21376
21450
|
}
|
|
21377
21451
|
}
|
|
21378
|
-
class Mh extends
|
|
21452
|
+
class Mh extends dn {
|
|
21379
21453
|
/**
|
|
21380
21454
|
* Creates a new AcDbDictionary instance.
|
|
21381
21455
|
*
|
|
@@ -21603,7 +21677,7 @@ class Gd extends Mh {
|
|
|
21603
21677
|
}), t;
|
|
21604
21678
|
}
|
|
21605
21679
|
}
|
|
21606
|
-
class jd extends
|
|
21680
|
+
class jd extends dn {
|
|
21607
21681
|
/**
|
|
21608
21682
|
* Creates a new AcDbRasterImageDef instance.
|
|
21609
21683
|
*
|
|
@@ -21932,7 +22006,9 @@ class Xd extends Zo {
|
|
|
21932
22006
|
unknownEntityCount: 0
|
|
21933
22007
|
}
|
|
21934
22008
|
};
|
|
21935
|
-
throw new Error(
|
|
22009
|
+
throw new Error(
|
|
22010
|
+
`Failed to parse drawing due to error: '${s.error}'`
|
|
22011
|
+
);
|
|
21936
22012
|
} else
|
|
21937
22013
|
return {
|
|
21938
22014
|
model: new Xc().parse(t),
|
|
@@ -22675,7 +22751,7 @@ class Er {
|
|
|
22675
22751
|
}));
|
|
22676
22752
|
}
|
|
22677
22753
|
}
|
|
22678
|
-
class zn extends
|
|
22754
|
+
class zn extends dn {
|
|
22679
22755
|
/**
|
|
22680
22756
|
* Creates a new AcDbSymbolTableRecord instance.
|
|
22681
22757
|
*
|
|
@@ -22898,7 +22974,7 @@ const Vr = class Vr extends zn {
|
|
|
22898
22974
|
};
|
|
22899
22975
|
Vr.MODEL_SPACE_NAME = "*MODEL_SPACE", Vr.PAPER_SPACE_NAME_PREFIX = "*PAPER_SPACE";
|
|
22900
22976
|
let We = Vr;
|
|
22901
|
-
class Rn extends
|
|
22977
|
+
class Rn extends dn {
|
|
22902
22978
|
/**
|
|
22903
22979
|
* Creates a new AcDbSymbolTable instance.
|
|
22904
22980
|
*
|
|
@@ -24792,7 +24868,7 @@ ri.DEFAULT_DIM_VALUES = {
|
|
|
24792
24868
|
dimlwe: -2
|
|
24793
24869
|
};
|
|
24794
24870
|
let Ps = ri;
|
|
24795
|
-
class E0 extends
|
|
24871
|
+
class E0 extends dn {
|
|
24796
24872
|
/**
|
|
24797
24873
|
* Creates a new AcDbDatabase instance.
|
|
24798
24874
|
*/
|
|
@@ -25865,10 +25941,10 @@ export {
|
|
|
25865
25941
|
Jd as AcDbLinetypeTable,
|
|
25866
25942
|
Zs as AcDbLinetypeTableRecord,
|
|
25867
25943
|
Yi as AcDbMText,
|
|
25868
|
-
|
|
25944
|
+
dn as AcDbObject,
|
|
25869
25945
|
ha as AcDbObjectIterator,
|
|
25870
25946
|
aa as AcDbOrdinateDimension,
|
|
25871
|
-
|
|
25947
|
+
Tn as AcDbOsnapMode,
|
|
25872
25948
|
Qi as AcDbPoint,
|
|
25873
25949
|
ws as AcDbPoly2dType,
|
|
25874
25950
|
Ks as AcDbPoly3dType,
|
|
@@ -25904,26 +25980,26 @@ export {
|
|
|
25904
25980
|
Ct as AcGeBox3d,
|
|
25905
25981
|
Md as AcGeCatmullRomCurve3d,
|
|
25906
25982
|
As as AcGeCircArc2d,
|
|
25907
|
-
|
|
25983
|
+
Nn as AcGeCircArc3d,
|
|
25908
25984
|
ks as AcGeCurve2d,
|
|
25909
25985
|
fa as AcGeEllipseArc2d,
|
|
25910
25986
|
_a as AcGeEllipseArc3d,
|
|
25911
25987
|
Ad as AcGeEuler,
|
|
25912
25988
|
gd as AcGeGeometryUtil,
|
|
25913
25989
|
va as AcGeLine2d,
|
|
25914
|
-
|
|
25990
|
+
un as AcGeLine3d,
|
|
25915
25991
|
Pd as AcGeLoop2d,
|
|
25916
25992
|
kt as AcGeMathUtil,
|
|
25917
25993
|
pa as AcGeMatrix2d,
|
|
25918
|
-
|
|
25919
|
-
|
|
25994
|
+
hn as AcGeMatrix3d,
|
|
25995
|
+
Cn as AcGeNurbsCurve,
|
|
25920
25996
|
ii as AcGePlane,
|
|
25921
25997
|
Nt as AcGePoint2d,
|
|
25922
25998
|
q as AcGePoint3d,
|
|
25923
25999
|
On as AcGePolyline2d,
|
|
25924
26000
|
ln as AcGeQuaternion,
|
|
25925
26001
|
wh as AcGeShape2d,
|
|
25926
|
-
|
|
26002
|
+
cn as AcGeSpline3d,
|
|
25927
26003
|
gh as AcGeTol,
|
|
25928
26004
|
Zt as AcGeVector2d,
|
|
25929
26005
|
Z as AcGeVector3d,
|
|
@@ -25942,7 +26018,7 @@ export {
|
|
|
25942
26018
|
fh as DEFAULT_TOL,
|
|
25943
26019
|
oh as DEG2RAD,
|
|
25944
26020
|
iu as DefaultLoadingManager,
|
|
25945
|
-
|
|
26021
|
+
En as FLOAT_TOL,
|
|
25946
26022
|
A0 as ORIGIN_POINT_2D,
|
|
25947
26023
|
ph as ORIGIN_POINT_3D,
|
|
25948
26024
|
lh as RAD2DEG,
|