@mlightcad/data-model 1.1.2 → 1.1.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/dist/data-model.js +5490 -1022
- package/dist/data-model.umd.cjs +2 -2
- package/lib/base/AcDbHostApplicationServices.d.ts +72 -6
- package/lib/base/AcDbHostApplicationServices.d.ts.map +1 -1
- package/lib/base/AcDbHostApplicationServices.js +71 -7
- package/lib/base/AcDbHostApplicationServices.js.map +1 -1
- package/lib/base/AcDbObject.d.ts +160 -25
- package/lib/base/AcDbObject.d.ts.map +1 -1
- package/lib/base/AcDbObject.js +149 -25
- package/lib/base/AcDbObject.js.map +1 -1
- package/lib/converter/AcDbBatchProcessing.d.ts +112 -10
- package/lib/converter/AcDbBatchProcessing.d.ts.map +1 -1
- package/lib/converter/AcDbBatchProcessing.js +110 -11
- package/lib/converter/AcDbBatchProcessing.js.map +1 -1
- package/lib/converter/AcDbDxfConverter.d.ts +224 -6
- package/lib/converter/AcDbDxfConverter.d.ts.map +1 -1
- package/lib/converter/AcDbDxfConverter.js +224 -6
- package/lib/converter/AcDbDxfConverter.js.map +1 -1
- package/lib/converter/AcDbDxfParseWorker.d.ts +16 -0
- package/lib/converter/AcDbDxfParseWorker.d.ts.map +1 -1
- package/lib/converter/AcDbDxfParseWorker.js +16 -0
- package/lib/converter/AcDbDxfParseWorker.js.map +1 -1
- package/lib/converter/AcDbEntitiyConverter.d.ts +118 -3
- package/lib/converter/AcDbEntitiyConverter.d.ts.map +1 -1
- package/lib/converter/AcDbEntitiyConverter.js +118 -3
- package/lib/converter/AcDbEntitiyConverter.js.map +1 -1
- package/lib/converter/AcDbObjectConverter.d.ts +52 -0
- package/lib/converter/AcDbObjectConverter.d.ts.map +1 -1
- package/lib/converter/AcDbObjectConverter.js +52 -0
- package/lib/converter/AcDbObjectConverter.js.map +1 -1
- package/lib/database/AcDbBlockTable.d.ts +35 -3
- package/lib/database/AcDbBlockTable.d.ts.map +1 -1
- package/lib/database/AcDbBlockTable.js +35 -3
- package/lib/database/AcDbBlockTable.js.map +1 -1
- package/lib/database/AcDbBlockTableRecord.d.ts +98 -15
- package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbBlockTableRecord.js +96 -15
- package/lib/database/AcDbBlockTableRecord.js.map +1 -1
- package/lib/database/AcDbDatabase.d.ts +303 -33
- package/lib/database/AcDbDatabase.d.ts.map +1 -1
- package/lib/database/AcDbDatabase.js +223 -39
- package/lib/database/AcDbDatabase.js.map +1 -1
- package/lib/database/AcDbDatabaseConverter.d.ts +77 -12
- package/lib/database/AcDbDatabaseConverter.d.ts.map +1 -1
- package/lib/database/AcDbDatabaseConverter.js +46 -13
- package/lib/database/AcDbDatabaseConverter.js.map +1 -1
- package/lib/database/AcDbDatabaseConverterManager.d.ts +97 -15
- package/lib/database/AcDbDatabaseConverterManager.d.ts.map +1 -1
- package/lib/database/AcDbDatabaseConverterManager.js +90 -15
- package/lib/database/AcDbDatabaseConverterManager.js.map +1 -1
- package/lib/database/AcDbDimStyleTable.d.ts +22 -2
- package/lib/database/AcDbDimStyleTable.d.ts.map +1 -1
- package/lib/database/AcDbDimStyleTable.js +22 -2
- package/lib/database/AcDbDimStyleTable.js.map +1 -1
- package/lib/database/AcDbDimStyleTableRecord.d.ts +115 -0
- package/lib/database/AcDbDimStyleTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbDimStyleTableRecord.js +44 -0
- package/lib/database/AcDbDimStyleTableRecord.js.map +1 -1
- package/lib/database/AcDbLayerTable.d.ts +39 -2
- package/lib/database/AcDbLayerTable.d.ts.map +1 -1
- package/lib/database/AcDbLayerTable.js +39 -2
- package/lib/database/AcDbLayerTable.js.map +1 -1
- package/lib/database/AcDbLayerTableRecord.d.ts +198 -18
- package/lib/database/AcDbLayerTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbLayerTableRecord.js +182 -19
- package/lib/database/AcDbLayerTableRecord.js.map +1 -1
- package/lib/database/AcDbLinetypeTable.d.ts +21 -2
- package/lib/database/AcDbLinetypeTable.d.ts.map +1 -1
- package/lib/database/AcDbLinetypeTable.js +21 -2
- package/lib/database/AcDbLinetypeTable.js.map +1 -1
- package/lib/database/AcDbLinetypeTableRecord.d.ts +46 -14
- package/lib/database/AcDbLinetypeTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbLinetypeTableRecord.js +46 -14
- package/lib/database/AcDbLinetypeTableRecord.js.map +1 -1
- package/lib/database/AcDbSymbolTable.d.ts +134 -29
- package/lib/database/AcDbSymbolTable.d.ts.map +1 -1
- package/lib/database/AcDbSymbolTable.js +133 -37
- package/lib/database/AcDbSymbolTable.js.map +1 -1
- package/lib/database/AcDbSymbolTableRecord.d.ts +47 -2
- package/lib/database/AcDbSymbolTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbSymbolTableRecord.js +40 -2
- package/lib/database/AcDbSymbolTableRecord.js.map +1 -1
- package/lib/database/AcDbTextStyleTable.d.ts +36 -2
- package/lib/database/AcDbTextStyleTable.d.ts.map +1 -1
- package/lib/database/AcDbTextStyleTable.js +36 -2
- package/lib/database/AcDbTextStyleTable.js.map +1 -1
- package/lib/database/AcDbTextStyleTableRecord.d.ts +129 -17
- package/lib/database/AcDbTextStyleTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbTextStyleTableRecord.js +127 -17
- package/lib/database/AcDbTextStyleTableRecord.js.map +1 -1
- package/lib/database/AcDbViewportTable.d.ts +22 -2
- package/lib/database/AcDbViewportTable.d.ts.map +1 -1
- package/lib/database/AcDbViewportTable.js +22 -2
- package/lib/database/AcDbViewportTable.js.map +1 -1
- package/lib/database/AcDbViewportTableRecord.d.ts +74 -9
- package/lib/database/AcDbViewportTableRecord.d.ts.map +1 -1
- package/lib/database/AcDbViewportTableRecord.js +65 -9
- package/lib/database/AcDbViewportTableRecord.js.map +1 -1
- package/lib/entity/AcDbArc.d.ts +202 -17
- package/lib/entity/AcDbArc.d.ts.map +1 -1
- package/lib/entity/AcDbArc.js +201 -17
- package/lib/entity/AcDbArc.js.map +1 -1
- package/lib/entity/AcDbBlockReference.d.ts +147 -13
- package/lib/entity/AcDbBlockReference.d.ts.map +1 -1
- package/lib/entity/AcDbBlockReference.js +142 -13
- package/lib/entity/AcDbBlockReference.js.map +1 -1
- package/lib/entity/AcDbCircle.d.ts +145 -12
- package/lib/entity/AcDbCircle.d.ts.map +1 -1
- package/lib/entity/AcDbCircle.js +144 -12
- package/lib/entity/AcDbCircle.js.map +1 -1
- package/lib/entity/AcDbCurve.d.ts +33 -2
- package/lib/entity/AcDbCurve.d.ts.map +1 -1
- package/lib/entity/AcDbCurve.js +17 -0
- package/lib/entity/AcDbCurve.js.map +1 -1
- package/lib/entity/AcDbEllipse.d.ts +168 -16
- package/lib/entity/AcDbEllipse.d.ts.map +1 -1
- package/lib/entity/AcDbEllipse.js +167 -16
- package/lib/entity/AcDbEllipse.js.map +1 -1
- package/lib/entity/AcDbEntity.d.ts +299 -35
- package/lib/entity/AcDbEntity.d.ts.map +1 -1
- package/lib/entity/AcDbEntity.js +275 -27
- package/lib/entity/AcDbEntity.js.map +1 -1
- package/lib/entity/AcDbHatch.d.ts +60 -4
- package/lib/entity/AcDbHatch.d.ts.map +1 -1
- package/lib/entity/AcDbHatch.js +52 -4
- package/lib/entity/AcDbHatch.js.map +1 -1
- package/lib/entity/AcDbLeader.d.ts +157 -10
- package/lib/entity/AcDbLeader.d.ts.map +1 -1
- package/lib/entity/AcDbLeader.js +149 -10
- package/lib/entity/AcDbLeader.js.map +1 -1
- package/lib/entity/AcDbLine.d.ts +154 -13
- package/lib/entity/AcDbLine.d.ts.map +1 -1
- package/lib/entity/AcDbLine.js +153 -13
- package/lib/entity/AcDbLine.js.map +1 -1
- package/lib/entity/AcDbMText.d.ts +127 -11
- package/lib/entity/AcDbMText.d.ts.map +1 -1
- package/lib/entity/AcDbMText.js +112 -11
- package/lib/entity/AcDbMText.js.map +1 -1
- package/lib/entity/AcDbPoint.d.ts +86 -7
- package/lib/entity/AcDbPoint.d.ts.map +1 -1
- package/lib/entity/AcDbPoint.js +85 -7
- package/lib/entity/AcDbPoint.js.map +1 -1
- package/lib/entity/AcDbPolyline.d.ts +172 -25
- package/lib/entity/AcDbPolyline.d.ts.map +1 -1
- package/lib/entity/AcDbPolyline.js +170 -25
- package/lib/entity/AcDbPolyline.js.map +1 -1
- package/lib/entity/AcDbRasterImage.d.ts +75 -31
- package/lib/entity/AcDbRasterImage.d.ts.map +1 -1
- package/lib/entity/AcDbRasterImage.js +60 -31
- package/lib/entity/AcDbRasterImage.js.map +1 -1
- package/lib/entity/AcDbRay.d.ts +115 -9
- package/lib/entity/AcDbRay.d.ts.map +1 -1
- package/lib/entity/AcDbRay.js +113 -9
- package/lib/entity/AcDbRay.js.map +1 -1
- package/lib/entity/AcDbSpline.d.ts +106 -14
- package/lib/entity/AcDbSpline.d.ts.map +1 -1
- package/lib/entity/AcDbSpline.js +67 -4
- package/lib/entity/AcDbSpline.js.map +1 -1
- package/lib/entity/AcDbTable.d.ts +161 -44
- package/lib/entity/AcDbTable.d.ts.map +1 -1
- package/lib/entity/AcDbTable.js +135 -44
- package/lib/entity/AcDbTable.js.map +1 -1
- package/lib/entity/AcDbText.d.ts +298 -25
- package/lib/entity/AcDbText.d.ts.map +1 -1
- package/lib/entity/AcDbText.js +288 -25
- package/lib/entity/AcDbText.js.map +1 -1
- package/lib/entity/AcDbTrace.d.ts +150 -23
- package/lib/entity/AcDbTrace.d.ts.map +1 -1
- package/lib/entity/AcDbTrace.js +147 -23
- package/lib/entity/AcDbTrace.js.map +1 -1
- package/lib/entity/AcDbViewport.d.ts +122 -9
- package/lib/entity/AcDbViewport.d.ts.map +1 -1
- package/lib/entity/AcDbViewport.js +122 -9
- package/lib/entity/AcDbViewport.js.map +1 -1
- package/lib/entity/AcDbWipeout.d.ts +29 -1
- package/lib/entity/AcDbWipeout.d.ts.map +1 -1
- package/lib/entity/AcDbWipeout.js +29 -1
- package/lib/entity/AcDbWipeout.js.map +1 -1
- package/lib/entity/AcDbXline.d.ts +116 -9
- package/lib/entity/AcDbXline.d.ts.map +1 -1
- package/lib/entity/AcDbXline.js +114 -9
- package/lib/entity/AcDbXline.js.map +1 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +56 -12
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.js +56 -12
- package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts +158 -17
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbAlignedDimension.js +153 -17
- package/lib/entity/dimension/AcDbAlignedDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbArcDimension.d.ts +58 -12
- package/lib/entity/dimension/AcDbArcDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbArcDimension.js +58 -12
- package/lib/entity/dimension/AcDbArcDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts +99 -25
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbDiametricDimension.js +99 -25
- package/lib/entity/dimension/AcDbDiametricDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbDimension.d.ts +108 -14
- package/lib/entity/dimension/AcDbDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbDimension.js +99 -14
- package/lib/entity/dimension/AcDbDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +48 -16
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.js +48 -16
- package/lib/entity/dimension/AcDbOrdinateDimension.js.map +1 -1
- package/lib/entity/dimension/AcDbRadialDimension.d.ts +167 -24
- package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +1 -1
- package/lib/entity/dimension/AcDbRadialDimension.js +162 -24
- package/lib/entity/dimension/AcDbRadialDimension.js.map +1 -1
- package/lib/misc/AcDbAngleUnits.d.ts +12 -0
- package/lib/misc/AcDbAngleUnits.d.ts.map +1 -1
- package/lib/misc/AcDbAngleUnits.js +12 -0
- package/lib/misc/AcDbAngleUnits.js.map +1 -1
- package/lib/misc/AcDbConstants.d.ts +20 -0
- package/lib/misc/AcDbConstants.d.ts.map +1 -1
- package/lib/misc/AcDbConstants.js +20 -0
- package/lib/misc/AcDbConstants.js.map +1 -1
- package/lib/misc/AcDbDimArrowType.d.ts +24 -21
- package/lib/misc/AcDbDimArrowType.d.ts.map +1 -1
- package/lib/misc/AcDbDimArrowType.js +24 -21
- package/lib/misc/AcDbDimArrowType.js.map +1 -1
- package/lib/misc/AcDbObjectIterator.d.ts +42 -3
- package/lib/misc/AcDbObjectIterator.d.ts.map +1 -1
- package/lib/misc/AcDbObjectIterator.js +42 -3
- package/lib/misc/AcDbObjectIterator.js.map +1 -1
- package/lib/misc/AcDbOsnapMode.d.ts +18 -10
- package/lib/misc/AcDbOsnapMode.d.ts.map +1 -1
- package/lib/misc/AcDbOsnapMode.js +18 -10
- package/lib/misc/AcDbOsnapMode.js.map +1 -1
- package/lib/misc/AcDbRenderingCache.d.ts +107 -29
- package/lib/misc/AcDbRenderingCache.d.ts.map +1 -1
- package/lib/misc/AcDbRenderingCache.js +105 -29
- package/lib/misc/AcDbRenderingCache.js.map +1 -1
- package/lib/misc/AcDbUnitsValue.d.ts +58 -8
- package/lib/misc/AcDbUnitsValue.d.ts.map +1 -1
- package/lib/misc/AcDbUnitsValue.js +58 -8
- package/lib/misc/AcDbUnitsValue.js.map +1 -1
- package/lib/object/AcDbDictionary.d.ts +128 -30
- package/lib/object/AcDbDictionary.d.ts.map +1 -1
- package/lib/object/AcDbDictionary.js +126 -30
- package/lib/object/AcDbDictionary.js.map +1 -1
- package/lib/object/AcDbRasterImageDef.d.ts +38 -9
- package/lib/object/AcDbRasterImageDef.d.ts.map +1 -1
- package/lib/object/AcDbRasterImageDef.js +37 -9
- package/lib/object/AcDbRasterImageDef.js.map +1 -1
- package/lib/object/layout/AcDbLayout.d.ts +152 -13
- package/lib/object/layout/AcDbLayout.d.ts.map +1 -1
- package/lib/object/layout/AcDbLayout.js +146 -13
- package/lib/object/layout/AcDbLayout.js.map +1 -1
- package/lib/object/layout/AcDbLayoutDictionary.d.ts +35 -7
- package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +1 -1
- package/lib/object/layout/AcDbLayoutDictionary.js +35 -7
- package/lib/object/layout/AcDbLayoutDictionary.js.map +1 -1
- package/lib/object/layout/AcDbLayoutManager.d.ts +103 -31
- package/lib/object/layout/AcDbLayoutManager.d.ts.map +1 -1
- package/lib/object/layout/AcDbLayoutManager.js +98 -31
- package/lib/object/layout/AcDbLayoutManager.js.map +1 -1
- package/package.json +4 -4
|
@@ -18,17 +18,49 @@ import { AcGiArrowType } from '@mlightcad/graphic-interface';
|
|
|
18
18
|
import { AcDbDimStyleTableRecord } from '../../database';
|
|
19
19
|
import { AcDbRenderingCache } from '../../misc';
|
|
20
20
|
import { AcDbEntity } from '../AcDbEntity';
|
|
21
|
+
/**
|
|
22
|
+
* Defines the line spacing style for dimension text.
|
|
23
|
+
*/
|
|
21
24
|
export var AcDbLineSpacingStyle;
|
|
22
25
|
(function (AcDbLineSpacingStyle) {
|
|
26
|
+
/** At least the specified spacing */
|
|
23
27
|
AcDbLineSpacingStyle[AcDbLineSpacingStyle["AtLeast"] = 1] = "AtLeast";
|
|
28
|
+
/** Exactly the specified spacing */
|
|
24
29
|
AcDbLineSpacingStyle[AcDbLineSpacingStyle["Exactly"] = 2] = "Exactly";
|
|
25
30
|
})(AcDbLineSpacingStyle || (AcDbLineSpacingStyle = {}));
|
|
26
31
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
32
|
+
* Abstract base class for all dimension entity types in AutoCAD.
|
|
33
|
+
*
|
|
34
|
+
* This class provides the fundamental functionality for all dimension entities,
|
|
35
|
+
* including dimension text, style management, arrow handling, and measurement
|
|
36
|
+
* calculations. The appearance of dimensions is controlled by dimension variable
|
|
37
|
+
* settings and dimension styles.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* class MyDimension extends AcDbDimension {
|
|
42
|
+
* // Implementation for specific dimension type
|
|
43
|
+
* draw(renderer: AcGiRenderer) {
|
|
44
|
+
* // Custom drawing logic
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
29
48
|
*/
|
|
30
49
|
var AcDbDimension = /** @class */ (function (_super) {
|
|
31
50
|
__extends(AcDbDimension, _super);
|
|
51
|
+
/**
|
|
52
|
+
* Creates a new dimension entity.
|
|
53
|
+
*
|
|
54
|
+
* This constructor initializes a dimension with default values.
|
|
55
|
+
* Subclasses should override this constructor to set up dimension-specific properties.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const dimension = new MyDimension();
|
|
60
|
+
* dimension.dimensionText = "10.0";
|
|
61
|
+
* dimension.textPosition = new AcGePoint3d(5, 5, 0);
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
32
64
|
function AcDbDimension() {
|
|
33
65
|
var _this = _super.call(this) || this;
|
|
34
66
|
_this._dimBlockId = null;
|
|
@@ -42,11 +74,29 @@ var AcDbDimension = /** @class */ (function (_super) {
|
|
|
42
74
|
}
|
|
43
75
|
Object.defineProperty(AcDbDimension.prototype, "dimBlockId", {
|
|
44
76
|
/**
|
|
45
|
-
*
|
|
77
|
+
* Gets the block table record ID containing the entities that this dimension displays.
|
|
78
|
+
*
|
|
79
|
+
* @returns The block table record ID, or null if not set
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```typescript
|
|
83
|
+
* const blockId = dimension.dimBlockId;
|
|
84
|
+
* console.log(`Dimension block ID: ${blockId}`);
|
|
85
|
+
* ```
|
|
46
86
|
*/
|
|
47
87
|
get: function () {
|
|
48
88
|
return this._dimBlockId;
|
|
49
89
|
},
|
|
90
|
+
/**
|
|
91
|
+
* Sets the block table record ID for this dimension.
|
|
92
|
+
*
|
|
93
|
+
* @param value - The block table record ID, or null to clear
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* dimension.dimBlockId = "MyDimensionBlock";
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
50
100
|
set: function (value) {
|
|
51
101
|
this._dimBlockId = value;
|
|
52
102
|
},
|
|
@@ -55,11 +105,29 @@ var AcDbDimension = /** @class */ (function (_super) {
|
|
|
55
105
|
});
|
|
56
106
|
Object.defineProperty(AcDbDimension.prototype, "dimensionStyleName", {
|
|
57
107
|
/**
|
|
58
|
-
*
|
|
108
|
+
* Gets the dimension style name used by this dimension.
|
|
109
|
+
*
|
|
110
|
+
* @returns The dimension style name, or null if not set
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```typescript
|
|
114
|
+
* const styleName = dimension.dimensionStyleName;
|
|
115
|
+
* console.log(`Dimension style: ${styleName}`);
|
|
116
|
+
* ```
|
|
59
117
|
*/
|
|
60
118
|
get: function () {
|
|
61
119
|
return this._dimensionStyleName;
|
|
62
120
|
},
|
|
121
|
+
/**
|
|
122
|
+
* Sets the dimension style name for this dimension.
|
|
123
|
+
*
|
|
124
|
+
* @param value - The dimension style name, or null to use default
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```typescript
|
|
128
|
+
* dimension.dimensionStyleName = "Standard";
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
63
131
|
set: function (value) {
|
|
64
132
|
this._dimensionStyleName = value;
|
|
65
133
|
},
|
|
@@ -68,7 +136,18 @@ var AcDbDimension = /** @class */ (function (_super) {
|
|
|
68
136
|
});
|
|
69
137
|
Object.defineProperty(AcDbDimension.prototype, "dimensionStyle", {
|
|
70
138
|
/**
|
|
71
|
-
*
|
|
139
|
+
* Gets the dimension style used by this dimension.
|
|
140
|
+
*
|
|
141
|
+
* This method returns the dimension style record associated with this dimension.
|
|
142
|
+
* If no style is specified, it returns the default dimension style.
|
|
143
|
+
*
|
|
144
|
+
* @returns The dimension style record
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```typescript
|
|
148
|
+
* const style = dimension.dimensionStyle;
|
|
149
|
+
* console.log(`Style name: ${style.name}`);
|
|
150
|
+
* ```
|
|
72
151
|
*/
|
|
73
152
|
get: function () {
|
|
74
153
|
if (this._dimStyle == null) {
|
|
@@ -87,15 +166,21 @@ var AcDbDimension = /** @class */ (function (_super) {
|
|
|
87
166
|
});
|
|
88
167
|
Object.defineProperty(AcDbDimension.prototype, "dimensionText", {
|
|
89
168
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* -
|
|
95
|
-
*
|
|
96
|
-
* -
|
|
97
|
-
*
|
|
98
|
-
*
|
|
169
|
+
* Gets the user-supplied dimension annotation text string.
|
|
170
|
+
*
|
|
171
|
+
* This string can contain multiline text formatting characters. The text can be:
|
|
172
|
+
* - Empty string ('') for default text only
|
|
173
|
+
* - Text with angle brackets for mixed default and user text (e.g., 'This is the default text <>')
|
|
174
|
+
* - Period ('.') for no text
|
|
175
|
+
* - User-defined text only
|
|
176
|
+
*
|
|
177
|
+
* @returns The dimension text string
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```typescript
|
|
181
|
+
* const text = dimension.dimensionText;
|
|
182
|
+
* console.log(`Dimension text: ${text}`);
|
|
183
|
+
* ```
|
|
99
184
|
*/
|
|
100
185
|
get: function () {
|
|
101
186
|
return this._dimensionText;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbDimension.js","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbDimension.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAGL,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAEL,aAAa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CAA4C,UAAU,GA+ZrD"}
|
|
@@ -1,42 +1,74 @@
|
|
|
1
1
|
import { AcGeBox3d, AcGePoint3d, AcGePoint3dLike } from '@mlightcad/geometry-engine';
|
|
2
2
|
import { AcDbDimension } from './AcDbDimension';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
4
|
+
* Represents an ordinate dimension entity in AutoCAD.
|
|
5
|
+
*
|
|
6
|
+
* Ordinate dimensions measure the "horizontal" (X axis) or "vertical" (Y axis) distance
|
|
7
|
+
* from a specified origin point to some other specified point. They are commonly used
|
|
8
|
+
* in mechanical drawings, architectural plans, and other technical documentation where
|
|
9
|
+
* precise coordinate measurements are required.
|
|
10
|
+
*
|
|
11
|
+
* The dimension displays a leader line from the defining point to the leader end point,
|
|
12
|
+
* with the annotation text located appropriately near the end of the leader. Ordinate
|
|
13
|
+
* dimensions are particularly useful for dimensioning parts with multiple features that
|
|
14
|
+
* need to be positioned relative to a common reference point.
|
|
11
15
|
*/
|
|
12
16
|
export declare class AcDbOrdinateDimension extends AcDbDimension {
|
|
13
17
|
private _definingPoint;
|
|
14
18
|
private _leaderEndPoint;
|
|
15
19
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @param
|
|
19
|
-
*
|
|
20
|
-
* @param
|
|
20
|
+
* Creates a new ordinate dimension.
|
|
21
|
+
*
|
|
22
|
+
* @param definingPoint - The point where the ordinate leader should start. This is
|
|
23
|
+
* the point being measured relative to the dimension's origin
|
|
24
|
+
* @param leaderEndPoint - The point where the ordinate leader should end. This point
|
|
25
|
+
* is used for the dimension leader's endpoint and in text
|
|
26
|
+
* position calculations
|
|
27
|
+
* @param dimText - Optional custom dimension text to display instead of the calculated
|
|
28
|
+
* coordinate value. If null, the calculated coordinate will be displayed
|
|
29
|
+
* @param dimStyle - Optional name of the dimension style table record to use for
|
|
30
|
+
* formatting. If null, the current default style will be used
|
|
21
31
|
*/
|
|
22
32
|
constructor(definingPoint: AcGePoint3dLike, leaderEndPoint: AcGePoint3dLike, dimText?: string | null, dimStyle?: string | null);
|
|
23
33
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
34
|
+
* Gets or sets the ordinate point to be measured.
|
|
35
|
+
*
|
|
36
|
+
* This is the point (in WCS coordinates) that defines the location being measured.
|
|
37
|
+
* The dimension measures the X or Y distance between this point and the dimension's
|
|
38
|
+
* origin point, depending on the orientation of the ordinate dimension.
|
|
39
|
+
*
|
|
40
|
+
* @returns The defining point of the ordinate dimension
|
|
26
41
|
*/
|
|
27
42
|
get definingPoint(): AcGePoint3d;
|
|
28
43
|
set definingPoint(value: AcGePoint3d);
|
|
29
44
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
45
|
+
* Gets or sets the leader end point.
|
|
46
|
+
*
|
|
47
|
+
* This point is used as the dimension leader's endpoint and is used in the text
|
|
48
|
+
* position calculations. It determines where the leader line ends and where the
|
|
49
|
+
* dimension text is positioned relative to the leader.
|
|
50
|
+
*
|
|
51
|
+
* @returns The leader end point of the ordinate dimension
|
|
32
52
|
*/
|
|
33
53
|
get leaderEndPoint(): AcGePoint3d;
|
|
34
54
|
set leaderEndPoint(value: AcGePoint3d);
|
|
35
55
|
/**
|
|
56
|
+
* Gets the geometric extents (bounding box) of this dimension entity.
|
|
57
|
+
*
|
|
58
|
+
* The geometric extents define the minimum bounding box that completely contains
|
|
59
|
+
* the dimension entity, including all its components like the leader line and text.
|
|
60
|
+
*
|
|
61
|
+
* @returns A 3D bounding box containing the dimension entity
|
|
36
62
|
* @inheritdoc
|
|
37
63
|
*/
|
|
38
64
|
get geometricExtents(): AcGeBox3d;
|
|
39
65
|
/**
|
|
66
|
+
* Gets the number of arrow lines for this dimension.
|
|
67
|
+
*
|
|
68
|
+
* Ordinate dimensions typically don't use arrows since they are coordinate-based
|
|
69
|
+
* measurements rather than distance measurements between two points.
|
|
70
|
+
*
|
|
71
|
+
* @returns The number of arrow lines (always 0 for ordinate dimensions)
|
|
40
72
|
* @inheritdoc
|
|
41
73
|
*/
|
|
42
74
|
protected get arrowLineCount(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbOrdinateDimension.d.ts","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbOrdinateDimension.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
|
|
1
|
+
{"version":3,"file":"AcDbOrdinateDimension.d.ts","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbOrdinateDimension.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;;;;;;;;;;;;GAYG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;IACtD,OAAO,CAAC,cAAc,CAAa;IACnC,OAAO,CAAC,eAAe,CAAa;IAEpC;;;;;;;;;;;;OAYG;gBAED,aAAa,EAAE,eAAe,EAC9B,cAAc,EAAE,eAAe,EAC/B,OAAO,GAAE,MAAM,GAAG,IAAW,EAC7B,QAAQ,GAAE,MAAM,GAAG,IAAW;IAWhC;;;;;;;;OAQG;IACH,IAAI,aAAa,IAGQ,WAAW,CADnC;IACD,IAAI,aAAa,CAAC,KAAK,EAAE,WAAW,EAEnC;IAED;;;;;;;;OAQG;IACH,IAAI,cAAc,IAGQ,WAAW,CADpC;IACD,IAAI,cAAc,CAAC,KAAK,EAAE,WAAW,EAEpC;IAED;;;;;;;;OAQG;IACH,IAAI,gBAAgB,cAGnB;IAED;;;;;;;;OAQG;IACH,SAAS,KAAK,cAAc,WAE3B;CACF"}
|
|
@@ -16,22 +16,32 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
import { AcGeBox3d, AcGePoint3d } from '@mlightcad/geometry-engine';
|
|
17
17
|
import { AcDbDimension } from './AcDbDimension';
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
19
|
+
* Represents an ordinate dimension entity in AutoCAD.
|
|
20
|
+
*
|
|
21
|
+
* Ordinate dimensions measure the "horizontal" (X axis) or "vertical" (Y axis) distance
|
|
22
|
+
* from a specified origin point to some other specified point. They are commonly used
|
|
23
|
+
* in mechanical drawings, architectural plans, and other technical documentation where
|
|
24
|
+
* precise coordinate measurements are required.
|
|
25
|
+
*
|
|
26
|
+
* The dimension displays a leader line from the defining point to the leader end point,
|
|
27
|
+
* with the annotation text located appropriately near the end of the leader. Ordinate
|
|
28
|
+
* dimensions are particularly useful for dimensioning parts with multiple features that
|
|
29
|
+
* need to be positioned relative to a common reference point.
|
|
26
30
|
*/
|
|
27
31
|
var AcDbOrdinateDimension = /** @class */ (function (_super) {
|
|
28
32
|
__extends(AcDbOrdinateDimension, _super);
|
|
29
33
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @param
|
|
33
|
-
*
|
|
34
|
-
* @param
|
|
34
|
+
* Creates a new ordinate dimension.
|
|
35
|
+
*
|
|
36
|
+
* @param definingPoint - The point where the ordinate leader should start. This is
|
|
37
|
+
* the point being measured relative to the dimension's origin
|
|
38
|
+
* @param leaderEndPoint - The point where the ordinate leader should end. This point
|
|
39
|
+
* is used for the dimension leader's endpoint and in text
|
|
40
|
+
* position calculations
|
|
41
|
+
* @param dimText - Optional custom dimension text to display instead of the calculated
|
|
42
|
+
* coordinate value. If null, the calculated coordinate will be displayed
|
|
43
|
+
* @param dimStyle - Optional name of the dimension style table record to use for
|
|
44
|
+
* formatting. If null, the current default style will be used
|
|
35
45
|
*/
|
|
36
46
|
function AcDbOrdinateDimension(definingPoint, leaderEndPoint, dimText, dimStyle) {
|
|
37
47
|
if (dimText === void 0) { dimText = null; }
|
|
@@ -46,8 +56,13 @@ var AcDbOrdinateDimension = /** @class */ (function (_super) {
|
|
|
46
56
|
}
|
|
47
57
|
Object.defineProperty(AcDbOrdinateDimension.prototype, "definingPoint", {
|
|
48
58
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
59
|
+
* Gets or sets the ordinate point to be measured.
|
|
60
|
+
*
|
|
61
|
+
* This is the point (in WCS coordinates) that defines the location being measured.
|
|
62
|
+
* The dimension measures the X or Y distance between this point and the dimension's
|
|
63
|
+
* origin point, depending on the orientation of the ordinate dimension.
|
|
64
|
+
*
|
|
65
|
+
* @returns The defining point of the ordinate dimension
|
|
51
66
|
*/
|
|
52
67
|
get: function () {
|
|
53
68
|
return this._definingPoint;
|
|
@@ -60,8 +75,13 @@ var AcDbOrdinateDimension = /** @class */ (function (_super) {
|
|
|
60
75
|
});
|
|
61
76
|
Object.defineProperty(AcDbOrdinateDimension.prototype, "leaderEndPoint", {
|
|
62
77
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
78
|
+
* Gets or sets the leader end point.
|
|
79
|
+
*
|
|
80
|
+
* This point is used as the dimension leader's endpoint and is used in the text
|
|
81
|
+
* position calculations. It determines where the leader line ends and where the
|
|
82
|
+
* dimension text is positioned relative to the leader.
|
|
83
|
+
*
|
|
84
|
+
* @returns The leader end point of the ordinate dimension
|
|
65
85
|
*/
|
|
66
86
|
get: function () {
|
|
67
87
|
return this._leaderEndPoint;
|
|
@@ -74,6 +94,12 @@ var AcDbOrdinateDimension = /** @class */ (function (_super) {
|
|
|
74
94
|
});
|
|
75
95
|
Object.defineProperty(AcDbOrdinateDimension.prototype, "geometricExtents", {
|
|
76
96
|
/**
|
|
97
|
+
* Gets the geometric extents (bounding box) of this dimension entity.
|
|
98
|
+
*
|
|
99
|
+
* The geometric extents define the minimum bounding box that completely contains
|
|
100
|
+
* the dimension entity, including all its components like the leader line and text.
|
|
101
|
+
*
|
|
102
|
+
* @returns A 3D bounding box containing the dimension entity
|
|
77
103
|
* @inheritdoc
|
|
78
104
|
*/
|
|
79
105
|
get: function () {
|
|
@@ -85,6 +111,12 @@ var AcDbOrdinateDimension = /** @class */ (function (_super) {
|
|
|
85
111
|
});
|
|
86
112
|
Object.defineProperty(AcDbOrdinateDimension.prototype, "arrowLineCount", {
|
|
87
113
|
/**
|
|
114
|
+
* Gets the number of arrow lines for this dimension.
|
|
115
|
+
*
|
|
116
|
+
* Ordinate dimensions typically don't use arrows since they are coordinate-based
|
|
117
|
+
* measurements rather than distance measurements between two points.
|
|
118
|
+
*
|
|
119
|
+
* @returns The number of arrow lines (always 0 for ordinate dimensions)
|
|
88
120
|
* @inheritdoc
|
|
89
121
|
*/
|
|
90
122
|
get: function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbOrdinateDimension.js","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbOrdinateDimension.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C
|
|
1
|
+
{"version":3,"file":"AcDbOrdinateDimension.js","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbOrdinateDimension.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;;;;;;;;;GAYG;AACH;IAA2C,yCAAa;IAItD;;;;;;;;;;;;OAYG;IACH,+BACE,aAA8B,EAC9B,cAA+B,EAC/B,OAA6B,EAC7B,QAA8B;QAD9B,wBAAA,EAAA,cAA6B;QAC7B,yBAAA,EAAA,eAA8B;QAE9B,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,cAAc,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QAC3D,KAAI,CAAC,eAAe,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QAE7D,KAAI,CAAC,aAAa,GAAG,OAAO,CAAA;QAC5B,6FAA6F;QAC7F,KAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAA;;IACpC,CAAC;IAWD,sBAAI,gDAAa;QATjB;;;;;;;;WAQG;aACH;YACE,OAAO,IAAI,CAAC,cAAc,CAAA;QAC5B,CAAC;aACD,UAAkB,KAAkB;YAClC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACjC,CAAC;;;OAHA;IAcD,sBAAI,iDAAc;QATlB;;;;;;;;WAQG;aACH;YACE,OAAO,IAAI,CAAC,eAAe,CAAA;QAC7B,CAAC;aACD,UAAmB,KAAkB;YACnC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAClC,CAAC;;;OAHA;IAcD,sBAAI,mDAAgB;QATpB;;;;;;;;WAQG;aACH;YACE,kBAAkB;YAClB,OAAO,IAAI,SAAS,EAAE,CAAA;QACxB,CAAC;;;OAAA;IAWD,sBAAc,iDAAc;QAT5B;;;;;;;;WAQG;aACH;YACE,OAAO,CAAC,CAAA;QACV,CAAC;;;OAAA;IACH,4BAAC;AAAD,CAAC,AA1FD,CAA2C,aAAa,GA0FvD"}
|
|
@@ -3,59 +3,202 @@ import { AcGiLineArrowStyle } from '@mlightcad/graphic-interface';
|
|
|
3
3
|
import { AcDbLine } from '../AcDbLine';
|
|
4
4
|
import { AcDbDimension } from './AcDbDimension';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* Represents a radial dimension entity in AutoCAD.
|
|
7
|
+
*
|
|
8
|
+
* A radial dimension measures the radius of a curve (typically a circle or arc).
|
|
9
|
+
* This dimension type requires a center point and a point on the curve being dimensioned
|
|
10
|
+
* in order to draw the dimension line from the center point through the point on the curve.
|
|
11
|
+
*
|
|
12
|
+
* The dimension utilizes a "leader length" value to determine how far the dimension line
|
|
13
|
+
* extends out past the curve before doing a horizontal dogleg (if necessary) to the annotation text.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // Create a radial dimension
|
|
18
|
+
* const radialDim = new AcDbRadialDimension(
|
|
19
|
+
* new AcGePoint3d(0, 0, 0), // Center point
|
|
20
|
+
* new AcGePoint3d(5, 0, 0), // Point on curve
|
|
21
|
+
* 2.0, // Leader length
|
|
22
|
+
* "5.0", // Dimension text
|
|
23
|
+
* "Standard" // Dimension style
|
|
24
|
+
* );
|
|
25
|
+
*
|
|
26
|
+
* // Access dimension properties
|
|
27
|
+
* console.log(`Center: ${radialDim.center}`);
|
|
28
|
+
* console.log(`Chord point: ${radialDim.chordPoint}`);
|
|
29
|
+
* console.log(`Leader length: ${radialDim.leaderLength}`);
|
|
30
|
+
* ```
|
|
11
31
|
*/
|
|
12
32
|
export declare class AcDbRadialDimension extends AcDbDimension {
|
|
33
|
+
/** The center point of the curve being dimensioned */
|
|
13
34
|
private _center;
|
|
35
|
+
/** The point where the dimension line intersects the curve being dimensioned */
|
|
14
36
|
private _chordPoint;
|
|
37
|
+
/** The extension arc start angle in radians */
|
|
15
38
|
private _extArcStartAngle;
|
|
39
|
+
/** The extension arc end angle in radians */
|
|
16
40
|
private _extArcEndAngle;
|
|
41
|
+
/** The leader length distance */
|
|
17
42
|
private _leaderLength;
|
|
18
43
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
44
|
+
* Creates a new radial dimension entity.
|
|
45
|
+
*
|
|
46
|
+
* This constructor initializes a radial dimension using the specified center point,
|
|
47
|
+
* chord point, and leader length. The dimension line behavior depends on whether
|
|
48
|
+
* the text is inside or outside the curve being dimensioned.
|
|
49
|
+
*
|
|
50
|
+
* - If the text is inside the curve, the dimension line is drawn from the center
|
|
51
|
+
* to the chordPoint, with a break for the annotation text.
|
|
52
|
+
* - If the text is outside the curve, the dimension line is drawn from the center,
|
|
53
|
+
* through the chordPoint and out the leaderLength distance past the chordPoint
|
|
54
|
+
* where it does a short horizontal dogleg (if appropriate) to the annotation text.
|
|
55
|
+
*
|
|
56
|
+
* @param center - Center point (in WCS coordinates) of curve being dimensioned
|
|
57
|
+
* @param chordPoint - Point (in WCS coordinates) on the curve being dimensioned
|
|
58
|
+
* @param leaderLength - Leader length distance
|
|
59
|
+
* @param dimText - Text string to use as the dimension annotation (optional)
|
|
60
|
+
* @param dimStyle - String name of dimension style table record to use (optional)
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* // Create a radial dimension with default text and style
|
|
65
|
+
* const radialDim = new AcDbRadialDimension(
|
|
66
|
+
* new AcGePoint3d(0, 0, 0),
|
|
67
|
+
* new AcGePoint3d(5, 0, 0),
|
|
68
|
+
* 2.0
|
|
69
|
+
* );
|
|
70
|
+
*
|
|
71
|
+
* // Create a radial dimension with custom text and style
|
|
72
|
+
* const radialDim2 = new AcDbRadialDimension(
|
|
73
|
+
* new AcGePoint3d(10, 10, 0),
|
|
74
|
+
* new AcGePoint3d(15, 10, 0),
|
|
75
|
+
* 3.0,
|
|
76
|
+
* "5.0",
|
|
77
|
+
* "Architectural"
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
30
80
|
*/
|
|
31
81
|
constructor(center: AcGePoint3dLike, chordPoint: AcGePoint3dLike, leaderLength: number, dimText?: string | null, dimStyle?: string | null);
|
|
32
82
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
83
|
+
* Gets the center point of the curve being dimensioned.
|
|
84
|
+
*
|
|
85
|
+
* This point is the primary definition point for this dimension type.
|
|
86
|
+
*
|
|
87
|
+
* @returns The center point in WCS coordinates
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* const center = radialDim.center;
|
|
92
|
+
* console.log(`Center point: ${center.x}, ${center.y}, ${center.z}`);
|
|
93
|
+
* ```
|
|
35
94
|
*/
|
|
36
95
|
get center(): AcGePoint3d;
|
|
96
|
+
/**
|
|
97
|
+
* Sets the center point of the curve being dimensioned.
|
|
98
|
+
*
|
|
99
|
+
* @param value - The new center point
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* radialDim.center = new AcGePoint3d(0, 0, 0);
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
37
106
|
set center(value: AcGePoint3d);
|
|
38
107
|
/**
|
|
39
|
-
*
|
|
108
|
+
* Gets the point where the dimension line intersects the curve being dimensioned.
|
|
109
|
+
*
|
|
110
|
+
* @returns The chord point in WCS coordinates
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```typescript
|
|
114
|
+
* const chordPoint = radialDim.chordPoint;
|
|
115
|
+
* console.log(`Chord point: ${chordPoint.x}, ${chordPoint.y}, ${chordPoint.z}`);
|
|
116
|
+
* ```
|
|
40
117
|
*/
|
|
41
118
|
get chordPoint(): AcGePoint3d;
|
|
119
|
+
/**
|
|
120
|
+
* Sets the point where the dimension line intersects the curve being dimensioned.
|
|
121
|
+
*
|
|
122
|
+
* @param value - The new chord point
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* radialDim.chordPoint = new AcGePoint3d(5, 0, 0);
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
42
129
|
set chordPoint(value: AcGePoint3d);
|
|
43
130
|
/**
|
|
44
|
-
*
|
|
131
|
+
* Gets the extension arc start angle.
|
|
132
|
+
*
|
|
133
|
+
* @returns The extension arc start angle in radians
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* const startAngle = radialDim.extArcStartAngle;
|
|
138
|
+
* console.log(`Extension arc start angle: ${startAngle} radians`);
|
|
139
|
+
* ```
|
|
45
140
|
*/
|
|
46
141
|
get extArcStartAngle(): number;
|
|
142
|
+
/**
|
|
143
|
+
* Sets the extension arc start angle.
|
|
144
|
+
*
|
|
145
|
+
* @param value - The new extension arc start angle in radians
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* radialDim.extArcStartAngle = 0;
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
47
152
|
set extArcStartAngle(value: number);
|
|
48
153
|
/**
|
|
49
|
-
*
|
|
154
|
+
* Gets the extension arc end angle.
|
|
155
|
+
*
|
|
156
|
+
* @returns The extension arc end angle in radians
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```typescript
|
|
160
|
+
* const endAngle = radialDim.extArcEndAngle;
|
|
161
|
+
* console.log(`Extension arc end angle: ${endAngle} radians`);
|
|
162
|
+
* ```
|
|
50
163
|
*/
|
|
51
164
|
get extArcEndAngle(): number;
|
|
165
|
+
/**
|
|
166
|
+
* Sets the extension arc end angle.
|
|
167
|
+
*
|
|
168
|
+
* @param value - The new extension arc end angle in radians
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* radialDim.extArcEndAngle = Math.PI / 2;
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
52
175
|
set extArcEndAngle(value: number);
|
|
53
176
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
177
|
+
* Gets the leader length.
|
|
178
|
+
*
|
|
179
|
+
* The leader length is the distance from the chordPoint dimension definition point
|
|
180
|
+
* out to where the dimension does a horizontal dogleg to the annotation text
|
|
181
|
+
* (or stops if no dogleg is needed).
|
|
182
|
+
*
|
|
183
|
+
* @returns The leader length value
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```typescript
|
|
187
|
+
* const leaderLength = radialDim.leaderLength;
|
|
188
|
+
* console.log(`Leader length: ${leaderLength}`);
|
|
189
|
+
* ```
|
|
57
190
|
*/
|
|
58
191
|
get leaderLength(): number;
|
|
192
|
+
/**
|
|
193
|
+
* Sets the leader length.
|
|
194
|
+
*
|
|
195
|
+
* @param value - The new leader length value
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```typescript
|
|
199
|
+
* radialDim.leaderLength = 3.0;
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
59
202
|
set leaderLenght(value: number);
|
|
60
203
|
/**
|
|
61
204
|
* @inheritdoc
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbRadialDimension.d.ts","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbRadialDimension.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EAChB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C
|
|
1
|
+
{"version":3,"file":"AcDbRadialDimension.d.ts","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbRadialDimension.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EAChB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,mBA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