@mlightcad/data-model 1.0.0

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 (301) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +116 -0
  3. package/dist/data-model.js +19887 -0
  4. package/dist/data-model.umd.cjs +5 -0
  5. package/lib/base/AcDbHostApplicationServices.d.ts +30 -0
  6. package/lib/base/AcDbHostApplicationServices.d.ts.map +1 -0
  7. package/lib/base/AcDbHostApplicationServices.js +54 -0
  8. package/lib/base/AcDbHostApplicationServices.js.map +1 -0
  9. package/lib/base/AcDbObject.d.ts +70 -0
  10. package/lib/base/AcDbObject.d.ts.map +1 -0
  11. package/lib/base/AcDbObject.js +113 -0
  12. package/lib/base/AcDbObject.js.map +1 -0
  13. package/lib/base/index.d.ts +3 -0
  14. package/lib/base/index.d.ts.map +1 -0
  15. package/lib/base/index.js +3 -0
  16. package/lib/base/index.js.map +1 -0
  17. package/lib/converter/AcDbBatchProcessing.d.ts +43 -0
  18. package/lib/converter/AcDbBatchProcessing.d.ts.map +1 -0
  19. package/lib/converter/AcDbBatchProcessing.js +165 -0
  20. package/lib/converter/AcDbBatchProcessing.js.map +1 -0
  21. package/lib/converter/AcDbDxfConverter.d.ts +39 -0
  22. package/lib/converter/AcDbDxfConverter.d.ts.map +1 -0
  23. package/lib/converter/AcDbDxfConverter.js +567 -0
  24. package/lib/converter/AcDbDxfConverter.js.map +1 -0
  25. package/lib/converter/AcDbDxfParseWorker.d.ts +2 -0
  26. package/lib/converter/AcDbDxfParseWorker.d.ts.map +1 -0
  27. package/lib/converter/AcDbDxfParseWorker.js +6 -0
  28. package/lib/converter/AcDbDxfParseWorker.js.map +1 -0
  29. package/lib/converter/AcDbEntitiyConverter.d.ts +36 -0
  30. package/lib/converter/AcDbEntitiyConverter.d.ts.map +1 -0
  31. package/lib/converter/AcDbEntitiyConverter.js +491 -0
  32. package/lib/converter/AcDbEntitiyConverter.js.map +1 -0
  33. package/lib/converter/AcDbObjectConverter.d.ts +9 -0
  34. package/lib/converter/AcDbObjectConverter.d.ts.map +1 -0
  35. package/lib/converter/AcDbObjectConverter.js +30 -0
  36. package/lib/converter/AcDbObjectConverter.js.map +1 -0
  37. package/lib/converter/index.d.ts +3 -0
  38. package/lib/converter/index.d.ts.map +1 -0
  39. package/lib/converter/index.js +3 -0
  40. package/lib/converter/index.js.map +1 -0
  41. package/lib/database/AcDbBlockTable.d.ts +15 -0
  42. package/lib/database/AcDbBlockTable.d.ts.map +1 -0
  43. package/lib/database/AcDbBlockTable.js +46 -0
  44. package/lib/database/AcDbBlockTable.js.map +1 -0
  45. package/lib/database/AcDbBlockTableRecord.d.ts +49 -0
  46. package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -0
  47. package/lib/database/AcDbBlockTableRecord.js +108 -0
  48. package/lib/database/AcDbBlockTableRecord.js.map +1 -0
  49. package/lib/database/AcDbDatabase.d.ts +211 -0
  50. package/lib/database/AcDbDatabase.d.ts.map +1 -0
  51. package/lib/database/AcDbDatabase.js +395 -0
  52. package/lib/database/AcDbDatabase.js.map +1 -0
  53. package/lib/database/AcDbDatabaseConverter.d.ts +120 -0
  54. package/lib/database/AcDbDatabaseConverter.d.ts.map +1 -0
  55. package/lib/database/AcDbDatabaseConverter.js +376 -0
  56. package/lib/database/AcDbDatabaseConverter.js.map +1 -0
  57. package/lib/database/AcDbDatabaseConverterManager.d.ts +59 -0
  58. package/lib/database/AcDbDatabaseConverterManager.d.ts.map +1 -0
  59. package/lib/database/AcDbDatabaseConverterManager.js +98 -0
  60. package/lib/database/AcDbDatabaseConverterManager.js.map +1 -0
  61. package/lib/database/AcDbDatabaseConverterRegister.d.ts +54 -0
  62. package/lib/database/AcDbDatabaseConverterRegister.d.ts.map +1 -0
  63. package/lib/database/AcDbDatabaseConverterRegister.js +84 -0
  64. package/lib/database/AcDbDatabaseConverterRegister.js.map +1 -0
  65. package/lib/database/AcDbDimStyleTable.d.ts +11 -0
  66. package/lib/database/AcDbDimStyleTable.d.ts.map +1 -0
  67. package/lib/database/AcDbDimStyleTable.js +29 -0
  68. package/lib/database/AcDbDimStyleTable.js.map +1 -0
  69. package/lib/database/AcDbDimStyleTableRecord.d.ts +682 -0
  70. package/lib/database/AcDbDimStyleTableRecord.d.ts.map +1 -0
  71. package/lib/database/AcDbDimStyleTableRecord.js +1250 -0
  72. package/lib/database/AcDbDimStyleTableRecord.js.map +1 -0
  73. package/lib/database/AcDbLayerTable.d.ts +14 -0
  74. package/lib/database/AcDbLayerTable.d.ts.map +1 -0
  75. package/lib/database/AcDbLayerTable.js +55 -0
  76. package/lib/database/AcDbLayerTable.js.map +1 -0
  77. package/lib/database/AcDbLayerTableRecord.d.ts +98 -0
  78. package/lib/database/AcDbLayerTableRecord.d.ts.map +1 -0
  79. package/lib/database/AcDbLayerTableRecord.js +235 -0
  80. package/lib/database/AcDbLayerTableRecord.js.map +1 -0
  81. package/lib/database/AcDbLinetypeTable.d.ts +11 -0
  82. package/lib/database/AcDbLinetypeTable.d.ts.map +1 -0
  83. package/lib/database/AcDbLinetypeTable.js +29 -0
  84. package/lib/database/AcDbLinetypeTable.js.map +1 -0
  85. package/lib/database/AcDbLinetypeTableRecord.d.ts +47 -0
  86. package/lib/database/AcDbLinetypeTableRecord.d.ts.map +1 -0
  87. package/lib/database/AcDbLinetypeTableRecord.js +97 -0
  88. package/lib/database/AcDbLinetypeTableRecord.js.map +1 -0
  89. package/lib/database/AcDbSymbolTable.d.ts +74 -0
  90. package/lib/database/AcDbSymbolTable.d.ts.map +1 -0
  91. package/lib/database/AcDbSymbolTable.js +136 -0
  92. package/lib/database/AcDbSymbolTable.js.map +1 -0
  93. package/lib/database/AcDbSymbolTableRecord.d.ts +16 -0
  94. package/lib/database/AcDbSymbolTableRecord.d.ts.map +1 -0
  95. package/lib/database/AcDbSymbolTableRecord.js +44 -0
  96. package/lib/database/AcDbSymbolTableRecord.js.map +1 -0
  97. package/lib/database/AcDbTextStyleTable.d.ts +14 -0
  98. package/lib/database/AcDbTextStyleTable.d.ts.map +1 -0
  99. package/lib/database/AcDbTextStyleTable.js +78 -0
  100. package/lib/database/AcDbTextStyleTable.js.map +1 -0
  101. package/lib/database/AcDbTextStyleTableRecord.d.ts +67 -0
  102. package/lib/database/AcDbTextStyleTableRecord.d.ts.map +1 -0
  103. package/lib/database/AcDbTextStyleTableRecord.js +166 -0
  104. package/lib/database/AcDbTextStyleTableRecord.js.map +1 -0
  105. package/lib/database/AcDbViewportTable.d.ts +11 -0
  106. package/lib/database/AcDbViewportTable.d.ts.map +1 -0
  107. package/lib/database/AcDbViewportTable.js +29 -0
  108. package/lib/database/AcDbViewportTable.js.map +1 -0
  109. package/lib/database/AcDbViewportTableRecord.d.ts +89 -0
  110. package/lib/database/AcDbViewportTableRecord.d.ts.map +1 -0
  111. package/lib/database/AcDbViewportTableRecord.js +262 -0
  112. package/lib/database/AcDbViewportTableRecord.js.map +1 -0
  113. package/lib/database/index.d.ts +18 -0
  114. package/lib/database/index.d.ts.map +1 -0
  115. package/lib/database/index.js +18 -0
  116. package/lib/database/index.js.map +1 -0
  117. package/lib/entity/AcDbArc.d.ts +67 -0
  118. package/lib/entity/AcDbArc.d.ts.map +1 -0
  119. package/lib/entity/AcDbArc.js +154 -0
  120. package/lib/entity/AcDbArc.js.map +1 -0
  121. package/lib/entity/AcDbBlockReference.d.ts +54 -0
  122. package/lib/entity/AcDbBlockReference.d.ts.map +1 -0
  123. package/lib/entity/AcDbBlockReference.js +168 -0
  124. package/lib/entity/AcDbBlockReference.js.map +1 -0
  125. package/lib/entity/AcDbCircle.d.ts +51 -0
  126. package/lib/entity/AcDbCircle.d.ts.map +1 -0
  127. package/lib/entity/AcDbCircle.js +115 -0
  128. package/lib/entity/AcDbCircle.js.map +1 -0
  129. package/lib/entity/AcDbCurve.d.ts +9 -0
  130. package/lib/entity/AcDbCurve.d.ts.map +1 -0
  131. package/lib/entity/AcDbCurve.js +25 -0
  132. package/lib/entity/AcDbCurve.js.map +1 -0
  133. package/lib/entity/AcDbEllipse.d.ts +53 -0
  134. package/lib/entity/AcDbEllipse.d.ts.map +1 -0
  135. package/lib/entity/AcDbEllipse.js +119 -0
  136. package/lib/entity/AcDbEllipse.js.map +1 -0
  137. package/lib/entity/AcDbEntity.d.ts +103 -0
  138. package/lib/entity/AcDbEntity.d.ts.map +1 -0
  139. package/lib/entity/AcDbEntity.js +292 -0
  140. package/lib/entity/AcDbEntity.js.map +1 -0
  141. package/lib/entity/AcDbHatch.d.ts +116 -0
  142. package/lib/entity/AcDbHatch.d.ts.map +1 -0
  143. package/lib/entity/AcDbHatch.js +200 -0
  144. package/lib/entity/AcDbHatch.js.map +1 -0
  145. package/lib/entity/AcDbLeader.d.ts +94 -0
  146. package/lib/entity/AcDbLeader.d.ts.map +1 -0
  147. package/lib/entity/AcDbLeader.js +217 -0
  148. package/lib/entity/AcDbLeader.js.map +1 -0
  149. package/lib/entity/AcDbLine.d.ts +55 -0
  150. package/lib/entity/AcDbLine.d.ts.map +1 -0
  151. package/lib/entity/AcDbLine.js +158 -0
  152. package/lib/entity/AcDbLine.js.map +1 -0
  153. package/lib/entity/AcDbMText.d.ts +119 -0
  154. package/lib/entity/AcDbMText.d.ts.map +1 -0
  155. package/lib/entity/AcDbMText.js +300 -0
  156. package/lib/entity/AcDbMText.js.map +1 -0
  157. package/lib/entity/AcDbPoint.d.ts +32 -0
  158. package/lib/entity/AcDbPoint.d.ts.map +1 -0
  159. package/lib/entity/AcDbPoint.js +75 -0
  160. package/lib/entity/AcDbPoint.js.map +1 -0
  161. package/lib/entity/AcDbPolyline.d.ts +72 -0
  162. package/lib/entity/AcDbPolyline.d.ts.map +1 -0
  163. package/lib/entity/AcDbPolyline.js +154 -0
  164. package/lib/entity/AcDbPolyline.js.map +1 -0
  165. package/lib/entity/AcDbRasterImage.d.ts +163 -0
  166. package/lib/entity/AcDbRasterImage.d.ts.map +1 -0
  167. package/lib/entity/AcDbRasterImage.js +406 -0
  168. package/lib/entity/AcDbRasterImage.js.map +1 -0
  169. package/lib/entity/AcDbRay.d.ts +42 -0
  170. package/lib/entity/AcDbRay.d.ts.map +1 -0
  171. package/lib/entity/AcDbRay.js +102 -0
  172. package/lib/entity/AcDbRay.js.map +1 -0
  173. package/lib/entity/AcDbSpline.d.ts +37 -0
  174. package/lib/entity/AcDbSpline.d.ts.map +1 -0
  175. package/lib/entity/AcDbSpline.js +71 -0
  176. package/lib/entity/AcDbSpline.js.map +1 -0
  177. package/lib/entity/AcDbTable.d.ts +141 -0
  178. package/lib/entity/AcDbTable.d.ts.map +1 -0
  179. package/lib/entity/AcDbTable.js +358 -0
  180. package/lib/entity/AcDbTable.js.map +1 -0
  181. package/lib/entity/AcDbText.d.ts +110 -0
  182. package/lib/entity/AcDbText.d.ts.map +1 -0
  183. package/lib/entity/AcDbText.js +255 -0
  184. package/lib/entity/AcDbText.js.map +1 -0
  185. package/lib/entity/AcDbTrace.d.ts +64 -0
  186. package/lib/entity/AcDbTrace.d.ts.map +1 -0
  187. package/lib/entity/AcDbTrace.js +145 -0
  188. package/lib/entity/AcDbTrace.js.map +1 -0
  189. package/lib/entity/AcDbViewport.d.ts +58 -0
  190. package/lib/entity/AcDbViewport.d.ts.map +1 -0
  191. package/lib/entity/AcDbViewport.js +179 -0
  192. package/lib/entity/AcDbViewport.js.map +1 -0
  193. package/lib/entity/AcDbWipeout.d.ts +9 -0
  194. package/lib/entity/AcDbWipeout.d.ts.map +1 -0
  195. package/lib/entity/AcDbWipeout.js +40 -0
  196. package/lib/entity/AcDbWipeout.js.map +1 -0
  197. package/lib/entity/AcDbXline.d.ts +42 -0
  198. package/lib/entity/AcDbXline.d.ts.map +1 -0
  199. package/lib/entity/AcDbXline.js +102 -0
  200. package/lib/entity/AcDbXline.js.map +1 -0
  201. package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +46 -0
  202. package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +1 -0
  203. package/lib/entity/dimension/AcDb3PointAngularDimension.js +111 -0
  204. package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +1 -0
  205. package/lib/entity/dimension/AcDbAlignedDimension.d.ts +77 -0
  206. package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +1 -0
  207. package/lib/entity/dimension/AcDbAlignedDimension.js +203 -0
  208. package/lib/entity/dimension/AcDbAlignedDimension.js.map +1 -0
  209. package/lib/entity/dimension/AcDbArcDimension.d.ts +46 -0
  210. package/lib/entity/dimension/AcDbArcDimension.d.ts.map +1 -0
  211. package/lib/entity/dimension/AcDbArcDimension.js +111 -0
  212. package/lib/entity/dimension/AcDbArcDimension.js.map +1 -0
  213. package/lib/entity/dimension/AcDbDiametricDimension.d.ts +69 -0
  214. package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +1 -0
  215. package/lib/entity/dimension/AcDbDiametricDimension.js +199 -0
  216. package/lib/entity/dimension/AcDbDiametricDimension.js.map +1 -0
  217. package/lib/entity/dimension/AcDbDimension.d.ts +161 -0
  218. package/lib/entity/dimension/AcDbDimension.d.ts.map +1 -0
  219. package/lib/entity/dimension/AcDbDimension.js +375 -0
  220. package/lib/entity/dimension/AcDbDimension.js.map +1 -0
  221. package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +44 -0
  222. package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +1 -0
  223. package/lib/entity/dimension/AcDbOrdinateDimension.js +99 -0
  224. package/lib/entity/dimension/AcDbOrdinateDimension.js.map +1 -0
  225. package/lib/entity/dimension/AcDbRadialDimension.d.ts +69 -0
  226. package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +1 -0
  227. package/lib/entity/dimension/AcDbRadialDimension.js +148 -0
  228. package/lib/entity/dimension/AcDbRadialDimension.js.map +1 -0
  229. package/lib/entity/dimension/index.d.ts +8 -0
  230. package/lib/entity/dimension/index.d.ts.map +1 -0
  231. package/lib/entity/dimension/index.js +8 -0
  232. package/lib/entity/dimension/index.js.map +1 -0
  233. package/lib/entity/index.d.ts +23 -0
  234. package/lib/entity/index.d.ts.map +1 -0
  235. package/lib/entity/index.js +23 -0
  236. package/lib/entity/index.js.map +1 -0
  237. package/lib/index.d.ts +10 -0
  238. package/lib/index.d.ts.map +1 -0
  239. package/lib/index.js +10 -0
  240. package/lib/index.js.map +1 -0
  241. package/lib/misc/AcDbAngleUnits.d.ts +8 -0
  242. package/lib/misc/AcDbAngleUnits.d.ts.map +1 -0
  243. package/lib/misc/AcDbAngleUnits.js +9 -0
  244. package/lib/misc/AcDbAngleUnits.js.map +1 -0
  245. package/lib/misc/AcDbConstants.d.ts +4 -0
  246. package/lib/misc/AcDbConstants.d.ts.map +1 -0
  247. package/lib/misc/AcDbConstants.js +4 -0
  248. package/lib/misc/AcDbConstants.js.map +1 -0
  249. package/lib/misc/AcDbDimArrowType.d.ts +86 -0
  250. package/lib/misc/AcDbDimArrowType.d.ts.map +1 -0
  251. package/lib/misc/AcDbDimArrowType.js +87 -0
  252. package/lib/misc/AcDbDimArrowType.js.map +1 -0
  253. package/lib/misc/AcDbObjectIterator.d.ts +16 -0
  254. package/lib/misc/AcDbObjectIterator.d.ts.map +1 -0
  255. package/lib/misc/AcDbObjectIterator.js +28 -0
  256. package/lib/misc/AcDbObjectIterator.js.map +1 -0
  257. package/lib/misc/AcDbOsnapMode.d.ts +43 -0
  258. package/lib/misc/AcDbOsnapMode.d.ts.map +1 -0
  259. package/lib/misc/AcDbOsnapMode.js +44 -0
  260. package/lib/misc/AcDbOsnapMode.js.map +1 -0
  261. package/lib/misc/AcDbRenderingCache.d.ts +61 -0
  262. package/lib/misc/AcDbRenderingCache.d.ts.map +1 -0
  263. package/lib/misc/AcDbRenderingCache.js +154 -0
  264. package/lib/misc/AcDbRenderingCache.js.map +1 -0
  265. package/lib/misc/AcDbUnitsValue.d.ts +51 -0
  266. package/lib/misc/AcDbUnitsValue.d.ts.map +1 -0
  267. package/lib/misc/AcDbUnitsValue.js +71 -0
  268. package/lib/misc/AcDbUnitsValue.js.map +1 -0
  269. package/lib/misc/index.d.ts +8 -0
  270. package/lib/misc/index.d.ts.map +1 -0
  271. package/lib/misc/index.js +8 -0
  272. package/lib/misc/index.js.map +1 -0
  273. package/lib/object/AcDbDictionary.d.ts +80 -0
  274. package/lib/object/AcDbDictionary.d.ts.map +1 -0
  275. package/lib/object/AcDbDictionary.js +144 -0
  276. package/lib/object/AcDbDictionary.js.map +1 -0
  277. package/lib/object/AcDbRasterImageDef.d.ts +25 -0
  278. package/lib/object/AcDbRasterImageDef.d.ts.map +1 -0
  279. package/lib/object/AcDbRasterImageDef.js +54 -0
  280. package/lib/object/AcDbRasterImageDef.js.map +1 -0
  281. package/lib/object/index.d.ts +4 -0
  282. package/lib/object/index.d.ts.map +1 -0
  283. package/lib/object/index.js +4 -0
  284. package/lib/object/index.js.map +1 -0
  285. package/lib/object/layout/AcDbLayout.d.ts +51 -0
  286. package/lib/object/layout/AcDbLayout.d.ts.map +1 -0
  287. package/lib/object/layout/AcDbLayout.js +120 -0
  288. package/lib/object/layout/AcDbLayout.js.map +1 -0
  289. package/lib/object/layout/AcDbLayoutDictionary.d.ts +19 -0
  290. package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +1 -0
  291. package/lib/object/layout/AcDbLayoutDictionary.js +94 -0
  292. package/lib/object/layout/AcDbLayoutDictionary.js.map +1 -0
  293. package/lib/object/layout/AcDbLayoutManager.d.ts +101 -0
  294. package/lib/object/layout/AcDbLayoutManager.d.ts.map +1 -0
  295. package/lib/object/layout/AcDbLayoutManager.js +154 -0
  296. package/lib/object/layout/AcDbLayoutManager.js.map +1 -0
  297. package/lib/object/layout/index.d.ts +4 -0
  298. package/lib/object/layout/index.d.ts.map +1 -0
  299. package/lib/object/layout/index.js +4 -0
  300. package/lib/object/layout/index.js.map +1 -0
  301. package/package.json +46 -0
