@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.
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 +8 -4
@@ -16,8 +16,41 @@ var __extends = (this && this.__extends) || (function () {
16
16
  import { AcGeBox3d, AcGePoint3d } from '@mlightcad/geometry-engine';
17
17
  import { AcGiViewport } from '@mlightcad/graphic-interface';
18
18
  import { AcDbEntity } from './AcDbEntity';
19
+ /**
20
+ * Represents a viewport entity in AutoCAD drawings.
21
+ *
22
+ * A viewport is a rectangular window that displays a portion of the drawing model space
23
+ * within paper space layouts. Viewports allow users to create multiple views of the same
24
+ * drawing at different scales and orientations on a single sheet.
25
+ *
26
+ * Key characteristics:
27
+ * - Viewports exist primarily in paper space layouts
28
+ * - Each viewport has a unique ID number (except the default system viewport with ID 1)
29
+ * - Viewports can be active or inactive
30
+ * - The viewport entity itself is drawn as a rectangular border in paper space
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * const viewport = new AcDbViewport();
35
+ * viewport.centerPoint = new AcGePoint3d(0, 0, 0);
36
+ * viewport.width = 10;
37
+ * viewport.height = 8;
38
+ * viewport.number = 2;
39
+ * ```
40
+ */
19
41
  var AcDbViewport = /** @class */ (function (_super) {
20
42
  __extends(AcDbViewport, _super);
43
+ /**
44
+ * Creates a new AcDbViewport instance.
45
+ *
46
+ * Initializes all properties with default values:
47
+ * - centerPoint: origin (0,0,0)
48
+ * - height: 0
49
+ * - width: 0
50
+ * - viewCenter: origin (0,0,0)
51
+ * - viewHeight: 0
52
+ * - number: -1 (indicating inactive viewport)
53
+ */
21
54
  function AcDbViewport() {
22
55
  var _this = _super.call(this) || this;
23
56
  _this._centerPoint = new AcGePoint3d();
@@ -30,10 +63,19 @@ var AcDbViewport = /** @class */ (function (_super) {
30
63
  }
31
64
  Object.defineProperty(AcDbViewport.prototype, "number", {
32
65
  /**
33
- * The viewport ID number. This is the number that is reported by the AutoCAD CVPORT system variable
66
+ * Gets or sets the viewport ID number.
67
+ *
68
+ * This is the number that is reported by the AutoCAD CVPORT system variable
34
69
  * when the viewport is the current viewport in the AutoCAD editor. If the viewport is inactive, -1
35
70
  * is returned.
36
- * This value is not saved with the drawing, and changes each time the drawing is opened.
71
+ *
72
+ * Important notes:
73
+ * - This value is not saved with the drawing, and changes each time the drawing is opened
74
+ * - Viewport ID 1 is reserved for the system-defined default viewport in paper space
75
+ * - Active viewports have IDs greater than 1
76
+ * - Inactive viewports return -1
77
+ *
78
+ * @returns The viewport ID number
37
79
  */
38
80
  get: function () {
39
81
  return this._number;
@@ -46,7 +88,12 @@ var AcDbViewport = /** @class */ (function (_super) {
46
88
  });
47
89
  Object.defineProperty(AcDbViewport.prototype, "centerPoint", {
48
90
  /**
49
- * The center point of the viewport entity in WCS coordinates (within Paper Space).
91
+ * Gets or sets the center point of the viewport entity in WCS coordinates (within Paper Space).
92
+ *
93
+ * This point represents the geometric center of the viewport's rectangular boundary
94
+ * in paper space coordinates, not the center of the model space view within the viewport.
95
+ *
96
+ * @returns The center point of the viewport entity
50
97
  */
51
98
  get: function () {
52
99
  return this._centerPoint;
@@ -59,7 +106,13 @@ var AcDbViewport = /** @class */ (function (_super) {
59
106
  });
60
107
  Object.defineProperty(AcDbViewport.prototype, "height", {
61
108
  /**
62
- * The height of the viewport entity's window in drawing units.
109
+ * Gets or sets the height of the viewport entity's window in drawing units.
110
+ *
111
+ * This represents the height of the viewport's rectangular boundary in paper space,
112
+ * measured in the current drawing units. It defines the vertical extent of the
113
+ * viewport border, not the height of the model space view within it.
114
+ *
115
+ * @returns The height of the viewport entity in drawing units
63
116
  */
64
117
  get: function () {
65
118
  return this._height;
@@ -72,8 +125,16 @@ var AcDbViewport = /** @class */ (function (_super) {
72
125
  });
73
126
  Object.defineProperty(AcDbViewport.prototype, "width", {
74
127
  /**
75
- * The width of the viewport entity's window in drawing units. This is the width in Paper Space
76
- * of the viewport itself, not the width of the Model Space view within the viewport.
128
+ * Gets or sets the width of the viewport entity's window in drawing units.
129
+ *
130
+ * This represents the width of the viewport's rectangular boundary in paper space,
131
+ * measured in the current drawing units. It defines the horizontal extent of the
132
+ * viewport border, not the width of the model space view within the viewport.
133
+ *
134
+ * Note: This is the width in Paper Space of the viewport itself, not the width
135
+ * of the Model Space view within the viewport.
136
+ *
137
+ * @returns The width of the viewport entity in drawing units
77
138
  */
78
139
  get: function () {
79
140
  return this._width;
@@ -86,7 +147,13 @@ var AcDbViewport = /** @class */ (function (_super) {
86
147
  });
87
148
  Object.defineProperty(AcDbViewport.prototype, "viewCenter", {
88
149
  /**
89
- * The view center (in display coordinate system coordinates) of the view in the viewport.
150
+ * Gets or sets the view center in display coordinate system coordinates.
151
+ *
152
+ * This point represents the center of the model space view that is displayed
153
+ * within the viewport. It is specified in the display coordinate system and
154
+ * determines what portion of the model space drawing is visible in the viewport.
155
+ *
156
+ * @returns The center point of the model space view within the viewport
90
157
  */
91
158
  get: function () {
92
159
  return this._viewCenter;
@@ -99,8 +166,16 @@ var AcDbViewport = /** @class */ (function (_super) {
99
166
  });
100
167
  Object.defineProperty(AcDbViewport.prototype, "viewHeight", {
101
168
  /**
102
- * The height (in display coordinate system coordinates) of the Model Space view within the viewport.
103
- * Zooming the view out within the viewport increases this value and zooming in decreases this value.
169
+ * Gets or sets the height of the Model Space view within the viewport.
170
+ *
171
+ * This value represents the height of the model space view that is displayed
172
+ * within the viewport, specified in display coordinate system coordinates.
173
+ *
174
+ * Zoom behavior:
175
+ * - Zooming the view out within the viewport increases this value
176
+ * - Zooming the view in within the viewport decreases this value
177
+ *
178
+ * @returns The height of the model space view in display coordinates
104
179
  */
105
180
  get: function () {
106
181
  return this._viewHeight;
@@ -113,6 +188,12 @@ var AcDbViewport = /** @class */ (function (_super) {
113
188
  });
114
189
  Object.defineProperty(AcDbViewport.prototype, "geometricExtents", {
115
190
  /**
191
+ * Gets the geometric extents of the viewport entity.
192
+ *
193
+ * This method returns a bounding box that encompasses the entire viewport entity
194
+ * in world coordinate system (WCS) coordinates.
195
+ *
196
+ * @returns A bounding box containing the viewport entity
116
197
  * @inheritdoc
117
198
  */
118
199
  get: function () {
@@ -123,6 +204,18 @@ var AcDbViewport = /** @class */ (function (_super) {
123
204
  configurable: true
124
205
  });
125
206
  /**
207
+ * Renders the viewport entity using the specified renderer.
208
+ *
209
+ * The viewport is drawn as a rectangular border when the following conditions are met:
210
+ * - The viewport entity is not in model space (i.e., it's in paper space)
211
+ * - The viewport ID number is greater than 1 (not the default system viewport)
212
+ *
213
+ * In paper space layouts, there is always a system-defined "default" viewport that exists as
214
+ * the bottom-most item. This viewport doesn't show any entities and is mainly for internal
215
+ * AutoCAD purposes. The viewport ID number of this system-defined "default" viewport is 1.
216
+ *
217
+ * @param renderer - The renderer to use for drawing the viewport
218
+ * @returns A render group containing the viewport border lines, or undefined if not drawn
126
219
  * @inheritdoc
127
220
  */
128
221
  AcDbViewport.prototype.draw = function (renderer) {
@@ -141,6 +234,14 @@ var AcDbViewport = /** @class */ (function (_super) {
141
234
  }
142
235
  return undefined;
143
236
  };
237
+ /**
238
+ * Converts this AcDbViewport to an AcGiViewport for rendering purposes.
239
+ *
240
+ * This method creates a graphic interface viewport object that contains all the
241
+ * necessary properties for rendering the viewport in the graphics system.
242
+ *
243
+ * @returns An AcGiViewport instance with all viewport properties copied
244
+ */
144
245
  AcDbViewport.prototype.toGiViewport = function () {
145
246
  var viewport = new AcGiViewport();
146
247
  viewport.id = this.objectId;
@@ -153,6 +254,18 @@ var AcDbViewport = /** @class */ (function (_super) {
153
254
  viewport.viewCenter = this.viewCenter;
154
255
  return viewport;
155
256
  };
257
+ /**
258
+ * Creates the rectangular border lines for the viewport.
259
+ *
260
+ * This private method generates four line entities that form a rectangle representing
261
+ * the viewport's boundary. The rectangle is centered on the viewport's center point
262
+ * and has dimensions specified by the viewport's width and height.
263
+ *
264
+ * @param viewport - The graphic interface viewport containing rendering properties
265
+ * @param renderer - The renderer to use for creating the line entities
266
+ * @returns An array of line entities forming the viewport border
267
+ * @private
268
+ */
156
269
  AcDbViewport.prototype.createViewportRect = function (viewport, renderer) {
157
270
  var lines = [];
158
271
  lines.push(renderer.lines([
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbViewport.js","sourceRoot":"","sources":["../../src/entity/AcDbViewport.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;A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cDbRasterImage';
3
+ /**
4
+ * Entity that creates a blank area in the drawing.
5
+ *
6
+ * The AcDbWipeout entity creates a blank area that covers other entities
7
+ * in the drawing. It's commonly used to hide parts of the drawing or
8
+ * create clean areas for annotations. The wipeout area is defined by
9
+ * a boundary path and is rendered as a solid black fill.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * const wipeout = new AcDbWipeout();
14
+ * // Set up boundary path and other properties
15
+ * wipeout.draw(renderer);
16
+ * ```
17
+ */
3
18
  export declare class AcDbWipeout extends AcDbRasterImage {
4
19
  /**
5
- * @inheritdoc
20
+ * Draws the wipeout entity.
21
+ *
22
+ * This method creates a solid black area based on the boundary path
23
+ * of the wipeout entity. The area covers all entities behind it,
24
+ * effectively "wiping out" that portion of the drawing.
25
+ *
26
+ * @param renderer - The renderer to use for drawing
27
+ * @returns The rendered entity or undefined if rendering fails
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const wipeout = new AcDbWipeout();
32
+ * const renderedEntity = wipeout.draw(renderer);
33
+ * ```
6
34
  */
7
35
  draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
8
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbWipeout.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbWipeout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,qBAAa,WAAY,SAAQ,eAAe;IAC9C;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAW5B"}
1
+ {"version":3,"file":"AcDbWipeout.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbWipeout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,WAAY,SAAQ,eAAe;IAC9C;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAW5B"}
@@ -15,13 +15,41 @@ var __extends = (this && this.__extends) || (function () {
15
15
  })();
16
16
  import { AcGeArea2d, AcGePolyline2d } from '@mlightcad/geometry-engine';
17
17
  import { AcDbRasterImage } from './AcDbRasterImage';
18
+ /**
19
+ * Entity that creates a blank area in the drawing.
20
+ *
21
+ * The AcDbWipeout entity creates a blank area that covers other entities
22
+ * in the drawing. It's commonly used to hide parts of the drawing or
23
+ * create clean areas for annotations. The wipeout area is defined by
24
+ * a boundary path and is rendered as a solid black fill.
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * const wipeout = new AcDbWipeout();
29
+ * // Set up boundary path and other properties
30
+ * wipeout.draw(renderer);
31
+ * ```
32
+ */
18
33
  var AcDbWipeout = /** @class */ (function (_super) {
19
34
  __extends(AcDbWipeout, _super);
20
35
  function AcDbWipeout() {
21
36
  return _super !== null && _super.apply(this, arguments) || this;
22
37
  }
23
38
  /**
24
- * @inheritdoc
39
+ * Draws the wipeout entity.
40
+ *
41
+ * This method creates a solid black area based on the boundary path
42
+ * of the wipeout entity. The area covers all entities behind it,
43
+ * effectively "wiping out" that portion of the drawing.
44
+ *
45
+ * @param renderer - The renderer to use for drawing
46
+ * @returns The rendered entity or undefined if rendering fails
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * const wipeout = new AcDbWipeout();
51
+ * const renderedEntity = wipeout.draw(renderer);
52
+ * ```
25
53
  */
26
54
  AcDbWipeout.prototype.draw = function (renderer) {
27
55
  var points = this.boundaryPath();
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbWipeout.js","sourceRoot":"","sources":["../../src/entity/AcDbWipeout.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAGvE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAm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eAAe,GA4B/C"}
@@ -2,40 +2,147 @@ import { AcGeBox3d, AcGePoint3d } from '@mlightcad/geometry-engine';
2
2
  import { AcGiRenderer } from '@mlightcad/graphic-interface';
3
3
  import { AcDbCurve } from './AcDbCurve';
4
4
  /**
5
- * The class represents the XLINE entity type within AutoCAD. An xline entity is a line that extends to
6
- * infinity in both directions.
5
+ * Represents an xline entity in AutoCAD.
6
+ *
7
+ * An xline is a 3D geometric object that extends infinitely in both directions from a base point.
8
+ * Xlines are commonly used for construction lines, reference lines, and temporary geometry.
9
+ * Unlike lines, xlines have no end points and extend to infinity in both directions.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * // Create an xline from origin in the positive X direction
14
+ * const xline = new AcDbXline();
15
+ * xline.basePoint = new AcGePoint3d(0, 0, 0);
16
+ * xline.unitDir = new AcGeVector3d(1, 0, 0);
17
+ *
18
+ * // Access xline properties
19
+ * console.log(`Base point: ${xline.basePoint}`);
20
+ * console.log(`Unit direction: ${xline.unitDir}`);
21
+ * ```
7
22
  */
8
23
  export declare class AcDbXline extends AcDbCurve {
24
+ /** The base point of the xline */
9
25
  private _basePoint;
26
+ /** The unit direction vector of the xline */
10
27
  private _unitDir;
11
28
  /**
12
- * Create one empty polyline
29
+ * Creates a new xline entity.
30
+ *
31
+ * This constructor initializes an xline with default values.
32
+ * The base point is at the origin and the unit direction is undefined.
33
+ *
34
+ * @example
35
+ * ```typescript
36
+ * const xline = new AcDbXline();
37
+ * xline.basePoint = new AcGePoint3d(5, 10, 0);
38
+ * xline.unitDir = new AcGeVector3d(0, 1, 0); // Positive Y direction
39
+ * ```
13
40
  */
14
41
  constructor();
15
42
  /**
16
- * The base point of the xline.
43
+ * Gets the base point of this xline.
44
+ *
45
+ * The base point is the center point from which the xline extends infinitely
46
+ * in both directions.
47
+ *
48
+ * @returns The base point as a 3D point
49
+ *
50
+ * @example
51
+ * ```typescript
52
+ * const basePoint = xline.basePoint;
53
+ * console.log(`Xline base point: ${basePoint.x}, ${basePoint.y}, ${basePoint.z}`);
54
+ * ```
17
55
  */
18
56
  get basePoint(): AcGePoint3d;
57
+ /**
58
+ * Sets the base point of this xline.
59
+ *
60
+ * @param value - The new base point
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * xline.basePoint = new AcGePoint3d(10, 20, 0);
65
+ * ```
66
+ */
19
67
  set basePoint(value: AcGePoint3d);
20
68
  /**
21
- * The second point of the xline.
69
+ * Gets the unit direction vector of this xline.
70
+ *
71
+ * The unit direction vector defines the direction in which the xline extends
72
+ * infinitely in both directions from the base point.
73
+ *
74
+ * @returns The unit direction vector
75
+ *
76
+ * @example
77
+ * ```typescript
78
+ * const unitDir = xline.unitDir;
79
+ * console.log(`Xline direction: ${unitDir.x}, ${unitDir.y}, ${unitDir.z}`);
80
+ * ```
22
81
  */
23
82
  get unitDir(): AcGePoint3d;
83
+ /**
84
+ * Sets the unit direction vector of this xline.
85
+ *
86
+ * @param value - The new unit direction vector
87
+ *
88
+ * @example
89
+ * ```typescript
90
+ * xline.unitDir = new AcGeVector3d(0, 0, 1); // Positive Z direction
91
+ * ```
92
+ */
24
93
  set unitDir(value: AcGePoint3d);
25
94
  /**
26
- * @inheritdoc
95
+ * Gets whether this xline is closed.
96
+ *
97
+ * Xlines are always open entities, so this always returns false.
98
+ *
99
+ * @returns Always false for xlines
27
100
  */
28
101
  get closed(): boolean;
29
102
  /**
30
- * @inheritdoc
103
+ * Gets the geometric extents (bounding box) of this xline.
104
+ *
105
+ * Since xlines extend infinitely in both directions, this method returns a
106
+ * bounding box that encompasses a finite portion of the xline for practical purposes.
107
+ *
108
+ * @returns The bounding box that encompasses a portion of the xline
109
+ *
110
+ * @example
111
+ * ```typescript
112
+ * const extents = xline.geometricExtents;
113
+ * console.log(`Xline bounds: ${extents.minPoint} to ${extents.maxPoint}`);
114
+ * ```
31
115
  */
32
116
  get geometricExtents(): AcGeBox3d;
33
117
  /**
34
- * @inheritdoc
118
+ * Gets the grip points for this xline.
119
+ *
120
+ * Grip points are control points that can be used to modify the xline.
121
+ * For an xline, the grip point is the base point.
122
+ *
123
+ * @returns Array of grip points (base point)
124
+ *
125
+ * @example
126
+ * ```typescript
127
+ * const gripPoints = xline.subGetGripPoints();
128
+ * // gripPoints contains: [basePoint]
129
+ * ```
35
130
  */
36
131
  subGetGripPoints(): AcGePoint3d[];
37
132
  /**
38
- * @inheritdoc
133
+ * Draws this xline using the specified renderer.
134
+ *
135
+ * This method renders the xline as a line segment extending from the base point
136
+ * in both directions along the unit vector. For practical purposes, the xline is
137
+ * drawn with a finite length.
138
+ *
139
+ * @param renderer - The renderer to use for drawing
140
+ * @returns The rendered xline entity, or undefined if drawing failed
141
+ *
142
+ * @example
143
+ * ```typescript
144
+ * const renderedXline = xline.draw(renderer);
145
+ * ```
39
146
  */
40
147
  draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
41
148
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbXline.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbXline.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;GAGG;AACH,qBAAa,SAAU,SAAQ,SAAS;IACtC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,QAAQ,CAAc;IAE9B;;OAEG;;IAOH;;OAEG;IACH,IAAI,SAAS,IAGQ,WAAW,CAD/B;IACD,IAAI,SAAS,CAAC,KAAK,EAAE,WAAW,EAE/B;IAED;;OAEG;IACH,IAAI,OAAO,IAGQ,WAAW,CAD7B;IACD,IAAI,OAAO,CAAC,KAAK,EAAE,WAAW,EAE7B;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED;;OAEG;IACH,IAAI,gBAAgB,IAAI,SAAS,CAShC;IAED;;OAEG;IACH,gBAAgB;IAMhB;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAU5B"}
1
+ {"version":3,"file":"AcDbXline.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbXline.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,SAAU,SAAQ,SAAS;IACtC,kCAAkC;IAClC,OAAO,CAAC,UAAU,CAAa;IAC/B,6CAA6C;IAC7C,OAAO,CAAC,QAAQ,CAAc;IAE9B;;;;;;;;;;;;OAYG;;IAOH;;;;;;;;;;;;;OAaG;IACH,IAAI,SAAS,IAcQ,WAAW,CAZ/B;IAED;;;;;;;;;OASG;IACH,IAAI,SAAS,CAAC,KAAK,EAAE,WAAW,EAE/B;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,OAAO,IAcQ,WAAW,CAZ7B;IAED;;;;;;;;;OASG;IACH,IAAI,OAAO,CAAC,KAAK,EAAE,WAAW,EAE7B;IAED;;;;;;OAMG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,gBAAgB,IAAI,SAAS,CAShC;IAED;;;;;;;;;;;;;OAaG;IACH,gBAAgB;IAMhB;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAU5B"}
@@ -16,13 +16,38 @@ var __extends = (this && this.__extends) || (function () {
16
16
  import { AcGeBox3d, AcGePoint3d, AcGeVector3d } from '@mlightcad/geometry-engine';
17
17
  import { AcDbCurve } from './AcDbCurve';
18
18
  /**
19
- * The class represents the XLINE entity type within AutoCAD. An xline entity is a line that extends to
20
- * infinity in both directions.
19
+ * Represents an xline entity in AutoCAD.
20
+ *
21
+ * An xline is a 3D geometric object that extends infinitely in both directions from a base point.
22
+ * Xlines are commonly used for construction lines, reference lines, and temporary geometry.
23
+ * Unlike lines, xlines have no end points and extend to infinity in both directions.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * // Create an xline from origin in the positive X direction
28
+ * const xline = new AcDbXline();
29
+ * xline.basePoint = new AcGePoint3d(0, 0, 0);
30
+ * xline.unitDir = new AcGeVector3d(1, 0, 0);
31
+ *
32
+ * // Access xline properties
33
+ * console.log(`Base point: ${xline.basePoint}`);
34
+ * console.log(`Unit direction: ${xline.unitDir}`);
35
+ * ```
21
36
  */
22
37
  var AcDbXline = /** @class */ (function (_super) {
23
38
  __extends(AcDbXline, _super);
24
39
  /**
25
- * Create one empty polyline
40
+ * Creates a new xline entity.
41
+ *
42
+ * This constructor initializes an xline with default values.
43
+ * The base point is at the origin and the unit direction is undefined.
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * const xline = new AcDbXline();
48
+ * xline.basePoint = new AcGePoint3d(5, 10, 0);
49
+ * xline.unitDir = new AcGeVector3d(0, 1, 0); // Positive Y direction
50
+ * ```
26
51
  */
27
52
  function AcDbXline() {
28
53
  var _this = _super.call(this) || this;
@@ -32,11 +57,32 @@ var AcDbXline = /** @class */ (function (_super) {
32
57
  }
33
58
  Object.defineProperty(AcDbXline.prototype, "basePoint", {
34
59
  /**
35
- * The base point of the xline.
60
+ * Gets the base point of this xline.
61
+ *
62
+ * The base point is the center point from which the xline extends infinitely
63
+ * in both directions.
64
+ *
65
+ * @returns The base point as a 3D point
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * const basePoint = xline.basePoint;
70
+ * console.log(`Xline base point: ${basePoint.x}, ${basePoint.y}, ${basePoint.z}`);
71
+ * ```
36
72
  */
37
73
  get: function () {
38
74
  return this._basePoint;
39
75
  },
76
+ /**
77
+ * Sets the base point of this xline.
78
+ *
79
+ * @param value - The new base point
80
+ *
81
+ * @example
82
+ * ```typescript
83
+ * xline.basePoint = new AcGePoint3d(10, 20, 0);
84
+ * ```
85
+ */
40
86
  set: function (value) {
41
87
  this._basePoint.copy(value);
42
88
  },
@@ -45,11 +91,32 @@ var AcDbXline = /** @class */ (function (_super) {
45
91
  });
46
92
  Object.defineProperty(AcDbXline.prototype, "unitDir", {
47
93
  /**
48
- * The second point of the xline.
94
+ * Gets the unit direction vector of this xline.
95
+ *
96
+ * The unit direction vector defines the direction in which the xline extends
97
+ * infinitely in both directions from the base point.
98
+ *
99
+ * @returns The unit direction vector
100
+ *
101
+ * @example
102
+ * ```typescript
103
+ * const unitDir = xline.unitDir;
104
+ * console.log(`Xline direction: ${unitDir.x}, ${unitDir.y}, ${unitDir.z}`);
105
+ * ```
49
106
  */
50
107
  get: function () {
51
108
  return this._unitDir;
52
109
  },
110
+ /**
111
+ * Sets the unit direction vector of this xline.
112
+ *
113
+ * @param value - The new unit direction vector
114
+ *
115
+ * @example
116
+ * ```typescript
117
+ * xline.unitDir = new AcGeVector3d(0, 0, 1); // Positive Z direction
118
+ * ```
119
+ */
53
120
  set: function (value) {
54
121
  this._unitDir.copy(value);
55
122
  },
@@ -58,7 +125,11 @@ var AcDbXline = /** @class */ (function (_super) {
58
125
  });
59
126
  Object.defineProperty(AcDbXline.prototype, "closed", {
60
127
  /**
61
- * @inheritdoc
128
+ * Gets whether this xline is closed.
129
+ *
130
+ * Xlines are always open entities, so this always returns false.
131
+ *
132
+ * @returns Always false for xlines
62
133
  */
63
134
  get: function () {
64
135
  return false;
@@ -68,7 +139,18 @@ var AcDbXline = /** @class */ (function (_super) {
68
139
  });
69
140
  Object.defineProperty(AcDbXline.prototype, "geometricExtents", {
70
141
  /**
71
- * @inheritdoc
142
+ * Gets the geometric extents (bounding box) of this xline.
143
+ *
144
+ * Since xlines extend infinitely in both directions, this method returns a
145
+ * bounding box that encompasses a finite portion of the xline for practical purposes.
146
+ *
147
+ * @returns The bounding box that encompasses a portion of the xline
148
+ *
149
+ * @example
150
+ * ```typescript
151
+ * const extents = xline.geometricExtents;
152
+ * console.log(`Xline bounds: ${extents.minPoint} to ${extents.maxPoint}`);
153
+ * ```
72
154
  */
73
155
  get: function () {
74
156
  var extents = new AcGeBox3d();
@@ -80,7 +162,18 @@ var AcDbXline = /** @class */ (function (_super) {
80
162
  configurable: true
81
163
  });
82
164
  /**
83
- * @inheritdoc
165
+ * Gets the grip points for this xline.
166
+ *
167
+ * Grip points are control points that can be used to modify the xline.
168
+ * For an xline, the grip point is the base point.
169
+ *
170
+ * @returns Array of grip points (base point)
171
+ *
172
+ * @example
173
+ * ```typescript
174
+ * const gripPoints = xline.subGetGripPoints();
175
+ * // gripPoints contains: [basePoint]
176
+ * ```
84
177
  */
85
178
  AcDbXline.prototype.subGetGripPoints = function () {
86
179
  var gripPoints = new Array();
@@ -88,7 +181,19 @@ var AcDbXline = /** @class */ (function (_super) {
88
181
  return gripPoints;
89
182
  };
90
183
  /**
91
- * @inheritdoc
184
+ * Draws this xline using the specified renderer.
185
+ *
186
+ * This method renders the xline as a line segment extending from the base point
187
+ * in both directions along the unit vector. For practical purposes, the xline is
188
+ * drawn with a finite length.
189
+ *
190
+ * @param renderer - The renderer to use for drawing
191
+ * @returns The rendered xline entity, or undefined if drawing failed
192
+ *
193
+ * @example
194
+ * ```typescript
195
+ * const renderedXline = xline.draw(renderer);
196
+ * ```
92
197
  */
93
198
  AcDbXline.prototype.draw = function (renderer) {
94
199
  var points = [];