@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
@@ -1,36 +1,68 @@
1
1
  import { AcGeBox3d } from '@mlightcad/geometry-engine';
2
2
  import { AcGiEntity, AcGiMTextAttachmentPoint, AcGiRenderer } from '@mlightcad/graphic-interface';
3
3
  import { AcDbBlockReference } from './AcDbBlockReference';
4
+ /**
5
+ * Interface defining the properties of a table cell within an AcDbTable entity.
6
+ *
7
+ * Table cells can contain various types of content including text, blocks, and other
8
+ * entities. Each cell has properties that control its appearance, content, and behavior.
9
+ */
4
10
  export interface AcDbTableCell {
11
+ /** The text content displayed in the cell */
5
12
  text: string;
13
+ /** The attachment point for text positioning within the cell */
6
14
  attachmentPoint: AcGiMTextAttachmentPoint;
15
+ /** Optional text style name for the cell content */
7
16
  textStyle?: string;
17
+ /** Optional rotation angle for the cell content in radians */
8
18
  rotation?: number;
19
+ /** The type of cell (text, block, etc.) */
9
20
  cellType: number;
21
+ /** Optional flag value for cell behavior */
10
22
  flagValue?: number;
23
+ /** Optional value indicating merged cell information */
11
24
  mergedValue?: number;
25
+ /** Optional auto-fit behavior setting */
12
26
  autoFit?: number;
27
+ /** Optional border width for merged cells */
13
28
  borderWidth?: number;
29
+ /** Optional border height for merged cells */
14
30
  borderHeight?: number;
31
+ /** Optional override flag for cell properties */
15
32
  overrideFlag?: number;
33
+ /** Optional virtual edge flag for cell borders */
16
34
  virtualEdgeFlag?: number;
35
+ /** Optional field object ID for text type cells */
17
36
  fieldObjetId?: string;
37
+ /** Optional block table record ID for block type cells */
18
38
  blockTableRecordId?: string;
39
+ /** Optional scale factor for block type cells */
19
40
  blockScale?: number;
41
+ /** Optional number of block attributes */
20
42
  blockAttrNum?: number;
43
+ /** Optional array of attribute definition IDs */
21
44
  attrDefineId?: string[];
45
+ /** Optional attribute text content */
22
46
  attrText?: string;
47
+ /** The height of text in the cell */
23
48
  textHeight: number;
49
+ /** Extended cell flags from AutoCAD 2007 and later */
24
50
  extendedCellFlags?: number;
25
51
  }
26
52
  /**
27
- * The class represents the table entity in AutoCAD. A table is generally thought of as an n x m rectangular
28
- * array of cells whose contents consist of annotation objects, primarily text. Tables often contain a title
29
- * row, a header row, and multiple data rows.
53
+ * Represents a table entity in AutoCAD.
54
+ *
55
+ * A table is generally thought of as an n x m rectangular array of cells whose contents
56
+ * consist of annotation objects, primarily text. Tables often contain a title row, a
57
+ * header row, and multiple data rows.
30
58
  *
31
- * After creating a new table object using the constructor, applications usually need to set the table style,
32
- * number of rows and columns, column width, row height, insert position, width direction, and normal vector.
33
- * Applications can also enter text or block contents into each cell using methods of this class.
59
+ * After creating a new table object using the constructor, applications usually need to
60
+ * set the table style, number of rows and columns, column width, row height, insert
61
+ * position, width direction, and normal vector. Applications can also enter text or
62
+ * block contents into each cell using methods of this class.
63
+ *
64
+ * Tables are commonly used for bills of materials, schedules, data sheets, and other
65
+ * tabular information in technical drawings and documentation.
34
66
  */
