@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.
Files changed (259) hide show
  1. package/dist/data-model.js +5490 -1022
  2. package/dist/data-model.umd.cjs +2 -2
  3. package/lib/base/AcDbHostApplicationServices.d.ts +72 -6
  4. package/lib/base/AcDbHostApplicationServices.d.ts.map +1 -1
  5. package/lib/base/AcDbHostApplicationServices.js +71 -7
  6. package/lib/base/AcDbHostApplicationServices.js.map +1 -1
  7. package/lib/base/AcDbObject.d.ts +160 -25
  8. package/lib/base/AcDbObject.d.ts.map +1 -1
  9. package/lib/base/AcDbObject.js +149 -25
  10. package/lib/base/AcDbObject.js.map +1 -1
  11. package/lib/converter/AcDbBatchProcessing.d.ts +112 -10
  12. package/lib/converter/AcDbBatchProcessing.d.ts.map +1 -1
  13. package/lib/converter/AcDbBatchProcessing.js +110 -11
  14. package/lib/converter/AcDbBatchProcessing.js.map +1 -1
  15. package/lib/converter/AcDbDxfConverter.d.ts +224 -6
  16. package/lib/converter/AcDbDxfConverter.d.ts.map +1 -1
  17. package/lib/converter/AcDbDxfConverter.js +224 -6
  18. package/lib/converter/AcDbDxfConverter.js.map +1 -1
  19. package/lib/converter/AcDbDxfParseWorker.d.ts +16 -0
  20. package/lib/converter/AcDbDxfParseWorker.d.ts.map +1 -1
  21. package/lib/converter/AcDbDxfParseWorker.js +16 -0
  22. package/lib/converter/AcDbDxfParseWorker.js.map +1 -1
  23. package/lib/converter/AcDbEntitiyConverter.d.ts +118 -3
  24. package/lib/converter/AcDbEntitiyConverter.d.ts.map +1 -1
  25. package/lib/converter/AcDbEntitiyConverter.js +118 -3
  26. package/lib/converter/AcDbEntitiyConverter.js.map +1 -1
  27. package/lib/converter/AcDbObjectConverter.d.ts +52 -0
  28. package/lib/converter/AcDbObjectConverter.d.ts.map +1 -1
  29. package/lib/converter/AcDbObjectConverter.js +52 -0
  30. package/lib/converter/AcDbObjectConverter.js.map +1 -1
  31. package/lib/database/AcDbBlockTable.d.ts +35 -3
  32. package/lib/database/AcDbBlockTable.d.ts.map +1 -1
  33. package/lib/database/AcDbBlockTable.js +35 -3
  34. package/lib/database/AcDbBlockTable.js.map +1 -1
  35. package/lib/database/AcDbBlockTableRecord.d.ts +98 -15
  36. package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -1
  37. package/lib/database/AcDbBlockTableRecord.js +96 -15
  38. package/lib/database/AcDbBlockTableRecord.js.map +1 -1
  39. package/lib/database/AcDbDatabase.d.ts +303 -33
  40. package/lib/database/AcDbDatabase.d.ts.map +1 -1
  41. package/lib/database/AcDbDatabase.js +223 -39
  42. package/lib/database/AcDbDatabase.js.map +1 -1
  43. package/lib/database/AcDbDatabaseConverter.d.ts +77 -12
  44. package/lib/database/AcDbDatabaseConverter.d.ts.map +1 -1
  45. package/lib/database/AcDbDatabaseConverter.js +46 -13
  46. package/lib/database/AcDbDatabaseConverter.js.map +1 -1
  47. package/lib/database/AcDbDatabaseConverterManager.d.ts +97 -15
  48. package/lib/database/AcDbDatabaseConverterManager.d.ts.map +1 -1
  49. package/lib/database/AcDbDatabaseConverterManager.js +90 -15
  50. package/lib/database/AcDbDatabaseConverterManager.js.map +1 -1
  51. package/lib/database/AcDbDimStyleTable.d.ts +22 -2
  52. package/lib/database/AcDbDimStyleTable.d.ts.map +1 -1
  53. package/lib/database/AcDbDimStyleTable.js +22 -2
  54. package/lib/database/AcDbDimStyleTable.js.map +1 -1
  55. package/lib/database/AcDbDimStyleTableRecord.d.ts +115 -0
  56. package/lib/database/AcDbDimStyleTableRecord.d.ts.map +1 -1
  57. package/lib/database/AcDbDimStyleTableRecord.js +44 -0
  58. package/lib/database/AcDbDimStyleTableRecord.js.map +1 -1
  59. package/lib/database/AcDbLayerTable.d.ts +39 -2
  60. package/lib/database/AcDbLayerTable.d.ts.map +1 -1
  61. package/lib/database/AcDbLayerTable.js +39 -2
  62. package/lib/database/AcDbLayerTable.js.map +1 -1
  63. package/lib/database/AcDbLayerTableRecord.d.ts +198 -18
  64. package/lib/database/AcDbLayerTableRecord.d.ts.map +1 -1
  65. package/lib/database/AcDbLayerTableRecord.js +182 -19
  66. package/lib/database/AcDbLayerTableRecord.js.map +1 -1
  67. package/lib/database/AcDbLinetypeTable.d.ts +21 -2
  68. package/lib/database/AcDbLinetypeTable.d.ts.map +1 -1
  69. package/lib/database/AcDbLinetypeTable.js +21 -2
  70. package/lib/database/AcDbLinetypeTable.js.map +1 -1
  71. package/lib/database/AcDbLinetypeTableRecord.d.ts +46 -14
  72. package/lib/database/AcDbLinetypeTableRecord.d.ts.map +1 -1
  73. package/lib/database/AcDbLinetypeTableRecord.js +46 -14
  74. package/lib/database/AcDbLinetypeTableRecord.js.map +1 -1
  75. package/lib/database/AcDbSymbolTable.d.ts +134 -29
  76. package/lib/database/AcDbSymbolTable.d.ts.map +1 -1
  77. package/lib/database/AcDbSymbolTable.js +133 -37
  78. package/lib/database/AcDbSymbolTable.js.map +1 -1
  79. package/lib/database/AcDbSymbolTableRecord.d.ts +47 -2
  80. package/lib/database/AcDbSymbolTableRecord.d.ts.map +1 -1
  81. package/lib/database/AcDbSymbolTableRecord.js +40 -2
  82. package/lib/database/AcDbSymbolTableRecord.js.map +1 -1
  83. package/lib/database/AcDbTextStyleTable.d.ts +36 -2
  84. package/lib/database/AcDbTextStyleTable.d.ts.map +1 -1
  85. package/lib/database/AcDbTextStyleTable.js +36 -2
  86. package/lib/database/AcDbTextStyleTable.js.map +1 -1
  87. package/lib/database/AcDbTextStyleTableRecord.d.ts +129 -17
  88. package/lib/database/AcDbTextStyleTableRecord.d.ts.map +1 -1
  89. package/lib/database/AcDbTextStyleTableRecord.js +127 -17
  90. package/lib/database/AcDbTextStyleTableRecord.js.map +1 -1
  91. package/lib/database/AcDbViewportTable.d.ts +22 -2
  92. package/lib/database/AcDbViewportTable.d.ts.map +1 -1
  93. package/lib/database/AcDbViewportTable.js +22 -2
  94. package/lib/database/AcDbViewportTable.js.map +1 -1
  95. package/lib/database/AcDbViewportTableRecord.d.ts +74 -9
  96. package/lib/database/AcDbViewportTableRecord.d.ts.map +1 -1
  97. package/lib/database/AcDbViewportTableRecord.js +65 -9
  98. package/lib/database/AcDbViewportTableRecord.js.map +1 -1
  99. package/lib/entity/AcDbArc.d.ts +202 -17
  100. package/lib/entity/AcDbArc.d.ts.map +1 -1
  101. package/lib/entity/AcDbArc.js +201 -17
  102. package/lib/entity/AcDbArc.js.map +1 -1
  103. package/lib/entity/AcDbBlockReference.d.ts +147 -13
  104. package/lib/entity/AcDbBlockReference.d.ts.map +1 -1
  105. package/lib/entity/AcDbBlockReference.js +142 -13
  106. package/lib/entity/AcDbBlockReference.js.map +1 -1
  107. package/lib/entity/AcDbCircle.d.ts +145 -12
  108. package/lib/entity/AcDbCircle.d.ts.map +1 -1
  109. package/lib/entity/AcDbCircle.js +144 -12
  110. package/lib/entity/AcDbCircle.js.map +1 -1
  111. package/lib/entity/AcDbCurve.d.ts +33 -2
  112. package/lib/entity/AcDbCurve.d.ts.map +1 -1
  113. package/lib/entity/AcDbCurve.js +17 -0
  114. package/lib/entity/AcDbCurve.js.map +1 -1
  115. package/lib/entity/AcDbEllipse.d.ts +168 -16
  116. package/lib/entity/AcDbEllipse.d.ts.map +1 -1
  117. package/lib/entity/AcDbEllipse.js +167 -16
  118. package/lib/entity/AcDbEllipse.js.map +1 -1
  119. package/lib/entity/AcDbEntity.d.ts +299 -35
  120. package/lib/entity/AcDbEntity.d.ts.map +1 -1
  121. package/lib/entity/AcDbEntity.js +275 -27
  122. package/lib/entity/AcDbEntity.js.map +1 -1
  123. package/lib/entity/AcDbHatch.d.ts +60 -4
  124. package/lib/entity/AcDbHatch.d.ts.map +1 -1
  125. package/lib/entity/AcDbHatch.js +52 -4
  126. package/lib/entity/AcDbHatch.js.map +1 -1
  127. package/lib/entity/AcDbLeader.d.ts +157 -10
  128. package/lib/entity/AcDbLeader.d.ts.map +1 -1
  129. package/lib/entity/AcDbLeader.js +149 -10
  130. package/lib/entity/AcDbLeader.js.map +1 -1
  131. package/lib/entity/AcDbLine.d.ts +154 -13
  132. package/lib/entity/AcDbLine.d.ts.map +1 -1
  133. package/lib/entity/AcDbLine.js +153 -13
  134. package/lib/entity/AcDbLine.js.map +1 -1
  135. package/lib/entity/AcDbMText.d.ts +127 -11
  136. package/lib/entity/AcDbMText.d.ts.map +1 -1
  137. package/lib/entity/AcDbMText.js +112 -11
  138. package/lib/entity/AcDbMText.js.map +1 -1
  139. package/lib/entity/AcDbPoint.d.ts +86 -7
  140. package/lib/entity/AcDbPoint.d.ts.map +1 -1
  141. package/lib/entity/AcDbPoint.js +85 -7
  142. package/lib/entity/AcDbPoint.js.map +1 -1
  143. package/lib/entity/AcDbPolyline.d.ts +172 -25
  144. package/lib/entity/AcDbPolyline.d.ts.map +1 -1
  145. package/lib/entity/AcDbPolyline.js +170 -25
  146. package/lib/entity/AcDbPolyline.js.map +1 -1
  147. package/lib/entity/AcDbRasterImage.d.ts +75 -31
  148. package/lib/entity/AcDbRasterImage.d.ts.map +1 -1
  149. package/lib/entity/AcDbRasterImage.js +60 -31
  150. package/lib/entity/AcDbRasterImage.js.map +1 -1
  151. package/lib/entity/AcDbRay.d.ts +115 -9
  152. package/lib/entity/AcDbRay.d.ts.map +1 -1
  153. package/lib/entity/AcDbRay.js +113 -9
  154. package/lib/entity/AcDbRay.js.map +1 -1
  155. package/lib/entity/AcDbSpline.d.ts +106 -14
  156. package/lib/entity/AcDbSpline.d.ts.map +1 -1
  157. package/lib/entity/AcDbSpline.js +67 -4
  158. package/lib/entity/AcDbSpline.js.map +1 -1
  159. package/lib/entity/AcDbTable.d.ts +161 -44
  160. package/lib/entity/AcDbTable.d.ts.map +1 -1
  161. package/lib/entity/AcDbTable.js +135 -44
  162. package/lib/entity/AcDbTable.js.map +1 -1
  163. package/lib/entity/AcDbText.d.ts +298 -25
  164. package/lib/entity/AcDbText.d.ts.map +1 -1
  165. package/lib/entity/AcDbText.js +288 -25
  166. package/lib/entity/AcDbText.js.map +1 -1
  167. package/lib/entity/AcDbTrace.d.ts +150 -23
  168. package/lib/entity/AcDbTrace.d.ts.map +1 -1
  169. package/lib/entity/AcDbTrace.js +147 -23
  170. package/lib/entity/AcDbTrace.js.map +1 -1
  171. package/lib/entity/AcDbViewport.d.ts +122 -9
  172. package/lib/entity/AcDbViewport.d.ts.map +1 -1
  173. package/lib/entity/AcDbViewport.js +122 -9
  174. package/lib/entity/AcDbViewport.js.map +1 -1
  175. package/lib/entity/AcDbWipeout.d.ts +29 -1
  176. package/lib/entity/AcDbWipeout.d.ts.map +1 -1
  177. package/lib/entity/AcDbWipeout.js +29 -1
  178. package/lib/entity/AcDbWipeout.js.map +1 -1
  179. package/lib/entity/AcDbXline.d.ts +116 -9
  180. package/lib/entity/AcDbXline.d.ts.map +1 -1
  181. package/lib/entity/AcDbXline.js +114 -9
  182. package/lib/entity/AcDbXline.js.map +1 -1
  183. package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +56 -12
  184. package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +1 -1
  185. package/lib/entity/dimension/AcDb3PointAngularDimension.js +56 -12
  186. package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +1 -1
  187. package/lib/entity/dimension/AcDbAlignedDimension.d.ts +158 -17
  188. package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +1 -1
  189. package/lib/entity/dimension/AcDbAlignedDimension.js +153 -17
  190. package/lib/entity/dimension/AcDbAlignedDimension.js.map +1 -1
  191. package/lib/entity/dimension/AcDbArcDimension.d.ts +58 -12
  192. package/lib/entity/dimension/AcDbArcDimension.d.ts.map +1 -1
  193. package/lib/entity/dimension/AcDbArcDimension.js +58 -12
  194. package/lib/entity/dimension/AcDbArcDimension.js.map +1 -1
  195. package/lib/entity/dimension/AcDbDiametricDimension.d.ts +99 -25
  196. package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +1 -1
  197. package/lib/entity/dimension/AcDbDiametricDimension.js +99 -25
  198. package/lib/entity/dimension/AcDbDiametricDimension.js.map +1 -1
  199. package/lib/entity/dimension/AcDbDimension.d.ts +108 -14
  200. package/lib/entity/dimension/AcDbDimension.d.ts.map +1 -1
  201. package/lib/entity/dimension/AcDbDimension.js +99 -14
  202. package/lib/entity/dimension/AcDbDimension.js.map +1 -1
  203. package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +48 -16
  204. package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +1 -1
  205. package/lib/entity/dimension/AcDbOrdinateDimension.js +48 -16
  206. package/lib/entity/dimension/AcDbOrdinateDimension.js.map +1 -1
  207. package/lib/entity/dimension/AcDbRadialDimension.d.ts +167 -24
  208. package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +1 -1
  209. package/lib/entity/dimension/AcDbRadialDimension.js +162 -24
  210. package/lib/entity/dimension/AcDbRadialDimension.js.map +1 -1
  211. package/lib/misc/AcDbAngleUnits.d.ts +12 -0
  212. package/lib/misc/AcDbAngleUnits.d.ts.map +1 -1
  213. package/lib/misc/AcDbAngleUnits.js +12 -0
  214. package/lib/misc/AcDbAngleUnits.js.map +1 -1
  215. package/lib/misc/AcDbConstants.d.ts +20 -0
  216. package/lib/misc/AcDbConstants.d.ts.map +1 -1
  217. package/lib/misc/AcDbConstants.js +20 -0
  218. package/lib/misc/AcDbConstants.js.map +1 -1
  219. package/lib/misc/AcDbDimArrowType.d.ts +24 -21
  220. package/lib/misc/AcDbDimArrowType.d.ts.map +1 -1
  221. package/lib/misc/AcDbDimArrowType.js +24 -21
  222. package/lib/misc/AcDbDimArrowType.js.map +1 -1
  223. package/lib/misc/AcDbObjectIterator.d.ts +42 -3
  224. package/lib/misc/AcDbObjectIterator.d.ts.map +1 -1
  225. package/lib/misc/AcDbObjectIterator.js +42 -3
  226. package/lib/misc/AcDbObjectIterator.js.map +1 -1
  227. package/lib/misc/AcDbOsnapMode.d.ts +18 -10
  228. package/lib/misc/AcDbOsnapMode.d.ts.map +1 -1
  229. package/lib/misc/AcDbOsnapMode.js +18 -10
  230. package/lib/misc/AcDbOsnapMode.js.map +1 -1
  231. package/lib/misc/AcDbRenderingCache.d.ts +107 -29
  232. package/lib/misc/AcDbRenderingCache.d.ts.map +1 -1
  233. package/lib/misc/AcDbRenderingCache.js +105 -29
  234. package/lib/misc/AcDbRenderingCache.js.map +1 -1
  235. package/lib/misc/AcDbUnitsValue.d.ts +58 -8
  236. package/lib/misc/AcDbUnitsValue.d.ts.map +1 -1
  237. package/lib/misc/AcDbUnitsValue.js +58 -8
  238. package/lib/misc/AcDbUnitsValue.js.map +1 -1
  239. package/lib/object/AcDbDictionary.d.ts +128 -30
  240. package/lib/object/AcDbDictionary.d.ts.map +1 -1
  241. package/lib/object/AcDbDictionary.js +126 -30
  242. package/lib/object/AcDbDictionary.js.map +1 -1
  243. package/lib/object/AcDbRasterImageDef.d.ts +38 -9
  244. package/lib/object/AcDbRasterImageDef.d.ts.map +1 -1
  245. package/lib/object/AcDbRasterImageDef.js +37 -9
  246. package/lib/object/AcDbRasterImageDef.js.map +1 -1
  247. package/lib/object/layout/AcDbLayout.d.ts +152 -13
  248. package/lib/object/layout/AcDbLayout.d.ts.map +1 -1
  249. package/lib/object/layout/AcDbLayout.js +146 -13
  250. package/lib/object/layout/AcDbLayout.js.map +1 -1
  251. package/lib/object/layout/AcDbLayoutDictionary.d.ts +35 -7
  252. package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +1 -1
  253. package/lib/object/layout/AcDbLayoutDictionary.js +35 -7
  254. package/lib/object/layout/AcDbLayoutDictionary.js.map +1 -1
  255. package/lib/object/layout/AcDbLayoutManager.d.ts +103 -31
  256. package/lib/object/layout/AcDbLayoutManager.d.ts.map +1 -1
  257. package/lib/object/layout/AcDbLayoutManager.js +98 -31
  258. package/lib/object/layout/AcDbLayoutManager.js.map +1 -1
  259. package/package.json +4 -4