@@ -0,0 +1,103 @@
1
+ import { AcCmColor } from '@mlightcad/common';
2
+ import { AcGeBox3d, AcGeMatrix3d, AcGePoint3d } from '@mlightcad/geometry-engine';
3
+ import { AcGiEntity, AcGiLineStyle, AcGiRenderer } from '@mlightcad/graphic-interface';
4
+ import { AcDbObject } from '../base/AcDbObject';
5
+ import { AcDbOsnapMode } from '../misc';
6
+ export declare abstract class AcDbEntity extends AcDbObject {
7
+ private _layer;
8
+ private _color;
9
+ private _lineType;
10
+ private _lineWeight;
11
+ private _linetypeScale;
12
+ private _visibility;
13
+ private _transparency;
14
+ get type(): string;
15
+ /**
16
+ * The name of the layer referenced by this entity
17
+ */
18
+ get layer(): string;
19
+ set layer(value: string);
20
+ /**
21
+ * The color information of this entity
22
+ */
23
+ get color(): AcCmColor;
24
+ set color(value: AcCmColor);
25
+ /**
26
+ * The RGB color of this entity after converting color index (including ByLayer and ByBlock) or name to
27
+ * real RGB color.
28
+ */
29
+ get rgbColor(): number;
30
+ /**
31
+ * The name of the line type referenced by this entity.
32
+ */
33
+ get lineType(): string;
34
+ set lineType(value: string);
35
+ /**
36
+ * Line weight used by this entity.
37
+ */
38
+ get lineWeight(): number;
39
+ set lineWeight(value: number);
40
+ /**
41
+ * The line type scale factor of this entity. When an entity is first instantiated, its line type scale
42
+ * is initialized to an invalid value. When the entity is added to the database, if a linetype scale has
43
+ * not been specified for the entity, it is set to the database's current line type scale value.
44
+ */
45
+ get linetypeScale(): number;
46
+ set linetypeScale(value: number);
47
+ /**
48
+ * The visibility state of this entity
49
+ */
50
+ get visibility(): boolean;
51
+ set visibility(value: boolean);
52
+ /**
53
+ * The transparency setting of this entity.
54
+ */
55
+ get transparency(): number;
56
+ set transparency(value: number);
57
+ /**
58
+ * Calculate grip points of this entity and return them.
59
+ * @returns Return grip points of this entity
60
+ */
61
+ subGetGripPoints(): AcGePoint3d[];
62
+ /**
63
+ * This function must use the material provided in osnapMode, gsSelectionMark, pickPoint, lastPoint, and
64
+ * viewXform to determine all appropriate osnap points for the entity. It must then append all such osnap
65
+ * points to the snapPoints array.
66
+ * @param osnapMode Input osnap mode being requested
67
+ * @param gsSelectionMark Input GS marker of the subentity involved in the object snap operation
68
+ * @param pickPoint Input point (in WCS coordinates) picked during the object snap operation
69
+ * @param lastPoint Input point (in WCS coordinates) selected just before pickPoint
70
+ * @param snapPoints The snapPoints array is passed to all entities involved in the osnap operation, so it's
71
+ * possible that the array will already have entries in it when passed in. For this reason, it's very important
72
+ * that points be appended to the snapPoints array instead of assigning to any existing elements.
73
+ */
74
+ subGetOsnapPoints(osnapMode: AcDbOsnapMode, gsSelectionMark: number, pickPoint: AcGePoint3d, lastPoint: AcGePoint3d, snapPoints: AcGePoint3d[]): void;
75
+ /**
76
+ * Apply a transformation matrix to this entity
77
+ * @param matrix Input one transformation matrix
78
+ * @returns Return this entity
79
+ */
80
+ transformBy(matrix: AcGeMatrix3d): this;
81
+ /**
82
+ * Compute the corner points (in WCS coordinates) of a box (with edges parallel to the WCS X, Y,
83
+ * and Z axes) that encloses the 3D extents of the entity, and return those points as an instance
84
+ * of class AcDbExtents.
85
+ */
86
+ abstract get geometricExtents(): AcGeBox3d;
87
+ /**
88
+ * Convert this entity to an object be able to draw by the specified renderer and return it.
89
+ * @param renderer Input renderer to draw this entity
90
+ * @returns Return object to render in the scene. Different renderers use different classes to
91
+ * represent objects to render. So the type of returned object is completely specific to render
92
+ * engine.
93
+ */
94
+ abstract draw(renderer: AcGiRenderer): AcGiEntity | undefined;
95
+ /**
96
+ * Trigger 'entityModified' event
97
+ */
98
+ triggerModifiedEvent(): void;
99
+ protected get lineStyle(): AcGiLineStyle;
100
+ private getLineType;
101
+ protected getLayerColor(): AcCmColor | null;
102
+ }
103
+ //# sourceMappingURL=AcDbEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbEntity.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EACL,SAAS,EACT,YAAY,EACZ,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACb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M,EAEvB,SAAS,EAAE,WAAW,EAEtB,SAAS,EAAE,WAAW,EAEtB,UAAU,EAAE,WAAW,EAAE;IAG3B;;;;OAIG;IAEH,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAIvC;;;;OAIG;IACH,QAAQ,KAAK,gBAAgB,IAAI,SAAS,CAAA;IAE1C;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,GAAG,UAAU,GAAG,SAAS;IAE7D;;OAEG;IACH,oBAAoB;IAOpB,SAAS,KAAK,SAAS,IAAI,aAAa,CAevC;IAED,OAAO,CAAC,WAAW;IAanB,SAAS,CAAC,aAAa;CAWxB"}
@@ -0,0 +1,292 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ var __read = (this && this.__read) || function (o, n) {
28
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
29
+ if (!m) return o;
30
+ var i = m.call(o), r, ar = [], e;
31
+ try {
32
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
33
+ }
34
+ catch (error) { e = { error: error }; }
35
+ finally {
36
+ try {
37
+ if (r && !r.done && (m = i["return"])) m.call(i);
38
+ }
39
+ finally { if (e) throw e.error; }
40
+ }
41
+ return ar;
42
+ };
43
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
44
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
45
+ if (ar || !(i in from)) {
46
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
47
+ ar[i] = from[i];
48
+ }
49
+ }
50
+ return to.concat(ar || Array.prototype.slice.call(from));
51
+ };
52
+ import { AcCmColor } from '@mlightcad/common';
53
+ import { AcDbObject } from '../base/AcDbObject';
54
+ import { ByBlock, ByLayer, DEFAULT_LINE_TYPE } from '../misc';
55
+ var AcDbEntity = /** @class */ (function (_super) {
56
+ __extends(AcDbEntity, _super);
57
+ function AcDbEntity() {
58
+ var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;
59
+ _this._layer = '0';
60
+ _this._color = new AcCmColor();
61
+ _this._lineType = ByLayer;
62
+ _this._lineWeight = 1;
63
+ _this._linetypeScale = -1;
64
+ _this._visibility = true;
65
+ _this._transparency = 0;
66
+ return _this;
67
+ }
68
+ Object.defineProperty(AcDbEntity.prototype, "type", {
69
+ get: function () {
70
+ return this.constructor.name.substring(4);
71
+ },
72
+ enumerable: false,
73
+ configurable: true
74
+ });
75
+ Object.defineProperty(AcDbEntity.prototype, "layer", {
76
+ /**
77
+ * The name of the layer referenced by this entity
78
+ */
79
+ get: function () {
80
+ return this._layer;
81
+ },
82
+ set: function (value) {
83
+ this._layer = value;
84
+ },
85
+ enumerable: false,
86
+ configurable: true
87
+ });
88
+ Object.defineProperty(AcDbEntity.prototype, "color", {
89
+ /**
90
+ * The color information of this entity
91
+ */
92
+ get: function () {
93
+ return this._color;
94
+ },
95
+ set: function (value) {
96
+ this._color.copy(value);
97
+ },
98
+ enumerable: false,
99
+ configurable: true
100
+ });
101
+ Object.defineProperty(AcDbEntity.prototype, "rgbColor", {
102
+ /**
103
+ * The RGB color of this entity after converting color index (including ByLayer and ByBlock) or name to
104
+ * real RGB color.
105
+ */
106
+ get: function () {
107
+ // Default color
108
+ var color = this.database.cecolor;
109
+ if (this.color.isByLayer) {
110
+ var layerColor = this.getLayerColor();
111
+ if (layerColor && layerColor.color) {
112
+ color = layerColor;
113
+ }
114
+ }
115
+ else if (this.color.isByBlock) {
116
+ // Do nothing for common entity and just use default color in database
117
+ // Block reference entity need to override this method handle 'byBlock'.
118
+ }
119
+ else if (this.color.color != null) {
120
+ color = this.color;
121
+ }
122
+ return color.color == null ? 0xffffff : color.color;
123
+ },
124
+ enumerable: false,
125
+ configurable: true
126
+ });
127
+ Object.defineProperty(AcDbEntity.prototype, "lineType", {
128
+ /**
129
+ * The name of the line type referenced by this entity.
130
+ */
131
+ get: function () {
132
+ return this._lineType;
133
+ },
134
+ set: function (value) {
135
+ this._lineType = value || ByLayer;
136
+ },
137
+ enumerable: false,
138
+ configurable: true
139
+ });
140
+ Object.defineProperty(AcDbEntity.prototype, "lineWeight", {
141
+ /**
142
+ * Line weight used by this entity.
143
+ */
144
+ get: function () {
145
+ return this._lineWeight;
146
+ },
147
+ set: function (value) {
148
+ this._lineWeight = value;
149
+ },
150
+ enumerable: false,
151
+ configurable: true
152
+ });
153
+ Object.defineProperty(AcDbEntity.prototype, "linetypeScale", {
154
+ /**
155
+ * The line type scale factor of this entity. When an entity is first instantiated, its line type scale
156
+ * is initialized to an invalid value. When the entity is added to the database, if a linetype scale has
157
+ * not been specified for the entity, it is set to the database's current line type scale value.
158
+ */
159
+ get: function () {
160
+ return this._linetypeScale;
161
+ },
162
+ set: function (value) {
163
+ this._linetypeScale = value;
164
+ },
165
+ enumerable: false,
166
+ configurable: true
167
+ });
168
+ Object.defineProperty(AcDbEntity.prototype, "visibility", {
169
+ /**
170
+ * The visibility state of this entity
171
+ */
172
+ get: function () {
173
+ return this._visibility;
174
+ },
175
+ set: function (value) {
176
+ this._visibility = value;
177
+ },
178
+ enumerable: false,
179
+ configurable: true
180
+ });
181
+ Object.defineProperty(AcDbEntity.prototype, "transparency", {
182
+ /**
183
+ * The transparency setting of this entity.
184
+ */
185
+ get: function () {
186
+ return this._transparency;
187
+ },
188
+ set: function (value) {
189
+ this._transparency = value;
190
+ },
191
+ enumerable: false,
192
+ configurable: true
193
+ });
194
+ /**
195
+ * Calculate grip points of this entity and return them.
196
+ * @returns Return grip points of this entity
197
+ */
198
+ AcDbEntity.prototype.subGetGripPoints = function () {
199
+ var gripPoints = new Array();
200
+ return gripPoints;
201
+ };
202
+ /**
203
+ * This function must use the material provided in osnapMode, gsSelectionMark, pickPoint, lastPoint, and
204
+ * viewXform to determine all appropriate osnap points for the entity. It must then append all such osnap
205
+ * points to the snapPoints array.
206
+ * @param osnapMode Input osnap mode being requested
207
+ * @param gsSelectionMark Input GS marker of the subentity involved in the object snap operation
208
+ * @param pickPoint Input point (in WCS coordinates) picked during the object snap operation
209
+ * @param lastPoint Input point (in WCS coordinates) selected just before pickPoint
210
+ * @param snapPoints The snapPoints array is passed to all entities involved in the osnap operation, so it's
211
+ * possible that the array will already have entries in it when passed in. For this reason, it's very important
212
+ * that points be appended to the snapPoints array instead of assigning to any existing elements.
213
+ */
214
+ AcDbEntity.prototype.subGetOsnapPoints = function (
215
+ // @ts-expect-error not use '_' prefix so that typedoc can the correct parameter to generate doc
216
+ osnapMode,
217
+ // @ts-expect-error not use '_' prefix so that typedoc can the correct parameter to generate doc
218
+ gsSelectionMark,
219
+ // @ts-expect-error not use '_' prefix so that typedoc can the correct parameter to generate doc
220
+ pickPoint,
221
+ // @ts-expect-error not use '_' prefix so that typedoc can the correct parameter to generate doc
222
+ lastPoint,
223
+ // @ts-expect-error not use '_' prefix so that typedoc can the correct parameter to generate doc
224
+ snapPoints) { };
225
+ /**
226
+ * Apply a transformation matrix to this entity
227
+ * @param matrix Input one transformation matrix
228
+ * @returns Return this entity
229
+ */
230
+ // @ts-expect-error not use '_' prefix so that typedoc can the correct parameter to generate doc
231
+ AcDbEntity.prototype.transformBy = function (matrix) {
232
+ return this;
233
+ };
234
+ /**
235
+ * Trigger 'entityModified' event
236
+ */
237
+ AcDbEntity.prototype.triggerModifiedEvent = function () {
238
+ this.database.events.entityModified.dispatch({
239
+ database: this.database,
240
+ entity: this
241
+ });
242
+ };
243
+ Object.defineProperty(AcDbEntity.prototype, "lineStyle", {
244
+ get: function () {
245
+ var _a;
246
+ var linetypeName = this.getLineType();
247
+ var linetypeRecord = (_a = this.database) === null || _a === void 0 ? void 0 : _a.tables.linetypeTable.getAt(linetypeName);
248
+ if (linetypeRecord) {
249
+ return __assign(__assign({}, linetypeRecord.linetype), { color: this.rgbColor });
250
+ }
251
+ else {
252
+ return {
253
+ name: linetypeName,
254
+ standardFlag: 0,
255
+ color: this.rgbColor,
256
+ description: '',
257
+ totalPatternLength: 0
258
+ };
259
+ }
260
+ },
261
+ enumerable: false,
262
+ configurable: true
263
+ });
264
+ AcDbEntity.prototype.getLineType = function () {
265
+ if (this.lineType == ByLayer) {
266
+ var layer = this.database.tables.layerTable.getAt(this.layer);
267
+ if (layer && layer.linetype)
268
+ return layer.linetype;
269
+ }
270
+ else if (this.lineType == ByBlock) {
271
+ // TODO: Get line type correctly
272
+ return DEFAULT_LINE_TYPE;
273
+ }
274
+ else {
275
+ return this.lineType;
276
+ }
277
+ return DEFAULT_LINE_TYPE;
278
+ };
279
+ AcDbEntity.prototype.getLayerColor = function () {
280
+ var layer = this.database.tables.layerTable.getAt(this.layer);
281
+ if (layer == null) {
282
+ console.error("The layer with name '".concat(this.layer, "' not found in drawing database!"));
283
+ }
284
+ else {
285
+ return layer.color;
286
+ }
287
+ return null;
288
+ };
289
+ return AcDbEntity;
290
+ }(AcDbObject));
291
+ export { AcDbEntity };
292
+ //# sourceMappingURL=AcDbEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbEntity.js","sourceRoot":"","sources":["../../src/entity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,gCAAW,GAAnB;QACE,IAAI,IAAI,CAAC,QAAQ,IAAI,OAAO,EAAE,CAAC;YAC7B,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YAC/D,IAAI,KAAK,IAAI,KAAK,CAAC,QAAQ;gBAAE,OAAO,KAAK,CAAC,QAAQ,CAAA;QACpD,CAAC;aAAM,IAAI,IAAI,CAAC,QAAQ,IAAI,OAAO,EAAE,CAAC;YACpC,gCAAgC;YAChC,OAAO,iBAAiB,CAAA;QAC1B,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,QAAQ,CAAA;QACtB,CAAC;QACD,OAAO,iBAAiB,CAAA;IAC1B,CAAC;IAES,kCAAa,GAAvB;QACE,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC/D,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,OAAO,CAAC,KAAK,CACX,+BAAwB,IAAI,CAAC,KAAK,qCAAkC,CACrE,CAAA;QACH,CAAC;aAAM,CAAC;YACN,OAAO,KAAK,CAAC,KAAK,CAAA;QACpB,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IACH,iBAAC;AAAD,CAAC,AAzND,CAAyC,UAAU,GAyNlD"}
@@ -0,0 +1,116 @@
1
+ import { AcGeBox3d, AcGeLoop2dType } from '@mlightcad/geometry-engine';
2
+ import { AcGiHatchPatternLine, AcGiRenderer } from '@mlightcad/graphic-interface';
3
+ import { AcDbEntity } from './AcDbEntity';
4
+ /**
5
+ * Hatch pattern type
6
+ */
7
+ export declare enum AcDbHatchPatternType {
8
+ /**
9
+ * A user-defined pattern provides a direct method to define a simple hatch pattern using a specified
10
+ * hatch entity linetype. The definition data for user-defined hatch pattern include angle, space and
11
+ * double. "Angle" specifies an angle for the hatch pattern relative to the X axis of the hatch plane
12
+ * in OCS. "Space" defines the vertical distance between two consecutive pattern lines. "Double"
13
+ * specifies that a second set of lines is to be drawn at 90 degrees to the original lines. When
14
+ * specifying a user-defined hatch pattern, you don't need to set the pattern name. AutoCAD designates
15
+ * a default pattern name "U" for all user-defined patterns.
16
+ */
17
+ UserDefined = 0,
18
+ /**
19
+ * A predefined pattern type allows you to select a hatch pattern from the AutoCAD standard hatch
20
+ * pattern file acad.pat in the "support" directory. The file contains many predefined hatch patterns,
21
+ * including ANGLE, ANSI31, BRICK, CLAY, etc. When you use a predefined pattern, you can also specify
22
+ * a scale and angle in order to modify the hatch's appearance. Solid fill is a new predefined pattern
23
+ * type that enables the application to fill in the hatch area with a specified color. The reserved
24
+ * name for this new pattern is "SOLID." SOLID does not appear in the file acad.pat because it has no
25
+ * definition data. To specify a solid, use the keyword "SOLID".
26
+ */
27
+ Predefined = 1,
28
+ /**
29
+ * A custom-defined pattern type stores the pattern in its own PAT file, in which the name of the
30
+ * hatch pattern must match the name of the file. For instance, you must store the TEST hatch pattern
31
+ * in a file named test.pat, and the file must be located in the ACAD search path. When you use a
32
+ * custom-defined pattern, you can also specify a scale and angle in order to modify the hatch's
33
+ * appearance.
34
+ */
35
+ Custom = 2
36
+ }
37
+ /**
38
+ * Hatch style
39
+ */
40
+ export declare enum AcDbHatchStyle {
41
+ /**
42
+ * Normal hatch style will hatch inward from the outer loop. If it encounters an internal intersection,
43
+ * it turns off hatching until it encounters another intersection. Thus, areas separated from the
44
+ * outside of the hatched area by an odd number of intersections are hatched, while areas separated by
45
+ * an even number of intersections are not.
46
+ */
47
+ Normal = 0,
48
+ /**
49
+ * Outer hatch style will hatch inward from the outer loop. It turns off hatching if it encounters an
50
+ * intersection and does not turn it back on. Because this process starts from both ends of each hatch
51
+ * line, only the outmost level of the structure is hatched, and the internal structure is left blank.
52
+ */
53
+ Outer = 1,
54
+ /**
55
+ * Ignore hatch style will hatch inward from the outer loop and ignores all internal loops.
56
+ */
57
+ Ignore = 2
58
+ }
59
+ /**
60
+ * The class represents the hatch entity in AutoCAD.
61
+ */
62
+ export declare class AcDbHatch extends AcDbEntity {
63
+ private _geo;
64
+ private _elevation;
65
+ private _definitionLines;
66
+ private _patternName;
67
+ private _patternType;
68
+ private _patternAngle;
69
+ private _patternScale;
70
+ private _hatchStyle;
71
+ /**
72
+ * Create one empty polyline
73
+ */
74
+ constructor();
75
+ get definitionLines(): AcGiHatchPatternLine[];
76
+ /**
77
+ * The pattern name of this hatch.
78
+ */
79
+ get patternName(): string;
80
+ set patternName(value: string);
81
+ /**
82
+ * The pattern name of this hatch.
83
+ */
84
+ get patternType(): AcDbHatchPatternType;
85
+ set patternType(value: AcDbHatchPatternType);
86
+ /**
87
+ * The pattern angle (in radians) of this hatch.
88
+ */
89
+ get patternAngle(): number;
90
+ set patternAngle(value: number);
91
+ /**
92
+ * The pattern scale of the hatch entity. It is a non-zero positive number.
93
+ */
94
+ get patternScale(): number;
95
+ set patternScale(value: number);
96
+ /**
97
+ * The pattern style of the hatch entity.
98
+ */
99
+ get hatchStyle(): AcDbHatchStyle;
100
+ set hatchStyle(value: AcDbHatchStyle);
101
+ /**
102
+ * Append one loop to loops of this area. If it is the first loop added, it is the outter loop.
103
+ * Otherwise, it is an inner loop.
104
+ * @param loop Input the loop to append
105
+ */
106
+ add(loop: AcGeLoop2dType): void;
107
+ /**
108
+ * @inheritdoc
109
+ */
110
+ get geometricExtents(): AcGeBox3d;
111
+ /**
112
+ * @inheritdoc
113
+ */
114
+ draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
115
+ }
116
+ //# sourceMappingURL=AcDbHatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbHatch.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbHatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,cAAc,EACf,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,oBAAoB,EACpB,YA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