@mlightcad/data-model 1.10.7 → 1.11.1

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.
Files changed (226) hide show
  1. package/README.md +1 -1
  2. package/dist/data-model.cjs +12 -12
  3. package/lib/acis/AcDbAcisDecode.d.ts +3 -3
  4. package/lib/acis/AcDbAcisDecode.js +8 -8
  5. package/lib/acis/AcDbAcisEntities.d.ts +2 -2
  6. package/lib/acis/AcDbAcisEntities.js +2 -2
  7. package/lib/acis/AcDbAcisGeometry.d.ts +5 -5
  8. package/lib/acis/AcDbAcisGeometry.js +5 -5
  9. package/lib/acis/AcDbAcisSab.d.ts +1 -1
  10. package/lib/acis/AcDbAcisSab.js +1 -1
  11. package/lib/acis/AcDbAcisSatWireframe.d.ts +1 -1
  12. package/lib/acis/AcDbAcisSatWireframe.js +3 -3
  13. package/lib/acis/AcDbAcisWireframe.js +8 -8
  14. package/lib/acis/index.d.ts +6 -6
  15. package/lib/acis/index.d.ts.map +1 -1
  16. package/lib/acis/index.js +6 -6
  17. package/lib/acis/index.js.map +1 -1
  18. package/lib/base/AcDbHostApplicationServices.d.ts +1 -1
  19. package/lib/base/AcDbHostApplicationServices.js +3 -3
  20. package/lib/base/AcDbObject.d.ts +1 -1
  21. package/lib/base/AcDbObject.d.ts.map +1 -1
  22. package/lib/base/AcDbObject.js +9 -6
  23. package/lib/base/AcDbObject.js.map +1 -1
  24. package/lib/base/index.d.ts +2 -2
  25. package/lib/base/index.js +2 -2
  26. package/lib/converter/AcDbRegenerator.d.ts.map +1 -1
  27. package/lib/converter/AcDbRegenerator.js +40 -4
  28. package/lib/converter/AcDbRegenerator.js.map +1 -1
  29. package/lib/converter/index.d.ts +1 -1
  30. package/lib/converter/index.d.ts.map +1 -1
  31. package/lib/converter/index.js +1 -1
  32. package/lib/converter/index.js.map +1 -1
  33. package/lib/converter/worker/AcDbWorkerManager.d.ts +1 -1
  34. package/lib/converter/worker/AcDbWorkerManager.d.ts.map +1 -1
  35. package/lib/converter/worker/AcDbWorkerManager.js +1 -1
  36. package/lib/converter/worker/AcDbWorkerManager.js.map +1 -1
  37. package/lib/converter/worker/index.d.ts +1 -1
  38. package/lib/converter/worker/index.d.ts.map +1 -1
  39. package/lib/converter/worker/index.js +1 -1
  40. package/lib/converter/worker/index.js.map +1 -1
  41. package/lib/database/AcDbBlockTableRecord.d.ts +12 -7
  42. package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -1
  43. package/lib/database/AcDbBlockTableRecord.js +15 -9
  44. package/lib/database/AcDbBlockTableRecord.js.map +1 -1
  45. package/lib/database/AcDbDatabase.d.ts +49 -0
  46. package/lib/database/AcDbDatabase.d.ts.map +1 -1
  47. package/lib/database/AcDbDatabase.js +304 -27
  48. package/lib/database/AcDbDatabase.js.map +1 -1
  49. package/lib/database/AcDbLayerTableRecord.d.ts +1 -1
  50. package/lib/database/AcDbLayerTableRecord.d.ts.map +1 -1
  51. package/lib/database/AcDbLayerTableRecord.js +3 -3
  52. package/lib/database/AcDbLayerTableRecord.js.map +1 -1
  53. package/lib/database/index.d.ts +1 -1
  54. package/lib/database/index.d.ts.map +1 -1
  55. package/lib/database/index.js +1 -1
  56. package/lib/database/index.js.map +1 -1
  57. package/lib/database/transaction/AcDbChangeApplier.d.ts +4 -4
  58. package/lib/database/transaction/AcDbChangeApplier.d.ts.map +1 -1
  59. package/lib/database/transaction/AcDbChangeApplier.js +6 -6
  60. package/lib/database/transaction/AcDbChangeApplier.js.map +1 -1
  61. package/lib/database/transaction/AcDbChangeRecorder.d.ts.map +1 -1
  62. package/lib/database/transaction/AcDbChangeRecorder.js +2 -2
  63. package/lib/database/transaction/AcDbChangeRecorder.js.map +1 -1
  64. package/lib/database/transaction/AcDbDatabaseChange.d.ts +1 -1
  65. package/lib/database/transaction/AcDbDatabaseChange.d.ts.map +1 -1
  66. package/lib/database/transaction/AcDbDatabaseChange.js +1 -1
  67. package/lib/database/transaction/AcDbDatabaseChange.js.map +1 -1
  68. package/lib/database/transaction/AcDbDatabaseTransactionManager.js +7 -7
  69. package/lib/database/transaction/AcDbDatabaseTransactionManager.js.map +1 -1
  70. package/lib/database/transaction/index.d.ts +2 -2
  71. package/lib/database/transaction/index.d.ts.map +1 -1
  72. package/lib/database/transaction/index.js +2 -2
  73. package/lib/database/transaction/index.js.map +1 -1
  74. package/lib/entity/AcDb3dSolid.js +3 -3
  75. package/lib/entity/AcDbArc.d.ts.map +1 -1
  76. package/lib/entity/AcDbArc.js +7 -7
  77. package/lib/entity/AcDbArc.js.map +1 -1
  78. package/lib/entity/AcDbBlockReference.d.ts +6 -0
  79. package/lib/entity/AcDbBlockReference.d.ts.map +1 -1
  80. package/lib/entity/AcDbBlockReference.js +12 -0
  81. package/lib/entity/AcDbBlockReference.js.map +1 -1
  82. package/lib/entity/AcDbCircle.d.ts.map +1 -1
  83. package/lib/entity/AcDbCircle.js +3 -3
  84. package/lib/entity/AcDbCircle.js.map +1 -1
  85. package/lib/entity/AcDbEllipse.d.ts.map +1 -1
  86. package/lib/entity/AcDbEllipse.js +3 -3
  87. package/lib/entity/AcDbEllipse.js.map +1 -1
  88. package/lib/entity/AcDbFace.js +2 -2
  89. package/lib/entity/AcDbFrame.d.ts +15 -0
  90. package/lib/entity/AcDbFrame.d.ts.map +1 -0
  91. package/lib/entity/AcDbFrame.js +36 -0
  92. package/lib/entity/AcDbFrame.js.map +1 -0
  93. package/lib/entity/AcDbLeader.js +2 -2
  94. package/lib/entity/AcDbLeader.js.map +1 -1
  95. package/lib/entity/AcDbOle2Frame.d.ts +390 -0
  96. package/lib/entity/AcDbOle2Frame.d.ts.map +1 -0
  97. package/lib/entity/AcDbOle2Frame.js +717 -0
  98. package/lib/entity/AcDbOle2Frame.js.map +1 -0
  99. package/lib/entity/AcDbOleFrame.d.ts +112 -0
  100. package/lib/entity/AcDbOleFrame.d.ts.map +1 -0
  101. package/lib/entity/AcDbOleFrame.js +198 -0
  102. package/lib/entity/AcDbOleFrame.js.map +1 -0
  103. package/lib/entity/AcDbPolyFaceMesh.js +2 -2
  104. package/lib/entity/AcDbPolyFaceMesh.js.map +1 -1
  105. package/lib/entity/AcDbPolygonMesh.js +2 -2
  106. package/lib/entity/AcDbPolygonMesh.js.map +1 -1
  107. package/lib/entity/AcDbPolyline.d.ts +2 -2
  108. package/lib/entity/AcDbPolyline.d.ts.map +1 -1
  109. package/lib/entity/AcDbPolyline.js +4 -4
  110. package/lib/entity/AcDbPolyline.js.map +1 -1
  111. package/lib/entity/AcDbProxyEntity.d.ts.map +1 -1
  112. package/lib/entity/AcDbProxyEntity.js +3 -3
  113. package/lib/entity/AcDbProxyEntity.js.map +1 -1
  114. package/lib/entity/AcDbRasterImage.d.ts +1 -1
  115. package/lib/entity/AcDbRasterImage.d.ts.map +1 -1
  116. package/lib/entity/AcDbRasterImage.js +4 -4
  117. package/lib/entity/AcDbRasterImage.js.map +1 -1
  118. package/lib/entity/AcDbRay.d.ts.map +1 -1
  119. package/lib/entity/AcDbRay.js +2 -2
  120. package/lib/entity/AcDbRay.js.map +1 -1
  121. package/lib/entity/AcDbSpline.d.ts.map +1 -1
  122. package/lib/entity/AcDbSpline.js +4 -4
  123. package/lib/entity/AcDbSpline.js.map +1 -1
  124. package/lib/entity/AcDbTrace.js +2 -2
  125. package/lib/entity/AcDbTrace.js.map +1 -1
  126. package/lib/entity/AcDbXline.d.ts.map +1 -1
  127. package/lib/entity/AcDbXline.js +2 -2
  128. package/lib/entity/AcDbXline.js.map +1 -1
  129. package/lib/entity/index.d.ts +5 -1
  130. package/lib/entity/index.d.ts.map +1 -1
  131. package/lib/entity/index.js +4 -1
  132. package/lib/entity/index.js.map +1 -1
  133. package/lib/index.d.ts +11 -9
  134. package/lib/index.d.ts.map +1 -1
  135. package/lib/index.js +8 -7
  136. package/lib/index.js.map +1 -1
  137. package/lib/ly/AcLyBoolExpr.d.ts +28 -0
  138. package/lib/ly/AcLyBoolExpr.d.ts.map +1 -0
  139. package/lib/ly/AcLyBoolExpr.js +36 -0
  140. package/lib/ly/AcLyBoolExpr.js.map +1 -0
  141. package/lib/ly/AcLyLayerFilter.d.ts +289 -0
  142. package/lib/ly/AcLyLayerFilter.d.ts.map +1 -0
  143. package/lib/ly/AcLyLayerFilter.js +509 -0
  144. package/lib/ly/AcLyLayerFilter.js.map +1 -0
  145. package/lib/ly/AcLyLayerFilterIO.d.ts +155 -0
  146. package/lib/ly/AcLyLayerFilterIO.d.ts.map +1 -0
  147. package/lib/ly/AcLyLayerFilterIO.js +517 -0
  148. package/lib/ly/AcLyLayerFilterIO.js.map +1 -0
  149. package/lib/ly/AcLyLayerFilterTree.d.ts +71 -0
  150. package/lib/ly/AcLyLayerFilterTree.d.ts.map +1 -0
  151. package/lib/ly/AcLyLayerFilterTree.js +95 -0
  152. package/lib/ly/AcLyLayerFilterTree.js.map +1 -0
  153. package/lib/ly/AcLyLayerGroup.d.ts +107 -0
  154. package/lib/ly/AcLyLayerGroup.d.ts.map +1 -0
  155. package/lib/ly/AcLyLayerGroup.js +158 -0
  156. package/lib/ly/AcLyLayerGroup.js.map +1 -0
  157. package/lib/ly/index.d.ts +8 -0
  158. package/lib/ly/index.d.ts.map +1 -0
  159. package/lib/ly/index.js +6 -0
  160. package/lib/ly/index.js.map +1 -0
  161. package/lib/misc/AcDbCodePage.d.ts +1 -1
  162. package/lib/misc/AcDbCodePage.d.ts.map +1 -1
  163. package/lib/misc/AcDbCodePage.js +1 -1
  164. package/lib/misc/AcDbCodePage.js.map +1 -1
  165. package/lib/misc/AcDbFormatter.d.ts.map +1 -1
  166. package/lib/misc/AcDbFormatter.js +3 -3
  167. package/lib/misc/AcDbFormatter.js.map +1 -1
  168. package/lib/misc/AcDbMLeaderStyleColorCodec.d.ts +2 -2
  169. package/lib/misc/AcDbMLeaderStyleColorCodec.d.ts.map +1 -1
  170. package/lib/misc/AcDbMLeaderStyleColorCodec.js +2 -2
  171. package/lib/misc/AcDbMLeaderStyleColorCodec.js.map +1 -1
  172. package/lib/misc/AcDbOleImageExtractor.d.ts +21 -0
  173. package/lib/misc/AcDbOleImageExtractor.d.ts.map +1 -0
  174. package/lib/misc/AcDbOleImageExtractor.js +659 -0
  175. package/lib/misc/AcDbOleImageExtractor.js.map +1 -0
  176. package/lib/misc/AcDbPreviewIcon.d.ts +13 -0
  177. package/lib/misc/AcDbPreviewIcon.d.ts.map +1 -0
  178. package/lib/misc/AcDbPreviewIcon.js +69 -0
  179. package/lib/misc/AcDbPreviewIcon.js.map +1 -0
  180. package/lib/misc/AcDbUnitsValue.d.ts +6 -6
  181. package/lib/misc/AcDbUnitsValue.d.ts.map +1 -1
  182. package/lib/misc/AcDbUnitsValue.js +6 -6
  183. package/lib/misc/AcDbUnitsValue.js.map +1 -1
  184. package/lib/misc/acdbDrawImageFrame.d.ts +17 -0
  185. package/lib/misc/acdbDrawImageFrame.d.ts.map +1 -0
  186. package/lib/misc/acdbDrawImageFrame.js +44 -0
  187. package/lib/misc/acdbDrawImageFrame.js.map +1 -0
  188. package/lib/misc/index.d.ts +8 -7
  189. package/lib/misc/index.d.ts.map +1 -1
  190. package/lib/misc/index.js +8 -7
  191. package/lib/misc/index.js.map +1 -1
  192. package/lib/misc/proxyGraphic/AcDbProxyGraphic.d.ts +1 -1
  193. package/lib/misc/proxyGraphic/AcDbProxyGraphic.d.ts.map +1 -1
  194. package/lib/misc/proxyGraphic/AcDbProxyGraphic.js +9 -9
  195. package/lib/misc/proxyGraphic/AcDbProxyGraphic.js.map +1 -1
  196. package/lib/misc/proxyGraphic/AcDbProxyGraphicBinaryStream.d.ts +2 -2
  197. package/lib/misc/proxyGraphic/AcDbProxyGraphicBinaryStream.d.ts.map +1 -1
  198. package/lib/misc/proxyGraphic/AcDbProxyGraphicBinaryStream.js +2 -2
  199. package/lib/misc/proxyGraphic/AcDbProxyGraphicBinaryStream.js.map +1 -1
  200. package/lib/misc/proxyGraphic/index.d.ts +2 -2
  201. package/lib/misc/proxyGraphic/index.d.ts.map +1 -1
  202. package/lib/misc/proxyGraphic/index.js +2 -2
  203. package/lib/misc/proxyGraphic/index.js.map +1 -1
  204. package/lib/object/AcDbFilter.d.ts +51 -0
  205. package/lib/object/AcDbFilter.d.ts.map +1 -0
  206. package/lib/object/AcDbFilter.js +63 -0
  207. package/lib/object/AcDbFilter.js.map +1 -0
  208. package/lib/object/AcDbIndex.d.ts +144 -0
  209. package/lib/object/AcDbIndex.d.ts.map +1 -0
  210. package/lib/object/AcDbIndex.js +146 -0
  211. package/lib/object/AcDbIndex.js.map +1 -0
  212. package/lib/object/AcDbLayerFilter.d.ts +144 -0
  213. package/lib/object/AcDbLayerFilter.d.ts.map +1 -0
  214. package/lib/object/AcDbLayerFilter.js +250 -0
  215. package/lib/object/AcDbLayerFilter.js.map +1 -0
  216. package/lib/object/AcDbLayerIndex.d.ts +165 -0
  217. package/lib/object/AcDbLayerIndex.d.ts.map +1 -0
  218. package/lib/object/AcDbLayerIndex.js +295 -0
  219. package/lib/object/AcDbLayerIndex.js.map +1 -0
  220. package/lib/object/AcDbMLeaderStyle.js +4 -4
  221. package/lib/object/AcDbMLeaderStyle.js.map +1 -1
  222. package/lib/object/index.d.ts +6 -0
  223. package/lib/object/index.d.ts.map +1 -1
  224. package/lib/object/index.js +4 -0
  225. package/lib/object/index.js.map +1 -1
  226. package/package.json +4 -4
