@mlightcad/data-model 1.3.0 → 1.3.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/package.json +4 -4
- package/dist/data-model.cjs +0 -5
- package/dist/data-model.js +0 -25305
- package/dist/dxf-parser-worker.js +0 -1669
- package/lib/base/AcDbHostApplicationServices.d.ts +0 -96
- package/lib/base/AcDbHostApplicationServices.d.ts.map +0 -1
- package/lib/base/AcDbHostApplicationServices.js +0 -118
- package/lib/base/AcDbHostApplicationServices.js.map +0 -1
- package/lib/base/AcDbObject.d.ts +0 -205
- package/lib/base/AcDbObject.d.ts.map +0 -1
- package/lib/base/AcDbObject.js +0 -236
- package/lib/base/AcDbObject.js.map +0 -1
- package/lib/base/index.d.ts +0 -3
- package/lib/base/index.d.ts.map +0 -1
- package/lib/base/index.js +0 -3
- package/lib/base/index.js.map +0 -1
- package/lib/converter/AcDbBatchProcessing.d.ts +0 -146
- package/lib/converter/AcDbBatchProcessing.d.ts.map +0 -1
- package/lib/converter/AcDbBatchProcessing.js +0 -272
- package/lib/converter/AcDbBatchProcessing.js.map +0 -1
- package/lib/converter/AcDbDxfConverter.d.ts +0 -272
- package/lib/converter/AcDbDxfConverter.d.ts.map +0 -1
- package/lib/converter/AcDbDxfConverter.js +0 -872
- package/lib/converter/AcDbDxfConverter.js.map +0 -1
- package/lib/converter/AcDbDxfParser.d.ts +0 -23
- package/lib/converter/AcDbDxfParser.d.ts.map +0 -1
- package/lib/converter/AcDbDxfParser.js +0 -83
- package/lib/converter/AcDbDxfParser.js.map +0 -1
- package/lib/converter/AcDbEntitiyConverter.d.ts +0 -159
- package/lib/converter/AcDbEntitiyConverter.d.ts.map +0 -1
- package/lib/converter/AcDbEntitiyConverter.js +0 -659
- package/lib/converter/AcDbEntitiyConverter.js.map +0 -1
- package/lib/converter/AcDbObjectConverter.d.ts +0 -61
- package/lib/converter/AcDbObjectConverter.d.ts.map +0 -1
- package/lib/converter/AcDbObjectConverter.js +0 -91
- package/lib/converter/AcDbObjectConverter.js.map +0 -1
- package/lib/converter/index.d.ts +0 -4
- package/lib/converter/index.d.ts.map +0 -1
- package/lib/converter/index.js +0 -4
- package/lib/converter/index.js.map +0 -1
- package/lib/converter/worker/AcDbBaseWorker.d.ts +0 -36
- package/lib/converter/worker/AcDbBaseWorker.d.ts.map +0 -1
- package/lib/converter/worker/AcDbBaseWorker.js +0 -93
- package/lib/converter/worker/AcDbBaseWorker.js.map +0 -1
- package/lib/converter/worker/AcDbDxfParserWorker.d.ts +0 -11
- package/lib/converter/worker/AcDbDxfParserWorker.d.ts.map +0 -1
- package/lib/converter/worker/AcDbDxfParserWorker.js +0 -75
- package/lib/converter/worker/AcDbDxfParserWorker.js.map +0 -1
- package/lib/converter/worker/AcDbWorkerManager.d.ts +0 -107
- package/lib/converter/worker/AcDbWorkerManager.d.ts.map +0 -1
- package/lib/converter/worker/AcDbWorkerManager.js +0 -360
- package/lib/converter/worker/AcDbWorkerManager.js.map +0 -1
- package/lib/converter/worker/index.d.ts +0 -3
- package/lib/converter/worker/index.d.ts.map +0 -1
- package/lib/converter/worker/index.js +0 -3
- package/lib/converter/worker/index.js.map +0 -1
- package/lib/database/AcDbBlockTable.d.ts +0 -56
- package/lib/database/AcDbBlockTable.d.ts.map +0 -1
- package/lib/database/AcDbBlockTable.js +0 -98
- package/lib/database/AcDbBlockTable.js.map +0 -1
- package/lib/database/AcDbBlockTableRecord.d.ts +0 -185
- package/lib/database/AcDbBlockTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbBlockTableRecord.js +0 -261
- package/lib/database/AcDbBlockTableRecord.js.map +0 -1
- package/lib/database/AcDbDatabase.d.ts +0 -575
- package/lib/database/AcDbDatabase.d.ts.map +0 -1
- package/lib/database/AcDbDatabase.js +0 -833
- package/lib/database/AcDbDatabase.js.map +0 -1
- package/lib/database/AcDbDatabaseConverter.d.ts +0 -292
- package/lib/database/AcDbDatabaseConverter.d.ts.map +0 -1
- package/lib/database/AcDbDatabaseConverter.js +0 -447
- package/lib/database/AcDbDatabaseConverter.js.map +0 -1
- package/lib/database/AcDbDatabaseConverterManager.d.ts +0 -141
- package/lib/database/AcDbDatabaseConverterManager.d.ts.map +0 -1
- package/lib/database/AcDbDatabaseConverterManager.js +0 -173
- package/lib/database/AcDbDatabaseConverterManager.js.map +0 -1
- package/lib/database/AcDbDimStyleTable.d.ts +0 -31
- package/lib/database/AcDbDimStyleTable.d.ts.map +0 -1
- package/lib/database/AcDbDimStyleTable.js +0 -49
- package/lib/database/AcDbDimStyleTable.js.map +0 -1
- package/lib/database/AcDbDimStyleTableRecord.d.ts +0 -797
- package/lib/database/AcDbDimStyleTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbDimStyleTableRecord.js +0 -1294
- package/lib/database/AcDbDimStyleTableRecord.js.map +0 -1
- package/lib/database/AcDbDwgVersion.d.ts +0 -32
- package/lib/database/AcDbDwgVersion.d.ts.map +0 -1
- package/lib/database/AcDbDwgVersion.js +0 -76
- package/lib/database/AcDbDwgVersion.js.map +0 -1
- package/lib/database/AcDbLayerTable.d.ts +0 -51
- package/lib/database/AcDbLayerTable.d.ts.map +0 -1
- package/lib/database/AcDbLayerTable.js +0 -92
- package/lib/database/AcDbLayerTable.js.map +0 -1
- package/lib/database/AcDbLayerTableRecord.d.ts +0 -278
- package/lib/database/AcDbLayerTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbLayerTableRecord.js +0 -397
- package/lib/database/AcDbLayerTableRecord.js.map +0 -1
- package/lib/database/AcDbLinetypeTable.d.ts +0 -30
- package/lib/database/AcDbLinetypeTable.d.ts.map +0 -1
- package/lib/database/AcDbLinetypeTable.js +0 -48
- package/lib/database/AcDbLinetypeTable.js.map +0 -1
- package/lib/database/AcDbLinetypeTableRecord.d.ts +0 -79
- package/lib/database/AcDbLinetypeTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbLinetypeTableRecord.js +0 -129
- package/lib/database/AcDbLinetypeTableRecord.js.map +0 -1
- package/lib/database/AcDbSymbolTable.d.ts +0 -199
- package/lib/database/AcDbSymbolTable.d.ts.map +0 -1
- package/lib/database/AcDbSymbolTable.js +0 -264
- package/lib/database/AcDbSymbolTable.js.map +0 -1
- package/lib/database/AcDbSymbolTableRecord.d.ts +0 -61
- package/lib/database/AcDbSymbolTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbSymbolTableRecord.js +0 -82
- package/lib/database/AcDbSymbolTableRecord.js.map +0 -1
- package/lib/database/AcDbTextStyleTable.d.ts +0 -48
- package/lib/database/AcDbTextStyleTable.d.ts.map +0 -1
- package/lib/database/AcDbTextStyleTable.js +0 -112
- package/lib/database/AcDbTextStyleTable.js.map +0 -1
- package/lib/database/AcDbTextStyleTableRecord.d.ts +0 -179
- package/lib/database/AcDbTextStyleTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbTextStyleTableRecord.js +0 -276
- package/lib/database/AcDbTextStyleTableRecord.js.map +0 -1
- package/lib/database/AcDbViewportTable.d.ts +0 -31
- package/lib/database/AcDbViewportTable.d.ts.map +0 -1
- package/lib/database/AcDbViewportTable.js +0 -49
- package/lib/database/AcDbViewportTable.js.map +0 -1
- package/lib/database/AcDbViewportTableRecord.d.ts +0 -154
- package/lib/database/AcDbViewportTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbViewportTableRecord.js +0 -318
- package/lib/database/AcDbViewportTableRecord.js.map +0 -1
- package/lib/database/index.d.ts +0 -19
- package/lib/database/index.d.ts.map +0 -1
- package/lib/database/index.js +0 -19
- package/lib/database/index.js.map +0 -1
- package/lib/entity/AcDbArc.d.ts +0 -254
- package/lib/entity/AcDbArc.d.ts.map +0 -1
- package/lib/entity/AcDbArc.js +0 -340
- package/lib/entity/AcDbArc.js.map +0 -1
- package/lib/entity/AcDbBlockReference.d.ts +0 -190
- package/lib/entity/AcDbBlockReference.d.ts.map +0 -1
- package/lib/entity/AcDbBlockReference.js +0 -302
- package/lib/entity/AcDbBlockReference.js.map +0 -1
- package/lib/entity/AcDbCircle.d.ts +0 -186
- package/lib/entity/AcDbCircle.d.ts.map +0 -1
- package/lib/entity/AcDbCircle.js +0 -249
- package/lib/entity/AcDbCircle.js.map +0 -1
- package/lib/entity/AcDbCurve.d.ts +0 -42
- package/lib/entity/AcDbCurve.d.ts.map +0 -1
- package/lib/entity/AcDbCurve.js +0 -44
- package/lib/entity/AcDbCurve.js.map +0 -1
- package/lib/entity/AcDbEllipse.d.ts +0 -207
- package/lib/entity/AcDbEllipse.d.ts.map +0 -1
- package/lib/entity/AcDbEllipse.js +0 -272
- package/lib/entity/AcDbEllipse.js.map +0 -1
- package/lib/entity/AcDbEntity.d.ts +0 -385
- package/lib/entity/AcDbEntity.d.ts.map +0 -1
- package/lib/entity/AcDbEntity.js +0 -561
- package/lib/entity/AcDbEntity.js.map +0 -1
- package/lib/entity/AcDbFace.d.ts +0 -151
- package/lib/entity/AcDbFace.d.ts.map +0 -1
- package/lib/entity/AcDbFace.js +0 -224
- package/lib/entity/AcDbFace.js.map +0 -1
- package/lib/entity/AcDbHatch.d.ts +0 -174
- package/lib/entity/AcDbHatch.d.ts.map +0 -1
- package/lib/entity/AcDbHatch.js +0 -250
- package/lib/entity/AcDbHatch.js.map +0 -1
- package/lib/entity/AcDbLeader.d.ts +0 -243
- package/lib/entity/AcDbLeader.d.ts.map +0 -1
- package/lib/entity/AcDbLeader.js +0 -358
- package/lib/entity/AcDbLeader.js.map +0 -1
- package/lib/entity/AcDbLine.d.ts +0 -198
- package/lib/entity/AcDbLine.d.ts.map +0 -1
- package/lib/entity/AcDbLine.js +0 -300
- package/lib/entity/AcDbLine.js.map +0 -1
- package/lib/entity/AcDbMText.d.ts +0 -248
- package/lib/entity/AcDbMText.d.ts.map +0 -1
- package/lib/entity/AcDbMText.js +0 -414
- package/lib/entity/AcDbMText.js.map +0 -1
- package/lib/entity/AcDbPoint.d.ts +0 -113
- package/lib/entity/AcDbPoint.d.ts.map +0 -1
- package/lib/entity/AcDbPoint.js +0 -155
- package/lib/entity/AcDbPoint.js.map +0 -1
- package/lib/entity/AcDbPolyline.d.ts +0 -221
- package/lib/entity/AcDbPolyline.d.ts.map +0 -1
- package/lib/entity/AcDbPolyline.js +0 -301
- package/lib/entity/AcDbPolyline.js.map +0 -1
- package/lib/entity/AcDbRasterImage.d.ts +0 -216
- package/lib/entity/AcDbRasterImage.d.ts.map +0 -1
- package/lib/entity/AcDbRasterImage.js +0 -451
- package/lib/entity/AcDbRasterImage.js.map +0 -1
- package/lib/entity/AcDbRay.d.ts +0 -150
- package/lib/entity/AcDbRay.d.ts.map +0 -1
- package/lib/entity/AcDbRay.js +0 -208
- package/lib/entity/AcDbRay.js.map +0 -1
- package/lib/entity/AcDbSpline.d.ts +0 -135
- package/lib/entity/AcDbSpline.d.ts.map +0 -1
- package/lib/entity/AcDbSpline.js +0 -142
- package/lib/entity/AcDbSpline.js.map +0 -1
- package/lib/entity/AcDbTable.d.ts +0 -260
- package/lib/entity/AcDbTable.d.ts.map +0 -1
- package/lib/entity/AcDbTable.js +0 -452
- package/lib/entity/AcDbTable.js.map +0 -1
- package/lib/entity/AcDbText.d.ts +0 -388
- package/lib/entity/AcDbText.d.ts.map +0 -1
- package/lib/entity/AcDbText.js +0 -523
- package/lib/entity/AcDbText.js.map +0 -1
- package/lib/entity/AcDbTrace.d.ts +0 -193
- package/lib/entity/AcDbTrace.d.ts.map +0 -1
- package/lib/entity/AcDbTrace.js +0 -271
- package/lib/entity/AcDbTrace.js.map +0 -1
- package/lib/entity/AcDbViewport.d.ts +0 -173
- package/lib/entity/AcDbViewport.d.ts.map +0 -1
- package/lib/entity/AcDbViewport.js +0 -295
- package/lib/entity/AcDbViewport.js.map +0 -1
- package/lib/entity/AcDbWipeout.d.ts +0 -39
- package/lib/entity/AcDbWipeout.d.ts.map +0 -1
- package/lib/entity/AcDbWipeout.js +0 -70
- package/lib/entity/AcDbWipeout.js.map +0 -1
- package/lib/entity/AcDbXline.d.ts +0 -151
- package/lib/entity/AcDbXline.d.ts.map +0 -1
- package/lib/entity/AcDbXline.js +0 -209
- package/lib/entity/AcDbXline.js.map +0 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +0 -92
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.js +0 -157
- package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts +0 -220
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbAlignedDimension.js +0 -341
- package/lib/entity/dimension/AcDbAlignedDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbArcDimension.d.ts +0 -94
- package/lib/entity/dimension/AcDbArcDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbArcDimension.js +0 -159
- package/lib/entity/dimension/AcDbArcDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts +0 -145
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbDiametricDimension.js +0 -275
- package/lib/entity/dimension/AcDbDiametricDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbDimension.d.ts +0 -257
- package/lib/entity/dimension/AcDbDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbDimension.js +0 -466
- package/lib/entity/dimension/AcDbDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +0 -78
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.js +0 -133
- package/lib/entity/dimension/AcDbOrdinateDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbRadialDimension.d.ts +0 -214
- package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbRadialDimension.js +0 -288
- package/lib/entity/dimension/AcDbRadialDimension.js.map +0 -1
- package/lib/entity/dimension/index.d.ts +0 -8
- package/lib/entity/dimension/index.d.ts.map +0 -1
- package/lib/entity/dimension/index.js +0 -8
- package/lib/entity/dimension/index.js.map +0 -1
- package/lib/entity/index.d.ts +0 -24
- package/lib/entity/index.d.ts.map +0 -1
- package/lib/entity/index.js +0 -24
- package/lib/entity/index.js.map +0 -1
- package/lib/index.d.ts +0 -10
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -10
- package/lib/index.js.map +0 -1
- package/lib/misc/AcDbAngleUnits.d.ts +0 -20
- package/lib/misc/AcDbAngleUnits.d.ts.map +0 -1
- package/lib/misc/AcDbAngleUnits.js +0 -21
- package/lib/misc/AcDbAngleUnits.js.map +0 -1
- package/lib/misc/AcDbCodePage.d.ts +0 -50
- package/lib/misc/AcDbCodePage.d.ts.map +0 -1
- package/lib/misc/AcDbCodePage.js +0 -100
- package/lib/misc/AcDbCodePage.js.map +0 -1
- package/lib/misc/AcDbConstants.d.ts +0 -24
- package/lib/misc/AcDbConstants.d.ts.map +0 -1
- package/lib/misc/AcDbConstants.js +0 -24
- package/lib/misc/AcDbConstants.js.map +0 -1
- package/lib/misc/AcDbDimArrowType.d.ts +0 -89
- package/lib/misc/AcDbDimArrowType.d.ts.map +0 -1
- package/lib/misc/AcDbDimArrowType.js +0 -90
- package/lib/misc/AcDbDimArrowType.js.map +0 -1
- package/lib/misc/AcDbObjectIterator.d.ts +0 -55
- package/lib/misc/AcDbObjectIterator.d.ts.map +0 -1
- package/lib/misc/AcDbObjectIterator.js +0 -67
- package/lib/misc/AcDbObjectIterator.js.map +0 -1
- package/lib/misc/AcDbOsnapMode.d.ts +0 -51
- package/lib/misc/AcDbOsnapMode.d.ts.map +0 -1
- package/lib/misc/AcDbOsnapMode.js +0 -52
- package/lib/misc/AcDbOsnapMode.js.map +0 -1
- package/lib/misc/AcDbRenderingCache.d.ts +0 -141
- package/lib/misc/AcDbRenderingCache.d.ts.map +0 -1
- package/lib/misc/AcDbRenderingCache.js +0 -239
- package/lib/misc/AcDbRenderingCache.js.map +0 -1
- package/lib/misc/AcDbUnitsValue.d.ts +0 -101
- package/lib/misc/AcDbUnitsValue.d.ts.map +0 -1
- package/lib/misc/AcDbUnitsValue.js +0 -121
- package/lib/misc/AcDbUnitsValue.js.map +0 -1
- package/lib/misc/index.d.ts +0 -9
- package/lib/misc/index.d.ts.map +0 -1
- package/lib/misc/index.js +0 -9
- package/lib/misc/index.js.map +0 -1
- package/lib/object/AcDbDictionary.d.ts +0 -178
- package/lib/object/AcDbDictionary.d.ts.map +0 -1
- package/lib/object/AcDbDictionary.js +0 -264
- package/lib/object/AcDbDictionary.js.map +0 -1
- package/lib/object/AcDbRasterImageDef.d.ts +0 -54
- package/lib/object/AcDbRasterImageDef.d.ts.map +0 -1
- package/lib/object/AcDbRasterImageDef.js +0 -82
- package/lib/object/AcDbRasterImageDef.js.map +0 -1
- package/lib/object/index.d.ts +0 -4
- package/lib/object/index.d.ts.map +0 -1
- package/lib/object/index.js +0 -4
- package/lib/object/index.js.map +0 -1
- package/lib/object/layout/AcDbLayout.d.ts +0 -190
- package/lib/object/layout/AcDbLayout.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayout.js +0 -253
- package/lib/object/layout/AcDbLayout.js.map +0 -1
- package/lib/object/layout/AcDbLayoutDictionary.d.ts +0 -47
- package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayoutDictionary.js +0 -122
- package/lib/object/layout/AcDbLayoutDictionary.js.map +0 -1
- package/lib/object/layout/AcDbLayoutManager.d.ts +0 -188
- package/lib/object/layout/AcDbLayoutManager.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayoutManager.js +0 -245
- package/lib/object/layout/AcDbLayoutManager.js.map +0 -1
- package/lib/object/layout/index.d.ts +0 -4
- package/lib/object/layout/index.d.ts.map +0 -1
- package/lib/object/layout/index.js +0 -4
- package/lib/object/layout/index.js.map +0 -1
|
@@ -1,129 +0,0 @@
|
|
|
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 { AcDbSymbolTableRecord } from './AcDbSymbolTableRecord';
|
|
17
|
-
/**
|
|
18
|
-
* Represents a record in the line type table within the AutoCAD drawing database.
|
|
19
|
-
*
|
|
20
|
-
* Each line type table record contains the information necessary to define a specific line type,
|
|
21
|
-
* including its pattern, description, and rendering characteristics. Line types define how lines
|
|
22
|
-
* are drawn, including patterns of dashes, dots, and spaces.
|
|
23
|
-
*
|
|
24
|
-
* Within the line type table record, the dashes (line segments that make up characteristics of the
|
|
25
|
-
* linetype) are stored in a list with an index that is zero based. If the linetype is complex, then
|
|
26
|
-
* embedded shapes or text strings are stored in the list at the same index as the dash that preceded
|
|
27
|
-
* them in the linetype definition. So there will always be a dashLength for any valid index in the
|
|
28
|
-
* list, even if there is a shape or text string sharing the same index. When the linetype is elaborated,
|
|
29
|
-
* a shape's insertion point will coincide with the end of the dash that it shares an index with.
|
|
30
|
-
*/
|
|
31
|
-
var AcDbLinetypeTableRecord = /** @class */ (function (_super) {
|
|
32
|
-
__extends(AcDbLinetypeTableRecord, _super);
|
|
33
|
-
/**
|
|
34
|
-
* Creates a new line type table record.
|
|
35
|
-
*
|
|
36
|
-
* @param linetype - The line type style object that defines the visual characteristics
|
|
37
|
-
* and pattern of this line type
|
|
38
|
-
*/
|
|
39
|
-
function AcDbLinetypeTableRecord(linetype) {
|
|
40
|
-
var _this = _super.call(this) || this;
|
|
41
|
-
_this.name = linetype.name;
|
|
42
|
-
_this._linetype = linetype;
|
|
43
|
-
return _this;
|
|
44
|
-
}
|
|
45
|
-
Object.defineProperty(AcDbLinetypeTableRecord.prototype, "numDashes", {
|
|
46
|
-
/**
|
|
47
|
-
* Gets the number of dash elements in the line type pattern.
|
|
48
|
-
*
|
|
49
|
-
* This value represents the total count of dashes, spaces, dots, and other pattern elements
|
|
50
|
-
* that make up the line type. It corresponds to DXF group code 73 in the AutoCAD file format.
|
|
51
|
-
*
|
|
52
|
-
* @returns The number of pattern elements in the line type
|
|
53
|
-
*/
|
|
54
|
-
get: function () {
|
|
55
|
-
return this._linetype.pattern ? this._linetype.pattern.length : 0;
|
|
56
|
-
},
|
|
57
|
-
enumerable: false,
|
|
58
|
-
configurable: true
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(AcDbLinetypeTableRecord.prototype, "patternLength", {
|
|
61
|
-
/**
|
|
62
|
-
* Gets the total pattern length in AutoCAD drawing units.
|
|
63
|
-
*
|
|
64
|
-
* The pattern length represents the total length of all dashes and spaces when the line type
|
|
65
|
-
* scale is 1.0. This value is used to calculate how the pattern repeats along a line.
|
|
66
|
-
*
|
|
67
|
-
* Note: Embedded shapes or text strings do not add to the pattern length because they are
|
|
68
|
-
* overlaid and do not interrupt the actual dash pattern.
|
|
69
|
-
*
|
|
70
|
-
* @returns The total length of the line type pattern in drawing units
|
|
71
|
-
*/
|
|
72
|
-
get: function () {
|
|
73
|
-
return this._linetype.totalPatternLength;
|
|
74
|
-
},
|
|
75
|
-
enumerable: false,
|
|
76
|
-
configurable: true
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(AcDbLinetypeTableRecord.prototype, "comments", {
|
|
79
|
-
/**
|
|
80
|
-
* Gets the description or comments associated with this line type.
|
|
81
|
-
*
|
|
82
|
-
* This property provides additional information about the line type, such as its intended
|
|
83
|
-
* use or any special characteristics.
|
|
84
|
-
*
|
|
85
|
-
* @returns The description text for the line type
|
|
86
|
-
*/
|
|
87
|
-
get: function () {
|
|
88
|
-
return this._linetype.description;
|
|
89
|
-
},
|
|
90
|
-
enumerable: false,
|
|
91
|
-
configurable: true
|
|
92
|
-
});
|
|
93
|
-
Object.defineProperty(AcDbLinetypeTableRecord.prototype, "linetype", {
|
|
94
|
-
/**
|
|
95
|
-
* Gets the line type style object used by the renderer.
|
|
96
|
-
*
|
|
97
|
-
* This property provides access to the underlying line type definition that contains
|
|
98
|
-
* all the visual characteristics and rendering information.
|
|
99
|
-
*
|
|
100
|
-
* @returns The line type style object
|
|
101
|
-
*/
|
|
102
|
-
get: function () {
|
|
103
|
-
return this._linetype;
|
|
104
|
-
},
|
|
105
|
-
enumerable: false,
|
|
106
|
-
configurable: true
|
|
107
|
-
});
|
|
108
|
-
/**
|
|
109
|
-
* Gets the length of a specific dash element in the line type pattern.
|
|
110
|
-
*
|
|
111
|
-
* Each dash element in the pattern has a specific length that determines how it appears
|
|
112
|
-
* when the line type is rendered. Positive values represent visible dashes, while negative
|
|
113
|
-
* values represent spaces (pen up).
|
|
114
|
-
*
|
|
115
|
-
* @param index - Zero-based index of the dash element. Must be greater than or equal to zero,
|
|
116
|
-
* but less than the value of property 'numDashes'
|
|
117
|
-
* @returns The length of the specified dash element in drawing units
|
|
118
|
-
* @throws {Error} When the index is out of range
|
|
119
|
-
*/
|
|
120
|
-
AcDbLinetypeTableRecord.prototype.dashLengthAt = function (index) {
|
|
121
|
-
if (index < 0 || index >= this.numDashes) {
|
|
122
|
-
throw new Error('Index must be greater than or equal to zero, but less than the value of property "numDashes".');
|
|
123
|
-
}
|
|
124
|
-
return this._linetype.pattern[index].elementLength;
|
|
125
|
-
};
|
|
126
|
-
return AcDbLinetypeTableRecord;
|
|
127
|
-
}(AcDbSymbolTableRecord));
|
|
128
|
-
export { AcDbLinetypeTableRecord };
|
|
129
|
-
//# sourceMappingURL=AcDbLinetypeTableRecord.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbLinetypeTableRecord.js","sourceRoot":"","sources":["../../src/database/AcDbLinetypeTableRecord.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAE/D;;;;;;;;;;;;;GAaG;AACH;IAA6C,2CAAqB;IAGhE;;;;;OAKG;IACH,iCAAY,QAA2B;QACrC,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAA;QACzB,KAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;;IAC3B,CAAC;IAUD,sBAAI,8CAAS;QARb;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;QACnE,CAAC;;;OAAA;IAaD,sBAAI,kDAAa;QAXjB;;;;;;;;;;WAUG;aACH;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAA;QAC1C,CAAC;;;OAAA;IAUD,sBAAI,6CAAQ;QARZ;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAA;QACnC,CAAC;;;OAAA;IAUD,sBAAI,6CAAQ;QARZ;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,SAAS,CAAA;QACvB,CAAC;;;OAAA;IAED;;;;;;;;;;;OAWG;IACH,8CAAY,GAAZ,UAAa,KAAa;QACxB,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CACb,+FAA+F,CAChG,CAAA;QACH,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAQ,CAAC,KAAK,CAAC,CAAC,aAAa,CAAA;IACrD,CAAC;IACH,8BAAC;AAAD,CAAC,AAtFD,CAA6C,qBAAqB,GAsFjE"}
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { AcDbObject, AcDbObjectId } from '../base/AcDbObject';
|
|
2
|
-
import { AcDbObjectIterator } from '../misc/AcDbObjectIterator';
|
|
3
|
-
import { AcDbDatabase } from './AcDbDatabase';
|
|
4
|
-
import { AcDbSymbolTableRecord } from './AcDbSymbolTableRecord';
|
|
5
|
-
/**
|
|
6
|
-
* Base class for all symbol tables in AutoCAD.
|
|
7
|
-
*
|
|
8
|
-
* AcDbSymbolTable is the base class for all classes used to manage AutoCAD's
|
|
9
|
-
* built-in symbol tables. Symbol tables organize and store various types of
|
|
10
|
-
* records such as layers, linetypes, text styles, dimension styles, etc.
|
|
11
|
-
*
|
|
12
|
-
* @template RecordType - The type of records this symbol table manages
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* class MySymbolTable extends AcDbSymbolTable<MySymbolTableRecord> {
|
|
17
|
-
* constructor(db: AcDbDatabase) {
|
|
18
|
-
* super(db);
|
|
19
|
-
* }
|
|
20
|
-
* }
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export declare class AcDbSymbolTable<RecordType extends AcDbSymbolTableRecord = AcDbSymbolTableRecord> extends AcDbObject {
|
|
24
|
-
/** Map of records indexed by name */
|
|
25
|
-
protected _recordsByName: Map<string, RecordType>;
|
|
26
|
-
/** Map of records indexed by object ID */
|
|
27
|
-
protected _recordsById: Map<string, RecordType>;
|
|
28
|
-
/**
|
|
29
|
-
* Creates a new AcDbSymbolTable instance.
|
|
30
|
-
*
|
|
31
|
-
* @param db - The database this symbol table belongs to
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```typescript
|
|
35
|
-
* const symbolTable = new AcDbSymbolTable(database);
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
constructor(db: AcDbDatabase);
|
|
39
|
-
/**
|
|
40
|
-
* Gets the number of entries in the table.
|
|
41
|
-
*
|
|
42
|
-
* @returns The number of entries in the table
|
|
43
|
-
*/
|
|
44
|
-
get numEntries(): number;
|
|
45
|
-
/**
|
|
46
|
-
* Adds a record to both the database containing the table and the table itself.
|
|
47
|
-
*
|
|
48
|
-
* @param record - The record to add to the table
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```typescript
|
|
52
|
-
* const record = new AcDbSymbolTableRecord({ name: 'MyRecord' });
|
|
53
|
-
* symbolTable.add(record);
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
add(record: RecordType): void;
|
|
57
|
-
/**
|
|
58
|
-
* Removes the record with the specified name.
|
|
59
|
-
*
|
|
60
|
-
* @param name - The name of the record to remove
|
|
61
|
-
* @returns True if the record was found and removed, false otherwise
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* const removed = symbolTable.remove('MyRecord');
|
|
66
|
-
* if (removed) {
|
|
67
|
-
* console.log('Record removed successfully');
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
remove(name: string): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Removes the record with the specified ID.
|
|
74
|
-
*
|
|
75
|
-
* @param id - The object ID of the record to remove
|
|
76
|
-
* @returns True if the record was found and removed, false otherwise
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```typescript
|
|
80
|
-
* const removed = symbolTable.removeId('some-object-id');
|
|
81
|
-
* if (removed) {
|
|
82
|
-
* console.log('Record removed successfully');
|
|
83
|
-
* }
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
removeId(id: AcDbObjectId): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Removes all records from the table.
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```typescript
|
|
92
|
-
* symbolTable.removeAll();
|
|
93
|
-
* console.log('All records removed');
|
|
94
|
-
* ```
|
|
95
|
-
*/
|
|
96
|
-
removeAll(): void;
|
|
97
|
-
/**
|
|
98
|
-
* Checks if the table contains a record with the specified name.
|
|
99
|
-
*
|
|
100
|
-
* @param name - The name to search for
|
|
101
|
-
* @returns True if a record with the specified name exists, false otherwise
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* ```typescript
|
|
105
|
-
* if (symbolTable.has('MyRecord')) {
|
|
106
|
-
* console.log('Record exists');
|
|
107
|
-
* }
|
|
108
|
-
* ```
|
|
109
|
-
*/
|
|
110
|
-
has(name: string): boolean;
|
|
111
|
-
/**
|
|
112
|
-
* Checks if the table contains a record with the specified ID.
|
|
113
|
-
*
|
|
114
|
-
* @param id - The ID to search for
|
|
115
|
-
* @returns True if a record with the specified ID exists, false otherwise
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* ```typescript
|
|
119
|
-
* if (symbolTable.hasId('some-object-id')) {
|
|
120
|
-
* console.log('Record exists');
|
|
121
|
-
* }
|
|
122
|
-
* ```
|
|
123
|
-
*/
|
|
124
|
-
hasId(id: string): boolean;
|
|
125
|
-
/**
|
|
126
|
-
* Searches the table for a record with the specified name.
|
|
127
|
-
*
|
|
128
|
-
* @param name - The name to search for
|
|
129
|
-
* @returns The record with the specified name, or undefined if not found
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```typescript
|
|
133
|
-
* const record = symbolTable.getAt('MyRecord');
|
|
134
|
-
* if (record) {
|
|
135
|
-
* console.log('Found record:', record.name);
|
|
136
|
-
* }
|
|
137
|
-
* ```
|
|
138
|
-
*/
|
|
139
|
-
getAt(name: string): RecordType | undefined;
|
|
140
|
-
/**
|
|
141
|
-
* Searches the table for a record with the specified ID.
|
|
142
|
-
*
|
|
143
|
-
* @param id - The ID to search for
|
|
144
|
-
* @returns The record with the specified ID, or undefined if not found
|
|
145
|
-
*
|
|
146
|
-
* @example
|
|
147
|
-
* ```typescript
|
|
148
|
-
* const record = symbolTable.getIdAt('some-object-id');
|
|
149
|
-
* if (record) {
|
|
150
|
-
* console.log('Found record:', record.name);
|
|
151
|
-
* }
|
|
152
|
-
* ```
|
|
153
|
-
*/
|
|
154
|
-
getIdAt(id: AcDbObjectId): RecordType | undefined;
|
|
155
|
-
/**
|
|
156
|
-
* Gets the owner ID of a record with the specified ID.
|
|
157
|
-
*
|
|
158
|
-
* @param id - The ID to search for
|
|
159
|
-
* @returns The record with the specified ID, or undefined if not found
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* ```typescript
|
|
163
|
-
* const record = symbolTable.getOwnerIdAt('some-object-id');
|
|
164
|
-
* if (record) {
|
|
165
|
-
* console.log('Owner ID:', record.ownerId);
|
|
166
|
-
* }
|
|
167
|
-
* ```
|
|
168
|
-
*/
|
|
169
|
-
getOwnerIdAt(id: AcDbObjectId): RecordType | undefined;
|
|
170
|
-
/**
|
|
171
|
-
* Creates an iterator object that can be used to iterate over the records in the table.
|
|
172
|
-
*
|
|
173
|
-
* @returns An iterator object that can be used to iterate over the records
|
|
174
|
-
*
|
|
175
|
-
* @example
|
|
176
|
-
* ```typescript
|
|
177
|
-
* const iterator = symbolTable.newIterator();
|
|
178
|
-
* for (const record of iterator) {
|
|
179
|
-
* console.log('Record:', record.name);
|
|
180
|
-
* }
|
|
181
|
-
* ```
|
|
182
|
-
*/
|
|
183
|
-
newIterator(): AcDbObjectIterator<RecordType>;
|
|
184
|
-
/**
|
|
185
|
-
* Normalizes the name of a symbol table record.
|
|
186
|
-
*
|
|
187
|
-
* Some symbol table records require name normalization. For example, the
|
|
188
|
-
* model space block table record may appear as either `*Model_Space` or
|
|
189
|
-
* `*MODEL_SPACE`, and should be standardized to a consistent form.
|
|
190
|
-
*
|
|
191
|
-
* Subclasses should override this method to implement record-specific
|
|
192
|
-
* normalization rules.
|
|
193
|
-
*
|
|
194
|
-
* @param name - The raw name of the symbol table record.
|
|
195
|
-
* @returns The normalized symbol table record name.
|
|
196
|
-
*/
|
|
197
|
-
protected normalizeName(name: string): string;
|
|
198
|
-
}
|
|
199
|
-
//# sourceMappingURL=AcDbSymbolTable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbSymbolTable.d.ts","sourceRoot":"","sources":["../../src/database/AcDbSymbolTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAE/D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,eAAe,CAC1B,UAAU,SAAS,qBAAqB,GAAG,qBAAqB,CAChE,SAAQ,UAAU;IAClB,qCAAqC;IACrC,SAAS,CAAC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACjD,0CAA0C;IAC1C,SAAS,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAE/C;;;;;;;;;OASG;gBACS,EAAE,EAAE,YAAY;IAO5B;;;;OAIG;IACH,IAAI,UAAU,WAEb;IAED;;;;;;;;;;OAUG;IACH,GAAG,CAAC,MAAM,EAAE,UAAU;IAOtB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM;IAWnB;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAE,EAAE,YAAY;IAUzB;;;;;;;;OAQG;IACH,SAAS;IAKT;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM;IAKhB;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,EAAE,EAAE,MAAM;IAIhB;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM;IAKlB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,EAAE,YAAY;IAIxB;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,EAAE,YAAY,GAAG,UAAU,GAAG,SAAS;IAItD;;;;;;;;;;;;OAYG;IACH,WAAW,IAAI,kBAAkB,CAAC,UAAU,CAAC;IAI7C;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM;CAGrC"}
|
|
@@ -1,264 +0,0 @@
|
|
|
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
|
-
import { AcDbObjectIterator } from '../misc/AcDbObjectIterator';
|
|
18
|
-
/**
|
|
19
|
-
* Base class for all symbol tables in AutoCAD.
|
|
20
|
-
*
|
|
21
|
-
* AcDbSymbolTable is the base class for all classes used to manage AutoCAD's
|
|
22
|
-
* built-in symbol tables. Symbol tables organize and store various types of
|
|
23
|
-
* records such as layers, linetypes, text styles, dimension styles, etc.
|
|
24
|
-
*
|
|
25
|
-
* @template RecordType - The type of records this symbol table manages
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```typescript
|
|
29
|
-
* class MySymbolTable extends AcDbSymbolTable<MySymbolTableRecord> {
|
|
30
|
-
* constructor(db: AcDbDatabase) {
|
|
31
|
-
* super(db);
|
|
32
|
-
* }
|
|
33
|
-
* }
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
var AcDbSymbolTable = /** @class */ (function (_super) {
|
|
37
|
-
__extends(AcDbSymbolTable, _super);
|
|
38
|
-
/**
|
|
39
|
-
* Creates a new AcDbSymbolTable instance.
|
|
40
|
-
*
|
|
41
|
-
* @param db - The database this symbol table belongs to
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```typescript
|
|
45
|
-
* const symbolTable = new AcDbSymbolTable(database);
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
function AcDbSymbolTable(db) {
|
|
49
|
-
var _this = _super.call(this) || this;
|
|
50
|
-
_this.database = db;
|
|
51
|
-
_this._recordsByName = new Map();
|
|
52
|
-
_this._recordsById = new Map();
|
|
53
|
-
return _this;
|
|
54
|
-
}
|
|
55
|
-
Object.defineProperty(AcDbSymbolTable.prototype, "numEntries", {
|
|
56
|
-
/**
|
|
57
|
-
* Gets the number of entries in the table.
|
|
58
|
-
*
|
|
59
|
-
* @returns The number of entries in the table
|
|
60
|
-
*/
|
|
61
|
-
get: function () {
|
|
62
|
-
return this._recordsByName.size;
|
|
63
|
-
},
|
|
64
|
-
enumerable: false,
|
|
65
|
-
configurable: true
|
|
66
|
-
});
|
|
67
|
-
/**
|
|
68
|
-
* Adds a record to both the database containing the table and the table itself.
|
|
69
|
-
*
|
|
70
|
-
* @param record - The record to add to the table
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```typescript
|
|
74
|
-
* const record = new AcDbSymbolTableRecord({ name: 'MyRecord' });
|
|
75
|
-
* symbolTable.add(record);
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
|
-
AcDbSymbolTable.prototype.add = function (record) {
|
|
79
|
-
record.database = this.database;
|
|
80
|
-
var normalizedName = this.normalizeName(record.name);
|
|
81
|
-
this._recordsByName.set(normalizedName, record);
|
|
82
|
-
this._recordsById.set(record.objectId, record);
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* Removes the record with the specified name.
|
|
86
|
-
*
|
|
87
|
-
* @param name - The name of the record to remove
|
|
88
|
-
* @returns True if the record was found and removed, false otherwise
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```typescript
|
|
92
|
-
* const removed = symbolTable.remove('MyRecord');
|
|
93
|
-
* if (removed) {
|
|
94
|
-
* console.log('Record removed successfully');
|
|
95
|
-
* }
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
|
-
AcDbSymbolTable.prototype.remove = function (name) {
|
|
99
|
-
var normalizedName = this.normalizeName(name);
|
|
100
|
-
var record = this._recordsByName.get(normalizedName);
|
|
101
|
-
if (record) {
|
|
102
|
-
this._recordsById.delete(record.objectId);
|
|
103
|
-
this._recordsByName.delete(name);
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
return false;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* Removes the record with the specified ID.
|
|
110
|
-
*
|
|
111
|
-
* @param id - The object ID of the record to remove
|
|
112
|
-
* @returns True if the record was found and removed, false otherwise
|
|
113
|
-
*
|
|
114
|
-
* @example
|
|
115
|
-
* ```typescript
|
|
116
|
-
* const removed = symbolTable.removeId('some-object-id');
|
|
117
|
-
* if (removed) {
|
|
118
|
-
* console.log('Record removed successfully');
|
|
119
|
-
* }
|
|
120
|
-
* ```
|
|
121
|
-
*/
|
|
122
|
-
AcDbSymbolTable.prototype.removeId = function (id) {
|
|
123
|
-
var record = this._recordsById.get(id);
|
|
124
|
-
if (record) {
|
|
125
|
-
this._recordsByName.delete(record.name);
|
|
126
|
-
this._recordsById.delete(id);
|
|
127
|
-
return true;
|
|
128
|
-
}
|
|
129
|
-
return false;
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* Removes all records from the table.
|
|
133
|
-
*
|
|
134
|
-
* @example
|
|
135
|
-
* ```typescript
|
|
136
|
-
* symbolTable.removeAll();
|
|
137
|
-
* console.log('All records removed');
|
|
138
|
-
* ```
|
|
139
|
-
*/
|
|
140
|
-
AcDbSymbolTable.prototype.removeAll = function () {
|
|
141
|
-
this._recordsByName.clear();
|
|
142
|
-
this._recordsById.clear();
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* Checks if the table contains a record with the specified name.
|
|
146
|
-
*
|
|
147
|
-
* @param name - The name to search for
|
|
148
|
-
* @returns True if a record with the specified name exists, false otherwise
|
|
149
|
-
*
|
|
150
|
-
* @example
|
|
151
|
-
* ```typescript
|
|
152
|
-
* if (symbolTable.has('MyRecord')) {
|
|
153
|
-
* console.log('Record exists');
|
|
154
|
-
* }
|
|
155
|
-
* ```
|
|
156
|
-
*/
|
|
157
|
-
AcDbSymbolTable.prototype.has = function (name) {
|
|
158
|
-
var normalizedName = this.normalizeName(name);
|
|
159
|
-
return this._recordsByName.has(normalizedName);
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* Checks if the table contains a record with the specified ID.
|
|
163
|
-
*
|
|
164
|
-
* @param id - The ID to search for
|
|
165
|
-
* @returns True if a record with the specified ID exists, false otherwise
|
|
166
|
-
*
|
|
167
|
-
* @example
|
|
168
|
-
* ```typescript
|
|
169
|
-
* if (symbolTable.hasId('some-object-id')) {
|
|
170
|
-
* console.log('Record exists');
|
|
171
|
-
* }
|
|
172
|
-
* ```
|
|
173
|
-
*/
|
|
174
|
-
AcDbSymbolTable.prototype.hasId = function (id) {
|
|
175
|
-
return this._recordsById.has(id);
|
|
176
|
-
};
|
|
177
|
-
/**
|
|
178
|
-
* Searches the table for a record with the specified name.
|
|
179
|
-
*
|
|
180
|
-
* @param name - The name to search for
|
|
181
|
-
* @returns The record with the specified name, or undefined if not found
|
|
182
|
-
*
|
|
183
|
-
* @example
|
|
184
|
-
* ```typescript
|
|
185
|
-
* const record = symbolTable.getAt('MyRecord');
|
|
186
|
-
* if (record) {
|
|
187
|
-
* console.log('Found record:', record.name);
|
|
188
|
-
* }
|
|
189
|
-
* ```
|
|
190
|
-
*/
|
|
191
|
-
AcDbSymbolTable.prototype.getAt = function (name) {
|
|
192
|
-
var normalizedName = this.normalizeName(name);
|
|
193
|
-
return this._recordsByName.get(normalizedName);
|
|
194
|
-
};
|
|
195
|
-
/**
|
|
196
|
-
* Searches the table for a record with the specified ID.
|
|
197
|
-
*
|
|
198
|
-
* @param id - The ID to search for
|
|
199
|
-
* @returns The record with the specified ID, or undefined if not found
|
|
200
|
-
*
|
|
201
|
-
* @example
|
|
202
|
-
* ```typescript
|
|
203
|
-
* const record = symbolTable.getIdAt('some-object-id');
|
|
204
|
-
* if (record) {
|
|
205
|
-
* console.log('Found record:', record.name);
|
|
206
|
-
* }
|
|
207
|
-
* ```
|
|
208
|
-
*/
|
|
209
|
-
AcDbSymbolTable.prototype.getIdAt = function (id) {
|
|
210
|
-
return this._recordsById.get(id);
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* Gets the owner ID of a record with the specified ID.
|
|
214
|
-
*
|
|
215
|
-
* @param id - The ID to search for
|
|
216
|
-
* @returns The record with the specified ID, or undefined if not found
|
|
217
|
-
*
|
|
218
|
-
* @example
|
|
219
|
-
* ```typescript
|
|
220
|
-
* const record = symbolTable.getOwnerIdAt('some-object-id');
|
|
221
|
-
* if (record) {
|
|
222
|
-
* console.log('Owner ID:', record.ownerId);
|
|
223
|
-
* }
|
|
224
|
-
* ```
|
|
225
|
-
*/
|
|
226
|
-
AcDbSymbolTable.prototype.getOwnerIdAt = function (id) {
|
|
227
|
-
return this._recordsById.get(id);
|
|
228
|
-
};
|
|
229
|
-
/**
|
|
230
|
-
* Creates an iterator object that can be used to iterate over the records in the table.
|
|
231
|
-
*
|
|
232
|
-
* @returns An iterator object that can be used to iterate over the records
|
|
233
|
-
*
|
|
234
|
-
* @example
|
|
235
|
-
* ```typescript
|
|
236
|
-
* const iterator = symbolTable.newIterator();
|
|
237
|
-
* for (const record of iterator) {
|
|
238
|
-
* console.log('Record:', record.name);
|
|
239
|
-
* }
|
|
240
|
-
* ```
|
|
241
|
-
*/
|
|
242
|
-
AcDbSymbolTable.prototype.newIterator = function () {
|
|
243
|
-
return new AcDbObjectIterator(this._recordsByName);
|
|
244
|
-
};
|
|
245
|
-
/**
|
|
246
|
-
* Normalizes the name of a symbol table record.
|
|
247
|
-
*
|
|
248
|
-
* Some symbol table records require name normalization. For example, the
|
|
249
|
-
* model space block table record may appear as either `*Model_Space` or
|
|
250
|
-
* `*MODEL_SPACE`, and should be standardized to a consistent form.
|
|
251
|
-
*
|
|
252
|
-
* Subclasses should override this method to implement record-specific
|
|
253
|
-
* normalization rules.
|
|
254
|
-
*
|
|
255
|
-
* @param name - The raw name of the symbol table record.
|
|
256
|
-
* @returns The normalized symbol table record name.
|
|
257
|
-
*/
|
|
258
|
-
AcDbSymbolTable.prototype.normalizeName = function (name) {
|
|
259
|
-
return name;
|
|
260
|
-
};
|
|
261
|
-
return AcDbSymbolTable;
|
|
262
|
-
}(AcDbObject));
|
|
263
|
-
export { AcDbSymbolTable };
|
|
264
|
-
//# sourceMappingURL=AcDbSymbolTable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbSymbolTable.js","sourceRoot":"","sources":["../../src/database/AcDbSymbolTable.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { AcDbObject, AcDbObjectAttrs } from '../base/AcDbObject';
|
|
2
|
-
/**
|
|
3
|
-
* Interface defining the attributes for symbol table records.
|
|
4
|
-
*
|
|
5
|
-
* Extends the base AcDbObjectAttrs interface and adds a name property
|
|
6
|
-
* that is required for all symbol table records.
|
|
7
|
-
*/
|
|
8
|
-
export interface AcDbSymbolTableRecordAttrs extends AcDbObjectAttrs {
|
|
9
|
-
/** The name of the symbol table record */
|
|
10
|
-
name: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Base class for all symbol table records.
|
|
14
|
-
*
|
|
15
|
-
* This class provides the fundamental functionality for all symbol table records,
|
|
16
|
-
* including name management and common attributes. Symbol table records represent
|
|
17
|
-
* entries in various symbol tables such as layer tables, linetype tables, text
|
|
18
|
-
* style tables, etc.
|
|
19
|
-
*
|
|
20
|
-
* @template ATTRS - The type of attributes this symbol table record can have
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```typescript
|
|
24
|
-
* class MySymbolTableRecord extends AcDbSymbolTableRecord<MySymbolTableRecordAttrs> {
|
|
25
|
-
* constructor(attrs?: Partial<MySymbolTableRecordAttrs>) {
|
|
26
|
-
* super(attrs);
|
|
27
|
-
* }
|
|
28
|
-
* }
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export declare class AcDbSymbolTableRecord<ATTRS extends AcDbSymbolTableRecordAttrs = AcDbSymbolTableRecordAttrs> extends AcDbObject<ATTRS> {
|
|
32
|
-
/**
|
|
33
|
-
* Creates a new AcDbSymbolTableRecord instance.
|
|
34
|
-
*
|
|
35
|
-
* @param attrs - Input attribute values for this symbol table record
|
|
36
|
-
* @param defaultAttrs - Default values for attributes of this symbol table record
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```typescript
|
|
40
|
-
* const record = new AcDbSymbolTableRecord({ name: 'MyRecord' });
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
constructor(attrs?: Partial<ATTRS>, defaultAttrs?: Partial<ATTRS>);
|
|
44
|
-
/**
|
|
45
|
-
* Gets or sets the name of the symbol table record.
|
|
46
|
-
*
|
|
47
|
-
* This property corresponds to DXF group code 2 and is used for
|
|
48
|
-
* identifying and referencing the symbol table record.
|
|
49
|
-
*
|
|
50
|
-
* @returns The name of the symbol table record
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```typescript
|
|
54
|
-
* const recordName = record.name;
|
|
55
|
-
* record.name = 'NewRecordName';
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
get name(): string;
|
|
59
|
-
set name(value: string);
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=AcDbSymbolTableRecord.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbSymbolTableRecord.d.ts","sourceRoot":"","sources":["../../src/database/AcDbSymbolTableRecord.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,0BAA2B,SAAQ,eAAe;IACjE,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,qBAAqB,CAChC,KAAK,SAAS,0BAA0B,GAAG,0BAA0B,CACrE,SAAQ,UAAU,CAAC,KAAK,CAAC;IACzB;;;;;;;;;;OAUG;gBACS,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC;IAMjE;;;;;;;;;;;;;OAaG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;CACF"}
|