@mlightcad/data-model 1.1.2 → 1.1.4

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 +5501 -1021
  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 +312 -36
  40. package/lib/database/AcDbDatabase.d.ts.map +1 -1
  41. package/lib/database/AcDbDatabase.js +237 -46
  42. package/lib/database/AcDbDatabase.js.map +1 -1
  43. package/lib/database/AcDbDatabaseConverter.d.ts +79 -14
  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
@@ -2,40 +2,146 @@ 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 RAY entity type within AutoCAD. An xline entity is a line that extends to
6
- * infinity in both directions.
5
+ * Represents a ray entity in AutoCAD.
6
+ *
7
+ * A ray is a 3D geometric object that extends infinitely in one direction from a base point.
8
+ * Rays are commonly used for construction lines, reference lines, and temporary geometry.
9
+ * Unlike lines, rays have no end point and extend to infinity.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * // Create a ray from origin in the positive X direction
14
+ * const ray = new AcDbRay();
15
+ * ray.basePoint = new AcGePoint3d(0, 0, 0);
16
+ * ray.unitDir = new AcGeVector3d(1, 0, 0);
17
+ *
18
+ * // Access ray properties
19
+ * console.log(`Base point: ${ray.basePoint}`);
20
+ * console.log(`Unit direction: ${ray.unitDir}`);
21
+ * ```
7
22
  */
8
23
  export declare class AcDbRay extends AcDbCurve {
24
+ /** The base point of the ray */
9
25
  private _basePoint;
26
+ /** The unit direction vector of the ray */
10
27
  private _unitDir;
11
28
  /**
12
- * Create one empty polyline
29
+ * Creates a new ray entity.
30
+ *
31
+ * This constructor initializes a ray with default values.
32
+ * The base point is at the origin and the unit direction is undefined.
33
+ *
34
+ * @example
35
+ * ```typescript
36
+ * const ray = new AcDbRay();
37
+ * ray.basePoint = new AcGePoint3d(5, 10, 0);
38
+ * ray.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 ray.
44
+ *
45
+ * The base point is the starting point from which the ray extends infinitely.
46
+ *
47
+ * @returns The base point as a 3D point
48
+ *
49
+ * @example
50
+ * ```typescript
51
+ * const basePoint = ray.basePoint;
52
+ * console.log(`Ray base point: ${basePoint.x}, ${basePoint.y}, ${basePoint.z}`);
53
+ * ```
17
54
  */
18
55
  get basePoint(): AcGePoint3d;
56
+ /**
57
+ * Sets the base point of this ray.
58
+ *
59
+ * @param value - The new base point
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * ray.basePoint = new AcGePoint3d(10, 20, 0);
64
+ * ```
65
+ */
19
66
  set basePoint(value: AcGePoint3d);
20
67
  /**
21
- * The second point of the xline.
68
+ * Gets the unit direction vector of this ray.
69
+ *
70
+ * The unit direction vector defines the direction in which the ray extends
71
+ * infinitely from the base point.
72
+ *
73
+ * @returns The unit direction vector
74
+ *
75
+ * @example
76
+ * ```typescript
77
+ * const unitDir = ray.unitDir;
78
+ * console.log(`Ray direction: ${unitDir.x}, ${unitDir.y}, ${unitDir.z}`);
79
+ * ```
22
80
  */
23
81
  get unitDir(): AcGePoint3d;
82
+ /**
83
+ * Sets the unit direction vector of this ray.
84
+ *
85
+ * @param value - The new unit direction vector
86
+ *
87
+ * @example
88
+ * ```typescript
89
+ * ray.unitDir = new AcGeVector3d(0, 0, 1); // Positive Z direction
90
+ * ```
91
+ */
24
92
  set unitDir(value: AcGePoint3d);
25
93
  /**
26
- * @inheritdoc
94
+ * Gets whether this ray is closed.
95
+ *
96
+ * Rays are always open entities, so this always returns false.
97
+ *
98
+ * @returns Always false for rays
27
99
  */