@@ -0,0 +1,146 @@
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
+ import { AcDbObject } from '../base/AcDbObject';
17
+ /**
18
+ * Abstract base class for index objects used with the AutoCAD index/filter
19
+ * scheme.
20
+ *
21
+ * An {@link AcDbIndex} accelerates queries defined by an {@link AcDbFilter}.
22
+ * Keeping the index up to date is typically done through index-filter manager
23
+ * update calls (or during save).
24
+ *
25
+ * @remarks
26
+ * Mirrors the ObjectARX `AcDbIndex` class. {@link AcDbLayerIndex} and spatial
27
+ * indexes derive from this type.
28
+ *
29
+ * @see https://help.autodesk.com/view/OARX/2024/ENU/?guid=OARX-RefGuide-AcDbIndex
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * const index = new AcDbLayerIndex();
34
+ * index.lastUpdatedAt = Date.now();
35
+ * ```
36
+ */
37
+ var AcDbIndex = /** @class */ (function (_super) {
38
+ __extends(AcDbIndex, _super);
39
+ /**
40
+ * Creates a new {@link AcDbIndex} instance.
41
+ */
42
+ function AcDbIndex() {
43
+ var _this = _super.call(this) || this;
44
+ _this._lastUpdatedAt = 0;
45
+ _this._lastUpdatedAtU = 0;
46
+ _this._isUptoDate = false;
47
+ _this._objectBeingIndexedId = '';
48
+ return _this;
49
+ }
50
+ Object.defineProperty(AcDbIndex.prototype, "lastUpdatedAt", {
51
+ /**
52
+ * Gets the local last-updated timestamp for this index.
53
+ *
54
+ * @remarks
55
+ * In ObjectARX this returns an `AcDbDate`. This port stores a numeric
56
+ * timestamp (Julian date when read from DXF group code 40).
57
+ *
58
+ * @returns The last-updated timestamp.
59
+ */
60
+ get: function () {
61
+ return this._lastUpdatedAt;
62
+ },
63
+ /**
64
+ * Sets the local last-updated timestamp for this index.
65
+ *
66
+ * @param value - The new timestamp value.
67
+ */
68
+ set: function (value) {
69
+ this._lastUpdatedAt = value;
70
+ },
71
+ enumerable: false,
72
+ configurable: true
73
+ });
74
+ Object.defineProperty(AcDbIndex.prototype, "lastUpdatedAtU", {
75
+ /**
76
+ * Gets the UTC last-updated timestamp for this index.
77
+ *
78
+ * @returns The UTC last-updated timestamp.
79
+ */
80
+ get: function () {
81
+ return this._lastUpdatedAtU;
82
+ },
83
+ /**
84
+ * Sets the UTC last-updated timestamp for this index.
85
+ *
86
+ * @param value - The new UTC timestamp value.
87
+ */
88
+ set: function (value) {
89
+ this._lastUpdatedAtU = value;
90
+ },
91
+ enumerable: false,
92
+ configurable: true
93
+ });
94
+ Object.defineProperty(AcDbIndex.prototype, "isUptoDate", {
95
+ /**
96
+ * Returns whether this index is considered up to date.
97
+ *
98
+ * @returns `true` if the index is current; otherwise `false`.
99
+ */
100
+ get: function () {
101
+ return this._isUptoDate;
102
+ },
103
+ /**
104
+ * Sets whether this index is considered up to date.
105
+ *
106
+ * @param value - `true` if the index is current.
107
+ */
108
+ set: function (value) {
109
+ this._isUptoDate = value;
110
+ },
111
+ enumerable: false,
112
+ configurable: true
113
+ });
114
+ /**
115
+ * Gets the object ID of the object (typically a block table record) being
116
+ * indexed.
117
+ *
118
+ * @returns The object ID being indexed.
119
+ */
120
+ AcDbIndex.prototype.objectBeingIndexedId = function () {
121
+ return this._objectBeingIndexedId;
122
+ };
123
+ /**
124
+ * Sets the object ID of the object being indexed.
125
+ *
126
+ * @param value - The object ID to associate with this index.
127
+ */
128
+ AcDbIndex.prototype.setObjectBeingIndexedId = function (value) {
129
+ this._objectBeingIndexedId = value;
130
+ };
131
+ /**
132
+ * Writes DXF fields for this index object.
133
+ *
134
+ * @param filer - DXF output writer.
135
+ * @returns The instance (for chaining).
136
+ */
137
+ AcDbIndex.prototype.dxfOutFields = function (filer) {
138
+ _super.prototype.dxfOutFields.call(this, filer);
139
+ filer.writeSubclassMarker('AcDbIndex');
140
+ filer.writeDouble(40, this.lastUpdatedAt);
141
+ return this;
142
+ };
143
+ return AcDbIndex;
144
+ }(AcDbObject));
145
+ export { AcDbIndex };
146
+ //# sourceMappingURL=AcDbIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbIndex.js","sourceRoot":"","sources":["../../src/object/AcDbIndex.ts"],"names":[],"mappings":";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CAAC,WAAW,CAAC,CAAA;QACtC,KAAK,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAA;QACzC,OAAO,IAAI,CAAA;IACb,CAAC;IACH,gBAAC;AAAD,CAAC,AA1ID,CAAwC,UAAU,GA0IjD"}
@@ -0,0 +1,144 @@
1
+ import { AcDbDxfFiler } from '../base/AcDbDxfFiler';
2
+ import { AcDbFilter } from './AcDbFilter';
3
+ /**
4
+ * Layer filter object used with the AutoCAD **index/filter** scheme
5
+ * (`INDEXCTL` / block regeneration), not the Layer Properties Manager tree.
6
+ *
7
+ * An {@link AcDbLayerFilter} stores a flat list of layer names that participate
8
+ * in a layer-based query against a block. It is the counterpart to
9
+ * {@link AcDbLayerIndex}; {@link AcDbLayerFilter.indexClass} returns the layer
10
+ * index class name.
11
+ *
12
+ * @remarks
13
+ * Mirrors the ObjectARX `AcDbLayerFilter` class. For the Layer Manager
14
+ * property/group filter **tree**, see {@link AcLyLayerFilter} /
15
+ * {@link AcLyLayerGroup} under the ObjectARX `AcLy*` classes.
16
+ *
17
+ * In DXF this object is written as type `LAYER_FILTER` with subclass markers
18
+ * `AcDbFilter` and `AcDbLayerFilter`, and repeated group code 8 entries for
19
+ * layer names.
20
+ *
21
+ * @see https://help.autodesk.com/view/OARX/2024/ENU/?guid=OARX-RefGuide-AcDbLayerFilter
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * const filter = new AcDbLayerFilter();
26
+ * filter.add('Walls');
27
+ * filter.add('Doors');
28
+ * console.log(filter.layerCount()); // 2
29
+ * console.log(filter.getAt(0)); // 'Walls'
30
+ * ```
31
+ */
32
+ export declare class AcDbLayerFilter extends AcDbFilter {
33
+ /** Layer names included in this filter (DXF group code 8, repeated). */
34
+ private _layerNames;
35
+ /**
36
+ * Creates a new {@link AcDbLayerFilter} instance.
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * const filter = new AcDbLayerFilter();
41
+ * ```
42
+ */
43
+ constructor();
44
+ /**
45
+ * Gets a copy of the layer names stored in this filter.
46
+ *
47
+ * @returns An array of layer names.
48
+ */
49
+ get layerNames(): readonly string[];
50
+ /**
51
+ * Replaces the layer names stored in this filter.
52
+ *
53
+ * @param value - The new list of layer names.
54
+ */
55
+ set layerNames(value: readonly string[]);
56
+ /**
57
+ * Adds a layer name to this filter.
58
+ *
59
+ * @remarks
60
+ * Mirrors ObjectARX `AcDbLayerFilter::add`. Duplicate names are ignored.
61
+ *
62
+ * @param layerName - Layer name to include in the filter.
63
+ * @returns `true` if the name was added; `false` if it was empty or already present.
64
+ *
65
+ * @example
66
+ * ```typescript
67
+ * filter.add('0');
68
+ * ```
69
+ */
70
+ add(layerName: string): boolean;
71
+ /**
72
+ * Gets the layer name at the specified index.
73
+ *
74
+ * @remarks
75
+ * Mirrors ObjectARX `AcDbLayerFilter::getAt`.
76
+ *
77
+ * @param index - Zero-based index into the layer name list.
78
+ * @returns The layer name at `index`.
79
+ * @throws {Error} If `index` is out of range.
80
+ *
81
+ * @example
82
+ * ```typescript
83
+ * const name = filter.getAt(0);
84
+ * ```
85
+ */
86
+ getAt(index: number): string;
87
+ /**
88
+ * Removes a layer name from this filter.
89
+ *
90
+ * @remarks
91
+ * Mirrors ObjectARX `AcDbLayerFilter::remove`.
92
+ *
93
+ * @param layerName - Layer name to remove.
94
+ * @returns `true` if the name was removed; otherwise `false`.
95
+ *
96
+ * @example
97
+ * ```typescript
98
+ * filter.remove('Walls');
99
+ * ```
100
+ */
101
+ remove(layerName: string): boolean;
102
+ /**
103
+ * Returns the number of layer names in this filter.
104
+ *
105
+ * @remarks
106
+ * Mirrors ObjectARX `AcDbLayerFilter::layerCount`.
107
+ *
108
+ * @returns The number of layer names.
109
+ *
110
+ * @example
111
+ * ```typescript
112
+ * const count = filter.layerCount();
113
+ * ```
114
+ */
115
+ layerCount(): number;
116
+ /**
117
+ * Returns the index class name associated with this filter.
118
+ *
119
+ * @remarks
120
+ * Mirrors ObjectARX `AcDbLayerFilter::indexClass`, which returns
121
+ * `AcDbLayerIndex::desc()`. This port returns the class name string.
122
+ *
123
+ * @returns Always `'AcDbLayerIndex'`.
124
+ */
125
+ indexClass(): string;
126
+ /**
127
+ * Returns whether this filter is considered valid.
128
+ *
129
+ * @remarks
130
+ * Mirrors ObjectARX `AcDbLayerFilter::isValid`. A filter is valid when it
131
+ * contains at least one non-empty layer name.
132
+ *
133
+ * @returns `true` if the filter is valid; otherwise `false`.
134
+ */
135
+ isValid(): boolean;
136
+ /**
137
+ * Writes DXF fields for this layer filter object.
138
+ *
139
+ * @param filer - DXF output writer.
140
+ * @returns The instance (for chaining).
141
+ */
142
+ dxfOutFields(filer: AcDbDxfFiler): this;
143
+ }
144
+ //# sourceMappingURL=AcDbLayerFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbLayerFilter.d.ts","sourceRoot":"","sources":["../../src/object/AcDbLayerFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,wEAAwE;IACxE,OAAO,CAAC,WAAW,CAAU;IAE7B;;;;;;;OAOG;;IAMH;;;;OAIG;IACH,IAAI,UAAU,IAAI,SAAS,MAAM,EAAE,CAElC;IAED;;;;OAIG;IACH,IAAI,UAAU,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAEtC;IAED;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAQ/B;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAO5B;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAOlC;;;;;;;;;;;;OAYG;IACH,UAAU,IAAI,MAAM;IAIpB;;;;;;;;OAQG;IACM,UAAU,IAAI,MAAM;IAI7B;;;;;;;;OAQG;IACH,OAAO,IAAI,OAAO;IAIlB;;;;;OAKG;IACM,YAAY,CAAC,KAAK,EAAE,YAAY;CAQ1C"}
@@ -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,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH;IAAqC,mCAAU;IAI7C;;;;;;;OAOG;IACH;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,WAAW,GAAG,EAAE,CAAA;;IACvB,CAAC;IAOD,sBAAI,uCAAU;QALd;;;;WAIG;aACH;YACE,OAAO,IAAI,CAAC,WAAW,CAAA;QACzB,CAAC;QAED;;;;WAIG;aACH,UAAe,KAAwB;YACrC,IAAI,CAAC,WAAW,4BAAO,KAAK,SAAC,CAAA;QAC/B,CAAC;;;OATA;IAWD;;;;;;;;;;;;;OAaG;IACH,6BAAG,GAAH,UAAI,SAAiB;QACnB,IAAM,IAAI,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,EAAE,CAAA;QAC9B,IAAI,CAAC,IAAI;YAAE,OAAO,KAAK,CAAA;QACvB,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,OAAO,KAAK,CAAA;QACjD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,+BAAK,GAAL,UAAM,KAA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