@mlightcad/data-model 1.5.1 → 1.5.3
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 +326 -24
- package/lib/base/AcDbOpenMode.d.ts +8 -0
- package/lib/base/AcDbOpenMode.d.ts.map +1 -0
- package/lib/base/AcDbOpenMode.js +9 -0
- package/lib/base/AcDbOpenMode.js.map +1 -0
- package/lib/base/index.d.ts +1 -0
- package/lib/base/index.d.ts.map +1 -1
- package/lib/base/index.js +1 -0
- package/lib/base/index.js.map +1 -1
- package/lib/database/AcDbBlockTable.d.ts +18 -0
- package/lib/database/AcDbBlockTable.d.ts.map +1 -1
- package/lib/database/AcDbBlockTable.js +46 -0
- package/lib/database/AcDbBlockTable.js.map +1 -1
- package/lib/database/AcDbBlockTableRecord.d.ts +17 -0
- package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbBlockTableRecord.js +35 -0
- package/lib/database/AcDbBlockTableRecord.js.map +1 -1
- package/lib/database/AcDbDatabase.d.ts +2 -0
- package/lib/database/AcDbDatabase.d.ts.map +1 -1
- package/lib/database/AcDbDatabase.js +2 -0
- package/lib/database/AcDbDatabase.js.map +1 -1
- package/lib/database/transaction/AcDbTransaction.d.ts +39 -0
- package/lib/database/transaction/AcDbTransaction.d.ts.map +1 -0
- package/lib/database/transaction/AcDbTransaction.js +107 -0
- package/lib/database/transaction/AcDbTransaction.js.map +1 -0
- package/lib/database/transaction/AcDbTransactionManager.d.ts +48 -0
- package/lib/database/transaction/AcDbTransactionManager.d.ts.map +1 -0
- package/lib/database/transaction/AcDbTransactionManager.js +72 -0
- package/lib/database/transaction/AcDbTransactionManager.js.map +1 -0
- package/lib/database/transaction/index.d.ts +3 -0
- package/lib/database/transaction/index.d.ts.map +1 -0
- package/lib/database/transaction/index.js +3 -0
- package/lib/database/transaction/index.js.map +1 -0
- package/lib/entity/AcDb2dPolyline.d.ts +11 -0
- package/lib/entity/AcDb2dPolyline.d.ts.map +1 -1
- package/lib/entity/AcDb2dPolyline.js +84 -0
- package/lib/entity/AcDb2dPolyline.js.map +1 -1
- package/lib/entity/AcDb3dPolyline.d.ts +11 -0
- package/lib/entity/AcDb3dPolyline.d.ts.map +1 -1
- package/lib/entity/AcDb3dPolyline.js +78 -0
- package/lib/entity/AcDb3dPolyline.js.map +1 -1
- package/lib/entity/AcDbEntity.d.ts +7 -0
- package/lib/entity/AcDbEntity.d.ts.map +1 -1
- package/lib/entity/AcDbEntity.js +9 -0
- package/lib/entity/AcDbEntity.js.map +1 -1
- package/lib/entity/AcDbEntityProperties.d.ts +18 -1
- package/lib/entity/AcDbEntityProperties.d.ts.map +1 -1
- package/lib/entity/AcDbPolyline.d.ts +11 -0
- package/lib/entity/AcDbPolyline.d.ts.map +1 -1
- package/lib/entity/AcDbPolyline.js +84 -0
- package/lib/entity/AcDbPolyline.js.map +1 -1
- package/package.json +4 -4
package/dist/data-model.js
CHANGED
|
@@ -809,7 +809,7 @@ let Cn = class {
|
|
|
809
809
|
console.warn("Unknown color name:", t);
|
|
810
810
|
}
|
|
811
811
|
};
|
|
812
|
-
class
|
|
812
|
+
class S0 {
|
|
813
813
|
/**
|
|
814
814
|
* Constructs a new `AcCmEntityColor`.
|
|
815
815
|
*
|
|
@@ -990,7 +990,7 @@ const $e = {
|
|
|
990
990
|
return new Error("Not implemented yet");
|
|
991
991
|
}
|
|
992
992
|
};
|
|
993
|
-
class
|
|
993
|
+
class I0 {
|
|
994
994
|
/**
|
|
995
995
|
* Creates {@link AcCmEventDispatcher} object.
|
|
996
996
|
*/
|
|
@@ -1281,9 +1281,9 @@ var $o = Ko.exports;
|
|
|
1281
1281
|
const uc = /* @__PURE__ */ cc($o), dc = /* @__PURE__ */ ac({
|
|
1282
1282
|
__proto__: null,
|
|
1283
1283
|
default: uc
|
|
1284
|
-
}, [$o]),
|
|
1284
|
+
}, [$o]), M0 = !0, Hs = dc;
|
|
1285
1285
|
Hs.setLevel("debug");
|
|
1286
|
-
const
|
|
1286
|
+
const k0 = (i) => {
|
|
1287
1287
|
try {
|
|
1288
1288
|
Hs.setLevel(i);
|
|
1289
1289
|
} catch (t) {
|
|
@@ -1466,7 +1466,7 @@ let pc = class Zo {
|
|
|
1466
1466
|
return this.entries.delete(t);
|
|
1467
1467
|
}
|
|
1468
1468
|
};
|
|
1469
|
-
class
|
|
1469
|
+
class T0 {
|
|
1470
1470
|
/**
|
|
1471
1471
|
* Converts a byte count to a human-readable string using appropriate size units.
|
|
1472
1472
|
*
|
|
@@ -1914,7 +1914,7 @@ let gc = class {
|
|
|
1914
1914
|
}
|
|
1915
1915
|
};
|
|
1916
1916
|
const _c = /* @__PURE__ */ new fc();
|
|
1917
|
-
class
|
|
1917
|
+
class L0 {
|
|
1918
1918
|
/**
|
|
1919
1919
|
* Creates a new AcCmLoader instance.
|
|
1920
1920
|
* @param manager The loadingManager for the loader to use. Default is DefaultLoadingManager.
|
|
@@ -3509,7 +3509,7 @@ const ji = class ll {
|
|
|
3509
3509
|
};
|
|
3510
3510
|
ji.IDENTITY = Object.freeze(new ji());
|
|
3511
3511
|
let _a = ji;
|
|
3512
|
-
const Ii = /* @__PURE__ */ new _a(), Nn = 1e-6, Qt = 2 * Math.PI,
|
|
3512
|
+
const Ii = /* @__PURE__ */ new _a(), Nn = 1e-6, Qt = 2 * Math.PI, O0 = {
|
|
3513
3513
|
x: 0,
|
|
3514
3514
|
y: 0
|
|
3515
3515
|
}, hl = {
|
|
@@ -3712,7 +3712,7 @@ function Hc(i, t, e, n) {
|
|
|
3712
3712
|
), I = x[0] - A[0], M = x[1] - A[1], L = x[2] - A[2];
|
|
3713
3713
|
return g += Math.sqrt(I * I + M * M + L * L), g;
|
|
3714
3714
|
}
|
|
3715
|
-
function
|
|
3715
|
+
function B0(i) {
|
|
3716
3716
|
return i.map((t) => [...t]);
|
|
3717
3717
|
}
|
|
3718
3718
|
class gn {
|
|
@@ -7793,6 +7793,16 @@ class Rn extends Ls {
|
|
|
7793
7793
|
constructor(t = null, e = !1) {
|
|
7794
7794
|
super(), this._vertices = t || new Array(), this._closed = e;
|
|
7795
7795
|
}
|
|
7796
|
+
/**
|
|
7797
|
+
* Vertices in the polyline.
|
|
7798
|
+
*
|
|
7799
|
+
* Notes:
|
|
7800
|
+
* This property is exposed so that it is easier to iterate each vertex in this
|
|
7801
|
+
* polyline. Please do not add or remove vertex through this property.
|
|
7802
|
+
*/
|
|
7803
|
+
get vertices() {
|
|
7804
|
+
return this._vertices;
|
|
7805
|
+
}
|
|
7796
7806
|
/**
|
|
7797
7807
|
* The number of vertices in the polyline
|
|
7798
7808
|
*/
|
|
@@ -13743,6 +13753,15 @@ const ka = class ka extends _n {
|
|
|
13743
13753
|
transformBy(t) {
|
|
13744
13754
|
return this;
|
|
13745
13755
|
}
|
|
13756
|
+
/**
|
|
13757
|
+
* Erase the current entity from the associated database.
|
|
13758
|
+
*
|
|
13759
|
+
* @returns — true if an entity in the database existed and has been removed,
|
|
13760
|
+
* or false if the entity does not exist.
|
|
13761
|
+
*/
|
|
13762
|
+
erase() {
|
|
13763
|
+
return this.database.tables.blockTable.removeEntity(this.objectId);
|
|
13764
|
+
}
|
|
13746
13765
|
/**
|
|
13747
13766
|
* Called by cad application when it wants the entity to draw itself in WCS (World Coordinate
|
|
13748
13767
|
* System) and acts as a wrapper / dispatcher around subWorldDraw(). The children class should
|
|
@@ -14119,6 +14138,85 @@ const Ca = class Ca extends Oe {
|
|
|
14119
14138
|
break;
|
|
14120
14139
|
}
|
|
14121
14140
|
}
|
|
14141
|
+
/**
|
|
14142
|
+
* Returns the full property definition for this polyline entity, including
|
|
14143
|
+
* general group and geometry group.
|
|
14144
|
+
*
|
|
14145
|
+
* The geometry group exposes properties via {@link AcDbPropertyAccessor} so
|
|
14146
|
+
* the property palette can update the polyline in real-time.
|
|
14147
|
+
*
|
|
14148
|
+
* Each property is an {@link AcDbEntityRuntimeProperty}.
|
|
14149
|
+
*/
|
|
14150
|
+
get properties() {
|
|
14151
|
+
return {
|
|
14152
|
+
type: this.type,
|
|
14153
|
+
groups: [
|
|
14154
|
+
this.getGeneralProperties(),
|
|
14155
|
+
{
|
|
14156
|
+
groupName: "geometry",
|
|
14157
|
+
properties: [
|
|
14158
|
+
{
|
|
14159
|
+
name: "vertices",
|
|
14160
|
+
type: "array",
|
|
14161
|
+
editable: !1,
|
|
14162
|
+
itemSchema: {
|
|
14163
|
+
properties: [
|
|
14164
|
+
{
|
|
14165
|
+
name: "x",
|
|
14166
|
+
type: "float",
|
|
14167
|
+
editable: !0
|
|
14168
|
+
},
|
|
14169
|
+
{
|
|
14170
|
+
name: "y",
|
|
14171
|
+
type: "float",
|
|
14172
|
+
editable: !0
|
|
14173
|
+
}
|
|
14174
|
+
]
|
|
14175
|
+
},
|
|
14176
|
+
accessor: {
|
|
14177
|
+
get: () => this._geo.vertices
|
|
14178
|
+
}
|
|
14179
|
+
},
|
|
14180
|
+
{
|
|
14181
|
+
name: "elevation",
|
|
14182
|
+
type: "float",
|
|
14183
|
+
editable: !0,
|
|
14184
|
+
accessor: {
|
|
14185
|
+
get: () => this.elevation,
|
|
14186
|
+
set: (t) => {
|
|
14187
|
+
this.elevation = t;
|
|
14188
|
+
}
|
|
14189
|
+
}
|
|
14190
|
+
},
|
|
14191
|
+
{
|
|
14192
|
+
name: "length",
|
|
14193
|
+
type: "float",
|
|
14194
|
+
editable: !1,
|
|
14195
|
+
accessor: {
|
|
14196
|
+
get: () => this._geo.length
|
|
14197
|
+
}
|
|
14198
|
+
}
|
|
14199
|
+
]
|
|
14200
|
+
},
|
|
14201
|
+
{
|
|
14202
|
+
groupName: "others",
|
|
14203
|
+
properties: [
|
|
14204
|
+
{
|
|
14205
|
+
name: "closed",
|
|
14206
|
+
type: "float",
|
|
14207
|
+
editable: !0,
|
|
14208
|
+
accessor: {
|
|
14209
|
+
get: () => this.closed,
|
|
14210
|
+
set: (t) => {
|
|
14211
|
+
this.closed = t;
|
|
14212
|
+
}
|
|
14213
|
+
}
|
|
14214
|
+
}
|
|
14215
|
+
]
|
|
14216
|
+
}
|
|
14217
|
+
]
|
|
14218
|
+
};
|
|
14219
|
+
}
|
|
14122
14220
|
/**
|
|
14123
14221
|
* Draws this polyline using the specified renderer.
|
|
14124
14222
|
*
|
|
@@ -14390,6 +14488,79 @@ const La = class La extends Oe {
|
|
|
14390
14488
|
break;
|
|
14391
14489
|
}
|
|
14392
14490
|
}
|
|
14491
|
+
/**
|
|
14492
|
+
* Returns the full property definition for this polyline entity, including
|
|
14493
|
+
* general group and geometry group.
|
|
14494
|
+
*
|
|
14495
|
+
* The geometry group exposes properties via {@link AcDbPropertyAccessor} so
|
|
14496
|
+
* the property palette can update the polyline in real-time.
|
|
14497
|
+
*
|
|
14498
|
+
* Each property is an {@link AcDbEntityRuntimeProperty}.
|
|
14499
|
+
*/
|
|
14500
|
+
get properties() {
|
|
14501
|
+
return {
|
|
14502
|
+
type: this.type,
|
|
14503
|
+
groups: [
|
|
14504
|
+
this.getGeneralProperties(),
|
|
14505
|
+
{
|
|
14506
|
+
groupName: "geometry",
|
|
14507
|
+
properties: [
|
|
14508
|
+
{
|
|
14509
|
+
name: "vertices",
|
|
14510
|
+
type: "array",
|
|
14511
|
+
editable: !1,
|
|
14512
|
+
itemSchema: {
|
|
14513
|
+
properties: [
|
|
14514
|
+
{
|
|
14515
|
+
name: "x",
|
|
14516
|
+
type: "float",
|
|
14517
|
+
editable: !0
|
|
14518
|
+
},
|
|
14519
|
+
{
|
|
14520
|
+
name: "y",
|
|
14521
|
+
type: "float",
|
|
14522
|
+
editable: !0
|
|
14523
|
+
},
|
|
14524
|
+
{
|
|
14525
|
+
name: "z",
|
|
14526
|
+
type: "float",
|
|
14527
|
+
editable: !0
|
|
14528
|
+
}
|
|
14529
|
+
]
|
|
14530
|
+
},
|
|
14531
|
+
accessor: {
|
|
14532
|
+
get: () => this._geo.vertices
|
|
14533
|
+
}
|
|
14534
|
+
},
|
|
14535
|
+
{
|
|
14536
|
+
name: "length",
|
|
14537
|
+
type: "float",
|
|
14538
|
+
editable: !1,
|
|
14539
|
+
accessor: {
|
|
14540
|
+
get: () => this._geo.length
|
|
14541
|
+
}
|
|
14542
|
+
}
|
|
14543
|
+
]
|
|
14544
|
+
},
|
|
14545
|
+
{
|
|
14546
|
+
groupName: "others",
|
|
14547
|
+
properties: [
|
|
14548
|
+
{
|
|
14549
|
+
name: "closed",
|
|
14550
|
+
type: "float",
|
|
14551
|
+
editable: !0,
|
|
14552
|
+
accessor: {
|
|
14553
|
+
get: () => this.closed,
|
|
14554
|
+
set: (t) => {
|
|
14555
|
+
this.closed = t;
|
|
14556
|
+
}
|
|
14557
|
+
}
|
|
14558
|
+
}
|
|
14559
|
+
]
|
|
14560
|
+
}
|
|
14561
|
+
]
|
|
14562
|
+
};
|
|
14563
|
+
}
|
|
14393
14564
|
/**
|
|
14394
14565
|
* Draws this polyline using the specified renderer.
|
|
14395
14566
|
*
|
|
@@ -19019,6 +19190,85 @@ const Xa = class Xa extends Oe {
|
|
|
19019
19190
|
break;
|
|
19020
19191
|
}
|
|
19021
19192
|
}
|
|
19193
|
+
/**
|
|
19194
|
+
* Returns the full property definition for this polyline entity, including
|
|
19195
|
+
* general group and geometry group.
|
|
19196
|
+
*
|
|
19197
|
+
* The geometry group exposes properties via {@link AcDbPropertyAccessor} so
|
|
19198
|
+
* the property palette can update the polyline in real-time.
|
|
19199
|
+
*
|
|
19200
|
+
* Each property is an {@link AcDbEntityRuntimeProperty}.
|
|
19201
|
+
*/
|
|
19202
|
+
get properties() {
|
|
19203
|
+
return {
|
|
19204
|
+
type: this.type,
|
|
19205
|
+
groups: [
|
|
19206
|
+
this.getGeneralProperties(),
|
|
19207
|
+
{
|
|
19208
|
+
groupName: "geometry",
|
|
19209
|
+
properties: [
|
|
19210
|
+
{
|
|
19211
|
+
name: "vertices",
|
|
19212
|
+
type: "array",
|
|
19213
|
+
editable: !1,
|
|
19214
|
+
itemSchema: {
|
|
19215
|
+
properties: [
|
|
19216
|
+
{
|
|
19217
|
+
name: "x",
|
|
19218
|
+
type: "float",
|
|
19219
|
+
editable: !0
|
|
19220
|
+
},
|
|
19221
|
+
{
|
|
19222
|
+
name: "y",
|
|
19223
|
+
type: "float",
|
|
19224
|
+
editable: !0
|
|
19225
|
+
}
|
|
19226
|
+
]
|
|
19227
|
+
},
|
|
19228
|
+
accessor: {
|
|
19229
|
+
get: () => this._geo.vertices
|
|
19230
|
+
}
|
|
19231
|
+
},
|
|
19232
|
+
{
|
|
19233
|
+
name: "elevation",
|
|
19234
|
+
type: "float",
|
|
19235
|
+
editable: !0,
|
|
19236
|
+
accessor: {
|
|
19237
|
+
get: () => this.elevation,
|
|
19238
|
+
set: (t) => {
|
|
19239
|
+
this.elevation = t;
|
|
19240
|
+
}
|
|
19241
|
+
}
|
|
19242
|
+
},
|
|
19243
|
+
{
|
|
19244
|
+
name: "length",
|
|
19245
|
+
type: "float",
|
|
19246
|
+
editable: !1,
|
|
19247
|
+
accessor: {
|
|
19248
|
+
get: () => this._geo.length
|
|
19249
|
+
}
|
|
19250
|
+
}
|
|
19251
|
+
]
|
|
19252
|
+
},
|
|
19253
|
+
{
|
|
19254
|
+
groupName: "others",
|
|
19255
|
+
properties: [
|
|
19256
|
+
{
|
|
19257
|
+
name: "closed",
|
|
19258
|
+
type: "float",
|
|
19259
|
+
editable: !0,
|
|
19260
|
+
accessor: {
|
|
19261
|
+
get: () => this.closed,
|
|
19262
|
+
set: (t) => {
|
|
19263
|
+
this.closed = t;
|
|
19264
|
+
}
|
|
19265
|
+
}
|
|
19266
|
+
}
|
|
19267
|
+
]
|
|
19268
|
+
}
|
|
19269
|
+
]
|
|
19270
|
+
};
|
|
19271
|
+
}
|
|
19022
19272
|
/**
|
|
19023
19273
|
* Draws this polyline using the specified renderer.
|
|
19024
19274
|
*
|
|
@@ -22066,10 +22316,10 @@ var Tl = /* @__PURE__ */ ((i) => (i[i.Undefined = 0] = "Undefined", i[i.Inches =
|
|
|
22066
22316
|
i.Max = 24
|
|
22067
22317
|
/* USSurveyMile */
|
|
22068
22318
|
] = "Max", i))(Tl || {});
|
|
22069
|
-
function
|
|
22319
|
+
function D0(i) {
|
|
22070
22320
|
return i == 4 || i == 5 || i == 6 || i == 7 || i == 12 || i == 13 || i == 14 || i == 15 || i == 16 || i == 17;
|
|
22071
22321
|
}
|
|
22072
|
-
function
|
|
22322
|
+
function U0(i) {
|
|
22073
22323
|
return i == 1 || i == 2 || i == 3 || i == 8 || i == 9 || i == 10 || i == 21;
|
|
22074
22324
|
}
|
|
22075
22325
|
const Cl = "Load Database";
|
|
@@ -24576,6 +24826,32 @@ const Xr = class Xr extends Dn {
|
|
|
24576
24826
|
entity: t
|
|
24577
24827
|
});
|
|
24578
24828
|
}
|
|
24829
|
+
/**
|
|
24830
|
+
* Removes the specified entity or entities from this block table record.
|
|
24831
|
+
*
|
|
24832
|
+
* Notes:
|
|
24833
|
+
* Please call method AcDbEntity.erase to remove one entity instead of calling
|
|
24834
|
+
* this function.
|
|
24835
|
+
*
|
|
24836
|
+
* AutoCAD ObjectARX API doesn't provide such one method to remove entities
|
|
24837
|
+
* from the block table record. I guess it is done by friend class or function
|
|
24838
|
+
* feature in C++. However, there are no similar feature in TypeScript. So
|
|
24839
|
+
* we have to expose such one public method in AcDbBlockTableRecord.
|
|
24840
|
+
*
|
|
24841
|
+
* @param objectId - The object id or ids of entities to remove from this block table record
|
|
24842
|
+
* @returns — true if an entity in the block table record existed and has been removed,
|
|
24843
|
+
* or false if the entity does not exist.
|
|
24844
|
+
*/
|
|
24845
|
+
removeEntity(t) {
|
|
24846
|
+
const e = Array.isArray(t) ? t : [t], n = [];
|
|
24847
|
+
return e.forEach((a) => {
|
|
24848
|
+
const h = this._entities.get(a);
|
|
24849
|
+
h && n.push(h), this._entities.delete(a);
|
|
24850
|
+
}), n.length > 0 && this.database.events.entityErased.dispatch({
|
|
24851
|
+
database: this.database,
|
|
24852
|
+
entity: n
|
|
24853
|
+
}), n.length > 0;
|
|
24854
|
+
}
|
|
24579
24855
|
/**
|
|
24580
24856
|
* Creates an iterator object that can be used to iterate over the entities in the block table record.
|
|
24581
24857
|
*
|
|
@@ -24845,7 +25121,7 @@ class i0 {
|
|
|
24845
25121
|
function a0(i) {
|
|
24846
25122
|
return new i0(i);
|
|
24847
25123
|
}
|
|
24848
|
-
class
|
|
25124
|
+
class V0 {
|
|
24849
25125
|
constructor() {
|
|
24850
25126
|
this.setupMessageHandler();
|
|
24851
25127
|
}
|
|
@@ -25888,6 +26164,28 @@ class h0 extends Un {
|
|
|
25888
26164
|
let t = this.getAt(me.MODEL_SPACE_NAME);
|
|
25889
26165
|
return t || (t = new me(), t.name = me.MODEL_SPACE_NAME, this.add(t)), t;
|
|
25890
26166
|
}
|
|
26167
|
+
/**
|
|
26168
|
+
* Removes the specified entity or entities from the block table.
|
|
26169
|
+
*
|
|
26170
|
+
* Notes:
|
|
26171
|
+
* Please call method AcDbEntity.erase to remove one entity instead of calling
|
|
26172
|
+
* this function.
|
|
26173
|
+
*
|
|
26174
|
+
* AutoCAD ObjectARX API doesn't provide such one method to remove entities
|
|
26175
|
+
* from the block table. I guess it is done by friend class or function
|
|
26176
|
+
* feature in C++. However, there are no similar feature in TypeScript. So
|
|
26177
|
+
* we have to expose such one public method in AcDbBlockTable.
|
|
26178
|
+
*
|
|
26179
|
+
* @param objectId - The object id or ids of entities to remove from this block table
|
|
26180
|
+
* @returns — true if an entity in the block table existed and has been removed,
|
|
26181
|
+
* or false if the entity does not exist.
|
|
26182
|
+
*/
|
|
26183
|
+
removeEntity(t) {
|
|
26184
|
+
let e = !0;
|
|
26185
|
+
for (const n of this.database.tables.blockTable.newIterator())
|
|
26186
|
+
n.removeEntity(t) || (e = !1);
|
|
26187
|
+
return e;
|
|
26188
|
+
}
|
|
25891
26189
|
/**
|
|
25892
26190
|
* Normalizes the specified block table record name if it is one paper spacce or model space
|
|
25893
26191
|
* block table record.
|
|
@@ -26344,7 +26642,7 @@ class m0 extends Un {
|
|
|
26344
26642
|
super(t);
|
|
26345
26643
|
}
|
|
26346
26644
|
}
|
|
26347
|
-
class
|
|
26645
|
+
class j0 extends _n {
|
|
26348
26646
|
/**
|
|
26349
26647
|
* Creates a new AcDbDatabase instance.
|
|
26350
26648
|
*/
|
|
@@ -26358,6 +26656,8 @@ class V0 extends _n {
|
|
|
26358
26656
|
entityAppended: new oe(),
|
|
26359
26657
|
/** Fired when an entity is modified in the database */
|
|
26360
26658
|
entityModified: new oe(),
|
|
26659
|
+
/** Fired when an entity is erased from the database */
|
|
26660
|
+
entityErased: new oe(),
|
|
26361
26661
|
/** Fired when a layer is appended to the database */
|
|
26362
26662
|
layerAppended: new oe(),
|
|
26363
26663
|
/** Fired when a layer is modified in the database */
|
|
@@ -28592,15 +28892,16 @@ const pi = class pi {
|
|
|
28592
28892
|
};
|
|
28593
28893
|
pi.instance = new pi();
|
|
28594
28894
|
let ga = pi;
|
|
28895
|
+
var A0 = /* @__PURE__ */ ((i) => (i.kForRead = "kForRead", i.kForWrite = "kForWrite", i))(A0 || {});
|
|
28595
28896
|
export {
|
|
28596
28897
|
$r as AcCmColor,
|
|
28597
28898
|
mt as AcCmColorMethod,
|
|
28598
28899
|
Cn as AcCmColorUtil,
|
|
28599
|
-
|
|
28900
|
+
S0 as AcCmEntityColor,
|
|
28600
28901
|
$e as AcCmErrors,
|
|
28601
|
-
|
|
28902
|
+
I0 as AcCmEventDispatcher,
|
|
28602
28903
|
oe as AcCmEventManager,
|
|
28603
|
-
|
|
28904
|
+
L0 as AcCmLoader,
|
|
28604
28905
|
fc as AcCmLoadingManager,
|
|
28605
28906
|
pc as AcCmObject,
|
|
28606
28907
|
Qo as AcCmPerformanceCollector,
|
|
@@ -28619,7 +28920,7 @@ export {
|
|
|
28619
28920
|
tl as AcDbAngleUnits,
|
|
28620
28921
|
Xi as AcDbArc,
|
|
28621
28922
|
Uo as AcDbArcDimension,
|
|
28622
|
-
|
|
28923
|
+
V0 as AcDbBaseWorker,
|
|
28623
28924
|
Jo as AcDbBatchProcessing,
|
|
28624
28925
|
ks as AcDbBlockReference,
|
|
28625
28926
|
h0 as AcDbBlockTable,
|
|
@@ -28628,7 +28929,7 @@ export {
|
|
|
28628
28929
|
el as AcDbCodePage,
|
|
28629
28930
|
Oe as AcDbCurve,
|
|
28630
28931
|
gu as AcDbDataGenerator,
|
|
28631
|
-
|
|
28932
|
+
j0 as AcDbDatabase,
|
|
28632
28933
|
Nl as AcDbDatabaseConverter,
|
|
28633
28934
|
Lr as AcDbDatabaseConverterManager,
|
|
28634
28935
|
ca as AcDbDiametricDimension,
|
|
@@ -28666,6 +28967,7 @@ export {
|
|
|
28666
28967
|
oi as AcDbMText,
|
|
28667
28968
|
_n as AcDbObject,
|
|
28668
28969
|
Aa as AcDbObjectIterator,
|
|
28970
|
+
A0 as AcDbOpenMode,
|
|
28669
28971
|
ua as AcDbOrdinateDimension,
|
|
28670
28972
|
Dt as AcDbOsnapMode,
|
|
28671
28973
|
na as AcDbPoint,
|
|
@@ -28735,16 +29037,16 @@ export {
|
|
|
28735
29037
|
Sl as AcGiOrthographicType,
|
|
28736
29038
|
Pl as AcGiRenderMode,
|
|
28737
29039
|
eu as AcGiViewport,
|
|
28738
|
-
|
|
29040
|
+
T0 as AcTrStringUtil,
|
|
28739
29041
|
bc as ByBlock,
|
|
28740
29042
|
Si as ByLayer,
|
|
28741
|
-
|
|
29043
|
+
M0 as DEBUG_MODE,
|
|
28742
29044
|
Ui as DEFAULT_LINE_TYPE,
|
|
28743
29045
|
ul as DEFAULT_TOL,
|
|
28744
29046
|
rl as DEG2RAD,
|
|
28745
29047
|
_c as DefaultLoadingManager,
|
|
28746
29048
|
Nn as FLOAT_TOL,
|
|
28747
|
-
|
|
29049
|
+
O0 as ORIGIN_POINT_2D,
|
|
28748
29050
|
hl as ORIGIN_POINT_3D,
|
|
28749
29051
|
nl as RAD2DEG,
|
|
28750
29052
|
Qt as TAU,
|
|
@@ -28769,14 +29071,14 @@ export {
|
|
|
28769
29071
|
jc as generateUniformKnots,
|
|
28770
29072
|
oc as has,
|
|
28771
29073
|
al as intPartLength,
|
|
28772
|
-
|
|
29074
|
+
B0 as interpolateControlPoints,
|
|
28773
29075
|
Ac as inverseLerp,
|
|
28774
29076
|
Rc as isBetween,
|
|
28775
29077
|
Fc as isBetweenAngle,
|
|
28776
29078
|
lc as isEmpty,
|
|
28777
29079
|
Is as isEqual,
|
|
28778
|
-
|
|
28779
|
-
|
|
29080
|
+
U0 as isImperialUnits,
|
|
29081
|
+
D0 as isMetricUnits,
|
|
28780
29082
|
dl as isPointInPolygon,
|
|
28781
29083
|
Uc as isPolygonIntersect,
|
|
28782
29084
|
Oc as isPowerOfTwo,
|
|
@@ -28791,7 +29093,7 @@ export {
|
|
|
28791
29093
|
Mc as randInt,
|
|
28792
29094
|
Dc as relativeEps,
|
|
28793
29095
|
Cc as seededRandom,
|
|
28794
|
-
|
|
29096
|
+
k0 as setLogLevel,
|
|
28795
29097
|
Ec as smootherstep,
|
|
28796
29098
|
Ic as smoothstep
|
|
28797
29099
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbOpenMode.d.ts","sourceRoot":"","sources":["../../src/base/AcDbOpenMode.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,YAAY;IACtB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Object open mode, similar to AcDb::OpenMode.
|
|
3
|
+
*/
|
|
4
|
+
export var AcDbOpenMode;
|
|
5
|
+
(function (AcDbOpenMode) {
|
|
6
|
+
AcDbOpenMode["kForRead"] = "kForRead";
|
|
7
|
+
AcDbOpenMode["kForWrite"] = "kForWrite";
|
|
8
|
+
})(AcDbOpenMode || (AcDbOpenMode = {}));
|
|
9
|
+
//# sourceMappingURL=AcDbOpenMode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbOpenMode.js","sourceRoot":"","sources":["../../src/base/AcDbOpenMode.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,uCAAuB,CAAA;AACzB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB"}
|
package/lib/base/index.d.ts
CHANGED
package/lib/base/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
package/lib/base/index.js
CHANGED
package/lib/base/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AcDbObjectId } from '../base';
|
|
1
2
|
import { AcDbBlockTableRecord } from './AcDbBlockTableRecord';
|
|
2
3
|
import { AcDbDatabase } from './AcDbDatabase';
|
|
3
4
|
import { AcDbSymbolTable } from './AcDbSymbolTable';
|
|
@@ -43,6 +44,23 @@ export declare class AcDbBlockTable extends AcDbSymbolTable<AcDbBlockTableRecord
|
|
|
43
44
|
* ```
|
|
44
45
|
*/
|
|
45
46
|
get modelSpace(): AcDbBlockTableRecord;
|
|
47
|
+
/**
|
|
48
|
+
* Removes the specified entity or entities from the block table.
|
|
49
|
+
*
|
|
50
|
+
* Notes:
|
|
51
|
+
* Please call method AcDbEntity.erase to remove one entity instead of calling
|
|
52
|
+
* this function.
|
|
53
|
+
*
|
|
54
|
+
* AutoCAD ObjectARX API doesn't provide such one method to remove entities
|
|
55
|
+
* from the block table. I guess it is done by friend class or function
|
|
56
|
+
* feature in C++. However, there are no similar feature in TypeScript. So
|
|
57
|
+
* we have to expose such one public method in AcDbBlockTable.
|
|
58
|
+
*
|
|
59
|
+
* @param objectId - The object id or ids of entities to remove from this block table
|
|
60
|
+
* @returns — true if an entity in the block table existed and has been removed,
|
|
61
|
+
* or false if the entity does not exist.
|
|
62
|
+
*/
|
|
63
|
+
removeEntity(objectId: AcDbObjectId | AcDbObjectId[]): boolean;
|
|
46
64
|
/**
|
|
47
65
|
* Normalizes the specified block table record name if it is one paper spacce or model space
|
|
48
66
|
* block table record.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbBlockTable.d.ts","sourceRoot":"","sources":["../../src/database/AcDbBlockTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAe,SAAQ,eAAe,CAAC,oBAAoB,CAAC;IACvE;;;;;;;;;OASG;gBACS,EAAE,EAAE,YAAY;IAI5B;;;;;;;;;;;;;;OAcG;IACH,IAAI,UAAU,IAAI,oBAAoB,CAQrC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM;CAWrC"}
|
|
1
|
+
{"version":3,"file":"AcDbBlockTable.d.ts","sourceRoot":"","sources":["../../src/database/AcDbBlockTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAe,SAAQ,eAAe,CAAC,oBAAoB,CAAC;IACvE;;;;;;;;;OASG;gBACS,EAAE,EAAE,YAAY;IAI5B;;;;;;;;;;;;;;OAcG;IACH,IAAI,UAAU,IAAI,oBAAoB,CAQrC;IAED;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE;IAQpD;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM;CAWrC"}
|
|
@@ -13,6 +13,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
|
+
var __values = (this && this.__values) || function(o) {
|
|
17
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
18
|
+
if (m) return m.call(o);
|
|
19
|
+
if (o && typeof o.length === "number") return {
|
|
20
|
+
next: function () {
|
|
21
|
+
if (o && i >= o.length) o = void 0;
|
|
22
|
+
return { value: o && o[i++], done: !o };
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
26
|
+
};
|
|
16
27
|
import { AcDbBlockTableRecord } from './AcDbBlockTableRecord';
|
|
17
28
|
import { AcDbSymbolTable } from './AcDbSymbolTable';
|
|
18
29
|
/**
|
|
@@ -72,6 +83,41 @@ var AcDbBlockTable = /** @class */ (function (_super) {
|
|
|
72
83
|
enumerable: false,
|
|
73
84
|
configurable: true
|
|
74
85
|
});
|
|
86
|
+
/**
|
|
87
|
+
* Removes the specified entity or entities from the block table.
|
|
88
|
+
*
|
|
89
|
+
* Notes:
|
|
90
|
+
* Please call method AcDbEntity.erase to remove one entity instead of calling
|
|
91
|
+
* this function.
|
|
92
|
+
*
|
|
93
|
+
* AutoCAD ObjectARX API doesn't provide such one method to remove entities
|
|
94
|
+
* from the block table. I guess it is done by friend class or function
|
|
95
|
+
* feature in C++. However, there are no similar feature in TypeScript. So
|
|
96
|
+
* we have to expose such one public method in AcDbBlockTable.
|
|
97
|
+
*
|
|
98
|
+
* @param objectId - The object id or ids of entities to remove from this block table
|
|
99
|
+
* @returns — true if an entity in the block table existed and has been removed,
|
|
100
|
+
* or false if the entity does not exist.
|
|
101
|
+
*/
|
|
102
|
+
AcDbBlockTable.prototype.removeEntity = function (objectId) {
|
|
103
|
+
var e_1, _a;
|
|
104
|
+
var result = true;
|
|
105
|
+
try {
|
|
106
|
+
for (var _b = __values(this.database.tables.blockTable.newIterator()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
107
|
+
var btr = _c.value;
|
|
108
|
+
if (!btr.removeEntity(objectId))
|
|
109
|
+
result = false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
113
|
+
finally {
|
|
114
|
+
try {
|
|
115
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
116
|
+
}
|
|
117
|
+
finally { if (e_1) throw e_1.error; }
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
};
|
|
75
121
|
/**
|
|
76
122
|
* Normalizes the specified block table record name if it is one paper spacce or model space
|
|
77
123
|
* block table record.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbBlockTable.js","sourceRoot":"","sources":["../../src/database/AcDbBlockTable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcDbBlockTable.js","sourceRoot":"","sources":["../../src/database/AcDbBlockTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;;;;;GAaG;AACH;IAAoC,kCAAqC;IACvE;;;;;;;;;OASG;IACH,wBAAY,EAAgB;QAC1B,OAAA,MAAK,YAAC,EAAE,CAAC,SAAA;IACX,CAAC;IAiBD,sBAAI,sCAAU;QAfd;;;;;;;;;;;;;;WAcG;aACH;YACE,IAAI,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;YAClE,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,UAAU,GAAG,IAAI,oBAAoB,EAAE,CAAA;gBACvC,UAAU,CAAC,IAAI,GAAG,oBAAoB,CAAC,gBAAgB,CAAA;gBACvD,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;YACtB,CAAC;YACD,OAAO,UAAU,CAAA;QACnB,CAAC;;;OAAA;IAED;;;;;;;;;;;;;;;OAeG;IACH,qCAAY,GAAZ,UAAa,QAAuC;;QAClD,IAAI,MAAM,GAAG,IAAI,CAAA;;YACjB,KAAkB,IAAA,KAAA,SAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA,gBAAA,4BAAE,CAAC;gBAA7D,IAAM,GAAG,WAAA;gBACZ,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC;oBAAE,MAAM,GAAG,KAAK,CAAA;YACjD,CAAC;;;;;;;;;QACD,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;;;;;OAOG;IACO,sCAAa,GAAvB,UAAwB,IAAY;QAClC,IAAI,eAAe,GAAG,IAAI,CAAA;QAC1B,IAAI,oBAAoB,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;YAChD,eAAe,GAAG,oBAAoB,CAAC,gBAAgB,CAAA;QACzD,CAAC;aAAM,IAAI,oBAAoB,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;YACvD,IAAM,MAAM,GAAG,oBAAoB,CAAC,uBAAuB,CAAA;YAC3D,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;YAC5C,eAAe,GAAG,MAAM,GAAG,MAAM,CAAA;QACnC,CAAC;QACD,OAAO,eAAe,CAAA;IACxB,CAAC;IACH,qBAAC;AAAD,CAAC,AAnFD,CAAoC,eAAe,GAmFlD"}
|