@mlightcad/data-model 1.1.1 → 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 +8 -4
|
@@ -1,58 +1,205 @@
|
|
|
1
1
|
import { AcGeBox3d, AcGePoint3dLike } from '@mlightcad/geometry-engine';
|
|
2
2
|
import { AcGiRenderer } from '@mlightcad/graphic-interface';
|
|
3
3
|
import { AcDbCurve } from './AcDbCurve';
|
|
4
|
+
/**
|
|
5
|
+
* Defines the annotation type for leader entities.
|
|
6
|
+
*/
|
|
4
7
|
export declare enum AcDbLeaderAnnotationType {
|
|
8
|
+
/** Multiline text annotation */
|
|
5
9
|
MText = 0,
|
|
10
|
+
/** Feature control frame annotation */
|
|
6
11
|
Fcf = 1,
|
|
12
|
+
/** Block reference annotation */
|
|
7
13
|
BlockReference = 2,
|
|
14
|
+
/** No annotation */
|
|
8
15
|
NoAnnotation = 3
|
|
9
16
|
}
|
|
10
17
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
18
|
+
* Represents a leader entity in AutoCAD.
|
|
19
|
+
*
|
|
20
|
+
* A leader is a dimension-like entity that consists of a line or spline with an arrowhead
|
|
21
|
+
* pointing to a specific object or location, and an annotation (text, block, or feature
|
|
22
|
+
* control frame) at the other end. Leaders are controlled by dimension variable settings
|
|
23
|
+
* and dimension styles.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* // Create a leader entity
|
|
28
|
+
* const leader = new AcDbLeader();
|
|
29
|
+
* leader.appendVertex(new AcGePoint3d(0, 0, 0));
|
|
30
|
+
* leader.appendVertex(new AcGePoint3d(5, 5, 0));
|
|
31
|
+
* leader.appendVertex(new AcGePoint3d(10, 5, 0));
|
|
32
|
+
* leader.hasArrowHead = true;
|
|
33
|
+
* leader.hasHookLine = true;
|
|
34
|
+
* leader.annoType = AcDbLeaderAnnotationType.MText;
|
|
35
|
+
*
|
|
36
|
+
* // Access leader properties
|
|
37
|
+
* console.log(`Number of vertices: ${leader.numVertices}`);
|
|
38
|
+
* console.log(`Has arrow head: ${leader.hasArrowHead}`);
|
|
39
|
+
* console.log(`Has hook line: ${leader.hasHookLine}`);
|
|
40
|
+
* ```
|
|
13
41
|
*/
|
|
14
42
|
export declare class AcDbLeader extends AcDbCurve {
|
|
43
|
+
/** Whether this leader is spline-fit */
|
|
15
44
|
private _isSplined;
|
|
45
|
+
/** The spline geometry if this leader is spline-fit */
|
|
16
46
|
private _splineGeo?;
|
|
47
|
+
/** Whether this leader has been updated */
|
|
17
48
|
private _updated;
|
|
49
|
+
/** Whether this leader has an arrowhead */
|
|
18
50
|
private _hasArrowHead;
|
|
51
|
+
/** The vertices of the leader line */
|
|
19
52
|
private _vertices;
|
|
53
|
+
/** The dimension style applied to this leader */
|
|
20
54
|
private _dimensionStyle;
|
|
55
|
+
/** Whether this leader has a hook line */
|
|
21
56
|
private _hasHookLine;
|
|
57
|
+
/** The annotation type for this leader */
|
|
22
58
|
private _annoType;
|
|
23
59
|
/**
|
|
24
|
-
*
|
|
60
|
+
* Creates a new leader entity.
|
|
61
|
+
*
|
|
62
|
+
* This constructor initializes a leader with default values.
|
|
63
|
+
* The leader is not spline-fit, has no arrowhead, no hook line,
|
|
64
|
+
* and no annotation type.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```typescript
|
|
68
|
+
* const leader = new AcDbLeader();
|
|
69
|
+
* leader.appendVertex(new AcGePoint3d(0, 0, 0));
|
|
70
|
+
* leader.appendVertex(new AcGePoint3d(5, 5, 0));
|
|
71
|
+
* ```
|
|
25
72
|
*/
|
|
26
73
|
constructor();
|
|
27
74
|
/**
|
|
28
|
-
*
|
|
75
|
+
* Gets whether this leader is spline-fit.
|
|
76
|
+
*
|
|
77
|
+
* @returns True if the leader is spline-fit, false otherwise
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const isSplined = leader.isSplined;
|
|
82
|
+
* console.log(`Leader is spline-fit: ${isSplined}`);
|
|
83
|
+
* ```
|
|
29
84
|
*/
|
|
30
85
|
get isSplined(): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Sets whether this leader is spline-fit.
|
|
88
|
+
*
|
|
89
|
+
* @param value - True to make the leader spline-fit, false otherwise
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```typescript
|
|
93
|
+
* leader.isSplined = true;
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
31
96
|
set isSplined(value: boolean);
|
|
32
97
|
/**
|
|
33
|
-
*
|
|
98
|
+
* Gets whether this leader has an arrowhead.
|
|
99
|
+
*
|
|
100
|
+
* @returns True if the leader has an arrowhead, false otherwise
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* const hasArrowHead = leader.hasArrowHead;
|
|
105
|
+
* console.log(`Leader has arrowhead: ${hasArrowHead}`);
|
|
106
|
+
* ```
|
|
34
107
|
*/
|
|
35
108
|
get hasArrowHead(): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Sets whether this leader has an arrowhead.
|
|
111
|
+
*
|
|
112
|
+
* @param value - True to enable arrowhead, false to disable
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* leader.hasArrowHead = true;
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
36
119
|
set hasArrowHead(value: boolean);
|
|
37
120
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
121
|
+
* Gets whether this leader has a hook line.
|
|
122
|
+
*
|
|
123
|
+
* The "hookline" is the small horizontal line at the end of the leader line
|
|
124
|
+
* just before the annotation.
|
|
125
|
+
*
|
|
126
|
+
* @returns True if the leader has a hook line, false otherwise
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```typescript
|
|
130
|
+
* const hasHookLine = leader.hasHookLine;
|
|
131
|
+
* console.log(`Leader has hook line: ${hasHookLine}`);
|
|
132
|
+
* ```
|
|
40
133
|
*/
|
|
41
134
|
get hasHookLine(): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Sets whether this leader has a hook line.
|
|
137
|
+
*
|
|
138
|
+
* @param value - True to enable hook line, false to disable
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```typescript
|
|
142
|
+
* leader.hasHookLine = true;
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
42
145
|
set hasHookLine(value: boolean);
|
|
43
146
|
/**
|
|
44
|
-
*
|
|
147
|
+
* Gets the number of vertices in the leader's vertex list.
|
|
148
|
+
*
|
|
149
|
+
* @returns The number of vertices
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* const numVertices = leader.numVertices;
|
|
154
|
+
* console.log(`Number of vertices: ${numVertices}`);
|
|
155
|
+
* ```
|
|
45
156
|
*/
|
|
46
157
|
get numVertices(): number;
|
|
47
158
|
/**
|
|
48
|
-
*
|
|
159
|
+
* Gets the dimension style applied to this leader.
|
|
160
|
+
*
|
|
161
|
+
* @returns The dimension style name
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```typescript
|
|
165
|
+
* const dimensionStyle = leader.dimensionStyle;
|
|
166
|
+
* console.log(`Dimension style: ${dimensionStyle}`);
|
|
167
|
+
* ```
|
|
49
168
|
*/
|
|
50
169
|
get dimensionStyle(): string;
|
|
170
|
+
/**
|
|
171
|
+
* Sets the dimension style applied to this leader.
|
|
172
|
+
*
|
|
173
|
+
* @param value - The new dimension style name
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```typescript
|
|
177
|
+
* leader.dimensionStyle = "Standard";
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
51
180
|
set dimensionStyle(value: string);
|
|
52
181
|
/**
|
|
53
|
-
*
|
|
182
|
+
* Gets the leader's annotation type.
|
|
183
|
+
*
|
|
184
|
+
* @returns The annotation type
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```typescript
|
|
188
|
+
* const annoType = leader.annoType;
|
|
189
|
+
* console.log(`Annotation type: ${annoType}`);
|
|
190
|
+
* ```
|
|
54
191
|
*/
|
|
55
192
|
get annoType(): AcDbLeaderAnnotationType;
|
|
193
|
+
/**
|
|
194
|
+
* Sets the leader's annotation type.
|
|
195
|
+
*
|
|
196
|
+
* @param value - The new annotation type
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```typescript
|
|
200
|
+
* leader.annoType = AcDbLeaderAnnotationType.MText;
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
56
203
|
set annoType(value: AcDbLeaderAnnotationType);
|
|
57
204
|
/**
|
|
58
205
|
* Appends vertex to the end of the vertex list for this leader. If vertex is not in the plane of the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbLeader.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbLeader.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,eAAe,EAEhB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,oBAAY,wBAAwB;IAClC,KAAK,IAAI;IACT,GAAG,IAAI;IACP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AAW,IAcQ,OAAO,CAZ7B;IAED;;;;;;;;;OASG;IACH,IAAI,WAAW,CAAC,KAAK,EAAE,OAAO,EAE7B;IAED;;;;;;;;;;OAUG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;IAED;;;;;;;;;;OAUG;IACH,IAAI,cAAc,IAcQ,MAAM,CAZ/B;IAED;;;;;;;;;OASG;IACH,IAAI,cAAc,CAAC,KAAK,EAAE,MAAM,EAE/B;IAED;;;;;;;;;;OAUG;IACH,IAAI,QAAQ,IAcQ,wBAAwB,CAZ3C;IAED;;;;;;;;;OASG;IACH,IAAI,QAAQ,CAAC,KAAK,EAAE,wBAAwB,EAE3C;IAED;;;;;;OAMG;IACH,YAAY,CAAC,KAAK,EAAE,eAAe;IAKnC;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe;IASjD;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM;IAOtB;;OAEG;IACH,IAAI,gBAAgB,cAOnB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IACD,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,EAEzB;IAED;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;IAS3B,OAAO,KAAK,SAAS,GAGpB;IAED,OAAO,CAAC,oBAAoB;CAU7B"}
|
package/lib/entity/AcDbLeader.js
CHANGED
|
@@ -15,21 +15,60 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
15
15
|
})();
|
|
16
16
|
import { AcGeBox3d, AcGePoint3d, AcGeSpline3d } from '@mlightcad/geometry-engine';
|
|
17
17
|
import { AcDbCurve } from './AcDbCurve';
|
|
18
|
+
/**
|
|
19
|
+
* Defines the annotation type for leader entities.
|
|
20
|
+
*/
|
|
18
21
|
export var AcDbLeaderAnnotationType;
|
|
19
22
|
(function (AcDbLeaderAnnotationType) {
|
|
23
|
+
/** Multiline text annotation */
|
|
20
24
|
AcDbLeaderAnnotationType[AcDbLeaderAnnotationType["MText"] = 0] = "MText";
|
|
25
|
+
/** Feature control frame annotation */
|
|
21
26
|
AcDbLeaderAnnotationType[AcDbLeaderAnnotationType["Fcf"] = 1] = "Fcf";
|
|
27
|
+
/** Block reference annotation */
|
|
22
28
|
AcDbLeaderAnnotationType[AcDbLeaderAnnotationType["BlockReference"] = 2] = "BlockReference";
|
|
29
|
+
/** No annotation */
|
|
23
30
|
AcDbLeaderAnnotationType[AcDbLeaderAnnotationType["NoAnnotation"] = 3] = "NoAnnotation";
|
|
24
31
|
})(AcDbLeaderAnnotationType || (AcDbLeaderAnnotationType = {}));
|
|
25
32
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
33
|
+
* Represents a leader entity in AutoCAD.
|
|
34
|
+
*
|
|
35
|
+
* A leader is a dimension-like entity that consists of a line or spline with an arrowhead
|
|
36
|
+
* pointing to a specific object or location, and an annotation (text, block, or feature
|
|
37
|
+
* control frame) at the other end. Leaders are controlled by dimension variable settings
|
|
38
|
+
* and dimension styles.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* // Create a leader entity
|
|
43
|
+
* const leader = new AcDbLeader();
|
|
44
|
+
* leader.appendVertex(new AcGePoint3d(0, 0, 0));
|
|
45
|
+
* leader.appendVertex(new AcGePoint3d(5, 5, 0));
|
|
46
|
+
* leader.appendVertex(new AcGePoint3d(10, 5, 0));
|
|
47
|
+
* leader.hasArrowHead = true;
|
|
48
|
+
* leader.hasHookLine = true;
|
|
49
|
+
* leader.annoType = AcDbLeaderAnnotationType.MText;
|
|
50
|
+
*
|
|
51
|
+
* // Access leader properties
|
|
52
|
+
* console.log(`Number of vertices: ${leader.numVertices}`);
|
|
53
|
+
* console.log(`Has arrow head: ${leader.hasArrowHead}`);
|
|
54
|
+
* console.log(`Has hook line: ${leader.hasHookLine}`);
|
|
55
|
+
* ```
|
|
28
56
|
*/
|
|
29
57
|
var AcDbLeader = /** @class */ (function (_super) {
|
|
30
58
|
__extends(AcDbLeader, _super);
|
|
31
59
|
/**
|
|
32
|
-
*
|
|
60
|
+
* Creates a new leader entity.
|
|
61
|
+
*
|
|
62
|
+
* This constructor initializes a leader with default values.
|
|
63
|
+
* The leader is not spline-fit, has no arrowhead, no hook line,
|
|
64
|
+
* and no annotation type.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```typescript
|
|
68
|
+
* const leader = new AcDbLeader();
|
|
69
|
+
* leader.appendVertex(new AcGePoint3d(0, 0, 0));
|
|
70
|
+
* leader.appendVertex(new AcGePoint3d(5, 5, 0));
|
|
71
|
+
* ```
|
|
33
72
|
*/
|
|
34
73
|
function AcDbLeader() {
|
|
35
74
|
var _this = _super.call(this) || this;
|
|
@@ -44,11 +83,29 @@ var AcDbLeader = /** @class */ (function (_super) {
|
|
|
44
83
|
}
|
|
45
84
|
Object.defineProperty(AcDbLeader.prototype, "isSplined", {
|
|
46
85
|
/**
|
|
47
|
-
*
|
|
86
|
+
* Gets whether this leader is spline-fit.
|
|
87
|
+
*
|
|
88
|
+
* @returns True if the leader is spline-fit, false otherwise
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* const isSplined = leader.isSplined;
|
|
93
|
+
* console.log(`Leader is spline-fit: ${isSplined}`);
|
|
94
|
+
* ```
|
|
48
95
|
*/
|
|
49
96
|
get: function () {
|
|
50
97
|
return this._isSplined;
|
|
51
98
|
},
|
|
99
|
+
/**
|
|
100
|
+
* Sets whether this leader is spline-fit.
|
|
101
|
+
*
|
|
102
|
+
* @param value - True to make the leader spline-fit, false otherwise
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```typescript
|
|
106
|
+
* leader.isSplined = true;
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
52
109
|
set: function (value) {
|
|
53
110
|
this._isSplined = value;
|
|
54
111
|
},
|
|
@@ -57,11 +114,29 @@ var AcDbLeader = /** @class */ (function (_super) {
|
|
|
57
114
|
});
|
|
58
115
|
Object.defineProperty(AcDbLeader.prototype, "hasArrowHead", {
|
|
59
116
|
/**
|
|
60
|
-
*
|
|
117
|
+
* Gets whether this leader has an arrowhead.
|
|
118
|
+
*
|
|
119
|
+
* @returns True if the leader has an arrowhead, false otherwise
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```typescript
|
|
123
|
+
* const hasArrowHead = leader.hasArrowHead;
|
|
124
|
+
* console.log(`Leader has arrowhead: ${hasArrowHead}`);
|
|
125
|
+
* ```
|
|
61
126
|
*/
|
|
62
127
|
get: function () {
|
|
63
128
|
return this._hasArrowHead;
|
|
64
129
|
},
|
|
130
|
+
/**
|
|
131
|
+
* Sets whether this leader has an arrowhead.
|
|
132
|
+
*
|
|
133
|
+
* @param value - True to enable arrowhead, false to disable
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* leader.hasArrowHead = true;
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
65
140
|
set: function (value) {
|
|
66
141
|
this._hasArrowHead = value;
|
|
67
142
|
},
|
|
@@ -70,12 +145,32 @@ var AcDbLeader = /** @class */ (function (_super) {
|
|
|
70
145
|
});
|
|
71
146
|
Object.defineProperty(AcDbLeader.prototype, "hasHookLine", {
|
|
72
147
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
148
|
+
* Gets whether this leader has a hook line.
|
|
149
|
+
*
|
|
150
|
+
* The "hookline" is the small horizontal line at the end of the leader line
|
|
151
|
+
* just before the annotation.
|
|
152
|
+
*
|
|
153
|
+
* @returns True if the leader has a hook line, false otherwise
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```typescript
|
|
157
|
+
* const hasHookLine = leader.hasHookLine;
|
|
158
|
+
* console.log(`Leader has hook line: ${hasHookLine}`);
|
|
159
|
+
* ```
|
|
75
160
|
*/
|
|
76
161
|
get: function () {
|
|
77
162
|
return this._hasHookLine;
|
|
78
163
|
},
|
|
164
|
+
/**
|
|
165
|
+
* Sets whether this leader has a hook line.
|
|
166
|
+
*
|
|
167
|
+
* @param value - True to enable hook line, false to disable
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```typescript
|
|
171
|
+
* leader.hasHookLine = true;
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
79
174
|
set: function (value) {
|
|
80
175
|
this._hasHookLine = value;
|
|
81
176
|
},
|
|
@@ -84,7 +179,15 @@ var AcDbLeader = /** @class */ (function (_super) {
|
|
|
84
179
|
});
|
|
85
180
|
Object.defineProperty(AcDbLeader.prototype, "numVertices", {
|
|
86
181
|
/**
|
|
87
|
-
*
|
|
182
|
+
* Gets the number of vertices in the leader's vertex list.
|
|
183
|
+
*
|
|
184
|
+
* @returns The number of vertices
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```typescript
|
|
188
|
+
* const numVertices = leader.numVertices;
|
|
189
|
+
* console.log(`Number of vertices: ${numVertices}`);
|
|
190
|
+
* ```
|
|
88
191
|
*/
|
|
89
192
|
get: function () {
|
|
90
193
|
return this._vertices.length;
|
|
@@ -94,11 +197,29 @@ var AcDbLeader = /** @class */ (function (_super) {
|
|
|
94
197
|
});
|
|
95
198
|
Object.defineProperty(AcDbLeader.prototype, "dimensionStyle", {
|
|
96
199
|
/**
|
|
97
|
-
*
|
|
200
|
+
* Gets the dimension style applied to this leader.
|
|
201
|
+
*
|
|
202
|
+
* @returns The dimension style name
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* const dimensionStyle = leader.dimensionStyle;
|
|
207
|
+
* console.log(`Dimension style: ${dimensionStyle}`);
|
|
208
|
+
* ```
|
|
98
209
|
*/
|
|
99
210
|
get: function () {
|
|
100
211
|
return this._dimensionStyle;
|
|
101
212
|
},
|
|
213
|
+
/**
|
|
214
|
+
* Sets the dimension style applied to this leader.
|
|
215
|
+
*
|
|
216
|
+
* @param value - The new dimension style name
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```typescript
|
|
220
|
+
* leader.dimensionStyle = "Standard";
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
102
223
|
set: function (value) {
|
|
103
224
|
this._dimensionStyle = value;
|
|
104
225
|
},
|
|
@@ -107,11 +228,29 @@ var AcDbLeader = /** @class */ (function (_super) {
|
|
|
107
228
|
});
|
|
108
229
|
Object.defineProperty(AcDbLeader.prototype, "annoType", {
|
|
109
230
|
/**
|
|
110
|
-
*
|
|
231
|
+
* Gets the leader's annotation type.
|
|
232
|
+
*
|
|
233
|
+
* @returns The annotation type
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* ```typescript
|
|
237
|
+
* const annoType = leader.annoType;
|
|
238
|
+
* console.log(`Annotation type: ${annoType}`);
|
|
239
|
+
* ```
|
|
111
240
|
*/
|
|
112
241
|
get: function () {
|
|
113
242
|
return this._annoType;
|
|
114
243
|
},
|
|
244
|
+
/**
|
|
245
|
+
* Sets the leader's annotation type.
|
|
246
|
+
*
|
|
247
|
+
* @param value - The new annotation type
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* ```typescript
|
|
251
|
+
* leader.annoType = AcDbLeaderAnnotationType.MText;
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
115
254
|
set: function (value) {
|
|
116
255
|
this._annoType = value;
|
|
117
256
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbLeader.js","sourceRoot":"","sources":["../../src/entity/AcDbLeader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,WAAW,EAEX,YAAY,EACb,MAAM,4BAA4B,CAAA;AAGnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"AcDbLeader.js","sourceRoot":"","sources":["../../src/entity/AcDbLeader.ts"],"names":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BAAoB,EAAE,CAAA;YAC3B,OAAO,IAAI,CAAC,UAAU,CAAA;QACxB,CAAC;;;OAAA;IAEO,yCAAoB,GAA5B;QACE,IACE,IAAI,CAAC,SAAS;YACd,IAAI,CAAC,WAAW,IAAI,CAAC;YACrB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,EAC1C,CAAC;YACD,IAAI,CAAC,UAAU,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;YAC7D,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA;QACvB,CAAC;IACH,CAAC;IACH,iBAAC;AAAD,CAAC,AAtSD,CAAgC,SAAS,GAsSxC"}
|
package/lib/entity/AcDbLine.d.ts
CHANGED
|
@@ -3,52 +3,193 @@ import { AcGiRenderer } from '@mlightcad/graphic-interface';
|
|
|
3
3
|
import { AcDbOsnapMode } from '../misc/AcDbOsnapMode';
|
|
4
4
|
import { AcDbCurve } from './AcDbCurve';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Represents a line entity in AutoCAD.
|
|
7
|
+
*
|
|
8
|
+
* A line is a 3D geometric object defined by its start point and end point.
|
|
9
|
+
* Lines are fundamental drawing entities that can be used to create straight
|
|
10
|
+
* line segments in 2D or 3D space.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* // Create a line from point (0,0,0) to point (10,10,0)
|
|
15
|
+
* const line = new AcDbLine(
|
|
16
|
+
* new AcGePoint3d(0, 0, 0),
|
|
17
|
+
* new AcGePoint3d(10, 10, 0)
|
|
18
|
+
* );
|
|
19
|
+
*
|
|
20
|
+
* // Access line properties
|
|
21
|
+
* console.log(`Start point: ${line.startPoint}`);
|
|
22
|
+
* console.log(`End point: ${line.endPoint}`);
|
|
23
|
+
* console.log(`Mid point: ${line.midPoint}`);
|
|
24
|
+
* ```
|
|
8
25
|
*/
|
|
9
26
|
export declare class AcDbLine extends AcDbCurve {
|
|
27
|
+
/** The underlying geometric line object */
|
|
10
28
|
private _geo;
|
|
11
29
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
30
|
+
* Creates a new line entity.
|
|
31
|
+
*
|
|
32
|
+
* This constructor initializes the line object with the specified start and end points.
|
|
33
|
+
* Both points must be in World Coordinate System (WCS) coordinates.
|
|
34
|
+
*
|
|
35
|
+
* @param start - The starting point of the line in WCS coordinates
|
|
36
|
+
* @param end - The ending point of the line in WCS coordinates
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const line = new AcDbLine(
|
|
41
|
+
* new AcGePoint3d(0, 0, 0),
|
|
42
|
+
* new AcGePoint3d(100, 50, 0)
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
14
45
|
*/
|
|
15
46
|
constructor(start: AcGePoint3dLike, end: AcGePoint3dLike);
|
|
16
47
|
/**
|
|
17
|
-
*
|
|
48
|
+
* Gets the starting point of this line.
|
|
49
|
+
*
|
|
50
|
+
* @returns The starting point as a 3D point
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* const startPoint = line.startPoint;
|
|
55
|
+
* console.log(`Line starts at: ${startPoint.x}, ${startPoint.y}, ${startPoint.z}`);
|
|
56
|
+
* ```
|
|
18
57
|
*/
|
|
19
58
|
get startPoint(): AcGePoint3d;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the starting point of this line.
|
|
61
|
+
*
|
|
62
|
+
* @param value - The new starting point
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* line.startPoint = new AcGePoint3d(5, 5, 0);
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
20
69
|
set startPoint(value: AcGePoint3dLike);
|
|
21
70
|
/**
|
|
22
|
-
*
|
|
71
|
+
* Gets the ending point of this line.
|
|
72
|
+
*
|
|
73
|
+
* @returns The ending point as a 3D point
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* const endPoint = line.endPoint;
|
|
78
|
+
* console.log(`Line ends at: ${endPoint.x}, ${endPoint.y}, ${endPoint.z}`);
|
|
79
|
+
* ```
|
|
23
80
|
*/
|
|
24
81
|
get endPoint(): AcGePoint3d;
|
|
82
|
+
/**
|
|
83
|
+
* Sets the ending point of this line.
|
|
84
|
+
*
|
|
85
|
+
* @param value - The new ending point
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```typescript
|
|
89
|
+
* line.endPoint = new AcGePoint3d(15, 15, 0);
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
25
92
|
set endPoint(value: AcGePoint3dLike);
|
|
26
93
|
/**
|
|
27
|
-
*
|
|
94
|
+
* Gets the middle point of this line.
|
|
95
|
+
*
|
|
96
|
+
* The middle point is calculated as the midpoint between the start and end points.
|
|
97
|
+
*
|
|
98
|
+
* @returns The middle point as a 3D point
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const midPoint = line.midPoint;
|
|
103
|
+
* console.log(`Line midpoint: ${midPoint.x}, ${midPoint.y}, ${midPoint.z}`);
|
|
104
|
+
* ```
|
|
28
105
|
*/
|
|
29
106
|
get midPoint(): AcGePoint3d;
|
|
30
107
|
/**
|
|
31
|
-
*
|
|
108
|
+
* Gets the geometric extents (bounding box) of this line.
|
|
109
|
+
*
|
|
110
|
+
* @returns The bounding box that encompasses the entire line
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```typescript
|
|
114
|
+
* const extents = line.geometricExtents;
|
|
115
|
+
* console.log(`Line bounds: ${extents.minPoint} to ${extents.maxPoint}`);
|
|
116
|
+
* ```
|
|
32
117
|
*/
|
|
33
118
|
get geometricExtents(): AcGeBox3d;
|
|
34
119
|
/**
|
|
35
|
-
*
|
|
120
|
+
* Gets whether this line is closed.
|
|
121
|
+
*
|
|
122
|
+
* Lines are always open entities, so this always returns false.
|
|
123
|
+
*
|
|
124
|
+
* @returns Always false for lines
|
|
36
125
|
*/
|
|
37
126
|
get closed(): boolean;
|
|
38
127
|
/**
|
|
39
|
-
*
|
|
128
|
+
* Gets the grip points for this line.
|
|
129
|
+
*
|
|
130
|
+
* Grip points are control points that can be used to modify the line.
|
|
131
|
+
* For a line, the grip points are the midpoint, start point, and end point.
|
|
132
|
+
*
|
|
133
|
+
* @returns Array of grip points (midpoint, start point, end point)
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* const gripPoints = line.subGetGripPoints();
|
|
138
|
+
* // gripPoints contains: [midPoint, startPoint, endPoint]
|
|
139
|
+
* ```
|
|
40
140
|
*/
|
|
41
141
|
subGetGripPoints(): AcGePoint3d[];
|
|
42
142
|
/**
|
|
43
|
-
*
|
|
143
|
+
* Gets the object snap points for this line.
|
|
144
|
+
*
|
|
145
|
+
* Object snap points are precise points that can be used for positioning
|
|
146
|
+
* when drawing or editing. This method provides snap points based on the
|
|
147
|
+
* specified snap mode.
|
|
148
|
+
*
|
|
149
|
+
* @param osnapMode - The object snap mode (Endpoint, Midpoint, Nearest, Perpendicular, Tangent)
|
|
150
|
+
* @param _gsSelectionMark - The selection mark (unused)
|
|
151
|
+
* @param pickPoint - The point where the user picked
|
|
152
|
+
* @param _lastPoint - The last point (unused)
|
|
153
|
+
* @param snapPoints - Array to populate with snap points
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```typescript
|
|
157
|
+
* const snapPoints: AcGePoint3d[] = [];
|
|
158
|
+
* line.subGetOsnapPoints(AcDbOsnapMode.EndPoint, 0, pickPoint, lastPoint, snapPoints);
|
|
159
|
+
* // snapPoints now contains the start and end points
|
|
160
|
+
* ```
|
|
44
161
|
*/
|
|
45
162
|
subGetOsnapPoints(osnapMode: AcDbOsnapMode, _gsSelectionMark: number, pickPoint: AcGePoint3d, _lastPoint: AcGePoint3d, snapPoints: AcGePoint3d[]): void;
|
|
46
163
|
/**
|
|
47
|
-
*
|
|
164
|
+
* Transforms this line by the specified matrix.
|
|
165
|
+
*
|
|
166
|
+
* This method applies a geometric transformation to the line, updating
|
|
167
|
+
* both the start and end points according to the transformation matrix.
|
|
168
|
+
*
|
|
169
|
+
* @param matrix - The transformation matrix to apply
|
|
170
|
+
* @returns This line after transformation
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```typescript
|
|
174
|
+
* const translationMatrix = AcGeMatrix3d.translation(10, 0, 0);
|
|
175
|
+
* line.transformBy(translationMatrix);
|
|
176
|
+
* // Line is now translated 10 units in the X direction
|
|
177
|
+
* ```
|
|
48
178
|
*/
|
|
49
179
|
transformBy(matrix: AcGeMatrix3d): this;
|
|
50
180
|
/**
|
|
51
|
-
*
|
|
181
|
+
* Draws this line using the specified renderer.
|
|
182
|
+
*
|
|
183
|
+
* This method renders the line as a series of connected line segments
|
|
184
|
+
* using the line's current style properties.
|
|
185
|
+
*
|
|
186
|
+
* @param renderer - The renderer to use for drawing
|
|
187
|
+
* @returns The rendered line entity, or undefined if drawing failed
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```typescript
|
|
191
|
+
* const renderedLine = line.draw(renderer);
|
|
192
|
+
* ```
|
|
52
193
|
*/
|
|
53
194
|
draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
|
|
54
195
|
}
|