@mlightcad/data-model 1.10.6 → 1.11.0
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/README.md +1 -1
- package/dist/data-model.cjs +12 -12
- package/lib/acis/AcDbAcisDecode.d.ts +3 -3
- package/lib/acis/AcDbAcisDecode.js +8 -8
- package/lib/acis/AcDbAcisEntities.d.ts +2 -2
- package/lib/acis/AcDbAcisEntities.js +2 -2
- package/lib/acis/AcDbAcisGeometry.d.ts +5 -5
- package/lib/acis/AcDbAcisGeometry.js +5 -5
- package/lib/acis/AcDbAcisSab.d.ts +1 -1
- package/lib/acis/AcDbAcisSab.js +1 -1
- package/lib/acis/AcDbAcisSatWireframe.d.ts +1 -1
- package/lib/acis/AcDbAcisSatWireframe.js +3 -3
- package/lib/acis/AcDbAcisWireframe.js +8 -8
- package/lib/acis/index.d.ts +6 -6
- package/lib/acis/index.d.ts.map +1 -1
- package/lib/acis/index.js +6 -6
- package/lib/acis/index.js.map +1 -1
- package/lib/base/AcDbHostApplicationServices.d.ts +1 -1
- package/lib/base/AcDbHostApplicationServices.js +3 -3
- package/lib/base/AcDbObject.d.ts +1 -1
- package/lib/base/AcDbObject.d.ts.map +1 -1
- package/lib/base/AcDbObject.js +9 -6
- package/lib/base/AcDbObject.js.map +1 -1
- package/lib/base/index.d.ts +2 -2
- package/lib/base/index.js +2 -2
- package/lib/converter/AcDbRegenerator.d.ts.map +1 -1
- package/lib/converter/AcDbRegenerator.js +40 -4
- package/lib/converter/AcDbRegenerator.js.map +1 -1
- package/lib/converter/index.d.ts +1 -1
- package/lib/converter/index.d.ts.map +1 -1
- package/lib/converter/index.js +1 -1
- package/lib/converter/index.js.map +1 -1
- package/lib/converter/worker/AcDbWorkerManager.d.ts +1 -1
- package/lib/converter/worker/AcDbWorkerManager.d.ts.map +1 -1
- package/lib/converter/worker/AcDbWorkerManager.js +1 -1
- package/lib/converter/worker/AcDbWorkerManager.js.map +1 -1
- package/lib/converter/worker/index.d.ts +1 -1
- package/lib/converter/worker/index.d.ts.map +1 -1
- package/lib/converter/worker/index.js +1 -1
- package/lib/converter/worker/index.js.map +1 -1
- package/lib/database/AcDbBlockTable.d.ts +8 -0
- package/lib/database/AcDbBlockTable.d.ts.map +1 -1
- package/lib/database/AcDbBlockTable.js +29 -0
- package/lib/database/AcDbBlockTable.js.map +1 -1
- package/lib/database/AcDbBlockTableRecord.d.ts +63 -1
- package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbBlockTableRecord.js +101 -1
- package/lib/database/AcDbBlockTableRecord.js.map +1 -1
- package/lib/database/AcDbDatabase.d.ts +49 -0
- package/lib/database/AcDbDatabase.d.ts.map +1 -1
- package/lib/database/AcDbDatabase.js +304 -27
- package/lib/database/AcDbDatabase.js.map +1 -1
- package/lib/database/AcDbDatabaseConverter.d.ts +8 -0
- package/lib/database/AcDbDatabaseConverter.d.ts.map +1 -1
- package/lib/database/AcDbDatabaseConverter.js +9 -1
- package/lib/database/AcDbDatabaseConverter.js.map +1 -1
- package/lib/database/AcDbLayerTableRecord.d.ts +1 -1
- package/lib/database/AcDbLayerTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbLayerTableRecord.js +3 -3
- package/lib/database/AcDbLayerTableRecord.js.map +1 -1
- package/lib/database/index.d.ts +2 -2
- package/lib/database/index.d.ts.map +1 -1
- package/lib/database/index.js +2 -2
- package/lib/database/index.js.map +1 -1
- package/lib/database/transaction/AcDbChangeApplier.d.ts +4 -4
- package/lib/database/transaction/AcDbChangeApplier.d.ts.map +1 -1
- package/lib/database/transaction/AcDbChangeApplier.js +6 -6
- package/lib/database/transaction/AcDbChangeApplier.js.map +1 -1
- package/lib/database/transaction/AcDbChangeRecorder.d.ts.map +1 -1
- package/lib/database/transaction/AcDbChangeRecorder.js +2 -2
- package/lib/database/transaction/AcDbChangeRecorder.js.map +1 -1
- package/lib/database/transaction/AcDbDatabaseChange.d.ts +1 -1
- package/lib/database/transaction/AcDbDatabaseChange.d.ts.map +1 -1
- package/lib/database/transaction/AcDbDatabaseChange.js +1 -1
- package/lib/database/transaction/AcDbDatabaseChange.js.map +1 -1
- package/lib/database/transaction/AcDbDatabaseTransactionManager.js +7 -7
- package/lib/database/transaction/AcDbDatabaseTransactionManager.js.map +1 -1
- package/lib/database/transaction/index.d.ts +2 -2
- package/lib/database/transaction/index.d.ts.map +1 -1
- package/lib/database/transaction/index.js +2 -2
- package/lib/database/transaction/index.js.map +1 -1
- package/lib/entity/AcDb3dSolid.js +3 -3
- package/lib/entity/AcDbArc.d.ts.map +1 -1
- package/lib/entity/AcDbArc.js +7 -7
- package/lib/entity/AcDbArc.js.map +1 -1
- package/lib/entity/AcDbBlockReference.d.ts +6 -0
- package/lib/entity/AcDbBlockReference.d.ts.map +1 -1
- package/lib/entity/AcDbBlockReference.js +12 -0
- package/lib/entity/AcDbBlockReference.js.map +1 -1
- package/lib/entity/AcDbCircle.d.ts.map +1 -1
- package/lib/entity/AcDbCircle.js +3 -3
- package/lib/entity/AcDbCircle.js.map +1 -1
- package/lib/entity/AcDbEllipse.d.ts.map +1 -1
- package/lib/entity/AcDbEllipse.js +3 -3
- package/lib/entity/AcDbEllipse.js.map +1 -1
- package/lib/entity/AcDbFace.js +2 -2
- package/lib/entity/AcDbFrame.d.ts +15 -0
- package/lib/entity/AcDbFrame.d.ts.map +1 -0
- package/lib/entity/AcDbFrame.js +36 -0
- package/lib/entity/AcDbFrame.js.map +1 -0
- package/lib/entity/AcDbLeader.js +2 -2
- package/lib/entity/AcDbLeader.js.map +1 -1
- package/lib/entity/AcDbOle2Frame.d.ts +390 -0
- package/lib/entity/AcDbOle2Frame.d.ts.map +1 -0
- package/lib/entity/AcDbOle2Frame.js +717 -0
- package/lib/entity/AcDbOle2Frame.js.map +1 -0
- package/lib/entity/AcDbOleFrame.d.ts +112 -0
- package/lib/entity/AcDbOleFrame.d.ts.map +1 -0
- package/lib/entity/AcDbOleFrame.js +198 -0
- package/lib/entity/AcDbOleFrame.js.map +1 -0
- package/lib/entity/AcDbPolyFaceMesh.js +2 -2
- package/lib/entity/AcDbPolyFaceMesh.js.map +1 -1
- package/lib/entity/AcDbPolygonMesh.js +2 -2
- package/lib/entity/AcDbPolygonMesh.js.map +1 -1
- package/lib/entity/AcDbPolyline.d.ts +2 -2
- package/lib/entity/AcDbPolyline.d.ts.map +1 -1
- package/lib/entity/AcDbPolyline.js +4 -4
- package/lib/entity/AcDbPolyline.js.map +1 -1
- package/lib/entity/AcDbProxyEntity.d.ts.map +1 -1
- package/lib/entity/AcDbProxyEntity.js +3 -3
- package/lib/entity/AcDbProxyEntity.js.map +1 -1
- package/lib/entity/AcDbRasterImage.d.ts +1 -1
- package/lib/entity/AcDbRasterImage.d.ts.map +1 -1
- package/lib/entity/AcDbRasterImage.js +4 -4
- package/lib/entity/AcDbRasterImage.js.map +1 -1
- package/lib/entity/AcDbRay.d.ts.map +1 -1
- package/lib/entity/AcDbRay.js +2 -2
- package/lib/entity/AcDbRay.js.map +1 -1
- package/lib/entity/AcDbSpline.d.ts.map +1 -1
- package/lib/entity/AcDbSpline.js +4 -4
- package/lib/entity/AcDbSpline.js.map +1 -1
- package/lib/entity/AcDbTrace.js +2 -2
- package/lib/entity/AcDbTrace.js.map +1 -1
- package/lib/entity/AcDbXline.d.ts.map +1 -1
- package/lib/entity/AcDbXline.js +2 -2
- package/lib/entity/AcDbXline.js.map +1 -1
- package/lib/entity/index.d.ts +5 -1
- package/lib/entity/index.d.ts.map +1 -1
- package/lib/entity/index.js +4 -1
- package/lib/entity/index.js.map +1 -1
- package/lib/index.d.ts +11 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -7
- package/lib/index.js.map +1 -1
- package/lib/ly/AcLyBoolExpr.d.ts +28 -0
- package/lib/ly/AcLyBoolExpr.d.ts.map +1 -0
- package/lib/ly/AcLyBoolExpr.js +36 -0
- package/lib/ly/AcLyBoolExpr.js.map +1 -0
- package/lib/ly/AcLyLayerFilter.d.ts +289 -0
- package/lib/ly/AcLyLayerFilter.d.ts.map +1 -0
- package/lib/ly/AcLyLayerFilter.js +509 -0
- package/lib/ly/AcLyLayerFilter.js.map +1 -0
- package/lib/ly/AcLyLayerFilterIO.d.ts +155 -0
- package/lib/ly/AcLyLayerFilterIO.d.ts.map +1 -0
- package/lib/ly/AcLyLayerFilterIO.js +506 -0
- package/lib/ly/AcLyLayerFilterIO.js.map +1 -0
- package/lib/ly/AcLyLayerFilterTree.d.ts +71 -0
- package/lib/ly/AcLyLayerFilterTree.d.ts.map +1 -0
- package/lib/ly/AcLyLayerFilterTree.js +95 -0
- package/lib/ly/AcLyLayerFilterTree.js.map +1 -0
- package/lib/ly/AcLyLayerGroup.d.ts +107 -0
- package/lib/ly/AcLyLayerGroup.d.ts.map +1 -0
- package/lib/ly/AcLyLayerGroup.js +158 -0
- package/lib/ly/AcLyLayerGroup.js.map +1 -0
- package/lib/ly/index.d.ts +8 -0
- package/lib/ly/index.d.ts.map +1 -0
- package/lib/ly/index.js +6 -0
- package/lib/ly/index.js.map +1 -0
- package/lib/misc/AcDbCodePage.d.ts +1 -1
- package/lib/misc/AcDbCodePage.d.ts.map +1 -1
- package/lib/misc/AcDbCodePage.js +1 -1
- package/lib/misc/AcDbCodePage.js.map +1 -1
- package/lib/misc/AcDbFormatter.d.ts.map +1 -1
- package/lib/misc/AcDbFormatter.js +3 -3
- package/lib/misc/AcDbFormatter.js.map +1 -1
- package/lib/misc/AcDbMLeaderStyleColorCodec.d.ts +2 -2
- package/lib/misc/AcDbMLeaderStyleColorCodec.d.ts.map +1 -1
- package/lib/misc/AcDbMLeaderStyleColorCodec.js +2 -2
- package/lib/misc/AcDbMLeaderStyleColorCodec.js.map +1 -1
- package/lib/misc/AcDbOleImageExtractor.d.ts +21 -0
- package/lib/misc/AcDbOleImageExtractor.d.ts.map +1 -0
- package/lib/misc/AcDbOleImageExtractor.js +659 -0
- package/lib/misc/AcDbOleImageExtractor.js.map +1 -0
- package/lib/misc/AcDbUnitsValue.d.ts +6 -6
- package/lib/misc/AcDbUnitsValue.d.ts.map +1 -1
- package/lib/misc/AcDbUnitsValue.js +6 -6
- package/lib/misc/AcDbUnitsValue.js.map +1 -1
- package/lib/misc/acdbDrawImageFrame.d.ts +17 -0
- package/lib/misc/acdbDrawImageFrame.d.ts.map +1 -0
- package/lib/misc/acdbDrawImageFrame.js +44 -0
- package/lib/misc/acdbDrawImageFrame.js.map +1 -0
- package/lib/misc/index.d.ts +7 -7
- package/lib/misc/index.d.ts.map +1 -1
- package/lib/misc/index.js +7 -7
- package/lib/misc/index.js.map +1 -1
- package/lib/misc/proxyGraphic/AcDbProxyGraphic.d.ts +1 -1
- package/lib/misc/proxyGraphic/AcDbProxyGraphic.d.ts.map +1 -1
- package/lib/misc/proxyGraphic/AcDbProxyGraphic.js +9 -9
- package/lib/misc/proxyGraphic/AcDbProxyGraphic.js.map +1 -1
- package/lib/misc/proxyGraphic/AcDbProxyGraphicBinaryStream.d.ts +2 -2
- package/lib/misc/proxyGraphic/AcDbProxyGraphicBinaryStream.d.ts.map +1 -1
- package/lib/misc/proxyGraphic/AcDbProxyGraphicBinaryStream.js +2 -2
- package/lib/misc/proxyGraphic/AcDbProxyGraphicBinaryStream.js.map +1 -1
- package/lib/misc/proxyGraphic/index.d.ts +2 -2
- package/lib/misc/proxyGraphic/index.d.ts.map +1 -1
- package/lib/misc/proxyGraphic/index.js +2 -2
- package/lib/misc/proxyGraphic/index.js.map +1 -1
- package/lib/object/AcDbFilter.d.ts +51 -0
- package/lib/object/AcDbFilter.d.ts.map +1 -0
- package/lib/object/AcDbFilter.js +63 -0
- package/lib/object/AcDbFilter.js.map +1 -0
- package/lib/object/AcDbIndex.d.ts +144 -0
- package/lib/object/AcDbIndex.d.ts.map +1 -0
- package/lib/object/AcDbIndex.js +146 -0
- package/lib/object/AcDbIndex.js.map +1 -0
- package/lib/object/AcDbLayerFilter.d.ts +144 -0
- package/lib/object/AcDbLayerFilter.d.ts.map +1 -0
- package/lib/object/AcDbLayerFilter.js +250 -0
- package/lib/object/AcDbLayerFilter.js.map +1 -0
- package/lib/object/AcDbLayerIndex.d.ts +165 -0
- package/lib/object/AcDbLayerIndex.d.ts.map +1 -0
- package/lib/object/AcDbLayerIndex.js +295 -0
- package/lib/object/AcDbLayerIndex.js.map +1 -0
- package/lib/object/AcDbMLeaderStyle.js +4 -4
- package/lib/object/AcDbMLeaderStyle.js.map +1 -1
- package/lib/object/index.d.ts +6 -0
- package/lib/object/index.d.ts.map +1 -1
- package/lib/object/index.js +4 -0
- package/lib/object/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
17
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
18
|
+
if (!m) return o;
|
|
19
|
+
var i = m.call(o), r, ar = [], e;
|
|
20
|
+
try {
|
|
21
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
22
|
+
}
|
|
23
|
+
catch (error) { e = { error: error }; }
|
|
24
|
+
finally {
|
|
25
|
+
try {
|
|
26
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
27
|
+
}
|
|
28
|
+
finally { if (e) throw e.error; }
|
|
29
|
+
}
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
33
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
34
|
+
if (ar || !(i in from)) {
|
|
35
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
36
|
+
ar[i] = from[i];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
40
|
+
};
|
|
41
|
+
var __values = (this && this.__values) || function(o) {
|
|
42
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
43
|
+
if (m) return m.call(o);
|
|
44
|
+
if (o && typeof o.length === "number") return {
|
|
45
|
+
next: function () {
|
|
46
|
+
if (o && i >= o.length) o = void 0;
|
|
47
|
+
return { value: o && o[i++], done: !o };
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
51
|
+
};
|
|
52
|
+
import { AcDbFilter } from './AcDbFilter';
|
|
53
|
+
/**
|
|
54
|
+
* Layer filter object used with the AutoCAD **index/filter** scheme
|
|
55
|
+
* (`INDEXCTL` / block regeneration), not the Layer Properties Manager tree.
|
|
56
|
+
*
|
|
57
|
+
* An {@link AcDbLayerFilter} stores a flat list of layer names that participate
|
|
58
|
+
* in a layer-based query against a block. It is the counterpart to
|
|
59
|
+
* {@link AcDbLayerIndex}; {@link AcDbLayerFilter.indexClass} returns the layer
|
|
60
|
+
* index class name.
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* Mirrors the ObjectARX `AcDbLayerFilter` class. For the Layer Manager
|
|
64
|
+
* property/group filter **tree**, see {@link AcLyLayerFilter} /
|
|
65
|
+
* {@link AcLyLayerGroup} under the ObjectARX `AcLy*` classes.
|
|
66
|
+
*
|
|
67
|
+
* In DXF this object is written as type `LAYER_FILTER` with subclass markers
|
|
68
|
+
* `AcDbFilter` and `AcDbLayerFilter`, and repeated group code 8 entries for
|
|
69
|
+
* layer names.
|
|
70
|
+
*
|
|
71
|
+
* @see https://help.autodesk.com/view/OARX/2024/ENU/?guid=OARX-RefGuide-AcDbLayerFilter
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const filter = new AcDbLayerFilter();
|
|
76
|
+
* filter.add('Walls');
|
|
77
|
+
* filter.add('Doors');
|
|
78
|
+
* console.log(filter.layerCount()); // 2
|
|
79
|
+
* console.log(filter.getAt(0)); // 'Walls'
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
var AcDbLayerFilter = /** @class */ (function (_super) {
|
|
83
|
+
__extends(AcDbLayerFilter, _super);
|
|
84
|
+
/**
|
|
85
|
+
* Creates a new {@link AcDbLayerFilter} instance.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```typescript
|
|
89
|
+
* const filter = new AcDbLayerFilter();
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
function AcDbLayerFilter() {
|
|
93
|
+
var _this = _super.call(this) || this;
|
|
94
|
+
_this._layerNames = [];
|
|
95
|
+
return _this;
|
|
96
|
+
}
|
|
97
|
+
Object.defineProperty(AcDbLayerFilter.prototype, "layerNames", {
|
|
98
|
+
/**
|
|
99
|
+
* Gets a copy of the layer names stored in this filter.
|
|
100
|
+
*
|
|
101
|
+
* @returns An array of layer names.
|
|
102
|
+
*/
|
|
103
|
+
get: function () {
|
|
104
|
+
return this._layerNames;
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Replaces the layer names stored in this filter.
|
|
108
|
+
*
|
|
109
|
+
* @param value - The new list of layer names.
|
|
110
|
+
*/
|
|
111
|
+
set: function (value) {
|
|
112
|
+
this._layerNames = __spreadArray([], __read(value), false);
|
|
113
|
+
},
|
|
114
|
+
enumerable: false,
|
|
115
|
+
configurable: true
|
|
116
|
+
});
|
|
117
|
+
/**
|
|
118
|
+
* Adds a layer name to this filter.
|
|
119
|
+
*
|
|
120
|
+
* @remarks
|
|
121
|
+
* Mirrors ObjectARX `AcDbLayerFilter::add`. Duplicate names are ignored.
|
|
122
|
+
*
|
|
123
|
+
* @param layerName - Layer name to include in the filter.
|
|
124
|
+
* @returns `true` if the name was added; `false` if it was empty or already present.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```typescript
|
|
128
|
+
* filter.add('0');
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
AcDbLayerFilter.prototype.add = function (layerName) {
|
|
132
|
+
var name = layerName === null || layerName === void 0 ? void 0 : layerName.trim();
|
|
133
|
+
if (!name)
|
|
134
|
+
return false;
|
|
135
|
+
if (this._layerNames.includes(name))
|
|
136
|
+
return false;
|
|
137
|
+
this._layerNames.push(name);
|
|
138
|
+
return true;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Gets the layer name at the specified index.
|
|
142
|
+
*
|
|
143
|
+
* @remarks
|
|
144
|
+
* Mirrors ObjectARX `AcDbLayerFilter::getAt`.
|
|
145
|
+
*
|
|
146
|
+
* @param index - Zero-based index into the layer name list.
|
|
147
|
+
* @returns The layer name at `index`.
|
|
148
|
+
* @throws {Error} If `index` is out of range.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```typescript
|
|
152
|
+
* const name = filter.getAt(0);
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
AcDbLayerFilter.prototype.getAt = function (index) {
|
|
156
|
+
if (index < 0 || index >= this._layerNames.length) {
|
|
157
|
+
throw new Error('The layer index is out of range!');
|
|
158
|
+
}
|
|
159
|
+
return this._layerNames[index];
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Removes a layer name from this filter.
|
|
163
|
+
*
|
|
164
|
+
* @remarks
|
|
165
|
+
* Mirrors ObjectARX `AcDbLayerFilter::remove`.
|
|
166
|
+
*
|
|
167
|
+
* @param layerName - Layer name to remove.
|
|
168
|
+
* @returns `true` if the name was removed; otherwise `false`.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* filter.remove('Walls');
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
AcDbLayerFilter.prototype.remove = function (layerName) {
|
|
176
|
+
var index = this._layerNames.indexOf(layerName);
|
|
177
|
+
if (index < 0)
|
|
178
|
+
return false;
|
|
179
|
+
this._layerNames.splice(index, 1);
|
|
180
|
+
return true;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Returns the number of layer names in this filter.
|
|
184
|
+
*
|
|
185
|
+
* @remarks
|
|
186
|
+
* Mirrors ObjectARX `AcDbLayerFilter::layerCount`.
|
|
187
|
+
*
|
|
188
|
+
* @returns The number of layer names.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```typescript
|
|
192
|
+
* const count = filter.layerCount();
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
AcDbLayerFilter.prototype.layerCount = function () {
|
|
196
|
+
return this._layerNames.length;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Returns the index class name associated with this filter.
|
|
200
|
+
*
|
|
201
|
+
* @remarks
|
|
202
|
+
* Mirrors ObjectARX `AcDbLayerFilter::indexClass`, which returns
|
|
203
|
+
* `AcDbLayerIndex::desc()`. This port returns the class name string.
|
|
204
|
+
*
|
|
205
|
+
* @returns Always `'AcDbLayerIndex'`.
|
|
206
|
+
*/
|
|
207
|
+
AcDbLayerFilter.prototype.indexClass = function () {
|
|
208
|
+
return 'AcDbLayerIndex';
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Returns whether this filter is considered valid.
|
|
212
|
+
*
|
|
213
|
+
* @remarks
|
|
214
|
+
* Mirrors ObjectARX `AcDbLayerFilter::isValid`. A filter is valid when it
|
|
215
|
+
* contains at least one non-empty layer name.
|
|
216
|
+
*
|
|
217
|
+
* @returns `true` if the filter is valid; otherwise `false`.
|
|
218
|
+
*/
|
|
219
|
+
AcDbLayerFilter.prototype.isValid = function () {
|
|
220
|
+
return this._layerNames.some(function (name) { return name.length > 0; });
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Writes DXF fields for this layer filter object.
|
|
224
|
+
*
|
|
225
|
+
* @param filer - DXF output writer.
|
|
226
|
+
* @returns The instance (for chaining).
|
|
227
|
+
*/
|
|
228
|
+
AcDbLayerFilter.prototype.dxfOutFields = function (filer) {
|
|
229
|
+
var e_1, _a;
|
|
230
|
+
_super.prototype.dxfOutFields.call(this, filer);
|
|
231
|
+
filer.writeSubclassMarker('AcDbLayerFilter');
|
|
232
|
+
try {
|
|
233
|
+
for (var _b = __values(this._layerNames), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
234
|
+
var layerName = _c.value;
|
|
235
|
+
filer.writeString(8, layerName);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
239
|
+
finally {
|
|
240
|
+
try {
|
|
241
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
242
|
+
}
|
|
243
|
+
finally { if (e_1) throw e_1.error; }
|
|
244
|
+
}
|
|
245
|
+
return this;
|
|
246
|
+
};
|
|
247
|
+
return AcDbLayerFilter;
|
|
248
|
+
}(AcDbFilter));
|
|
249
|
+
export { AcDbLayerFilter };
|
|
250
|
+
//# sourceMappingURL=AcDbLayerFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbLayerFilter.js","sourceRoot":"","sources":["../../src/object/AcDbLayerFilter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAA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;QAC3B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,oCAAU,GAAV;QACE,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAA;IAChC,CAAC;IAED;;;;;;;;OAQG;IACM,oCAAU,GAAnB;QACE,OAAO,gBAAgB,CAAA;IACzB,CAAC;IAED;;;;;;;;OAQG;IACH,iCAAO,GAAP;QACE,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,MAAM,GAAG,CAAC,EAAf,CAAe,CAAC,CAAA;IACvD,CAAC;IAED;;;;;OAKG;IACM,sCAAY,GAArB,UAAsB,KAAmB;;QACvC,gBAAK,CAAC,YAAY,YAAC,KAAK,CAAC,CAAA;QACzB,KAAK,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAA;;YAC5C,KAAwB,IAAA,KAAA,SAAA,IAAI,CAAC,WAAW,CAAA,gBAAA,4BAAE,CAAC;gBAAtC,IAAM,SAAS,WAAA;gBAClB,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;YACjC,CAAC;;;;;;;;;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IACH,sBAAC;AAAD,CAAC,AA7JD,CAAqC,UAAU,GA6J9C"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { AcDbDxfFiler } from '../base/AcDbDxfFiler';
|
|
2
|
+
import type { AcDbObjectId } from '../base/AcDbObject';
|
|
3
|
+
import type { AcDbBlockTableRecord } from '../database/AcDbBlockTableRecord';
|
|
4
|
+
import type { AcDbLayerTable } from '../database/AcDbLayerTable';
|
|
5
|
+
import type { AcDbFilter } from './AcDbFilter';
|
|
6
|
+
import { AcDbBlockChangeIterator, AcDbFilteredBlockIterator, AcDbIndex, AcDbIndexUpdateData } from './AcDbIndex';
|
|
7
|
+
/**
|
|
8
|
+
* Describes one layer entry stored in an {@link AcDbLayerIndex}.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* LAYER_INDEX DXF objects store parallel arrays of layer names (group 8),
|
|
12
|
+
* hard-owner IDBUFFER handles (group 360), and IDBUFFER entry counts
|
|
13
|
+
* (group 90). This type groups those related values for convenience.
|
|
14
|
+
*/
|
|
15
|
+
export interface AcDbLayerIndexEntry {
|
|
16
|
+
/** Layer name (DXF group code 8). */
|
|
17
|
+
layerName: string;
|
|
18
|
+
/** Hard-owner handle of the associated IDBUFFER object (DXF group code 360). */
|
|
19
|
+
idBufferId: AcDbObjectId;
|
|
20
|
+
/** Number of entries in the associated IDBUFFER (DXF group code 90). */
|
|
21
|
+
idBufferEntryCount: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Layer index object used with the AutoCAD index/filter scheme.
|
|
25
|
+
*
|
|
26
|
+
* An {@link AcDbLayerIndex} is an index implementation specialized for layers.
|
|
27
|
+
* It is typically associated with a block table record and used together with
|
|
28
|
+
* {@link AcDbLayerFilter} when regenerating xrefs and blocks under the
|
|
29
|
+
* `INDEXCTL` system variable.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Mirrors the ObjectARX `AcDbLayerIndex` class. In DXF this object is written
|
|
33
|
+
* as type `LAYER_INDEX` with subclass markers `AcDbIndex` and
|
|
34
|
+
* `AcDbLayerIndex`.
|
|
35
|
+
*
|
|
36
|
+
* @see https://help.autodesk.com/view/OARX/2024/ENU/?guid=OARX-RefGuide-AcDbLayerIndex
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const index = new AcDbLayerIndex();
|
|
41
|
+
* index.lastUpdatedAt = 2451545.0;
|
|
42
|
+
* index.layerNames = ['0', 'Walls'];
|
|
43
|
+
* index.idBufferIds = ['1A', '1B'];
|
|
44
|
+
* index.idBufferEntryCounts = [10, 4];
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare class AcDbLayerIndex extends AcDbIndex {
|
|
48
|
+
/** Layer names included in this index (DXF group code 8, repeated). */
|
|
49
|
+
private _layerNames;
|
|
50
|
+
/** Hard-owner handles to IDBUFFER objects (DXF group code 360, repeated). */
|
|
51
|
+
private _idBufferIds;
|
|
52
|
+
/** Entry counts for each IDBUFFER (DXF group code 90, repeated). */
|
|
53
|
+
private _idBufferEntryCounts;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a new {@link AcDbLayerIndex} instance.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const index = new AcDbLayerIndex();
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
constructor();
|
|
63
|
+
/**
|
|
64
|
+
* Gets a copy of the layer names stored in this index.
|
|
65
|
+
*
|
|
66
|
+
* @returns An array of layer names.
|
|
67
|
+
*/
|
|
68
|
+
get layerNames(): readonly string[];
|
|
69
|
+
/**
|
|
70
|
+
* Replaces the layer names stored in this index.
|
|
71
|
+
*
|
|
72
|
+
* @param value - The new list of layer names.
|
|
73
|
+
*/
|
|
74
|
+
set layerNames(value: readonly string[]);
|
|
75
|
+
/**
|
|
76
|
+
* Gets a copy of the IDBUFFER object IDs referenced by this index.
|
|
77
|
+
*
|
|
78
|
+
* @returns An array of hard-owner IDBUFFER handles.
|
|
79
|
+
*/
|
|
80
|
+
get idBufferIds(): readonly AcDbObjectId[];
|
|
81
|
+
/**
|
|
82
|
+
* Replaces the IDBUFFER object IDs referenced by this index.
|
|
83
|
+
*
|
|
84
|
+
* @param value - The new list of IDBUFFER handles.
|
|
85
|
+
*/
|
|
86
|
+
set idBufferIds(value: readonly AcDbObjectId[]);
|
|
87
|
+
/**
|
|
88
|
+
* Gets a copy of the IDBUFFER entry counts stored in this index.
|
|
89
|
+
*
|
|
90
|
+
* @returns An array of IDBUFFER entry counts.
|
|
91
|
+
*/
|
|
92
|
+
get idBufferEntryCounts(): readonly number[];
|
|
93
|
+
/**
|
|
94
|
+
* Replaces the IDBUFFER entry counts stored in this index.
|
|
95
|
+
*
|
|
96
|
+
* @param value - The new list of entry counts.
|
|
97
|
+
*/
|
|
98
|
+
set idBufferEntryCounts(value: readonly number[]);
|
|
99
|
+
/**
|
|
100
|
+
* Returns grouped layer-index entries derived from the parallel DXF arrays.
|
|
101
|
+
*
|
|
102
|
+
* @returns An array of {@link AcDbLayerIndexEntry} values.
|
|
103
|
+
*/
|
|
104
|
+
get entries(): AcDbLayerIndexEntry[];
|
|
105
|
+
/**
|
|
106
|
+
* Replaces this index from grouped layer-index entries.
|
|
107
|
+
*
|
|
108
|
+
* @param value - The entries to store.
|
|
109
|
+
*/
|
|
110
|
+
set entries(value: readonly AcDbLayerIndexEntry[]);
|
|
111
|
+
/**
|
|
112
|
+
* Computes (rebuilds) this layer index from a layer table and block table
|
|
113
|
+
* record.
|
|
114
|
+
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* Mirrors ObjectARX `AcDbLayerIndex::compute`. This port records layer names
|
|
117
|
+
* present in `layerTable` and associates the index with `blockTableRecord`;
|
|
118
|
+
* IDBUFFER population is not performed here.
|
|
119
|
+
*
|
|
120
|
+
* @param layerTable - Layer table used as the index source.
|
|
121
|
+
* @param blockTableRecord - Block table record being indexed.
|
|
122
|
+
* @returns `true` if the compute succeeded.
|
|
123
|
+
*/
|
|
124
|
+
compute(layerTable?: AcDbLayerTable, blockTableRecord?: AcDbBlockTableRecord): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Creates a filtered block iterator for the given layer filter query.
|
|
127
|
+
*
|
|
128
|
+
* @remarks
|
|
129
|
+
* Mirrors ObjectARX `AcDbLayerIndex::newIterator`. A full filtered iterator
|
|
130
|
+
* is not yet implemented in this port.
|
|
131
|
+
*
|
|
132
|
+
* @param _filter - The filter defining the query (typically an
|
|
133
|
+
* {@link AcDbLayerFilter}).
|
|
134
|
+
* @returns Always `null` until filtered iteration is implemented.
|
|
135
|
+
*/
|
|
136
|
+
newIterator(_filter: AcDbFilter): AcDbFilteredBlockIterator | null;
|
|
137
|
+
/**
|
|
138
|
+
* Fully rebuilds this layer index.
|
|
139
|
+
*
|
|
140
|
+
* @remarks
|
|
141
|
+
* Mirrors ObjectARX `AcDbLayerIndex::rebuildFull`.
|
|
142
|
+
*
|
|
143
|
+
* @param _updateData - Optional index update mapping data.
|
|
144
|
+
* @returns `true` if the rebuild succeeded.
|
|
145
|
+
*/
|
|
146
|
+
rebuildFull(_updateData?: AcDbIndexUpdateData): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Incrementally rebuilds this layer index for modified block contents.
|
|
149
|
+
*
|
|
150
|
+
* @remarks
|
|
151
|
+
* Mirrors ObjectARX `AcDbLayerIndex::rebuildModified`.
|
|
152
|
+
*
|
|
153
|
+
* @param _changeIterator - Optional iterator over changed block entities.
|
|
154
|
+
* @returns `true` if the rebuild succeeded.
|
|
155
|
+
*/
|
|
156
|
+
protected rebuildModified(_changeIterator?: AcDbBlockChangeIterator): boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Writes DXF fields for this layer index object.
|
|
159
|
+
*
|
|
160
|
+
* @param filer - DXF output writer.
|
|
161
|
+
* @returns The instance (for chaining).
|
|
162
|
+
*/
|
|
163
|
+
dxfOutFields(filer: AcDbDxfFiler): this;
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=AcDbLayerIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbLayerIndex.d.ts","sourceRoot":"","sources":["../../src/object/AcDbLayerIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4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