@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,220 +0,0 @@
|
|
|
1
|
-
import { AcGeBox3d, AcGeLine3d, AcGePoint3d, AcGePointLike } from '@mlightcad/geometry-engine';
|
|
2
|
-
import { AcDbDimension } from './AcDbDimension';
|
|
3
|
-
/**
|
|
4
|
-
* Represents an aligned dimension entity in AutoCAD.
|
|
5
|
-
*
|
|
6
|
-
* An aligned dimension measures the distance between two points located anywhere in space.
|
|
7
|
-
* The dimension's normal vector must be perpendicular to the line between the two points.
|
|
8
|
-
* The two selected points are also used as the definition points for the start of the
|
|
9
|
-
* two dimension extension lines.
|
|
10
|
-
*
|
|
11
|
-
* Aligned dimensions are commonly used to measure distances that are not parallel to
|
|
12
|
-
* the X or Y axes, providing accurate measurements regardless of the orientation.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* // Create an aligned dimension
|
|
17
|
-
* const alignedDim = new AcDbAlignedDimension(
|
|
18
|
-
* new AcGePoint3d(0, 0, 0), // First extension line point
|
|
19
|
-
* new AcGePoint3d(10, 5, 0), // Second extension line point
|
|
20
|
-
* new AcGePoint3d(5, 2.5, 0), // Dimension line point
|
|
21
|
-
* "10.0", // Dimension text
|
|
22
|
-
* "Standard" // Dimension style
|
|
23
|
-
* );
|
|
24
|
-
*
|
|
25
|
-
* // Access dimension properties
|
|
26
|
-
* console.log(`Dimension line point: ${alignedDim.dimLinePoint}`);
|
|
27
|
-
* console.log(`Extension line 1 point: ${alignedDim.xLine1Point}`);
|
|
28
|
-
* console.log(`Extension line 2 point: ${alignedDim.xLine2Point}`);
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export declare class AcDbAlignedDimension extends AcDbDimension {
|
|
32
|
-
/** The entity type name */
|
|
33
|
-
static typeName: string;
|
|
34
|
-
/** The definition point that specifies where the dimension line will be */
|
|
35
|
-
private _dimLinePoint;
|
|
36
|
-
/** The start point for the first extension line */
|
|
37
|
-
private _xLine1Point;
|
|
38
|
-
/** The start point for the second extension line */
|
|
39
|
-
private _xLine2Point;
|
|
40
|
-
/** The extension line obliquing angle in radians */
|
|
41
|
-
private _oblique;
|
|
42
|
-
/** The dimension's rotation angle in radians */
|
|
43
|
-
private _rotation;
|
|
44
|
-
/**
|
|
45
|
-
* Creates a new aligned dimension entity.
|
|
46
|
-
*
|
|
47
|
-
* This constructor initializes an aligned dimension using the specified points.
|
|
48
|
-
* The extension line obliquing angle is set to 0.0 by default.
|
|
49
|
-
*
|
|
50
|
-
* @param xLine1Point - Start point (in WCS coordinates) of first extension line
|
|
51
|
-
* @param xLine2Point - Start point (in WCS coordinates) of second extension line
|
|
52
|
-
* @param dimLinePoint - Point (in WCS coordinates) on dimension line itself
|
|
53
|
-
* @param dimText - Text string to use as the dimension annotation (optional)
|
|
54
|
-
* @param dimStyle - String name of dimension style table record to use (optional)
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```typescript
|
|
58
|
-
* // Create an aligned dimension with default text and style
|
|
59
|
-
* const alignedDim = new AcDbAlignedDimension(
|
|
60
|
-
* new AcGePoint3d(0, 0, 0),
|
|
61
|
-
* new AcGePoint3d(10, 5, 0),
|
|
62
|
-
* new AcGePoint3d(5, 2.5, 0)
|
|
63
|
-
* );
|
|
64
|
-
*
|
|
65
|
-
* // Create an aligned dimension with custom text and style
|
|
66
|
-
* const alignedDim2 = new AcDbAlignedDimension(
|
|
67
|
-
* new AcGePoint3d(0, 0, 0),
|
|
68
|
-
* new AcGePoint3d(15, 10, 0),
|
|
69
|
-
* new AcGePoint3d(7.5, 5, 0),
|
|
70
|
-
* "15.0",
|
|
71
|
-
* "Architectural"
|
|
72
|
-
* );
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
constructor(xLine1Point: AcGePointLike, xLine2Point: AcGePointLike, dimLinePoint: AcGePointLike, dimText?: string | null, dimStyle?: string | null);
|
|
76
|
-
/**
|
|
77
|
-
* Gets the definition point that specifies where the dimension line will be.
|
|
78
|
-
*
|
|
79
|
-
* This point will be somewhere on the dimension line and determines the position
|
|
80
|
-
* of the dimension text and arrows.
|
|
81
|
-
*
|
|
82
|
-
* @returns The dimension line point in WCS coordinates
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* ```typescript
|
|
86
|
-
* const dimLinePoint = alignedDim.dimLinePoint;
|
|
87
|
-
* console.log(`Dimension line point: ${dimLinePoint.x}, ${dimLinePoint.y}, ${dimLinePoint.z}`);
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
get dimLinePoint(): AcGePoint3d;
|
|
91
|
-
/**
|
|
92
|
-
* Sets the definition point that specifies where the dimension line will be.
|
|
93
|
-
*
|
|
94
|
-
* @param value - The new dimension line point
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```typescript
|
|
98
|
-
* alignedDim.dimLinePoint = new AcGePoint3d(5, 2.5, 0);
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
set dimLinePoint(value: AcGePoint3d);
|
|
102
|
-
/**
|
|
103
|
-
* Gets the start point for the first extension line of the dimension.
|
|
104
|
-
*
|
|
105
|
-
* @returns The first extension line point in WCS coordinates
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* ```typescript
|
|
109
|
-
* const xLine1Point = alignedDim.xLine1Point;
|
|
110
|
-
* console.log(`Extension line 1 point: ${xLine1Point.x}, ${xLine1Point.y}, ${xLine1Point.z}`);
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
get xLine1Point(): AcGePoint3d;
|
|
114
|
-
/**
|
|
115
|
-
* Sets the start point for the first extension line of the dimension.
|
|
116
|
-
*
|
|
117
|
-
* @param value - The new first extension line point
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```typescript
|
|
121
|
-
* alignedDim.xLine1Point = new AcGePoint3d(0, 0, 0);
|
|
122
|
-
* ```
|
|
123
|
-
*/
|
|
124
|
-
set xLine1Point(value: AcGePoint3d);
|
|
125
|
-
/**
|
|
126
|
-
* Gets the start point for the second extension line of the dimension.
|
|
127
|
-
*
|
|
128
|
-
* @returns The second extension line point in WCS coordinates
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* ```typescript
|
|
132
|
-
* const xLine2Point = alignedDim.xLine2Point;
|
|
133
|
-
* console.log(`Extension line 2 point: ${xLine2Point.x}, ${xLine2Point.y}, ${xLine2Point.z}`);
|
|
134
|
-
* ```
|
|
135
|
-
*/
|
|
136
|
-
get xLine2Point(): AcGePoint3d;
|
|
137
|
-
/**
|
|
138
|
-
* Sets the start point for the second extension line of the dimension.
|
|
139
|
-
*
|
|
140
|
-
* @param value - The new second extension line point
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* ```typescript
|
|
144
|
-
* alignedDim.xLine2Point = new AcGePoint3d(10, 5, 0);
|
|
145
|
-
* ```
|
|
146
|
-
*/
|
|
147
|
-
set xLine2Point(value: AcGePoint3d);
|
|
148
|
-
/**
|
|
149
|
-
* Gets the dimension's rotation angle.
|
|
150
|
-
*
|
|
151
|
-
* @returns The rotation angle in radians
|
|
152
|
-
*
|
|
153
|
-
* @example
|
|
154
|
-
* ```typescript
|
|
155
|
-
* const rotation = alignedDim.rotation;
|
|
156
|
-
* console.log(`Rotation: ${rotation} radians (${rotation * 180 / Math.PI} degrees)`);
|
|
157
|
-
* ```
|
|
158
|
-
*/
|
|
159
|
-
get rotation(): number;
|
|
160
|
-
/**
|
|
161
|
-
* Sets the dimension's rotation angle.
|
|
162
|
-
*
|
|
163
|
-
* @param value - The new rotation angle in radians
|
|
164
|
-
*
|
|
165
|
-
* @example
|
|
166
|
-
* ```typescript
|
|
167
|
-
* alignedDim.rotation = Math.PI / 4; // 45 degrees
|
|
168
|
-
* ```
|
|
169
|
-
*/
|
|
170
|
-
set rotation(value: number);
|
|
171
|
-
/**
|
|
172
|
-
* Gets the extension line obliquing angle.
|
|
173
|
-
*
|
|
174
|
-
* @returns The obliquing angle in radians
|
|
175
|
-
*
|
|
176
|
-
* @example
|
|
177
|
-
* ```typescript
|
|
178
|
-
* const oblique = alignedDim.oblique;
|
|
179
|
-
* console.log(`Oblique angle: ${oblique} radians`);
|
|
180
|
-
* ```
|
|
181
|
-
*/
|
|
182
|
-
get oblique(): number;
|
|
183
|
-
/**
|
|
184
|
-
* Sets the extension line obliquing angle.
|
|
185
|
-
*
|
|
186
|
-
* @param value - The new obliquing angle in radians
|
|
187
|
-
*
|
|
188
|
-
* @example
|
|
189
|
-
* ```typescript
|
|
190
|
-
* alignedDim.oblique = Math.PI / 6; // 30 degrees
|
|
191
|
-
* ```
|
|
192
|
-
*/
|
|
193
|
-
set oblique(value: number);
|
|
194
|
-
/**
|
|
195
|
-
* @inheritdoc
|
|
196
|
-
*/
|
|
197
|
-
get geometricExtents(): AcGeBox3d;
|
|
198
|
-
/**
|
|
199
|
-
* @inheritdoc
|
|
200
|
-
*/
|
|
201
|
-
protected get isAppendArrow(): boolean;
|
|
202
|
-
/**
|
|
203
|
-
* Return one array which contains three lines of the alinged dimension.
|
|
204
|
-
* - The first line in the array is dimension line.
|
|
205
|
-
* - The second line and the third line in the array are extension lines.
|
|
206
|
-
* @returns Return three lines of the alinged dimension
|
|
207
|
-
*/
|
|
208
|
-
protected calculateLines(): AcGeLine3d[];
|
|
209
|
-
private createExtensionLine;
|
|
210
|
-
/**
|
|
211
|
-
* Compute the intersection point between a line 'line1' and a line 'line2' that passes through
|
|
212
|
-
* a given point 'p' and is perpendicular to line 'line1'.
|
|
213
|
-
*
|
|
214
|
-
* @param line The 'line1'.
|
|
215
|
-
* @param p The point through which the perpendicular 'line2' passes.
|
|
216
|
-
* @returns Returns the intersection point of 'line1' and 'line2'.
|
|
217
|
-
*/
|
|
218
|
-
private findIntersectionPoint;
|
|
219
|
-
}
|
|
220
|
-
//# sourceMappingURL=AcDbAlignedDimension.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbAlignedDimension.d.ts","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbAlignedDimension.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,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Q,MAAM,CAZxB;IAED;;;;;;;;;OASG;IACH,IAAI,OAAO,CAAC,KAAK,EAAE,MAAM,EAExB;IAED;;OAEG;IACH,IAAI,gBAAgB,cAGnB;IAED;;OAEG;IACH,SAAS,KAAK,aAAa,YAE1B;IAED;;;;;OAKG;IACH,SAAS,CAAC,cAAc;IA8BxB,OAAO,CAAC,mBAAmB;IAM3B;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;CAqB9B"}
|
|
@@ -1,341 +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
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
import { AcGeBox3d, AcGeLine3d, AcGePoint3d, AcGeVector3d } from '@mlightcad/geometry-engine';
|
|
28
|
-
import { AcDbDimension } from './AcDbDimension';
|
|
29
|
-
/**
|
|
30
|
-
* Represents an aligned dimension entity in AutoCAD.
|
|
31
|
-
*
|
|
32
|
-
* An aligned dimension measures the distance between two points located anywhere in space.
|
|
33
|
-
* The dimension's normal vector must be perpendicular to the line between the two points.
|
|
34
|
-
* The two selected points are also used as the definition points for the start of the
|
|
35
|
-
* two dimension extension lines.
|
|
36
|
-
*
|
|
37
|
-
* Aligned dimensions are commonly used to measure distances that are not parallel to
|
|
38
|
-
* the X or Y axes, providing accurate measurements regardless of the orientation.
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```typescript
|
|
42
|
-
* // Create an aligned dimension
|
|
43
|
-
* const alignedDim = new AcDbAlignedDimension(
|
|
44
|
-
* new AcGePoint3d(0, 0, 0), // First extension line point
|
|
45
|
-
* new AcGePoint3d(10, 5, 0), // Second extension line point
|
|
46
|
-
* new AcGePoint3d(5, 2.5, 0), // Dimension line point
|
|
47
|
-
* "10.0", // Dimension text
|
|
48
|
-
* "Standard" // Dimension style
|
|
49
|
-
* );
|
|
50
|
-
*
|
|
51
|
-
* // Access dimension properties
|
|
52
|
-
* console.log(`Dimension line point: ${alignedDim.dimLinePoint}`);
|
|
53
|
-
* console.log(`Extension line 1 point: ${alignedDim.xLine1Point}`);
|
|
54
|
-
* console.log(`Extension line 2 point: ${alignedDim.xLine2Point}`);
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
var AcDbAlignedDimension = /** @class */ (function (_super) {
|
|
58
|
-
__extends(AcDbAlignedDimension, _super);
|
|
59
|
-
/**
|
|
60
|
-
* Creates a new aligned dimension entity.
|
|
61
|
-
*
|
|
62
|
-
* This constructor initializes an aligned dimension using the specified points.
|
|
63
|
-
* The extension line obliquing angle is set to 0.0 by default.
|
|
64
|
-
*
|
|
65
|
-
* @param xLine1Point - Start point (in WCS coordinates) of first extension line
|
|
66
|
-
* @param xLine2Point - Start point (in WCS coordinates) of second extension line
|
|
67
|
-
* @param dimLinePoint - Point (in WCS coordinates) on dimension line itself
|
|
68
|
-
* @param dimText - Text string to use as the dimension annotation (optional)
|
|
69
|
-
* @param dimStyle - String name of dimension style table record to use (optional)
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```typescript
|
|
73
|
-
* // Create an aligned dimension with default text and style
|
|
74
|
-
* const alignedDim = new AcDbAlignedDimension(
|
|
75
|
-
* new AcGePoint3d(0, 0, 0),
|
|
76
|
-
* new AcGePoint3d(10, 5, 0),
|
|
77
|
-
* new AcGePoint3d(5, 2.5, 0)
|
|
78
|
-
* );
|
|
79
|
-
*
|
|
80
|
-
* // Create an aligned dimension with custom text and style
|
|
81
|
-
* const alignedDim2 = new AcDbAlignedDimension(
|
|
82
|
-
* new AcGePoint3d(0, 0, 0),
|
|
83
|
-
* new AcGePoint3d(15, 10, 0),
|
|
84
|
-
* new AcGePoint3d(7.5, 5, 0),
|
|
85
|
-
* "15.0",
|
|
86
|
-
* "Architectural"
|
|
87
|
-
* );
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
function AcDbAlignedDimension(xLine1Point, xLine2Point, dimLinePoint, dimText, dimStyle) {
|
|
91
|
-
if (dimText === void 0) { dimText = null; }
|
|
92
|
-
if (dimStyle === void 0) { dimStyle = null; }
|
|
93
|
-
var _this = _super.call(this) || this;
|
|
94
|
-
_this._dimLinePoint = new AcGePoint3d().copy(dimLinePoint);
|
|
95
|
-
_this._xLine1Point = new AcGePoint3d().copy(xLine1Point);
|
|
96
|
-
_this._xLine2Point = new AcGePoint3d().copy(xLine2Point);
|
|
97
|
-
_this._oblique = 0;
|
|
98
|
-
_this._rotation = 0;
|
|
99
|
-
_this.dimensionText = dimText;
|
|
100
|
-
// TODO: Set it to the current default dimStyle within the AutoCAD editor if dimStyle is null
|
|
101
|
-
_this.dimensionStyleName = dimStyle;
|
|
102
|
-
return _this;
|
|
103
|
-
}
|
|
104
|
-
Object.defineProperty(AcDbAlignedDimension.prototype, "dimLinePoint", {
|
|
105
|
-
/**
|
|
106
|
-
* Gets the definition point that specifies where the dimension line will be.
|
|
107
|
-
*
|
|
108
|
-
* This point will be somewhere on the dimension line and determines the position
|
|
109
|
-
* of the dimension text and arrows.
|
|
110
|
-
*
|
|
111
|
-
* @returns The dimension line point in WCS coordinates
|
|
112
|
-
*
|
|
113
|
-
* @example
|
|
114
|
-
* ```typescript
|
|
115
|
-
* const dimLinePoint = alignedDim.dimLinePoint;
|
|
116
|
-
* console.log(`Dimension line point: ${dimLinePoint.x}, ${dimLinePoint.y}, ${dimLinePoint.z}`);
|
|
117
|
-
* ```
|
|
118
|
-
*/
|
|
119
|
-
get: function () {
|
|
120
|
-
return this._dimLinePoint;
|
|
121
|
-
},
|
|
122
|
-
/**
|
|
123
|
-
* Sets the definition point that specifies where the dimension line will be.
|
|
124
|
-
*
|
|
125
|
-
* @param value - The new dimension line point
|
|
126
|
-
*
|
|
127
|
-
* @example
|
|
128
|
-
* ```typescript
|
|
129
|
-
* alignedDim.dimLinePoint = new AcGePoint3d(5, 2.5, 0);
|
|
130
|
-
* ```
|
|
131
|
-
*/
|
|
132
|
-
set: function (value) {
|
|
133
|
-
this._dimLinePoint.copy(value);
|
|
134
|
-
},
|
|
135
|
-
enumerable: false,
|
|
136
|
-
configurable: true
|
|
137
|
-
});
|
|
138
|
-
Object.defineProperty(AcDbAlignedDimension.prototype, "xLine1Point", {
|
|
139
|
-
/**
|
|
140
|
-
* Gets the start point for the first extension line of the dimension.
|
|
141
|
-
*
|
|
142
|
-
* @returns The first extension line point in WCS coordinates
|
|
143
|
-
*
|
|
144
|
-
* @example
|
|
145
|
-
* ```typescript
|
|
146
|
-
* const xLine1Point = alignedDim.xLine1Point;
|
|
147
|
-
* console.log(`Extension line 1 point: ${xLine1Point.x}, ${xLine1Point.y}, ${xLine1Point.z}`);
|
|
148
|
-
* ```
|
|
149
|
-
*/
|
|
150
|
-
get: function () {
|
|
151
|
-
return this._xLine1Point;
|
|
152
|
-
},
|
|
153
|
-
/**
|
|
154
|
-
* Sets the start point for the first extension line of the dimension.
|
|
155
|
-
*
|
|
156
|
-
* @param value - The new first extension line point
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
* ```typescript
|
|
160
|
-
* alignedDim.xLine1Point = new AcGePoint3d(0, 0, 0);
|
|
161
|
-
* ```
|
|
162
|
-
*/
|
|
163
|
-
set: function (value) {
|
|
164
|
-
this._xLine1Point.copy(value);
|
|
165
|
-
},
|
|
166
|
-
enumerable: false,
|
|
167
|
-
configurable: true
|
|
168
|
-
});
|
|
169
|
-
Object.defineProperty(AcDbAlignedDimension.prototype, "xLine2Point", {
|
|
170
|
-
/**
|
|
171
|
-
* Gets the start point for the second extension line of the dimension.
|
|
172
|
-
*
|
|
173
|
-
* @returns The second extension line point in WCS coordinates
|
|
174
|
-
*
|
|
175
|
-
* @example
|
|
176
|
-
* ```typescript
|
|
177
|
-
* const xLine2Point = alignedDim.xLine2Point;
|
|
178
|
-
* console.log(`Extension line 2 point: ${xLine2Point.x}, ${xLine2Point.y}, ${xLine2Point.z}`);
|
|
179
|
-
* ```
|
|
180
|
-
*/
|
|
181
|
-
get: function () {
|
|
182
|
-
return this._xLine2Point;
|
|
183
|
-
},
|
|
184
|
-
/**
|
|
185
|
-
* Sets the start point for the second extension line of the dimension.
|
|
186
|
-
*
|
|
187
|
-
* @param value - The new second extension line point
|
|
188
|
-
*
|
|
189
|
-
* @example
|
|
190
|
-
* ```typescript
|
|
191
|
-
* alignedDim.xLine2Point = new AcGePoint3d(10, 5, 0);
|
|
192
|
-
* ```
|
|
193
|
-
*/
|
|
194
|
-
set: function (value) {
|
|
195
|
-
this._xLine2Point.copy(value);
|
|
196
|
-
},
|
|
197
|
-
enumerable: false,
|
|
198
|
-
configurable: true
|
|
199
|
-
});
|
|
200
|
-
Object.defineProperty(AcDbAlignedDimension.prototype, "rotation", {
|
|
201
|
-
/**
|
|
202
|
-
* Gets the dimension's rotation angle.
|
|
203
|
-
*
|
|
204
|
-
* @returns The rotation angle in radians
|
|
205
|
-
*
|
|
206
|
-
* @example
|
|
207
|
-
* ```typescript
|
|
208
|
-
* const rotation = alignedDim.rotation;
|
|
209
|
-
* console.log(`Rotation: ${rotation} radians (${rotation * 180 / Math.PI} degrees)`);
|
|
210
|
-
* ```
|
|
211
|
-
*/
|
|
212
|
-
get: function () {
|
|
213
|
-
return this._rotation;
|
|
214
|
-
},
|
|
215
|
-
/**
|
|
216
|
-
* Sets the dimension's rotation angle.
|
|
217
|
-
*
|
|
218
|
-
* @param value - The new rotation angle in radians
|
|
219
|
-
*
|
|
220
|
-
* @example
|
|
221
|
-
* ```typescript
|
|
222
|
-
* alignedDim.rotation = Math.PI / 4; // 45 degrees
|
|
223
|
-
* ```
|
|
224
|
-
*/
|
|
225
|
-
set: function (value) {
|
|
226
|
-
this._rotation = value;
|
|
227
|
-
},
|
|
228
|
-
enumerable: false,
|
|
229
|
-
configurable: true
|
|
230
|
-
});
|
|
231
|
-
Object.defineProperty(AcDbAlignedDimension.prototype, "oblique", {
|
|
232
|
-
/**
|
|
233
|
-
* Gets the extension line obliquing angle.
|
|
234
|
-
*
|
|
235
|
-
* @returns The obliquing angle in radians
|
|
236
|
-
*
|
|
237
|
-
* @example
|
|
238
|
-
* ```typescript
|
|
239
|
-
* const oblique = alignedDim.oblique;
|
|
240
|
-
* console.log(`Oblique angle: ${oblique} radians`);
|
|
241
|
-
* ```
|
|
242
|
-
*/
|
|
243
|
-
get: function () {
|
|
244
|
-
return this._oblique;
|
|
245
|
-
},
|
|
246
|
-
/**
|
|
247
|
-
* Sets the extension line obliquing angle.
|
|
248
|
-
*
|
|
249
|
-
* @param value - The new obliquing angle in radians
|
|
250
|
-
*
|
|
251
|
-
* @example
|
|
252
|
-
* ```typescript
|
|
253
|
-
* alignedDim.oblique = Math.PI / 6; // 30 degrees
|
|
254
|
-
* ```
|
|
255
|
-
*/
|
|
256
|
-
set: function (value) {
|
|
257
|
-
this._oblique = value;
|
|
258
|
-
},
|
|
259
|
-
enumerable: false,
|
|
260
|
-
configurable: true
|
|
261
|
-
});
|
|
262
|
-
Object.defineProperty(AcDbAlignedDimension.prototype, "geometricExtents", {
|
|
263
|
-
/**
|
|
264
|
-
* @inheritdoc
|
|
265
|
-
*/
|
|
266
|
-
get: function () {
|
|
267
|
-
// TODO: Finish it
|
|
268
|
-
return new AcGeBox3d();
|
|
269
|
-
},
|
|
270
|
-
enumerable: false,
|
|
271
|
-
configurable: true
|
|
272
|
-
});
|
|
273
|
-
Object.defineProperty(AcDbAlignedDimension.prototype, "isAppendArrow", {
|
|
274
|
-
/**
|
|
275
|
-
* @inheritdoc
|
|
276
|
-
*/
|
|
277
|
-
get: function () {
|
|
278
|
-
return false;
|
|
279
|
-
},
|
|
280
|
-
enumerable: false,
|
|
281
|
-
configurable: true
|
|
282
|
-
});
|
|
283
|
-
/**
|
|
284
|
-
* Return one array which contains three lines of the alinged dimension.
|
|
285
|
-
* - The first line in the array is dimension line.
|
|
286
|
-
* - The second line and the third line in the array are extension lines.
|
|
287
|
-
* @returns Return three lines of the alinged dimension
|
|
288
|
-
*/
|
|
289
|
-
AcDbAlignedDimension.prototype.calculateLines = function () {
|
|
290
|
-
var lines = [];
|
|
291
|
-
var extensionLine1 = this.createExtensionLine(this._xLine1Point);
|
|
292
|
-
var extensionLine2 = this.createExtensionLine(this._xLine2Point);
|
|
293
|
-
var intersectionPoint1 = this.findIntersectionPoint(extensionLine1, this._dimLinePoint);
|
|
294
|
-
var intersectionPoint2 = this.findIntersectionPoint(extensionLine2, this._dimLinePoint);
|
|
295
|
-
var dimensionLine = new AcGeLine3d(intersectionPoint1, intersectionPoint2);
|
|
296
|
-
lines.push(dimensionLine);
|
|
297
|
-
// Create the first extension line with extension
|
|
298
|
-
extensionLine1.endPoint = intersectionPoint1;
|
|
299
|
-
this.adjustExtensionLine(extensionLine1);
|
|
300
|
-
lines.push(extensionLine1);
|
|
301
|
-
// Create the second extension line with extension
|
|
302
|
-
extensionLine2.endPoint = intersectionPoint2;
|
|
303
|
-
this.adjustExtensionLine(extensionLine2);
|
|
304
|
-
lines.push(extensionLine2);
|
|
305
|
-
return lines;
|
|
306
|
-
};
|
|
307
|
-
AcDbAlignedDimension.prototype.createExtensionLine = function (point) {
|
|
308
|
-
var angle = this.rotation + Math.PI / 2;
|
|
309
|
-
var anotherPoint = this.findPointOnLine2(point, angle, 100);
|
|
310
|
-
return new AcGeLine3d(point, __assign(__assign({}, anotherPoint), { z: point.z }));
|
|
311
|
-
};
|
|
312
|
-
/**
|
|
313
|
-
* Compute the intersection point between a line 'line1' and a line 'line2' that passes through
|
|
314
|
-
* a given point 'p' and is perpendicular to line 'line1'.
|
|
315
|
-
*
|
|
316
|
-
* @param line The 'line1'.
|
|
317
|
-
* @param p The point through which the perpendicular 'line2' passes.
|
|
318
|
-
* @returns Returns the intersection point of 'line1' and 'line2'.
|
|
319
|
-
*/
|
|
320
|
-
AcDbAlignedDimension.prototype.findIntersectionPoint = function (line1, p) {
|
|
321
|
-
var p1 = line1.startPoint;
|
|
322
|
-
var p2 = line1.endPoint;
|
|
323
|
-
// Direction of line1 (p1 - p2)
|
|
324
|
-
var directionOfLine1 = new AcGeVector3d().subVectors(p2, p1).normalize();
|
|
325
|
-
// Vector from point 'p1' to point 'p3'
|
|
326
|
-
var vectorFromP1ToP3 = new AcGeVector3d().subVectors(p, p1);
|
|
327
|
-
// Project vectorAP onto directionL to get the projection vector
|
|
328
|
-
var projectionLength = vectorFromP1ToP3.dot(directionOfLine1);
|
|
329
|
-
var projectionVector = new AcGeVector3d()
|
|
330
|
-
.copy(directionOfLine1)
|
|
331
|
-
.multiplyScalar(projectionLength);
|
|
332
|
-
// Intersection point is the point on line L at the projection
|
|
333
|
-
var intersection = new AcGeVector3d().addVectors(p1, projectionVector);
|
|
334
|
-
return intersection;
|
|
335
|
-
};
|
|
336
|
-
/** The entity type name */
|
|
337
|
-
AcDbAlignedDimension.typeName = 'AlignedDimension';
|
|
338
|
-
return AcDbAlignedDimension;
|
|
339
|
-
}(AcDbDimension));
|
|
340
|
-
export { AcDbAlignedDimension };
|
|
341
|
-
//# sourceMappingURL=AcDbAlignedDimension.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbAlignedDimension.js","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbAlignedDimension.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,WAAW,EAEX,YAAY,EACb,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IAA0C,wCAAa;IAerD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,8BACE,WAA0B,EAC1B,WAA0B,EAC1B,YAA2B,EAC3B,OAA6B,EAC7B,QAA8B;QAD9B,wBAAA,EAAA,cAA6B;QAC7B,yBAAA,EAAA,eAA8B;QAE9B,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,aAAa,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QACzD,KAAI,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACvD,KAAI,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACvD,KAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;QACjB,KAAI,CAAC,SAAS,GAAG,CAAC,CAAA;QAElB,KAAI,CAAC,aAAa,GAAG,OAAO,CAAA;QAC5B,6FAA6F;QAC7F,KAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAA;;IACpC,CAAC;IAgBD,sBAAI,8CAAY;QAdhB;;;;;;;;;;;;;WAaG;aACH;YACE,OAAO,IAAI,CAAC,aAAa,CAAA;QAC3B,CAAC;QAED;;;;;;;;;W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U,CAAA;QAC3B,IAAM,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAA;QAEzB,+BAA+B;QAC/B,IAAM,gBAAgB,GAAG,IAAI,YAAY,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAA;QAE1E,uCAAuC;QACvC,IAAM,gBAAgB,GAAG,IAAI,YAAY,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAE7D,gEAAgE;QAChE,IAAM,gBAAgB,GAAG,gBAAgB,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;QAC/D,IAAM,gBAAgB,GAAG,IAAI,YAAY,EAAE;aACxC,IAAI,CAAC,gBAAgB,CAAC;aACtB,cAAc,CAAC,gBAAgB,CAAC,CAAA;QAEnC,8DAA8D;QAC9D,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAA;QAExE,OAAO,YAAY,CAAA;IACrB,CAAC;IAzSD,2BAA2B;IACX,6BAAQ,GAAW,kBAAkB,CAAA;IAySvD,2BAAC;CAAA,AA3SD,CAA0C,aAAa,GA2StD;SA3SY,oBAAoB"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { AcGeBox3d, AcGePoint3d, AcGePoint3dLike } from '@mlightcad/geometry-engine';
|
|
2
|
-
import { AcDbDimension } from './AcDbDimension';
|
|
3
|
-
/**
|
|
4
|
-
* Represents an arc length dimension entity in AutoCAD.
|
|
5
|
-
*
|
|
6
|
-
* This dimension type measures the length of an arc by defining the arc's center point,
|
|
7
|
-
* two points that define the arc's extent, and a point on the arc itself. Arc length
|
|
8
|
-
* dimensions are commonly used in mechanical drawings, architectural plans, and other
|
|
9
|
-
* technical documentation where precise arc measurements are required.
|
|
10
|
-
*
|
|
11
|
-
* The dimension displays the actual arc length value and typically includes extension
|
|
12
|
-
* lines, dimension lines, and arrows positioned to clearly indicate the arc being measured.
|
|
13
|
-
*/
|
|
14
|
-
export declare class AcDbArcDimension extends AcDbDimension {
|
|
15
|
-
/** The entity type name */
|
|
16
|
-
static typeName: string;
|
|
17
|
-
private _arcPoint;
|
|
18
|
-
private _centerPoint;
|
|
19
|
-
private _xLine1Point;
|
|
20
|
-
private _xLine2Point;
|
|
21
|
-
/**
|
|
22
|
-
* Creates a new arc length dimension.
|
|
23
|
-
*
|
|
24
|
-
* @param centerPoint - The center point of the arc being measured. This defines
|
|
25
|
-
* the center of the circle that contains the arc
|
|
26
|
-
* @param xLine1Point - The first extension line end point. This defines one end
|
|
27
|
-
* of the arc being measured
|
|
28
|
-
* @param xLine2Point - The second extension line end point. This defines the other
|
|
29
|
-
* end of the arc being measured
|
|
30
|
-
* @param arcPoint - A point on the arc that helps define the specific arc segment
|
|
31
|
-
* being measured. This point is typically between the two extension
|
|
32
|
-
* line points
|
|
33
|
-
* @param dimText - Optional custom dimension text to display instead of the calculated
|
|
34
|
-
* arc length value. If null, the calculated length will be displayed
|
|
35
|
-
* @param dimStyle - Optional name of the dimension style table record to use for
|
|
36
|
-
* formatting. If null, the current default style will be used
|
|
37
|
-
*/
|
|
38
|
-
constructor(centerPoint: AcGePoint3dLike, xLine1Point: AcGePoint3dLike, xLine2Point: AcGePoint3dLike, arcPoint: AcGePoint3dLike, dimText?: string | null, dimStyle?: string | null);
|
|
39
|
-
/**
|
|
40
|
-
* Gets or sets a point on the arc that helps define the arc segment being measured.
|
|
41
|
-
*
|
|
42
|
-
* This point is typically positioned between the two extension line points and helps
|
|
43
|
-
* determine which arc segment should be measured when multiple arcs could be defined
|
|
44
|
-
* by the same center and end points.
|
|
45
|
-
*
|
|
46
|
-
* @returns The arc point that defines the arc segment
|
|
47
|
-
*/
|
|
48
|
-
get arcPoint(): AcGePoint3d;
|
|
49
|
-
set arcPoint(value: AcGePoint3d);
|
|
50
|
-
/**
|
|
51
|
-
* Gets or sets the center point of the arc being measured.
|
|
52
|
-
*
|
|
53
|
-
* The center point defines the center of the circle that contains the arc. This point
|
|
54
|
-
* is used to calculate the arc length and position the dimension elements correctly.
|
|
55
|
-
*
|
|
56
|
-
* @returns The center point of the arc
|
|
57
|
-
*/
|
|
58
|
-
get centerPoint(): AcGePoint3d;
|
|
59
|
-
set centerPoint(value: AcGePoint3d);
|
|
60
|
-
/**
|
|
61
|
-
* Gets or sets the first extension line end point.
|
|
62
|
-
*
|
|
63
|
-
* This point defines one end of the arc being measured. The extension line extends
|
|
64
|
-
* from this point to the arc, helping to clearly identify the starting point of
|
|
65
|
-
* the arc length measurement.
|
|
66
|
-
*
|
|
67
|
-
* @returns The first extension line end point
|
|
68
|
-
*/
|
|
69
|
-
get xLine1Point(): AcGePoint3d;
|
|
70
|
-
set xLine1Point(value: AcGePoint3d);
|
|
71
|
-
/**
|
|
72
|
-
* Gets or sets the second extension line end point.
|
|
73
|
-
*
|
|
74
|
-
* This point defines the other end of the arc being measured. The extension line
|
|
75
|
-
* extends from this point to the arc, helping to clearly identify the ending point
|
|
76
|
-
* of the arc length measurement.
|
|
77
|
-
*
|
|
78
|
-
* @returns The second extension line end point
|
|
79
|
-
*/
|
|
80
|
-
get xLine2Point(): AcGePoint3d;
|
|
81
|
-
set xLine2Point(value: AcGePoint3d);
|
|
82
|
-
/**
|
|
83
|
-
* Gets the geometric extents (bounding box) of this dimension entity.
|
|
84
|
-
*
|
|
85
|
-
* The geometric extents define the minimum bounding box that completely contains
|
|
86
|
-
* the dimension entity, including all its components like extension lines,
|
|
87
|
-
* dimension lines, arrows, and text.
|
|
88
|
-
*
|
|
89
|
-
* @returns A 3D bounding box containing the dimension entity
|
|
90
|
-
* @inheritdoc
|
|
91
|
-
*/
|
|
92
|
-
get geometricExtents(): AcGeBox3d;
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=AcDbArcDimension.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbArcDimension.d.ts","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbArcDimension.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EAChB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;;;;;;;GAUG;AACH,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,2BAA2B;IAC3B,OAAgB,QAAQ,EAAE,MAAM,CAAiB;IAEjD,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,YAAY,CAAa;IAEjC;;;;;;;;;;;;;;;;OAgBG;gBAED,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,eAAe,EAC5B,QAAQ,EAAE,eAAe,EACzB,OAAO,GAAE,MAAM,GAAG,IAAW,EAC7B,QAAQ,GAAE,MAAM,GAAG,IAAW;IAahC;;;;;;;;OAQG;IACH,IAAI,QAAQ,IAGQ,WAAW,CAD9B;IACD,IAAI,QAAQ,CAAC,KAAK,EAAE,WAAW,EAE9B;IAED;;;;;;;OAOG;IACH,IAAI,WAAW,IAGQ,WAAW,CADjC;IACD,IAAI,WAAW,CAAC,KAAK,EAAE,WAAW,EAEjC;IAED;;;;;;;;OAQG;IACH,IAAI,WAAW,IAGQ,WAAW,CADjC;IACD,IAAI,WAAW,CAAC,KAAK,EAAE,WAAW,EAEjC;IAED;;;;;;;;OAQG;IACH,IAAI,WAAW,IAGQ,WAAW,CADjC;IACD,IAAI,WAAW,CAAC,KAAK,EAAE,WAAW,EAEjC;IAED;;;;;;;;;OASG;IACH,IAAI,gBAAgB,cAGnB;CACF"}
|