28
100
  get closed(): boolean;
29
101
  /**
30
- * @inheritdoc
102
+ * Gets the geometric extents (bounding box) of this ray.
103
+ *
104
+ * Since rays extend infinitely, this method returns a bounding box that
105
+ * encompasses a finite portion of the ray for practical purposes.
106
+ *
107
+ * @returns The bounding box that encompasses a portion of the ray
108
+ *
109
+ * @example
110
+ * ```typescript
111
+ * const extents = ray.geometricExtents;
112
+ * console.log(`Ray bounds: ${extents.minPoint} to ${extents.maxPoint}`);
113
+ * ```
31
114
  */
32
115
  get geometricExtents(): AcGeBox3d;
33
116
  /**
34
- * @inheritdoc
117
+ * Gets the grip points for this ray.
118
+ *
119
+ * Grip points are control points that can be used to modify the ray.
120
+ * For a ray, the grip point is the base point.
121
+ *
122
+ * @returns Array of grip points (base point)
123
+ *
124
+ * @example
125
+ * ```typescript
126
+ * const gripPoints = ray.subGetGripPoints();
127
+ * // gripPoints contains: [basePoint]
128
+ * ```
35
129
  */
36
130
  subGetGripPoints(): AcGePoint3d[];
37
131
  /**
38
- * @inheritdoc
132
+ * Draws this ray using the specified renderer.
133
+ *
134
+ * This method renders the ray as a line segment extending from the base point
135
+ * in the direction of the unit vector. For practical purposes, the ray is
136
+ * drawn with a finite length.
137
+ *
138
+ * @param renderer - The renderer to use for drawing
139
+ * @returns The rendered ray entity, or undefined if drawing failed
140
+ *
141
+ * @example
142
+ * ```typescript
143
+ * const renderedRay = ray.draw(renderer);
144
+ * ```
39
145
  */
40
146
  draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
41
147
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbRay.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbRay.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,OAAQ,SAAQ,SAAS;IACpC,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;CAQ5B"}
1
+ {"version":3,"file":"AcDbRay.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbRay.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,OAAQ,SAAQ,SAAS;IACpC,gCAAgC;IAChC,OAAO,CAAC,UAAU,CAAa;IAC/B,2CAA2C;IAC3C,OAAO,CAAC,QAAQ,CAAc;IAE9B;;;;;;;;;;;;OAYG;;IAOH;;;;;;;;;;;;OAYG;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;CAQ5B"}
@@ -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 RAY entity type within AutoCAD. An xline entity is a line that extends to
20
- * infinity in both directions.
19
+ * Represents a ray entity in AutoCAD.
20
+ *
21
+ * A ray is a 3D geometric object that extends infinitely in one direction from a base point.
22
+ * Rays are commonly used for construction lines, reference lines, and temporary geometry.
23
+ * Unlike lines, rays have no end point and extend to infinity.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * // Create a ray from origin in the positive X direction
28
+ * const ray = new AcDbRay();
29
+ * ray.basePoint = new AcGePoint3d(0, 0, 0);
30
+ * ray.unitDir = new AcGeVector3d(1, 0, 0);
31
+ *
32
+ * // Access ray properties
33
+ * console.log(`Base point: ${ray.basePoint}`);
34
+ * console.log(`Unit direction: ${ray.unitDir}`);
35
+ * ```
21
36
  */
22
37
  var AcDbRay = /** @class */ (function (_super) {
23
38
  __extends(AcDbRay, _super);
24
39
  /**
25
- * Create one empty polyline
40
+ * Creates a new ray entity.
41
+ *
42
+ * This constructor initializes a ray with default values.
43
+ * The base point is at the origin and the unit direction is undefined.
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * const ray = new AcDbRay();
48
+ * ray.basePoint = new AcGePoint3d(5, 10, 0);
49
+ * ray.unitDir = new AcGeVector3d(0, 1, 0); // Positive Y direction
50
+ * ```
26
51
  */
