@mlightcad/data-model 1.3.1 → 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 -25475
- 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 -867
- 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 -85
- 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/AcDbRegenerator.d.ts +0 -101
- package/lib/converter/AcDbRegenerator.d.ts.map +0 -1
- package/lib/converter/AcDbRegenerator.js +0 -334
- package/lib/converter/AcDbRegenerator.js.map +0 -1
- package/lib/converter/index.d.ts +0 -5
- package/lib/converter/index.d.ts.map +0 -1
- package/lib/converter/index.js +0 -5
- 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 -563
- package/lib/database/AcDbDatabase.d.ts.map +0 -1
- package/lib/database/AcDbDatabase.js +0 -842
- 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 -446
- 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 -64
- package/lib/misc/AcDbObjectIterator.d.ts.map +0 -1
- package/lib/misc/AcDbObjectIterator.js +0 -84
- 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,193 +0,0 @@
|
|
|
1
|
-
import { AcGeBox3d, AcGePoint3d, AcGePointLike } from '@mlightcad/geometry-engine';
|
|
2
|
-
import { AcGiRenderer } from '@mlightcad/graphic-interface';
|
|
3
|
-
import { AcDbCurve } from './AcDbCurve';
|
|
4
|
-
/**
|
|
5
|
-
* Represents a trace entity in AutoCAD.
|
|
6
|
-
*
|
|
7
|
-
* A trace is a 3D geometric object that represents a filled four-sided polygon.
|
|
8
|
-
* It is typically used to create trace-like shapes and can be visualized as a
|
|
9
|
-
* "filled polyline" with four vertices, where each edge connects two consecutive points.
|
|
10
|
-
*
|
|
11
|
-
* This entity was more commonly used in earlier versions of AutoCAD, especially before
|
|
12
|
-
* the introduction of more advanced entities like solid and hatches. Today, it's not
|
|
13
|
-
* as commonly used since solid provides similar capabilities with more flexibility.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* // Create a trace entity
|
|
18
|
-
* const trace = new AcDbTrace();
|
|
19
|
-
* trace.setPointAt(0, new AcGePoint3d(0, 0, 0));
|
|
20
|
-
* trace.setPointAt(1, new AcGePoint3d(10, 0, 0));
|
|
21
|
-
* trace.setPointAt(2, new AcGePoint3d(10, 5, 0));
|
|
22
|
-
* trace.setPointAt(3, new AcGePoint3d(0, 5, 0));
|
|
23
|
-
*
|
|
24
|
-
* // Access trace properties
|
|
25
|
-
* console.log(`Elevation: ${trace.elevation}`);
|
|
26
|
-
* console.log(`Thickness: ${trace.thickness}`);
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare class AcDbTrace extends AcDbCurve {
|
|
30
|
-
/** The entity type name */
|
|
31
|
-
static typeName: string;
|
|
32
|
-
/** The elevation (Z-coordinate) of the trace plane */
|
|
33
|
-
private _elevation;
|
|
34
|
-
/** The four vertices of the trace */
|
|
35
|
-
private _vertices;
|
|
36
|
-
/** The thickness (extrusion) of the trace */
|
|
37
|
-
private _thickness;
|
|
38
|
-
/**
|
|
39
|
-
* Creates a new trace entity.
|
|
40
|
-
*
|
|
41
|
-
* This constructor initializes a trace with default values.
|
|
42
|
-
* All vertices are set to the origin, elevation is 0, and thickness is 1.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```typescript
|
|
46
|
-
* const trace = new AcDbTrace();
|
|
47
|
-
* // Set the four vertices to create a rectangle
|
|
48
|
-
* trace.setPointAt(0, new AcGePoint3d(0, 0, 0));
|
|
49
|
-
* trace.setPointAt(1, new AcGePoint3d(10, 0, 0));
|
|
50
|
-
* trace.setPointAt(2, new AcGePoint3d(10, 5, 0));
|
|
51
|
-
* trace.setPointAt(3, new AcGePoint3d(0, 5, 0));
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
constructor();
|
|
55
|
-
/**
|
|
56
|
-
* Gets the elevation of this trace.
|
|
57
|
-
*
|
|
58
|
-
* The elevation is the distance of the trace's plane from the WCS origin
|
|
59
|
-
* along the Z-axis.
|
|
60
|
-
*
|
|
61
|
-
* @returns The elevation value
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* const elevation = trace.elevation;
|
|
66
|
-
* console.log(`Trace elevation: ${elevation}`);
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
get elevation(): number;
|
|
70
|
-
/**
|
|
71
|
-
* Sets the elevation of this trace.
|
|
72
|
-
*
|
|
73
|
-
* @param value - The new elevation value
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```typescript
|
|
77
|
-
* trace.elevation = 10;
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
|
-
set elevation(value: number);
|
|
81
|
-
/**
|
|
82
|
-
* Gets whether this trace is closed.
|
|
83
|
-
*
|
|
84
|
-
* Traces are always closed entities, so this always returns true.
|
|
85
|
-
*
|
|
86
|
-
* @returns Always true for traces
|
|
87
|
-
*/
|
|
88
|
-
get closed(): boolean;
|
|
89
|
-
/**
|
|
90
|
-
* Gets the thickness of this trace.
|
|
91
|
-
*
|
|
92
|
-
* The thickness is the trace's dimension along its normal vector direction
|
|
93
|
-
* (sometimes called the extrusion direction).
|
|
94
|
-
*
|
|
95
|
-
* @returns The thickness value
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* ```typescript
|
|
99
|
-
* const thickness = trace.thickness;
|
|
100
|
-
* console.log(`Trace thickness: ${thickness}`);
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
103
|
-
get thickness(): number;
|
|
104
|
-
/**
|
|
105
|
-
* Sets the thickness of this trace.
|
|
106
|
-
*
|
|
107
|
-
* @param value - The new thickness value
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```typescript
|
|
111
|
-
* trace.thickness = 2.0;
|
|
112
|
-
* ```
|
|
113
|
-
*/
|
|
114
|
-
set thickness(value: number);
|
|
115
|
-
/**
|
|
116
|
-
* Gets the point at the specified index in this trace.
|
|
117
|
-
*
|
|
118
|
-
* The index can be 0, 1, 2, or 3, representing the four vertices of the trace.
|
|
119
|
-
* If the index is out of range, it returns the first or last vertex accordingly.
|
|
120
|
-
*
|
|
121
|
-
* @param index - The index (0-3) of the vertex to get
|
|
122
|
-
* @returns The point at the specified index in WCS coordinates
|
|
123
|
-
*
|
|
124
|
-
* @example
|
|
125
|
-
* ```typescript
|
|
126
|
-
* const point0 = trace.getPointAt(0);
|
|
127
|
-
* const point1 = trace.getPointAt(1);
|
|
128
|
-
* console.log(`Vertex 0: ${point0.x}, ${point0.y}, ${point0.z}`);
|
|
129
|
-
* ```
|
|
130
|
-
*/
|
|
131
|
-
getPointAt(index: number): AcGePoint3d;
|
|
132
|
-
/**
|
|
133
|
-
* Sets the point at the specified index in this trace.
|
|
134
|
-
*
|
|
135
|
-
* The index must be 0, 1, 2, or 3, representing the four vertices of the trace.
|
|
136
|
-
* If the index is out of range, it sets the first or last vertex accordingly.
|
|
137
|
-
*
|
|
138
|
-
* @param index - The index (0-3) of the vertex to set
|
|
139
|
-
* @param point - The new point in WCS coordinates
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* ```typescript
|
|
143
|
-
* trace.setPointAt(0, new AcGePoint3d(0, 0, 0));
|
|
144
|
-
* trace.setPointAt(1, new AcGePoint3d(10, 0, 0));
|
|
145
|
-
* trace.setPointAt(2, new AcGePoint3d(10, 5, 0));
|
|
146
|
-
* trace.setPointAt(3, new AcGePoint3d(0, 5, 0));
|
|
147
|
-
* ```
|
|
148
|
-
*/
|
|
149
|
-
setPointAt(index: number, point: AcGePointLike): AcGePoint3d | undefined;
|
|
150
|
-
/**
|
|
151
|
-
* Gets the geometric extents (bounding box) of this trace.
|
|
152
|
-
*
|
|
153
|
-
* @returns The bounding box that encompasses the entire trace
|
|
154
|
-
*
|
|
155
|
-
* @example
|
|
156
|
-
* ```typescript
|
|
157
|
-
* const extents = trace.geometricExtents;
|
|
158
|
-
* console.log(`Trace bounds: ${extents.minPoint} to ${extents.maxPoint}`);
|
|
159
|
-
* ```
|
|
160
|
-
*/
|
|
161
|
-
get geometricExtents(): AcGeBox3d;
|
|
162
|
-
/**
|
|
163
|
-
* Gets the grip points for this trace.
|
|
164
|
-
*
|
|
165
|
-
* Grip points are control points that can be used to modify the trace.
|
|
166
|
-
* For a trace, the grip points are all four vertices.
|
|
167
|
-
*
|
|
168
|
-
* @returns Array of grip points (all four vertices)
|
|
169
|
-
*
|
|
170
|
-
* @example
|
|
171
|
-
* ```typescript
|
|
172
|
-
* const gripPoints = trace.subGetGripPoints();
|
|
173
|
-
* // gripPoints contains all four vertices of the trace
|
|
174
|
-
* ```
|
|
175
|
-
*/
|
|
176
|
-
subGetGripPoints(): AcGePoint3d[];
|
|
177
|
-
/**
|
|
178
|
-
* Draws this trace using the specified renderer.
|
|
179
|
-
*
|
|
180
|
-
* This method renders the trace as a filled area using the trace's
|
|
181
|
-
* current style properties.
|
|
182
|
-
*
|
|
183
|
-
* @param renderer - The renderer to use for drawing
|
|
184
|
-
* @returns The rendered trace entity, or undefined if drawing failed
|
|
185
|
-
*
|
|
186
|
-
* @example
|
|
187
|
-
* ```typescript
|
|
188
|
-
* const renderedTrace = trace.draw(renderer);
|
|
189
|
-
* ```
|
|
190
|
-
*/
|
|
191
|
-
draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
|
|
192
|
-
}
|
|
193
|
-
//# sourceMappingURL=AcDbTrace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbTrace.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbTrace.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,WAAW,EACX,aAAa,EAEd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,SAAU,SAAQ,SAAS;IACtC,2BAA2B;IAC3B,OAAgB,QAAQ,EAAE,MAAM,CAAU;IAE1C,sDAAsD;IACtD,OAAO,CAAC,UAAU,CAAQ;IAC1B,qCAAqC;IACrC,OAAO,CAAC,SAAS,CAAsD;IACvE,6CAA6C;IAC7C,OAAO,CAAC,UAAU,CAAQ;IAE1B;;;;;;;;;;;;;;;OAeG;;IAaH;;;;;;;;;;;;;OAaG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;;;;;;;;OASG;IACH,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAE1B;IAED;;;;;;OAMG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,SAAS,IAcQ,MAAM,CAZ1B;IAED;;;;;;;;;OASG;IACH,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAE1B;IAED;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW;IAMtC;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa;IAM9C;;;;;;;;;;OAUG;IACH,IAAI,gBAAgB,IAAI,SAAS,CAEhC;IAED;;;;;;;;;;;;;OAaG;IACH,gBAAgB;IAQhB;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAW5B"}
|
package/lib/entity/AcDbTrace.js
DELETED
|
@@ -1,271 +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 { AcGeArea2d, AcGeBox3d, AcGePoint3d, AcGePolyline2d } from '@mlightcad/geometry-engine';
|
|
17
|
-
import { AcDbCurve } from './AcDbCurve';
|
|
18
|
-
/**
|
|
19
|
-
* Represents a trace entity in AutoCAD.
|
|
20
|
-
*
|
|
21
|
-
* A trace is a 3D geometric object that represents a filled four-sided polygon.
|
|
22
|
-
* It is typically used to create trace-like shapes and can be visualized as a
|
|
23
|
-
* "filled polyline" with four vertices, where each edge connects two consecutive points.
|
|
24
|
-
*
|
|
25
|
-
* This entity was more commonly used in earlier versions of AutoCAD, especially before
|
|
26
|
-
* the introduction of more advanced entities like solid and hatches. Today, it's not
|
|
27
|
-
* as commonly used since solid provides similar capabilities with more flexibility.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```typescript
|
|
31
|
-
* // Create a trace entity
|
|
32
|
-
* const trace = new AcDbTrace();
|
|
33
|
-
* trace.setPointAt(0, new AcGePoint3d(0, 0, 0));
|
|
34
|
-
* trace.setPointAt(1, new AcGePoint3d(10, 0, 0));
|
|
35
|
-
* trace.setPointAt(2, new AcGePoint3d(10, 5, 0));
|
|
36
|
-
* trace.setPointAt(3, new AcGePoint3d(0, 5, 0));
|
|
37
|
-
*
|
|
38
|
-
* // Access trace properties
|
|
39
|
-
* console.log(`Elevation: ${trace.elevation}`);
|
|
40
|
-
* console.log(`Thickness: ${trace.thickness}`);
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
var AcDbTrace = /** @class */ (function (_super) {
|
|
44
|
-
__extends(AcDbTrace, _super);
|
|
45
|
-
/**
|
|
46
|
-
* Creates a new trace entity.
|
|
47
|
-
*
|
|
48
|
-
* This constructor initializes a trace with default values.
|
|
49
|
-
* All vertices are set to the origin, elevation is 0, and thickness is 1.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* const trace = new AcDbTrace();
|
|
54
|
-
* // Set the four vertices to create a rectangle
|
|
55
|
-
* trace.setPointAt(0, new AcGePoint3d(0, 0, 0));
|
|
56
|
-
* trace.setPointAt(1, new AcGePoint3d(10, 0, 0));
|
|
57
|
-
* trace.setPointAt(2, new AcGePoint3d(10, 5, 0));
|
|
58
|
-
* trace.setPointAt(3, new AcGePoint3d(0, 5, 0));
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
function AcDbTrace() {
|
|
62
|
-
var _this = _super.call(this) || this;
|
|
63
|
-
_this._elevation = 0;
|
|
64
|
-
_this._thickness = 1;
|
|
65
|
-
_this._vertices = [
|
|
66
|
-
new AcGePoint3d(),
|
|
67
|
-
new AcGePoint3d(),
|
|
68
|
-
new AcGePoint3d(),
|
|
69
|
-
new AcGePoint3d()
|
|
70
|
-
];
|
|
71
|
-
return _this;
|
|
72
|
-
}
|
|
73
|
-
Object.defineProperty(AcDbTrace.prototype, "elevation", {
|
|
74
|
-
/**
|
|
75
|
-
* Gets the elevation of this trace.
|
|
76
|
-
*
|
|
77
|
-
* The elevation is the distance of the trace's plane from the WCS origin
|
|
78
|
-
* along the Z-axis.
|
|
79
|
-
*
|
|
80
|
-
* @returns The elevation value
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```typescript
|
|
84
|
-
* const elevation = trace.elevation;
|
|
85
|
-
* console.log(`Trace elevation: ${elevation}`);
|
|
86
|
-
* ```
|
|
87
|
-
*/
|
|
88
|
-
get: function () {
|
|
89
|
-
return this._elevation;
|
|
90
|
-
},
|
|
91
|
-
/**
|
|
92
|
-
* Sets the elevation of this trace.
|
|
93
|
-
*
|
|
94
|
-
* @param value - The new elevation value
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```typescript
|
|
98
|
-
* trace.elevation = 10;
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
set: function (value) {
|
|
102
|
-
this._elevation = value;
|
|
103
|
-
},
|
|
104
|
-
enumerable: false,
|
|
105
|
-
configurable: true
|
|
106
|
-
});
|
|
107
|
-
Object.defineProperty(AcDbTrace.prototype, "closed", {
|
|
108
|
-
/**
|
|
109
|
-
* Gets whether this trace is closed.
|
|
110
|
-
*
|
|
111
|
-
* Traces are always closed entities, so this always returns true.
|
|
112
|
-
*
|
|
113
|
-
* @returns Always true for traces
|
|
114
|
-
*/
|
|
115
|
-
get: function () {
|
|
116
|
-
return true;
|
|
117
|
-
},
|
|
118
|
-
enumerable: false,
|
|
119
|
-
configurable: true
|
|
120
|
-
});
|
|
121
|
-
Object.defineProperty(AcDbTrace.prototype, "thickness", {
|
|
122
|
-
/**
|
|
123
|
-
* Gets the thickness of this trace.
|
|
124
|
-
*
|
|
125
|
-
* The thickness is the trace's dimension along its normal vector direction
|
|
126
|
-
* (sometimes called the extrusion direction).
|
|
127
|
-
*
|
|
128
|
-
* @returns The thickness value
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* ```typescript
|
|
132
|
-
* const thickness = trace.thickness;
|
|
133
|
-
* console.log(`Trace thickness: ${thickness}`);
|
|
134
|
-
* ```
|
|
135
|
-
*/
|
|
136
|
-
get: function () {
|
|
137
|
-
return this._thickness;
|
|
138
|
-
},
|
|
139
|
-
/**
|
|
140
|
-
* Sets the thickness of this trace.
|
|
141
|
-
*
|
|
142
|
-
* @param value - The new thickness value
|
|
143
|
-
*
|
|
144
|
-
* @example
|
|
145
|
-
* ```typescript
|
|
146
|
-
* trace.thickness = 2.0;
|
|
147
|
-
* ```
|
|
148
|
-
*/
|
|
149
|
-
set: function (value) {
|
|
150
|
-
this._thickness = value;
|
|
151
|
-
},
|
|
152
|
-
enumerable: false,
|
|
153
|
-
configurable: true
|
|
154
|
-
});
|
|
155
|
-
/**
|
|
156
|
-
* Gets the point at the specified index in this trace.
|
|
157
|
-
*
|
|
158
|
-
* The index can be 0, 1, 2, or 3, representing the four vertices of the trace.
|
|
159
|
-
* If the index is out of range, it returns the first or last vertex accordingly.
|
|
160
|
-
*
|
|
161
|
-
* @param index - The index (0-3) of the vertex to get
|
|
162
|
-
* @returns The point at the specified index in WCS coordinates
|
|
163
|
-
*
|
|
164
|
-
* @example
|
|
165
|
-
* ```typescript
|
|
166
|
-
* const point0 = trace.getPointAt(0);
|
|
167
|
-
* const point1 = trace.getPointAt(1);
|
|
168
|
-
* console.log(`Vertex 0: ${point0.x}, ${point0.y}, ${point0.z}`);
|
|
169
|
-
* ```
|
|
170
|
-
*/
|
|
171
|
-
AcDbTrace.prototype.getPointAt = function (index) {
|
|
172
|
-
if (index < 0)
|
|
173
|
-
return this._vertices[0];
|
|
174
|
-
if (index > 3)
|
|
175
|
-
return this._vertices[3];
|
|
176
|
-
return this._vertices[index];
|
|
177
|
-
};
|
|
178
|
-
/**
|
|
179
|
-
* Sets the point at the specified index in this trace.
|
|
180
|
-
*
|
|
181
|
-
* The index must be 0, 1, 2, or 3, representing the four vertices of the trace.
|
|
182
|
-
* If the index is out of range, it sets the first or last vertex accordingly.
|
|
183
|
-
*
|
|
184
|
-
* @param index - The index (0-3) of the vertex to set
|
|
185
|
-
* @param point - The new point in WCS coordinates
|
|
186
|
-
*
|
|
187
|
-
* @example
|
|
188
|
-
* ```typescript
|
|
189
|
-
* trace.setPointAt(0, new AcGePoint3d(0, 0, 0));
|
|
190
|
-
* trace.setPointAt(1, new AcGePoint3d(10, 0, 0));
|
|
191
|
-
* trace.setPointAt(2, new AcGePoint3d(10, 5, 0));
|
|
192
|
-
* trace.setPointAt(3, new AcGePoint3d(0, 5, 0));
|
|
193
|
-
* ```
|
|
194
|
-
*/
|
|
195
|
-
AcDbTrace.prototype.setPointAt = function (index, point) {
|
|
196
|
-
if (index < 0)
|
|
197
|
-
this._vertices[0].copy(point);
|
|
198
|
-
if (index > 3)
|
|
199
|
-
return this._vertices[3].copy(point);
|
|
200
|
-
this._vertices[index].copy(point);
|
|
201
|
-
};
|
|
202
|
-
Object.defineProperty(AcDbTrace.prototype, "geometricExtents", {
|
|
203
|
-
/**
|
|
204
|
-
* Gets the geometric extents (bounding box) of this trace.
|
|
205
|
-
*
|
|
206
|
-
* @returns The bounding box that encompasses the entire trace
|
|
207
|
-
*
|
|
208
|
-
* @example
|
|
209
|
-
* ```typescript
|
|
210
|
-
* const extents = trace.geometricExtents;
|
|
211
|
-
* console.log(`Trace bounds: ${extents.minPoint} to ${extents.maxPoint}`);
|
|
212
|
-
* ```
|
|
213
|
-
*/
|
|
214
|
-
get: function () {
|
|
215
|
-
return new AcGeBox3d().setFromPoints(this._vertices);
|
|
216
|
-
},
|
|
217
|
-
enumerable: false,
|
|
218
|
-
configurable: true
|
|
219
|
-
});
|
|
220
|
-
/**
|
|
221
|
-
* Gets the grip points for this trace.
|
|
222
|
-
*
|
|
223
|
-
* Grip points are control points that can be used to modify the trace.
|
|
224
|
-
* For a trace, the grip points are all four vertices.
|
|
225
|
-
*
|
|
226
|
-
* @returns Array of grip points (all four vertices)
|
|
227
|
-
*
|
|
228
|
-
* @example
|
|
229
|
-
* ```typescript
|
|
230
|
-
* const gripPoints = trace.subGetGripPoints();
|
|
231
|
-
* // gripPoints contains all four vertices of the trace
|
|
232
|
-
* ```
|
|
233
|
-
*/
|
|
234
|
-
AcDbTrace.prototype.subGetGripPoints = function () {
|
|
235
|
-
var gripPoints = new Array();
|
|
236
|
-
for (var index = 0; index < 4; ++index) {
|
|
237
|
-
gripPoints.push(this.getPointAt(index));
|
|
238
|
-
}
|
|
239
|
-
return gripPoints;
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* Draws this trace using the specified renderer.
|
|
243
|
-
*
|
|
244
|
-
* This method renders the trace as a filled area using the trace's
|
|
245
|
-
* current style properties.
|
|
246
|
-
*
|
|
247
|
-
* @param renderer - The renderer to use for drawing
|
|
248
|
-
* @returns The rendered trace entity, or undefined if drawing failed
|
|
249
|
-
*
|
|
250
|
-
* @example
|
|
251
|
-
* ```typescript
|
|
252
|
-
* const renderedTrace = trace.draw(renderer);
|
|
253
|
-
* ```
|
|
254
|
-
*/
|
|
255
|
-
AcDbTrace.prototype.draw = function (renderer) {
|
|
256
|
-
var polyline = new AcGePolyline2d(this._vertices, true);
|
|
257
|
-
var area = new AcGeArea2d();
|
|
258
|
-
area.add(polyline);
|
|
259
|
-
return renderer.area(area, {
|
|
260
|
-
color: this.rgbColor,
|
|
261
|
-
solidFill: true,
|
|
262
|
-
patternAngle: 0,
|
|
263
|
-
patternLines: []
|
|
264
|
-
});
|
|
265
|
-
};
|
|
266
|
-
/** The entity type name */
|
|
267
|
-
AcDbTrace.typeName = 'Trace';
|
|
268
|
-
return AcDbTrace;
|
|
269
|
-
}(AcDbCurve));
|
|
270
|
-
export { AcDbTrace };
|
|
271
|
-
//# sourceMappingURL=AcDbTrace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbTrace.js","sourceRoot":"","sources":["../../src/entity/AcDbTrace.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { AcGeBox3d, AcGePoint3d } from '@mlightcad/geometry-engine';
|
|
2
|
-
import { AcGiEntity, AcGiRenderer, AcGiViewport } from '@mlightcad/graphic-interface';
|
|
3
|
-
import { AcDbEntity } from './AcDbEntity';
|
|
4
|
-
/**
|
|
5
|
-
* Represents a viewport entity in AutoCAD drawings.
|
|
6
|
-
*
|
|
7
|
-
* A viewport is a rectangular window that displays a portion of the drawing model space
|
|
8
|
-
* within paper space layouts. Viewports allow users to create multiple views of the same
|
|
9
|
-
* drawing at different scales and orientations on a single sheet.
|
|
10
|
-
*
|
|
11
|
-
* Key characteristics:
|
|
12
|
-
* - Viewports exist primarily in paper space layouts
|
|
13
|
-
* - Each viewport has a unique ID number (except the default system viewport with ID 1)
|
|
14
|
-
* - Viewports can be active or inactive
|
|
15
|
-
* - The viewport entity itself is drawn as a rectangular border in paper space
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const viewport = new AcDbViewport();
|
|
20
|
-
* viewport.centerPoint = new AcGePoint3d(0, 0, 0);
|
|
21
|
-
* viewport.width = 10;
|
|
22
|
-
* viewport.height = 8;
|
|
23
|
-
* viewport.number = 2;
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export declare class AcDbViewport extends AcDbEntity {
|
|
27
|
-
/** The entity type name */
|
|
28
|
-
static typeName: string;
|
|
29
|
-
private _centerPoint;
|
|
30
|
-
private _height;
|
|
31
|
-
private _width;
|
|
32
|
-
private _viewCenter;
|
|
33
|
-
private _viewHeight;
|
|
34
|
-
private _number;
|
|
35
|
-
/**
|
|
36
|
-
* Creates a new AcDbViewport instance.
|
|
37
|
-
*
|
|
38
|
-
* Initializes all properties with default values:
|
|
39
|
-
* - centerPoint: origin (0,0,0)
|
|
40
|
-
* - height: 0
|
|
41
|
-
* - width: 0
|
|
42
|
-
* - viewCenter: origin (0,0,0)
|
|
43
|
-
* - viewHeight: 0
|
|
44
|
-
* - number: -1 (indicating inactive viewport)
|
|
45
|
-
*/
|
|
46
|
-
constructor();
|
|
47
|
-
/**
|
|
48
|
-
* Gets or sets the viewport ID number.
|
|
49
|
-
*
|
|
50
|
-
* This is the number that is reported by the AutoCAD CVPORT system variable
|
|
51
|
-
* when the viewport is the current viewport in the AutoCAD editor. If the viewport is inactive, -1
|
|
52
|
-
* is returned.
|
|
53
|
-
*
|
|
54
|
-
* Important notes:
|
|
55
|
-
* - This value is not saved with the drawing, and changes each time the drawing is opened
|
|
56
|
-
* - Viewport ID 1 is reserved for the system-defined default viewport in paper space
|
|
57
|
-
* - Active viewports have IDs greater than 1
|
|
58
|
-
* - Inactive viewports return -1
|
|
59
|
-
*
|
|
60
|
-
* @returns The viewport ID number
|
|
61
|
-
*/
|
|
62
|
-
get number(): number;
|
|
63
|
-
set number(value: number);
|
|
64
|
-
/**
|
|
65
|
-
* Gets or sets the center point of the viewport entity in WCS coordinates (within Paper Space).
|
|
66
|
-
*
|
|
67
|
-
* This point represents the geometric center of the viewport's rectangular boundary
|
|
68
|
-
* in paper space coordinates, not the center of the model space view within the viewport.
|
|
69
|
-
*
|
|
70
|
-
* @returns The center point of the viewport entity
|
|
71
|
-
*/
|
|
72
|
-
get centerPoint(): AcGePoint3d;
|
|
73
|
-
set centerPoint(value: AcGePoint3d);
|
|
74
|
-
/**
|
|
75
|
-
* Gets or sets the height of the viewport entity's window in drawing units.
|
|
76
|
-
*
|
|
77
|
-
* This represents the height of the viewport's rectangular boundary in paper space,
|
|
78
|
-
* measured in the current drawing units. It defines the vertical extent of the
|
|
79
|
-
* viewport border, not the height of the model space view within it.
|
|
80
|
-
*
|
|
81
|
-
* @returns The height of the viewport entity in drawing units
|
|
82
|
-
*/
|
|
83
|
-
get height(): number;
|
|
84
|
-
set height(value: number);
|
|
85
|
-
/**
|
|
86
|
-
* Gets or sets the width of the viewport entity's window in drawing units.
|
|
87
|
-
*
|
|
88
|
-
* This represents the width of the viewport's rectangular boundary in paper space,
|
|
89
|
-
* measured in the current drawing units. It defines the horizontal extent of the
|
|
90
|
-
* viewport border, not the width of the model space view within the viewport.
|
|
91
|
-
*
|
|
92
|
-
* Note: This is the width in Paper Space of the viewport itself, not the width
|
|
93
|
-
* of the Model Space view within the viewport.
|
|
94
|
-
*
|
|
95
|
-
* @returns The width of the viewport entity in drawing units
|
|
96
|
-
*/
|
|
97
|
-
get width(): number;
|
|
98
|
-
set width(value: number);
|
|
99
|
-
/**
|
|
100
|
-
* Gets or sets the view center in display coordinate system coordinates.
|
|
101
|
-
*
|
|
102
|
-
* This point represents the center of the model space view that is displayed
|
|
103
|
-
* within the viewport. It is specified in the display coordinate system and
|
|
104
|
-
* determines what portion of the model space drawing is visible in the viewport.
|
|
105
|
-
*
|
|
106
|
-
* @returns The center point of the model space view within the viewport
|
|
107
|
-
*/
|
|
108
|
-
get viewCenter(): AcGePoint3d;
|
|
109
|
-
set viewCenter(value: AcGePoint3d);
|
|
110
|
-
/**
|
|
111
|
-
* Gets or sets the height of the Model Space view within the viewport.
|
|
112
|
-
*
|
|
113
|
-
* This value represents the height of the model space view that is displayed
|
|
114
|
-
* within the viewport, specified in display coordinate system coordinates.
|
|
115
|
-
*
|
|
116
|
-
* Zoom behavior:
|
|
117
|
-
* - Zooming the view out within the viewport increases this value
|
|
118
|
-
* - Zooming the view in within the viewport decreases this value
|
|
119
|
-
*
|
|
120
|
-
* @returns The height of the model space view in display coordinates
|
|
121
|
-
*/
|
|
122
|
-
get viewHeight(): number;
|
|
123
|
-
set viewHeight(value: number);
|
|
124
|
-
/**
|
|
125
|
-
* Gets the geometric extents of the viewport entity.
|
|
126
|
-
*
|
|
127
|
-
* This method returns a bounding box that encompasses the entire viewport entity
|
|
128
|
-
* in world coordinate system (WCS) coordinates.
|
|
129
|
-
*
|
|
130
|
-
* @returns A bounding box containing the viewport entity
|
|
131
|
-
* @inheritdoc
|
|
132
|
-
*/
|
|
133
|
-
get geometricExtents(): AcGeBox3d;
|
|
134
|
-
/**
|
|
135
|
-
* Renders the viewport entity using the specified renderer.
|
|
136
|
-
*
|
|
137
|
-
* The viewport is drawn as a rectangular border when the following conditions are met:
|
|
138
|
-
* - The viewport entity is not in model space (i.e., it's in paper space)
|
|
139
|
-
* - The viewport ID number is greater than 1 (not the default system viewport)
|
|
140
|
-
*
|
|
141
|
-
* In paper space layouts, there is always a system-defined "default" viewport that exists as
|
|
142
|
-
* the bottom-most item. This viewport doesn't show any entities and is mainly for internal
|
|
143
|
-
* AutoCAD purposes. The viewport ID number of this system-defined "default" viewport is 1.
|
|
144
|
-
*
|
|
145
|
-
* @param renderer - The renderer to use for drawing the viewport
|
|
146
|
-
* @returns A render group containing the viewport border lines, or undefined if not drawn
|
|
147
|
-
* @inheritdoc
|
|
148
|
-
*/
|
|
149
|
-
draw(renderer: AcGiRenderer): AcGiEntity | undefined;
|
|
150
|
-
/**
|
|
151
|
-
* Converts this AcDbViewport to an AcGiViewport for rendering purposes.
|
|
152
|
-
*
|
|
153
|
-
* This method creates a graphic interface viewport object that contains all the
|
|
154
|
-
* necessary properties for rendering the viewport in the graphics system.
|
|
155
|
-
*
|
|
156
|
-
* @returns An AcGiViewport instance with all viewport properties copied
|
|
157
|
-
*/
|
|
158
|
-
toGiViewport(): AcGiViewport;
|
|
159
|
-
/**
|
|
160
|
-
* Creates the rectangular border lines for the viewport.
|
|
161
|
-
*
|
|
162
|
-
* This private method generates four line entities that form a rectangle representing
|
|
163
|
-
* the viewport's boundary. The rectangle is centered on the viewport's center point
|
|
164
|
-
* and has dimensions specified by the viewport's width and height.
|
|
165
|
-
*
|
|
166
|
-
* @param viewport - The graphic interface viewport containing rendering properties
|
|
167
|
-
* @param renderer - The renderer to use for creating the line entities
|
|
168
|
-
* @returns An array of line entities forming the viewport border
|
|
169
|
-
* @private
|
|
170
|
-
*/
|
|
171
|
-
private createViewportRect;
|
|
172
|
-
}
|
|
173
|
-
//# sourceMappingURL=AcDbViewport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbViewport.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbViewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACb,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC1C,2BAA2B;IAC3B,OAAgB,QAAQ,EAAE,MAAM,CAAa;IAE7C,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,OAAO,CAAQ;IAEvB;;;;;;;;;;OAUG;;IAWH;;;;;;;;;;;;;;OAcG;IACH,IAAI,MAAM,IAGQ,MAAM,CADvB;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAEvB;IAED;;;;;;;OAOG;IACH,IAAI,WAAW,IAGQ,WAAW,CADjC;IACD,IAAI,WAAW,CAAC,KAAK,EAAE,WAAW,EAEjC;IAED;;;;;;;;OAQG;IACH,IAAI,MAAM,IAGQ,MAAM,CADvB;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAEvB;IAED;;;;;;;;;;;OAWG;IACH,IAAI,KAAK,IAGQ,MAAM,CADtB;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAEtB;IAED;;;;;;;;OAQG;IACH,IAAI,UAAU,IAGQ,WAAW,CADhC;IACD,IAAI,UAAU,CAAC,KAAK,EAAE,WAAW,EAEhC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,UAAU,IAGQ,MAAM,CAD3B;IACD,IAAI,UAAU,CAAC,KAAK,EAAE,MAAM,EAE3B;IAED;;;;;;;;OAQG;IACH,IAAI,gBAAgB,IAAI,SAAS,CAGhC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;IAoB3B;;;;;;;OAOG;IACH,YAAY;IAaZ;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,kBAAkB;CAwE3B"}
|