35
67
  export declare class AcDbTable extends AcDbBlockReference {
36
68
  private _attachmentPoint;
@@ -39,103 +71,188 @@ export declare class AcDbTable extends AcDbBlockReference {
39
71
  private _rowHeight;
40
72
  private _columnWidth;
41
73
  private _cells;
74
+ /**
75
+ * Creates a new table entity.
76
+ *
77
+ * @param name - The name of the table block reference
78
+ * @param numRows - The number of rows in the table
79
+ * @param numColumns - The number of columns in the table
80
+ */
42
81
  constructor(name: string, numRows: number, numColumns: number);
43
82
  /**
44
- * Cell alignment value of this table.
83
+ * Gets or sets the cell alignment value for this table.
84
+ *
85
+ * This property controls how text is positioned within table cells by default.
86
+ * Individual cells can override this setting with their own attachment point.
87
+ *
88
+ * @returns The default attachment point for table cells
45
89
  */
46
90
  get attachmentPoint(): AcGiMTextAttachmentPoint;
47
91
  set attachmentPoint(value: AcGiMTextAttachmentPoint);
48
92
  /**
49
- * The number of rows in the table.
93
+ * Gets or sets the number of rows in the table.
94
+ *
95
+ * Changing this value will resize the table and may affect existing cell data.
96
+ *
97
+ * @returns The current number of rows in the table
50
98
  */
51
99
  get numRows(): number;
52
100
  set numRows(value: number);
53
101
  /**
54
- * The number of columns in the table.
102
+ * Gets or sets the number of columns in the table.
103
+ *
104
+ * Changing this value will resize the table and may affect existing cell data.
105
+ *
106
+ * @returns The current number of columns in the table
55
107
  */
56
108
  get numColumns(): number;
57
109
  set numColumns(value: number);
58
110
  /**
59
- * Get the number of contents in the specified cell.
60
- * @param row Input row index. It should be more than or equal to 0 and less than the number of rows.
61
- * @param col Input column index. It should be more than or equal to 0 and less than the number of columns.
62
- * @returns Return the number of contents in the specified cell.
111
+ * Gets the number of contents in the specified cell.
112
+ *
113
+ * @param row - Row index. Must be greater than or equal to 0 and less than the number of rows
114
+ * @param col - Column index. Must be greater than or equal to 0 and less than the number of columns
115
+ * @returns The number of contents in the specified cell
63
116
  */
64
117
  numContents(row: number, col: number): number;
65
118
  /**
66
- * Get the row height of the specified row in the table.
67
- * @param index Input zero-based row index
68
- * @returns Return the row height of the specified row in the table.
119
+ * Gets the row height of the specified row in the table.
120
+ *
121
+ * @param index - Zero-based row index
122
+ * @returns The row height of the specified row in the table
69
123
  */
70
124
  rowHeight(index: number): number;
71
125
  /**
72
- * Set the row height for the specified row index in the table.
73
- * @param index Input zero-based row index
74
- * @param height Input height to be used for the specified row
126
+ * Sets the row height for the specified row index in the table.
127
+ *
128
+ * @param index - Zero-based row index
129
+ * @param height - Height to be used for the specified row
75
130
  */
76
131
  setRowHeight(index: number, height: number): void;
77
132
  /**
78
- * Set a uniform row height for all the rows in the table.
79
- * @param height Input height to be used for all the rows in the table
133
+ * Sets a uniform row height for all the rows in the table.
134
+ *
135
+ * @param height - Height to be used for all the rows in the table
80
136
  */
81
137
  setUniformRowHeight(height: number): void;
82
138
  /**
83
- * Get the column width at the specified column index in the table.
139
+ * Gets the column width at the specified column index in the table.
140
+ *
141
+ * @param index - Zero-based column index
142
+ * @returns The width of the specified column
84
143
  */
85
144
  columnWidth(index: number): number;
86
145
  /**
87
- * Set a uniform column width for all the columns in the table.
88
- * @param width Input uniform width to be used for all the columns in the table
146
+ * Sets a uniform column width for all the columns in the table.
147
+ *
148
+ * @param width - Uniform width to be used for all the columns in the table
89
149
  */
90
150
  setUniformColumnWidth(width: number): void;
91
151
  /**
92
- * Set the column width at the specified column index in the table.
93
- * @param index Input zero-based column index
94
- * @param width Input width to be used for the specified column
152
+ * Sets the column width at the specified column index in the table.
153
+ *
154
+ * @param index - Zero-based column index
155
+ * @param width - Width to be used for the specified column
95
156
  */
96
157
  setColumnWidth(index: number, width: number): void;
97
158
  /**
98
- * Get the cell by index.
99
- * @param index Input cell index
100
- * @returns Return the specified cell by index
159
+ * Gets the cell at the specified index.
160
+ *
161
+ * @param index - Cell index (calculated as row * numColumns + column)
162
+ * @returns The specified cell by index, or undefined if index is out of range
101
163
  */
102
164
  cell(index: number): AcDbTableCell | undefined;
103
165
  /**
104
- * Set the cell by index.
105
- * @param index Input cell index
166
+ * Sets the cell at the specified index.
167
+ *
168
+ * @param index - Cell index (calculated as row * numColumns + column)
169
+ * @param cell - The cell data to set
106
170
  */
107
171
  setCell(index: number, cell: AcDbTableCell): void;
108
172
  /**
109
- * Get text string in the specified cell.
110
- * @param row Input integer specifying the zero-based row index for the cell
111
- * @param col Input integer specifying the zero-based column index for the cell
112
- * @param content Input content index. It should be more than or equal to 0 and less than the number of contents.
173
+ * Gets the text string in the specified cell.
174
+ *
175
+ * @param row - Integer specifying the zero-based row index for the cell
176
+ * @param col - Integer specifying the zero-based column index for the cell
177
+ * @param content - Content index. Should be greater than or equal to 0 and less than the number of contents
178
+ * @returns The text string in the specified cell
113
179
  */
114
180
  textString(row: number, col: number, content?: number): string;
115
181
  /**
116
- * Set the text for the first content at the specified content index.
117
- * @param row Input integer specifying the zero-based row index for the cell
118
- * @param col Input integer specifying the zero-based column index for the cell
119
- * @param text Input text string
182
+ * Sets the text for the first content at the specified content index.
183
+ *
184
+ * @param row - Integer specifying the zero-based row index for the cell
185
+ * @param col - Integer specifying the zero-based column index for the cell
186
+ * @param text - Text string to set
120
187
  */
121
188
  setTextString(row: number, col: number, text: string): void;
122
189
  /**
123
- * Return true if the content of the specified cell is empty
124
- * @param row Input integer specifying the zero-based row index for the cell
125
- * @param col Input integer specifying the zero-based column index for the cell
126
- * @returns Return true if the content of the specified cell is empty. Otherwise, return false.
190
+ * Checks if the content of the specified cell is empty.
191
+ *
192
+ * @param row - Integer specifying the zero-based row index for the cell
193
+ * @param col - Integer specifying the zero-based column index for the cell
194
+ * @returns True if the content of the specified cell is empty, false otherwise
127
195
  */
128
196
  isEmpty(row: number, col: number): boolean;
129
197
  /**
198
+ * Gets the geometric extents (bounding box) of this table entity.
199
+ *
200
+ * The geometric extents define the minimum bounding box that completely contains
201
+ * the table entity, including all its cells, borders, and content.
202
+ *
203
+ * @returns A 3D bounding box containing the table entity
130
204
  * @inheritdoc
131
205
  */
132
206
  get geometricExtents(): AcGeBox3d;
133
207
  /**
208
+ * Renders the table entity using the specified graphics renderer.
209
+ *
210
+ * This method draws the table structure including borders, cell content, and text.
211
+ * It handles the rendering of individual cells, merged cells, and applies the
212
+ * appropriate transformations and styling.
213
+ *
214
+ * @param renderer - The graphics renderer used to draw the table
215
+ * @returns The rendered graphics entity representing the table
134
216
  * @inheritdoc
135
217
  */
136
218
  draw(renderer: AcGiRenderer): AcGiEntity;
219
+ /**
220
+ * Marks cells as visited to handle merged cell rendering.
221
+ *
222
+ * This method prevents duplicate rendering of merged cells by marking all
223
+ * constituent cells as visited.
224
+ *
225
+ * @param visited - Array tracking which cells have been processed
226
+ * @param currentIndex - Index of the current cell being processed
227
+ * @param columnCount - Total number of columns in the table
228
+ * @param columnSpan - Number of columns this cell spans
229
+ * @param rowSpan - Number of rows this cell spans
230
+ * @private
231
+ */
137
232
  private fillVisited;
233
+ /**
234
+ * Gets the text style for a specific cell.
235
+ *
236
+ * This method retrieves the appropriate text style for the cell, falling back
237
+ * to the standard style if no specific style is specified.
238
+ *
239
+ * @param cell - The cell for which to get the text style
240
+ * @returns The text style configuration for the cell
241
+ * @private
242
+ */
138
243
  private getTextStyle;
244
+ /**
245
+ * Calculates the text offset within a table cell based on attachment point.
246
+ *
247
+ * This method determines the appropriate positioning offset for text within
248
+ * a cell based on the specified attachment point and cell dimensions.
249
+ *
250
+ * @param textAlign - The text alignment/attachment point value
251
+ * @param width - The width of the cell
252
+ * @param height - The height of the cell
253
+ * @returns A vector representing the text offset from the cell corner
254
+ * @private
255
+ */
139
256
  private getTableTextOffset;
140
257
  }
141
258
  //# sourceMappingURL=AcDbTable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbTable.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAIV,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAEL,UAAU,EACV,wBAAwB,EAExB,YAAY,EAEb,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,wBAAwB,CAAA;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAID;;;;;;;;GAQG;AACH,qBAA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AKpC;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM;IAIvB;;;;;OAKG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAI1C;;;;OAIG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM;IAIlC;;;;;OAKG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM;IAIzB;;;;OAIG;IACH,qBAAqB,CAAC,KAAK,EAAE,MAAM;IAInC;;;;;OAKG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAI3C;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM;IAKlB;;;;;OAKG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa;IAI1C;;;;;;;OAOG;IAEH,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;IAIrD;;;;;;OAMG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAIpD;;;;;;OAMG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAIhC;;;;;;;;OAQG;IACH,IAAI,gBAAgB,IAAI,SAAS,CAGhC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY,GAAG,UAAU;IAiHxC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,WAAW;IAkBnB;;;;;;;;;OASG;IACH,OAAO,CAAC,YAAY;IAapB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,kBAAkB;CAwC3B"}
@@ -29,16 +29,29 @@ import { AcGiMTextAttachmentPoint } from '@mlightcad/graphic-interface';
29
29
  import { AcDbBlockReference } from './AcDbBlockReference';
30
30
  var tempVector = /*@__PURE__*/ new AcGeVector3d();
31
31
  /**
32
- * The class represents the table entity in AutoCAD. A table is generally thought of as an n x m rectangular
33
- * array of cells whose contents consist of annotation objects, primarily text. Tables often contain a title
34
- * row, a header row, and multiple data rows.
32
+ * Represents a table entity in AutoCAD.
35
33
  *
36
- * After creating a new table object using the constructor, applications usually need to set the table style,
37
- * number of rows and columns, column width, row height, insert position, width direction, and normal vector.
38
- * Applications can also enter text or block contents into each cell using methods of this class.
34
+ * A table is generally thought of as an n x m rectangular array of cells whose contents
35
+ * consist of annotation objects, primarily text. Tables often contain a title row, a
36
+ * header row, and multiple data rows.
37
+ *
38
+ * After creating a new table object using the constructor, applications usually need to
39
+ * set the table style, number of rows and columns, column width, row height, insert
40
+ * position, width direction, and normal vector. Applications can also enter text or
41
+ * block contents into each cell using methods of this class.
42
+ *
43
+ * Tables are commonly used for bills of materials, schedules, data sheets, and other
44
+ * tabular information in technical drawings and documentation.
39
45
  */
40
46
  var AcDbTable = /** @class */ (function (_super) {
41
47
  __extends(AcDbTable, _super);
48
+ /**
49
+ * Creates a new table entity.
50
+ *
51
+ * @param name - The name of the table block reference
52
+ * @param numRows - The number of rows in the table
53
+ * @param numColumns - The number of columns in the table
54
+ */
42
55
  function AcDbTable(name, numRows, numColumns) {
43
56
  var _this = _super.call(this, name) || this;
44
57
  _this._attachmentPoint = AcGiMTextAttachmentPoint.TopLeft;
@@ -51,7 +64,12 @@ var AcDbTable = /** @class */ (function (_super) {
51
64
  }
52
65
  Object.defineProperty(AcDbTable.prototype, "attachmentPoint", {
53
66
  /**
54
- * Cell alignment value of this table.
67
+ * Gets or sets the cell alignment value for this table.
68
+ *
69
+ * This property controls how text is positioned within table cells by default.
70
+ * Individual cells can override this setting with their own attachment point.
71
+ *
72
+ * @returns The default attachment point for table cells
55
73
  */
56
74
  get: function () {
57
75
  return this._attachmentPoint;
@@ -64,7 +82,11 @@ var AcDbTable = /** @class */ (function (_super) {
64
82
  });
65
83
  Object.defineProperty(AcDbTable.prototype, "numRows", {
66
84
  /**
67
- * The number of rows in the table.
85
+ * Gets or sets the number of rows in the table.
86
+ *
87
+ * Changing this value will resize the table and may affect existing cell data.
88
+ *
89
+ * @returns The current number of rows in the table
68
90
  */
69
91
  get: function () {
70
92
  return this._numRows;
@@ -77,7 +99,11 @@ var AcDbTable = /** @class */ (function (_super) {
77
99
  });
78
100
  Object.defineProperty(AcDbTable.prototype, "numColumns", {
79
101
  /**
80
- * The number of columns in the table.
102
+ * Gets or sets the number of columns in the table.
103
+ *
104
+ * Changing this value will resize the table and may affect existing cell data.
105
+ *
106
+ * @returns The current number of columns in the table
81
107
  */
82
108
  get: function () {
83
109
  return this._numColumns;
@@ -89,10 +115,11 @@ var AcDbTable = /** @class */ (function (_super) {
89
115
  configurable: true
90
116
  });
91
117
  /**
92
- * Get the number of contents in the specified cell.
93
- * @param row Input row index. It should be more than or equal to 0 and less than the number of rows.
94
- * @param col Input column index. It should be more than or equal to 0 and less than the number of columns.
95
- * @returns Return the number of contents in the specified cell.
118
+ * Gets the number of contents in the specified cell.
119
+ *
120
+ * @param row - Row index. Must be greater than or equal to 0 and less than the number of rows
121
+ * @param col - Column index. Must be greater than or equal to 0 and less than the number of columns
122
+ * @returns The number of contents in the specified cell
96
123
  */
97
124
  // @ts-expect-error not use '_' prefix so that typedoc can the correct parameter to generate doc
98
125
  AcDbTable.prototype.numContents = function (row, col) {
@@ -100,53 +127,62 @@ var AcDbTable = /** @class */ (function (_super) {
100
127
  return 1;
101
128
  };
102
129
  /**
103
- * Get the row height of the specified row in the table.
104
- * @param index Input zero-based row index
105
- * @returns Return the row height of the specified row in the table.
130
+ * Gets the row height of the specified row in the table.
131
+ *
132
+ * @param index - Zero-based row index
133
+ * @returns The row height of the specified row in the table
106
134
  */
107
135
  AcDbTable.prototype.rowHeight = function (index) {
108
136
  return this._rowHeight[index];
109
137
  };
110
138
  /**
111
- * Set the row height for the specified row index in the table.
112
- * @param index Input zero-based row index
113
- * @param height Input height to be used for the specified row
139
+ * Sets the row height for the specified row index in the table.
140
+ *
141
+ * @param index - Zero-based row index
142
+ * @param height - Height to be used for the specified row
114
143
  */
115
144
  AcDbTable.prototype.setRowHeight = function (index, height) {
116
145
  this._rowHeight[index] = height;
117
146
  };
118
147
  /**
119
- * Set a uniform row height for all the rows in the table.
120
- * @param height Input height to be used for all the rows in the table
148
+ * Sets a uniform row height for all the rows in the table.
149
+ *
150
+ * @param height - Height to be used for all the rows in the table
121
151
  */
122
152
  AcDbTable.prototype.setUniformRowHeight = function (height) {
123
153
  this._rowHeight.fill(height);
124
154
  };
125
155
  /**
126
- * Get the column width at the specified column index in the table.
156
+ * Gets the column width at the specified column index in the table.
157
+ *
158
+ * @param index - Zero-based column index
159
+ * @returns The width of the specified column
127
160
  */
128
161
  AcDbTable.prototype.columnWidth = function (index) {
129
162
  return this._columnWidth[index];
130
163
  };
131
164
  /**
132
- * Set a uniform column width for all the columns in the table.
133
- * @param width Input uniform width to be used for all the columns in the table
165
+ * Sets a uniform column width for all the columns in the table.
166
+ *
167
+ * @param width - Uniform width to be used for all the columns in the table
134
168
  */
135
169
  AcDbTable.prototype.setUniformColumnWidth = function (width) {
136
170
  this._columnWidth.fill(width);
137
171
  };
138
172
  /**
139
- * Set the column width at the specified column index in the table.
140
- * @param index Input zero-based column index
141
- * @param width Input width to be used for the specified column
173
+ * Sets the column width at the specified column index in the table.
174
+ *
175
+ * @param index - Zero-based column index
176
+ * @param width - Width to be used for the specified column
142
177
  */
143
178
  AcDbTable.prototype.setColumnWidth = function (index, width) {
144
179
  this._columnWidth[index] = width;
145
180
  };
146
181
  /**
147
- * Get the cell by index.
148
- * @param index Input cell index
149
- * @returns Return the specified cell by index
182
+ * Gets the cell at the specified index.
183
+ *
184
+ * @param index - Cell index (calculated as row * numColumns + column)
185
+ * @returns The specified cell by index, or undefined if index is out of range
150
186
  */
151
187
  AcDbTable.prototype.cell = function (index) {
152
188
  if (index < 0 || index >= this._cells.length)
@@ -154,42 +190,54 @@ var AcDbTable = /** @class */ (function (_super) {
154
190
  return this._cells[index];
155
191
  };
156
192
  /**
157
- * Set the cell by index.
158
- * @param index Input cell index
193
+ * Sets the cell at the specified index.
194
+ *
195
+ * @param index - Cell index (calculated as row * numColumns + column)
196
+ * @param cell - The cell data to set
159
197
  */
160
198
  AcDbTable.prototype.setCell = function (index, cell) {
161
199
  this._cells[index] = cell;
162
200
  };
163
201
  /**
164
- * Get text string in the specified cell.
165
- * @param row Input integer specifying the zero-based row index for the cell
166
- * @param col Input integer specifying the zero-based column index for the cell
167
- * @param content Input content index. It should be more than or equal to 0 and less than the number of contents.
202
+ * Gets the text string in the specified cell.
203
+ *
204
+ * @param row - Integer specifying the zero-based row index for the cell
205
+ * @param col - Integer specifying the zero-based column index for the cell
206
+ * @param content - Content index. Should be greater than or equal to 0 and less than the number of contents
207
+ * @returns The text string in the specified cell
168
208
  */
169
209
  // @ts-expect-error not use '_' prefix so that typedoc can the correct parameter to generate doc
170
210
  AcDbTable.prototype.textString = function (row, col, content) {
171
211
  return this._cells[row * col].text;
172
212
  };
173
213
  /**
174
- * Set the text for the first content at the specified content index.
175
- * @param row Input integer specifying the zero-based row index for the cell
176
- * @param col Input integer specifying the zero-based column index for the cell
177
- * @param text Input text string
214
+ * Sets the text for the first content at the specified content index.
215
+ *
216
+ * @param row - Integer specifying the zero-based row index for the cell
217
+ * @param col - Integer specifying the zero-based column index for the cell
218
+ * @param text - Text string to set
178
219
  */
179
220
  AcDbTable.prototype.setTextString = function (row, col, text) {
180
221
  this._cells[row * col].text = text;
181
222
  };
182
223
  /**
183
- * Return true if the content of the specified cell is empty
184
- * @param row Input integer specifying the zero-based row index for the cell
185
- * @param col Input integer specifying the zero-based column index for the cell
186
- * @returns Return true if the content of the specified cell is empty. Otherwise, return false.
224
+ * Checks if the content of the specified cell is empty.
225
+ *
226
+ * @param row - Integer specifying the zero-based row index for the cell
227
+ * @param col - Integer specifying the zero-based column index for the cell
228
+ * @returns True if the content of the specified cell is empty, false otherwise
187
229
  */
188
230
  AcDbTable.prototype.isEmpty = function (row, col) {
189
231
  return !this._cells[row * col].text;
190
232
  };
191
233
  Object.defineProperty(AcDbTable.prototype, "geometricExtents", {
192
234
  /**
235
+ * Gets the geometric extents (bounding box) of this table entity.
236
+ *
237
+ * The geometric extents define the minimum bounding box that completely contains
238
+ * the table entity, including all its cells, borders, and content.
239
+ *
240
+ * @returns A 3D bounding box containing the table entity
193
241
  * @inheritdoc
194
242
  */
195
243
  get: function () {
@@ -200,6 +248,14 @@ var AcDbTable = /** @class */ (function (_super) {
200
248
  configurable: true
201
249
  });
202
250
  /**
251
+ * Renders the table entity using the specified graphics renderer.
252
+ *
253
+ * This method draws the table structure including borders, cell content, and text.
254
+ * It handles the rendering of individual cells, merged cells, and applies the
255
+ * appropriate transformations and styling.
256
+ *
257
+ * @param renderer - The graphics renderer used to draw the table
258
+ * @returns The rendered graphics entity representing the table
203
259
  * @inheritdoc
204
260
  */
205
261
  AcDbTable.prototype.draw = function (renderer) {
@@ -287,6 +343,19 @@ var AcDbTable = /** @class */ (function (_super) {
287
343
  group.applyMatrix(_tmpMatrix);
288
344
  return group;
289
345
  };
346
+ /**
347
+ * Marks cells as visited to handle merged cell rendering.
348
+ *
349
+ * This method prevents duplicate rendering of merged cells by marking all
350
+ * constituent cells as visited.
351
+ *
352
+ * @param visited - Array tracking which cells have been processed
353
+ * @param currentIndex - Index of the current cell being processed
354
+ * @param columnCount - Total number of columns in the table
355
+ * @param columnSpan - Number of columns this cell spans
356
+ * @param rowSpan - Number of rows this cell spans
357
+ * @private
358
+ */
290
359
  AcDbTable.prototype.fillVisited = function (visited, currentIndex, columnCount, columnSpan, rowSpan) {
291
360
  if (rowSpan == 1 && columnSpan == 1) {
292
361
  visited[currentIndex] = true;
@@ -299,6 +368,16 @@ var AcDbTable = /** @class */ (function (_super) {
299
368
  }
300
369
  }
301
370
  };
371
+ /**
372
+ * Gets the text style for a specific cell.
373
+ *
374
+ * This method retrieves the appropriate text style for the cell, falling back
375
+ * to the standard style if no specific style is specified.
376
+ *
377
+ * @param cell - The cell for which to get the text style
378
+ * @returns The text style configuration for the cell
379
+ * @private
380
+ */
302
381
  AcDbTable.prototype.getTextStyle = function (cell) {
303
382
  var textStyleTable = this.database.tables.textStyleTable;
304
383
  var style;
@@ -311,6 +390,18 @@ var AcDbTable = /** @class */ (function (_super) {
311
390
  }
312
391
  return style.textStyle;
313
392
  };
393
+ /**
394
+ * Calculates the text offset within a table cell based on attachment point.
395
+ *
396
+ * This method determines the appropriate positioning offset for text within
397
+ * a cell based on the specified attachment point and cell dimensions.
398
+ *
399
+ * @param textAlign - The text alignment/attachment point value
400
+ * @param width - The width of the cell
401
+ * @param height - The height of the cell
402
+ * @returns A vector representing the text offset from the cell corner
403
+ * @private
404
+ */
314
405
  AcDbTable.prototype.getTableTextOffset = function (textAlign, width, height) {
315
406
  var offset = new AcGeVector3d();
316
407
  switch (textAlign) {