27
52
  function AcDbRay() {
28
53
  var _this = _super.call(this) || this;
@@ -32,11 +57,31 @@ var AcDbRay = /** @class */ (function (_super) {
32
57
  }
33
58
  Object.defineProperty(AcDbRay.prototype, "basePoint", {
34
59
  /**
35
- * The base point of the xline.
60
+ * Gets the base point of this ray.
61
+ *
62
+ * The base point is the starting point from which the ray extends infinitely.
63
+ *
64
+ * @returns The base point as a 3D point
65
+ *
66
+ * @example
67
+ * ```typescript
68
+ * const basePoint = ray.basePoint;
69
+ * console.log(`Ray base point: ${basePoint.x}, ${basePoint.y}, ${basePoint.z}`);
70
+ * ```
36
71
  */
37
72
  get: function () {
38
73
  return this._basePoint;
39
74
  },
75
+ /**
76
+ * Sets the base point of this ray.
77
+ *
78
+ * @param value - The new base point
79
+ *
80
+ * @example
81
+ * ```typescript
82
+ * ray.basePoint = new AcGePoint3d(10, 20, 0);
83
+ * ```
84
+ */
40
85
  set: function (value) {
41
86
  this._basePoint.copy(value);
42
87
  },
@@ -45,11 +90,32 @@ var AcDbRay = /** @class */ (function (_super) {
45
90
  });
46
91
  Object.defineProperty(AcDbRay.prototype, "unitDir", {
47
92
  /**
48
- * The second point of the xline.
93
+ * Gets the unit direction vector of this ray.
94
+ *
95
+ * The unit direction vector defines the direction in which the ray extends
96
+ * infinitely from the base point.
97
+ *
98
+ * @returns The unit direction vector
99
+ *
100
+ * @example
101
+ * ```typescript
102
+ * const unitDir = ray.unitDir;
103
+ * console.log(`Ray direction: ${unitDir.x}, ${unitDir.y}, ${unitDir.z}`);
104
+ * ```
49
105
  */
50
106
  get: function () {
51
107
  return this._unitDir;
52
108
  },
109
+ /**
110
+ * Sets the unit direction vector of this ray.
111
+ *
112
+ * @param value - The new unit direction vector
113
+ *
114
+ * @example
115
+ * ```typescript
116
+ * ray.unitDir = new AcGeVector3d(0, 0, 1); // Positive Z direction
117
+ * ```
118
+ */
53
119
  set: function (value) {
54
120
  this._unitDir.copy(value);
55
121
  },
@@ -58,7 +124,11 @@ var AcDbRay = /** @class */ (function (_super) {
58
124
  });
59
125
  Object.defineProperty(AcDbRay.prototype, "closed", {
60
126
  /**
61
- * @inheritdoc
127
+ * Gets whether this ray is closed.
128
+ *
129
+ * Rays are always open entities, so this always returns false.
130
+ *
131
+ * @returns Always false for rays
62
132
  */
63
133
  get: function () {
64
134
  return false;
@@ -68,7 +138,18 @@ var AcDbRay = /** @class */ (function (_super) {
68
138
  });
69
139
  Object.defineProperty(AcDbRay.prototype, "geometricExtents", {
70
140
  /**
71
- * @inheritdoc
141
+ * Gets the geometric extents (bounding box) of this ray.
142
+ *
143
+ * Since rays extend infinitely, this method returns a bounding box that
144
+ * encompasses a finite portion of the ray for practical purposes.
145
+ *
146
+ * @returns The bounding box that encompasses a portion of the ray
147
+ *
148
+ * @example
149
+ * ```typescript
150
+ * const extents = ray.geometricExtents;
151
+ * console.log(`Ray bounds: ${extents.minPoint} to ${extents.maxPoint}`);
152
+ * ```
72
153
  */
73
154
  get: function () {
74
155
  var extents = new AcGeBox3d();
@@ -80,7 +161,18 @@ var AcDbRay = /** @class */ (function (_super) {
80
161
  configurable: true
81
162
  });
82
163
  /**
83
- * @inheritdoc
164
+ * Gets the grip points for this ray.
165
+ *
166
+ * Grip points are control points that can be used to modify the ray.
167
+ * For a ray, the grip point is the base point.
168
+ *
169
+ * @returns Array of grip points (base point)
170
+ *
171
+ * @example
172
+ * ```typescript
173
+ * const gripPoints = ray.subGetGripPoints();
174
+ * // gripPoints contains: [basePoint]
175
+ * ```
84
176
  */
85
177
  AcDbRay.prototype.subGetGripPoints = function () {
86
178
  var gripPoints = new Array();
@@ -88,7 +180,19 @@ var AcDbRay = /** @class */ (function (_super) {
88
180
  return gripPoints;
89
181
  };
90
182
  /**
91
- * @inheritdoc
183
+ * Draws this ray using the specified renderer.
184
+ *
185
+ * This method renders the ray as a line segment extending from the base point
186
+ * in the direction of the unit vector. For practical purposes, the ray is
187
+ * drawn with a finite length.
188
+ *
189
+ * @param renderer - The renderer to use for drawing
190
+ * @returns The rendered ray entity, or undefined if drawing failed
191
+ *
192
+ * @example
193
+ * ```typescript
194
+ * const renderedRay = ray.draw(renderer);
195
+ * ```
92
196
  */
93
197
  AcDbRay.prototype.draw = function (renderer) {
94
198
  var points = [];
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbRay.js","sourceRoot":"","sources":["../../src/entity/AcDbRay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,YAAY,EACb,MAAM,4BAA4B,CAAA;AAGnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;GAGG;AACH;IAA6B,2BAAS;IAIpC;;OAEG;IACH;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,UAAU,GAAG,IAAI,WAAW,EAAE,CAAA;QACnC,KAAI,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAA;;IACpC,CAAC;IAKD,sBAAI,8BAAS;QAHb;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,UAAU,CAAA;QACxB,CA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H;YACE,IAAM,OAAO,GAAG,IAAI,SAAS,EAAE,CAAA;YAC/B,OAAO,CAAC,aAAa,CACnB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAC9D,CAAA;YACD,OAAO,CAAC,aAAa,CACnB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAC/D,CAAA;YACD,OAAO,OAAO,CAAA;QAChB,CAAC;;;OAAA;IAED;;;;;;;;;;;;;OAaG;IACH,kCAAgB,GAAhB;QACE,IAAM,UAAU,GAAG,IAAI,KAAK,EAAe,CAAA;QAC3C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC/B,OAAO,UAAU,CAAA;IACnB,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,sBAAI,GAAJ,UAAK,QAAsB;QACzB,IAAM,MAAM,GAAkB,EAAE,CAAA;QAChC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC3B,MAAM,CAAC,IAAI,CACT,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CACnE,CAAA;QACD,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IAC/C,CAAC;IACH,cAAC;AAAD,CAAC,AAvKD,CAA6B,SAAS,GAuKrC"}
@@ -2,37 +2,129 @@ import { AcGeKnotParameterizationType, AcGePoint3dLike } from '@mlightcad/geomet
2
2
  import { AcGiRenderer } from '@mlightcad/graphic-interface';
3
3
  import { AcDbCurve } from './AcDbCurve';
4
4
  /**
5
- * The class represents the spline entity in AutoCAD.
5
+ * Represents a spline entity in AutoCAD.
6
+ *
7
+ * A spline is a 3D geometric object defined by control points or fit points.
8
+ * Splines are smooth curves that can be used to create complex curved shapes
9
+ * in drawings. They can be either open or closed curves.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * // Create a spline from control points
14
+ * const controlPoints = [
15
+ * new AcGePoint3d(0, 0, 0),
16
+ * new AcGePoint3d(5, 5, 0),
17
+ * new AcGePoint3d(10, 0, 0)
18
+ * ];
19
+ * const knots = [0, 0, 0, 1, 1, 1];
20
+ * const spline = new AcDbSpline(controlPoints, knots);
21
+ *
22
+ * // Create a spline from fit points
23
+ * const fitPoints = [
24
+ * new AcGePoint3d(0, 0, 0),
25
+ * new AcGePoint3d(5, 5, 0),
26
+ * new AcGePoint3d(10, 0, 0)
27
+ * ];
28
+ * const spline2 = new AcDbSpline(fitPoints, AcGeKnotParameterizationType.Uniform);
29
+ * ```
6
30
  */
7
31
  export declare class AcDbSpline extends AcDbCurve {
32
+ /** The underlying geometric spline object */
8
33
  private _geo;
9
34
  /**
10
- * Construct an instance of the spline entity.
11
- * @param controlPoints Input an array of control points (in WCS coordinates) of the spline
12
- * @param knots Input an array of numbers that specifies the knot values of the spline
13
- * @param weights Input an array of doubles that specifies the weights at each control point.
14
- * Default weight of 1 if weights are not provided
15
- * @param closed Whether the spline should be closed. Default is false
35
+ * Creates a new spline entity from control points.
36
+ *
37
+ * This constructor creates a spline using the specified control points, knots,
38
+ * and optional weights. The control points must be in World Coordinate System (WCS) coordinates.
39
+ *
40
+ * @param controlPoints - Array of control points in WCS coordinates
41
+ * @param knots - Array of knot values that define the spline's parameterization
42
+ * @param weights - Optional array of weights for each control point (default: 1 for all)
43
+ * @param closed - Whether the spline should be closed (default: false)
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * const controlPoints = [
48
+ * new AcGePoint3d(0, 0, 0),
49
+ * new AcGePoint3d(5, 5, 0),
50
+ * new AcGePoint3d(10, 0, 0)
51
+ * ];
52
+ * const knots = [0, 0, 0, 1, 1, 1];
53
+ * const spline = new AcDbSpline(controlPoints, knots);
54
+ * ```
16
55
  */
17
56
  constructor(controlPoints: AcGePoint3dLike[], knots: number[], weights?: number[], closed?: boolean);
18
57
  /**
19
- * Construct an instance of the spline entity.
20
- * @param fitPoints Input an array of points (in WCS coordinates) through which to fit the curve
21
- * @param knotParam Input knot parameterization which define the knot values
22
- * @param closed Whether the spline should be closed. Default is false
58
+ * Creates a new spline entity from fit points.
59
+ *
60
+ * This constructor creates a spline that passes through the specified fit points.
61
+ * The fit points must be in World Coordinate System (WCS) coordinates.
62
+ *
63
+ * @param fitPoints - Array of fit points in WCS coordinates
64
+ * @param knotParam - Knot parameterization type that defines how knots are generated
65
+ * @param closed - Whether the spline should be closed (default: false)
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * const fitPoints = [
70
+ * new AcGePoint3d(0, 0, 0),
71
+ * new AcGePoint3d(5, 5, 0),
72
+ * new AcGePoint3d(10, 0, 0)
73
+ * ];
74
+ * const spline = new AcDbSpline(fitPoints, AcGeKnotParameterizationType.Uniform);
75
+ * ```
23
76
  */
24
77
  constructor(fitPoints: AcGePoint3dLike[], knotParam: AcGeKnotParameterizationType, closed?: boolean);
25
78
  /**
26
- * @inheritdoc
79
+ * Gets the geometric extents (bounding box) of this spline.
80
+ *
81
+ * @returns The bounding box that encompasses the entire spline
82
+ *
83
+ * @example
84
+ * ```typescript
85
+ * const extents = spline.geometricExtents;
86
+ * console.log(`Spline bounds: ${extents.minPoint} to ${extents.maxPoint}`);
87
+ * ```
27
88
  */
28
89
  get geometricExtents(): import("@mlightcad/geometry-engine").AcGeBox3d;
29
90
  /**
30
- * @inheritdoc
91
+ * Gets whether this spline is closed.
92
+ *
93
+ * A closed spline forms a complete loop where the end point connects to the start point.
94
+ *
95
+ * @returns True if the spline is closed, false otherwise
96
+ *
97
+ * @example
98
+ * ```typescript
99
+ * const isClosed = spline.closed;
100
+ * console.log(`Spline is closed: ${isClosed}`);
101
+ * ```
31
102
  */
32
103
  get closed(): boolean;
104
+ /**
105
+ * Sets whether this spline is closed.
106
+ *
107
+ * @param value - True to close the spline, false to open it
108
+ *
109
+ * @example
110
+ * ```typescript
111
+ * spline.closed = true; // Close the spline
112
+ * ```
113
+ */
33
114
  set closed(value: boolean);
34
115
  /**
35
- * @inheritdoc
116
+ * Draws this spline using the specified renderer.
117
+ *
118
+ * This method renders the spline as a series of connected line segments
119
+ * using the spline's current style properties.
120
+ *
121
+ * @param renderer - The renderer to use for drawing
122
+ * @returns The rendered spline entity, or undefined if drawing failed
123
+ *
124
+ * @example
125
+ * ```typescript
126
+ * const renderedSpline = spline.draw(renderer);
127
+ * ```
36
128
  */
37
129
  draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
38
130
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbSpline.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbSpline.ts"],"names":[],"mappings":"AACA,OAAO,EACL,4BAA4B,EAC5B,eAAe,EAEhB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;GAEG;AACH,qBAAa,UAAW,SAAQ,SAAS;IACvC,OAAO,CAAC,IAAI,CAAc;IAE1B;;;;;;;OAOG;gBAED,aAAa,EAAE,eAAe,EAAE,EAChC,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,MAAM,CAAC,EAAE,OAAO;IAElB;;;;;OAKG;gBAED,SAAS,EAAE,eAAe,EAAE,EAC5B,SAAS,EAAE,4BAA4B,EACvC,MAAM,CAAC,EAAE,OAAO;IAiClB;;OAEG;IACH,IAAI,gBAAgB,mDAEnB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,EAExB;IAED;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAI5B"}
1
+ {"version":3,"file":"AcDbSpline.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbSpline.ts"],"names":[],"mappings":"AACA,OAAO,EACL,4BAA4B,EAC5B,eAAe,EAEhB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,UAAW,SAAQ,SAAS;IACvC,6CAA6C;IAC7C,OAAO,CAAC,IAAI,CAAc;IAE1B;;;;;;;;;;;;;;;;;;;;;OAqBG;gBAED,aAAa,EAAE,eAAe,EAAE,EAChC,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,MAAM,CAAC,EAAE,OAAO;IAElB;;;;;;;;;;;;;;;;;;;OAmBG;gBAED,SAAS,EAAE,eAAe,EAAE,EAC5B,SAAS,EAAE,4BAA4B,EACvC,MAAM,CAAC,EAAE,OAAO;IAiClB;;;;;;;;;;OAUG;IACH,IAAI,gBAAgB,mDAEnB;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED;;;;;;;;;OASG;IACH,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,EAExB;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAI5B"}
@@ -17,7 +17,31 @@ import { AcCmErrors } from '@mlightcad/common';
17
17
  import { AcGeSpline3d } from '@mlightcad/geometry-engine';
18
18
  import { AcDbCurve } from './AcDbCurve';
19
19
  /**
20
- * The class represents the spline entity in AutoCAD.
20
+ * Represents a spline entity in AutoCAD.
21
+ *
22
+ * A spline is a 3D geometric object defined by control points or fit points.
23
+ * Splines are smooth curves that can be used to create complex curved shapes
24
+ * in drawings. They can be either open or closed curves.
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * // Create a spline from control points
29
+ * const controlPoints = [
30
+ * new AcGePoint3d(0, 0, 0),
31
+ * new AcGePoint3d(5, 5, 0),
32
+ * new AcGePoint3d(10, 0, 0)
33
+ * ];
34
+ * const knots = [0, 0, 0, 1, 1, 1];
35
+ * const spline = new AcDbSpline(controlPoints, knots);
36
+ *
37
+ * // Create a spline from fit points
38
+ * const fitPoints = [
39
+ * new AcGePoint3d(0, 0, 0),
40
+ * new AcGePoint3d(5, 5, 0),
41
+ * new AcGePoint3d(10, 0, 0)
42
+ * ];
43
+ * const spline2 = new AcDbSpline(fitPoints, AcGeKnotParameterizationType.Uniform);
44
+ * ```
21
45
  */
22
46
  var AcDbSpline = /** @class */ (function (_super) {
23
47
  __extends(AcDbSpline, _super);
@@ -42,7 +66,15 @@ var AcDbSpline = /** @class */ (function (_super) {
42
66
  }
43
67
  Object.defineProperty(AcDbSpline.prototype, "geometricExtents", {
44
68
  /**
45
- * @inheritdoc
69
+ * Gets the geometric extents (bounding box) of this spline.
70
+ *
71
+ * @returns The bounding box that encompasses the entire spline
72
+ *
73
+ * @example
74
+ * ```typescript
75
+ * const extents = spline.geometricExtents;
76
+ * console.log(`Spline bounds: ${extents.minPoint} to ${extents.maxPoint}`);
77
+ * ```
46
78
  */
47
79
  get: function () {
48
80
  return this._geo.box;
@@ -52,11 +84,31 @@ var AcDbSpline = /** @class */ (function (_super) {
52
84
  });
53
85
  Object.defineProperty(AcDbSpline.prototype, "closed", {
54
86
  /**
55
- * @inheritdoc
87
+ * Gets whether this spline is closed.
88
+ *
89
+ * A closed spline forms a complete loop where the end point connects to the start point.
90
+ *
91
+ * @returns True if the spline is closed, false otherwise
92
+ *
93
+ * @example
94
+ * ```typescript
95
+ * const isClosed = spline.closed;
96
+ * console.log(`Spline is closed: ${isClosed}`);
97
+ * ```
56
98
  */
57
99
  get: function () {
58
100
  return this._geo.closed;
59
101
  },
102
+ /**
103
+ * Sets whether this spline is closed.
104
+ *
105
+ * @param value - True to close the spline, false to open it
106
+ *
107
+ * @example
108
+ * ```typescript
109
+ * spline.closed = true; // Close the spline
110
+ * ```
111
+ */
60
112
  set: function (value) {
61
113
  this._geo.closed = value;
62
114
  },
@@ -64,7 +116,18 @@ var AcDbSpline = /** @class */ (function (_super) {
64
116
  configurable: true
65
117
  });
66
118
  /**
67
- * @inheritdoc
119
+ * Draws this spline using the specified renderer.
120
+ *
121
+ * This method renders the spline as a series of connected line segments
122
+ * using the spline's current style properties.
123
+ *
124
+ * @param renderer - The renderer to use for drawing
125
+ * @returns The rendered spline entity, or undefined if drawing failed
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * const renderedSpline = spline.draw(renderer);
130
+ * ```
68
131
  */
69
132
  AcDbSpline.prototype.draw = function (renderer) {
70
133
  var points = this._geo.getPoints(100);
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbSpline.js","sourceRoot":"","sources":["../../src/entity/AcDbSpline.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAGL,YAAY,EACb,MAAM,4BAA4B,CAAA;AAGnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;GAEG;AACH;IAAgC,8BAAS;IA4BvC,oBAAY,CAAW,EAAE,CAAW,EAAE,CAAW,EAAE,CAAW;QAC5D,YAAA,MAAK,WAAE,SAAA;QACP,IAAM,UAAU,GACd,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;YAClB,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;YAClB,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;YAClB,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAA;QAEpB,IAAI,UAAU,GAAG,CAAC,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;YACrC,MAAM,UAAU,CAAC,kBAAkB,CAAA;QACrC,CAAC;QAED,2FAA2F;QAC3F,IAAM,sBAAsB,GA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