@@ -3,101 +3,365 @@ import { AcGeBox3d, AcGeMatrix3d, AcGePoint3d } from '@mlightcad/geometry-engine
3
3
  import { AcGiEntity, AcGiLineStyle, AcGiRenderer } from '@mlightcad/graphic-interface';
4
4
  import { AcDbObject } from '../base/AcDbObject';
5
5
  import { AcDbOsnapMode } from '../misc';
6
+ /**
7
+ * Abstract base class for all drawing entities.
8
+ *
9
+ * This class provides the fundamental functionality for all drawing entities,
10
+ * including layer management, color handling, linetype support, visibility,
11
+ * and geometric operations. All specific entity types (lines, circles, text, etc.)
12
+ * inherit from this class.
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * class MyEntity extends AcDbEntity {
17
+ * get geometricExtents(): AcGeBox3d {
18
+ * // Implementation for geometric extents
19
+ * }
20
+ *
21
+ * draw(renderer: AcGiRenderer): AcGiEntity | undefined {
22
+ * // Implementation for drawing
23
+ * }
24
+ * }
25
+ * ```
26
+ */
6
27
  export declare abstract class AcDbEntity extends AcDbObject {
28
+ /** The layer name this entity belongs to */
7
29
  private _layer;
30
+ /** The color of this entity */
8
31
  private _color;
32
+ /** The linetype name for this entity */
9
33
  private _lineType;
34
+ /** The line weight for this entity */
10
35
  private _lineWeight;
36
+ /** The linetype scale factor for this entity */
11
37
  private _linetypeScale;
38
+ /** Whether this entity is visible */
12
39
  private _visibility;
40
+ /** The transparency level of this entity (0-1) */
13
41
  private _transparency;
42
+ /**
43
+ * Gets the type name of this entity.
44
+ *
45
+ * This method returns the entity type by removing the "AcDb" prefix
46
+ * from the constructor name.
47
+ *
48
+ * @returns The entity type name
49
+ *
50
+ * @example
51
+ * ```typescript
52
+ * const entity = new AcDbLine();
53
+ * console.log(entity.type); // "Line"
54
+ * ```
55
+ */
14
56
  get type(): string;
15
57
  /**
16
- * The name of the layer referenced by this entity
58
+ * Gets the name of the layer referenced by this entity.
59
+ *
60
+ * @returns The layer name
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * const layerName = entity.layer;
65
+ * ```
17
66
  */
18
67
  get layer(): string;
68
+ /**
69
+ * Sets the name of the layer for this entity.
70
+ *
71
+ * @param value - The new layer name
72
+ *
73
+ * @example
74
+ * ```typescript
75
+ * entity.layer = 'MyLayer';
76
+ * ```
77
+ */
19
78
  set layer(value: string);
20
79
  /**
21
- * The color information of this entity
80
+ * Gets the color information of this entity.
81
+ *
82
+ * @returns The color object for this entity
83
+ *
84
+ * @example
85
+ * ```typescript
86
+ * const color = entity.color;
87
+ * ```
22
88
  */
23
89
  get color(): AcCmColor;
90
+ /**
91
+ * Sets the color information for this entity.
92
+ *
93
+ * @param value - The new color object
94
+ *
95
+ * @example
96
+ * ```typescript
97
+ * entity.color = new AcCmColor(0xFF0000);
98
+ * ```
99
+ */
24
100
  set color(value: AcCmColor);
25
101
  /**
26
- * The RGB color of this entity after converting color index (including ByLayer and ByBlock) or name to
27
- * real RGB color.
102
+ * Gets the RGB color of this entity after converting color index.
103
+ *
104
+ * This method handles the conversion of color indices (including ByLayer and ByBlock)
105
+ * to actual RGB colors. It resolves layer colors and block colors as needed.
106
+ *
107
+ * @returns The RGB color value as a number
108
+ *
109
+ * @example
110
+ * ```typescript
111
+ * const rgbColor = entity.rgbColor;
112
+ * console.log(`RGB: ${rgbColor.toString(16)}`);
113
+ * ```
28
114
  */
29
115
  get rgbColor(): number;
30
116
  /**
31
- * The name of the line type referenced by this entity.
117
+ * Gets the name of the line type referenced by this entity.
118
+ *
119
+ * @returns The linetype name
120
+ *
121
+ * @example
122
+ * ```typescript
123
+ * const lineType = entity.lineType;
124
+ * ```
32
125
  */
33
126
  get lineType(): string;
127
+ /**
128
+ * Sets the name of the line type for this entity.
129
+ *
130
+ * @param value - The new linetype name
131
+ *
132
+ * @example
133
+ * ```typescript
134
+ * entity.lineType = 'DASHED';
135
+ * ```
136
+ */
34
137
  set lineType(value: string);
35
138
  /**
36
- * Line weight used by this entity.
139
+ * Gets the line weight used by this entity.
140
+ *
141
+ * @returns The line weight value
142
+ *
143
+ * @example
144
+ * ```typescript
145
+ * const weight = entity.lineWeight;
146
+ * ```
37
147
  */
38
148
  get lineWeight(): number;
149
+ /**
150
+ * Sets the line weight for this entity.
151
+ *
152
+ * @param value - The new line weight value
153
+ *
154
+ * @example
155
+ * ```typescript
156
+ * entity.lineWeight = 2;
157
+ * ```
158
+ */
39
159
  set lineWeight(value: number);
40
160
  /**
41
- * The line type scale factor of this entity. When an entity is first instantiated, its line type scale
42
- * is initialized to an invalid value. When the entity is added to the database, if a linetype scale has
43
- * not been specified for the entity, it is set to the database's current line type scale value.
161
+ * Gets the line type scale factor of this entity.
162
+ *
163
+ * When an entity is first instantiated, its line type scale is initialized
164
+ * to an invalid value. When the entity is added to the database, if a
165
+ * linetype scale has not been specified for the entity, it is set to the
166
+ * database's current line type scale value.
167
+ *
168
+ * @returns The linetype scale factor
169
+ *
170
+ * @example
171
+ * ```typescript
172
+ * const scale = entity.linetypeScale;
173
+ * ```
44
174
  */
45
175
  get linetypeScale(): number;
176
+ /**
177
+ * Sets the line type scale factor for this entity.
178
+ *
179
+ * @param value - The new linetype scale factor
180
+ *
181
+ * @example
182
+ * ```typescript
183
+ * entity.linetypeScale = 2.0;
184
+ * ```
185
+ */
46
186
  set linetypeScale(value: number);
47
187
  /**
48
- * The visibility state of this entity
188
+ * Gets whether this entity is visible.
189
+ *
190
+ * @returns True if the entity is visible, false otherwise
191
+ *
192
+ * @example
193
+ * ```typescript
194
+ * const isVisible = entity.visibility;
195
+ * ```
49
196
  */
50
197
  get visibility(): boolean;
198
+ /**
199
+ * Sets whether this entity is visible.
200
+ *
201
+ * @param value - True to make the entity visible, false to hide it
202
+ *
203
+ * @example
204
+ * ```typescript
205
+ * entity.visibility = false; // Hide the entity
206
+ * ```
207
+ */
51
208
  set visibility(value: boolean);
52
209
  /**
53
- * The transparency setting of this entity.
210
+ * Gets the transparency level of this entity.
211
+ *
212
+ * @returns The transparency value (0-1, where 0 is opaque and 1 is fully transparent)
213
+ *
214
+ * @example
215
+ * ```typescript
216
+ * const transparency = entity.transparency;
217
+ * ```
54
218
  */
55
219
  get transparency(): number;
220
+ /**
221
+ * Sets the transparency level of this entity.
222
+ *
223
+ * @param value - The transparency value (0-1, where 0 is opaque and 1 is fully transparent)
224
+ *
225
+ * @example
226
+ * ```typescript
227
+ * entity.transparency = 0.5; // 50% transparent
228
+ * ```
229
+ */
56
230
  set transparency(value: number);
57
231
  /**
58
- * Calculate grip points of this entity and return them.
59
- * @returns Return grip points of this entity
232
+ * Gets the grip points for this entity.
233
+ *
234
+ * Grip points are the control points that can be used to modify the entity.
235
+ * This method should be overridden by subclasses to provide entity-specific
236
+ * grip points.
237
+ *
238
+ * @returns Array of grip points as 3D points
239
+ *
240
+ * @example
241
+ * ```typescript
242
+ * const gripPoints = entity.subGetGripPoints();
243
+ * ```
60
244
  */
61
245
  subGetGripPoints(): AcGePoint3d[];
62
246
  /**
63
- * This function must use the material provided in osnapMode, gsSelectionMark, pickPoint, lastPoint, and
64
- * viewXform to determine all appropriate osnap points for the entity. It must then append all such osnap
65
- * points to the snapPoints array.
66
- * @param osnapMode Input osnap mode being requested
67
- * @param gsSelectionMark Input GS marker of the subentity involved in the object snap operation
68
- * @param pickPoint Input point (in WCS coordinates) picked during the object snap operation
69
- * @param lastPoint Input point (in WCS coordinates) selected just before pickPoint
70
- * @param snapPoints The snapPoints array is passed to all entities involved in the osnap operation, so it's
71
- * possible that the array will already have entries in it when passed in. For this reason, it's very important
72
- * that points be appended to the snapPoints array instead of assigning to any existing elements.
247
+ * Gets the object snap points for this entity.
248
+ *
249
+ * Object snap points are the points that can be used for precise positioning
250
+ * when drawing or editing. This method should be overridden by subclasses
251
+ * to provide entity-specific snap points.
252
+ *
253
+ * @param osnapMode - The object snap mode
254
+ * @param gsSelectionMark - The selection mark
255
+ * @param pickPoint - The pick point
256
+ * @param lastPoint - The last point
257
+ * @param snapPoints - Array to populate with snap points
258
+ *
259
+ * @example
260
+ * ```typescript
261
+ * const snapPoints: AcGePoint3d[] = [];
262
+ * entity.subGetOsnapPoints(AcDbOsnapMode.Endpoint, 0, pickPoint, lastPoint, snapPoints);
263
+ * ```
73
264
  */
74
265
  subGetOsnapPoints(osnapMode: AcDbOsnapMode, gsSelectionMark: number, pickPoint: AcGePoint3d, lastPoint: AcGePoint3d, snapPoints: AcGePoint3d[]): void;
75
266
  /**
76
- * Apply a transformation matrix to this entity
77
- * @param matrix Input one transformation matrix
78
- * @returns Return this entity
267
+ * Transforms this entity by the specified matrix.
268
+ *
269
+ * This method applies a geometric transformation to the entity.
270
+ * Subclasses should override this method to provide entity-specific
271
+ * transformation behavior.
272
+ *
273
+ * @param matrix - The transformation matrix to apply
274
+ * @returns This entity after transformation
275
+ *
276
+ * @example
277
+ * ```typescript
278
+ * const matrix = AcGeMatrix3d.translation(10, 0, 0);
279
+ * entity.transformBy(matrix);
280
+ * ```
79
281
  */
80
282
  transformBy(matrix: AcGeMatrix3d): this;
81
283
  /**
82
- * Compute the corner points (in WCS coordinates) of a box (with edges parallel to the WCS X, Y,
83
- * and Z axes) that encloses the 3D extents of the entity, and return those points as an instance
84
- * of class AcDbExtents.
284
+ * Gets the geometric extents of this entity.
285
+ *
286
+ * This method should be implemented by subclasses to return the
287
+ * bounding box that encompasses the entire entity.
288
+ *
289
+ * @returns The geometric extents as a 3D bounding box
290
+ *
291
+ * @example
292
+ * ```typescript
293
+ * const extents = entity.geometricExtents;
294
+ * console.log(`Min: ${extents.minPoint}, Max: ${extents.maxPoint}`);
295
+ * ```
85
296
  */
86
297
  abstract get geometricExtents(): AcGeBox3d;
87
298
  /**
88
- * Convert this entity to an object be able to draw by the specified renderer and return it.
89
- * @param renderer Input renderer to draw this entity
90
- * @returns Return object to render in the scene. Different renderers use different classes to
91
- * represent objects to render. So the type of returned object is completely specific to render
92
- * engine.
299
+ * Draws this entity using the specified renderer.
300
+ *
301
+ * This method should be implemented by subclasses to provide
302
+ * entity-specific drawing behavior.
303
+ *
304
+ * @param renderer - The renderer to use for drawing
305
+ * @returns The rendered entity, or undefined if drawing failed
306
+ *
307
+ * @example
308
+ * ```typescript
309
+ * const renderedEntity = entity.draw(renderer);
310
+ * ```
93
311
  */
94
312
  abstract draw(renderer: AcGiRenderer): AcGiEntity | undefined;
95
313
  /**
96
- * Trigger 'entityModified' event
314
+ * Triggers a modified event for this entity.
315
+ *
316
+ * This method notifies listeners that the entity has been modified.
317
+ *
318
+ * @example
319
+ * ```typescript
320
+ * entity.triggerModifiedEvent();
321
+ * ```
97
322
  */
98
323
  triggerModifiedEvent(): void;
324
+ /**
325
+ * Gets the line style for this entity.
326
+ *
327
+ * This method returns the line style based on the entity's linetype
328
+ * and other properties.
329
+ *
330
+ * @returns The line style object
331
+ *
332
+ * @example
333
+ * ```typescript
334
+ * const lineStyle = entity.lineStyle;
335
+ * ```
336
+ */
99
337
  protected get lineStyle(): AcGiLineStyle;
338
+ /**
339
+ * Gets the line type for this entity.
340
+ *
341
+ * This method resolves the line type, handling ByLayer and ByBlock
342
+ * references as needed.
343
+ *
344
+ * @returns The resolved line type name
345
+ *
346
+ * @example
347
+ * ```typescript
348
+ * const lineType = entity.getLineType();
349
+ * ```
350
+ */
100
351
  private getLineType;
352
+ /**
353
+ * Gets the color of the layer this entity belongs to.
354
+ *
355
+ * This method retrieves the color from the layer table for the
356
+ * layer this entity belongs to.
357
+ *
358
+ * @returns The layer color, or undefined if the layer doesn't exist
359
+ *
360
+ * @example
361
+ * ```typescript
362
+ * const layerColor = entity.getLayerColor();
363
+ * ```
364
+ */
101
365
  protected getLayerColor(): AcCmColor | null;
102
366
  }
103
367
  //# sourceMappingURL=AcDbEntity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbEntity.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EACL,SAAS,EACT,YAAY,EACZ,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACb,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CA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