@mlightcad/cad-simple-viewer 1.5.11 → 1.6.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 (487) hide show
  1. package/README.md +23 -8
  2. package/dist/cad-simple-viewer.js +32135 -25300
  3. package/dist/cad-simple-viewer.umd.cjs +136 -24
  4. package/lib/app/AcApDocManager.d.ts +18 -24
  5. package/lib/app/AcApDocManager.d.ts.map +1 -1
  6. package/lib/app/AcApDocManager.js +40 -41
  7. package/lib/app/AcApDocManager.js.map +1 -1
  8. package/lib/app/AcApSettingManager.d.ts +24 -10
  9. package/lib/app/AcApSettingManager.d.ts.map +1 -1
  10. package/lib/app/AcApSettingManager.js +49 -10
  11. package/lib/app/AcApSettingManager.js.map +1 -1
  12. package/lib/app/AcApWebworkerReadiness.d.ts +7 -2
  13. package/lib/app/AcApWebworkerReadiness.d.ts.map +1 -1
  14. package/lib/app/AcApWebworkerReadiness.js +13 -8
  15. package/lib/app/AcApWebworkerReadiness.js.map +1 -1
  16. package/lib/app/AcApWorkerAssets.d.ts +14 -1
  17. package/lib/app/AcApWorkerAssets.d.ts.map +1 -1
  18. package/lib/app/AcApWorkerAssets.js +14 -1
  19. package/lib/app/AcApWorkerAssets.js.map +1 -1
  20. package/lib/app/index.d.ts +0 -1
  21. package/lib/app/index.d.ts.map +1 -1
  22. package/lib/app/index.js +0 -1
  23. package/lib/app/index.js.map +1 -1
  24. package/lib/command/AcApRedoCmd.d.ts +1 -1
  25. package/lib/command/AcApRedoCmd.d.ts.map +1 -1
  26. package/lib/command/AcApRedoCmd.js +9 -4
  27. package/lib/command/AcApRedoCmd.js.map +1 -1
  28. package/lib/command/AcApUndoCmd.d.ts +1 -1
  29. package/lib/command/AcApUndoCmd.d.ts.map +1 -1
  30. package/lib/command/AcApUndoCmd.js +9 -4
  31. package/lib/command/AcApUndoCmd.js.map +1 -1
  32. package/lib/command/draw/AcApRevCloudCmd.d.ts +48 -0
  33. package/lib/command/draw/AcApRevCloudCmd.d.ts.map +1 -0
  34. package/lib/command/draw/AcApRevCloudCmd.js +747 -0
  35. package/lib/command/draw/AcApRevCloudCmd.js.map +1 -0
  36. package/lib/command/draw/AcApRevCloudGeom.d.ts +57 -0
  37. package/lib/command/draw/AcApRevCloudGeom.d.ts.map +1 -0
  38. package/lib/command/draw/AcApRevCloudGeom.js +373 -0
  39. package/lib/command/draw/AcApRevCloudGeom.js.map +1 -0
  40. package/lib/command/draw/AcApSketchCmd.d.ts +59 -0
  41. package/lib/command/draw/AcApSketchCmd.d.ts.map +1 -0
  42. package/lib/command/draw/AcApSketchCmd.js +537 -0
  43. package/lib/command/draw/AcApSketchCmd.js.map +1 -0
  44. package/lib/command/draw/index.d.ts +3 -0
  45. package/lib/command/draw/index.d.ts.map +1 -1
  46. package/lib/command/draw/index.js +3 -0
  47. package/lib/command/draw/index.js.map +1 -1
  48. package/lib/command/index.d.ts +2 -1
  49. package/lib/command/index.d.ts.map +1 -1
  50. package/lib/command/index.js +2 -1
  51. package/lib/command/index.js.map +1 -1
  52. package/lib/command/markup/AcApClearMarkupsCmd.d.ts +10 -0
  53. package/lib/command/markup/AcApClearMarkupsCmd.d.ts.map +1 -0
  54. package/lib/command/{review/AcApRevCircleCmd.js → markup/AcApClearMarkupsCmd.js} +19 -49
  55. package/lib/command/markup/AcApClearMarkupsCmd.js.map +1 -0
  56. package/lib/command/markup/AcApMarkupArrowCmd.d.ts +10 -0
  57. package/lib/command/markup/AcApMarkupArrowCmd.d.ts.map +1 -0
  58. package/lib/command/markup/AcApMarkupArrowCmd.js +164 -0
  59. package/lib/command/markup/AcApMarkupArrowCmd.js.map +1 -0
  60. package/lib/command/markup/AcApMarkupCalloutCmd.d.ts +17 -0
  61. package/lib/command/markup/AcApMarkupCalloutCmd.d.ts.map +1 -0
  62. package/lib/command/markup/AcApMarkupCalloutCmd.js +259 -0
  63. package/lib/command/markup/AcApMarkupCalloutCmd.js.map +1 -0
  64. package/lib/command/markup/AcApMarkupCalloutDrag.d.ts +78 -0
  65. package/lib/command/markup/AcApMarkupCalloutDrag.d.ts.map +1 -0
  66. package/lib/command/markup/AcApMarkupCalloutDrag.js +78 -0
  67. package/lib/command/markup/AcApMarkupCalloutDrag.js.map +1 -0
  68. package/lib/command/markup/AcApMarkupCircleCmd.d.ts +10 -0
  69. package/lib/command/markup/AcApMarkupCircleCmd.d.ts.map +1 -0
  70. package/lib/command/markup/AcApMarkupCircleCmd.js +174 -0
  71. package/lib/command/markup/AcApMarkupCircleCmd.js.map +1 -0
  72. package/lib/command/markup/AcApMarkupCloudCmd.d.ts +11 -0
  73. package/lib/command/markup/AcApMarkupCloudCmd.d.ts.map +1 -0
  74. package/lib/command/markup/AcApMarkupCloudCmd.js +178 -0
  75. package/lib/command/markup/AcApMarkupCloudCmd.js.map +1 -0
  76. package/lib/command/markup/AcApMarkupCmdUtil.d.ts +43 -0
  77. package/lib/command/markup/AcApMarkupCmdUtil.d.ts.map +1 -0
  78. package/lib/command/markup/AcApMarkupCmdUtil.js +133 -0
  79. package/lib/command/markup/AcApMarkupCmdUtil.js.map +1 -0
  80. package/lib/command/markup/AcApMarkupGeometry.d.ts +57 -0
  81. package/lib/command/markup/AcApMarkupGeometry.d.ts.map +1 -0
  82. package/lib/command/markup/AcApMarkupGeometry.js +231 -0
  83. package/lib/command/markup/AcApMarkupGeometry.js.map +1 -0
  84. package/lib/command/markup/AcApMarkupHighlightCmd.d.ts +10 -0
  85. package/lib/command/markup/AcApMarkupHighlightCmd.d.ts.map +1 -0
  86. package/lib/command/markup/AcApMarkupHighlightCmd.js +166 -0
  87. package/lib/command/markup/AcApMarkupHighlightCmd.js.map +1 -0
  88. package/lib/command/markup/AcApMarkupHistory.d.ts +139 -0
  89. package/lib/command/markup/AcApMarkupHistory.d.ts.map +1 -0
  90. package/lib/command/markup/AcApMarkupHistory.js +336 -0
  91. package/lib/command/markup/AcApMarkupHistory.js.map +1 -0
  92. package/lib/command/markup/AcApMarkupImportExportCmd.d.ts +17 -0
  93. package/lib/command/markup/AcApMarkupImportExportCmd.d.ts.map +1 -0
  94. package/lib/command/markup/AcApMarkupImportExportCmd.js +182 -0
  95. package/lib/command/markup/AcApMarkupImportExportCmd.js.map +1 -0
  96. package/lib/command/markup/AcApMarkupLineCmd.d.ts +10 -0
  97. package/lib/command/markup/AcApMarkupLineCmd.d.ts.map +1 -0
  98. package/lib/command/markup/AcApMarkupLineCmd.js +185 -0
  99. package/lib/command/markup/AcApMarkupLineCmd.js.map +1 -0
  100. package/lib/command/markup/AcApMarkupPresenter.d.ts +62 -0
  101. package/lib/command/markup/AcApMarkupPresenter.d.ts.map +1 -0
  102. package/lib/command/markup/AcApMarkupPresenter.js +288 -0
  103. package/lib/command/markup/AcApMarkupPresenter.js.map +1 -0
  104. package/lib/command/markup/AcApMarkupRectCmd.d.ts +10 -0
  105. package/lib/command/markup/AcApMarkupRectCmd.d.ts.map +1 -0
  106. package/lib/command/markup/AcApMarkupRectCmd.js +174 -0
  107. package/lib/command/markup/AcApMarkupRectCmd.js.map +1 -0
  108. package/lib/command/markup/AcApMarkupRepublish.d.ts +29 -0
  109. package/lib/command/markup/AcApMarkupRepublish.d.ts.map +1 -0
  110. package/lib/command/markup/AcApMarkupRepublish.js +28 -0
  111. package/lib/command/markup/AcApMarkupRepublish.js.map +1 -0
  112. package/lib/command/markup/AcApMarkupShapeBuilder.d.ts +88 -0
  113. package/lib/command/markup/AcApMarkupShapeBuilder.d.ts.map +1 -0
  114. package/lib/command/markup/AcApMarkupShapeBuilder.js +246 -0
  115. package/lib/command/markup/AcApMarkupShapeBuilder.js.map +1 -0
  116. package/lib/command/markup/AcApMarkupShapeCallout.d.ts +46 -0
  117. package/lib/command/markup/AcApMarkupShapeCallout.d.ts.map +1 -0
  118. package/lib/command/markup/AcApMarkupShapeCallout.js +356 -0
  119. package/lib/command/markup/AcApMarkupShapeCallout.js.map +1 -0
  120. package/lib/command/markup/AcApMarkupSidecar.d.ts +14 -0
  121. package/lib/command/markup/AcApMarkupSidecar.d.ts.map +1 -0
  122. package/lib/command/markup/AcApMarkupSidecar.js +196 -0
  123. package/lib/command/markup/AcApMarkupSidecar.js.map +1 -0
  124. package/lib/command/markup/AcApMarkupStampCmd.d.ts +10 -0
  125. package/lib/command/markup/AcApMarkupStampCmd.d.ts.map +1 -0
  126. package/lib/command/markup/AcApMarkupStampCmd.js +158 -0
  127. package/lib/command/markup/AcApMarkupStampCmd.js.map +1 -0
  128. package/lib/command/markup/AcApMarkupStore.d.ts +94 -0
  129. package/lib/command/markup/AcApMarkupStore.d.ts.map +1 -0
  130. package/lib/command/markup/AcApMarkupStore.js +327 -0
  131. package/lib/command/markup/AcApMarkupStore.js.map +1 -0
  132. package/lib/command/markup/AcApMarkupTextCmd.d.ts +10 -0
  133. package/lib/command/markup/AcApMarkupTextCmd.d.ts.map +1 -0
  134. package/lib/command/markup/AcApMarkupTextCmd.js +141 -0
  135. package/lib/command/markup/AcApMarkupTextCmd.js.map +1 -0
  136. package/lib/command/markup/AcApMarkupTextEdit.d.ts +88 -0
  137. package/lib/command/markup/AcApMarkupTextEdit.d.ts.map +1 -0
  138. package/lib/command/markup/AcApMarkupTextEdit.js +249 -0
  139. package/lib/command/markup/AcApMarkupTextEdit.js.map +1 -0
  140. package/lib/command/markup/AcApMarkupTypes.d.ts +118 -0
  141. package/lib/command/markup/AcApMarkupTypes.d.ts.map +1 -0
  142. package/lib/command/markup/AcApMarkupTypes.js +8 -0
  143. package/lib/command/markup/AcApMarkupTypes.js.map +1 -0
  144. package/lib/command/markup/AcApMarkupUtil.d.ts +41 -0
  145. package/lib/command/markup/AcApMarkupUtil.d.ts.map +1 -0
  146. package/lib/command/markup/AcApMarkupUtil.js +135 -0
  147. package/lib/command/markup/AcApMarkupUtil.js.map +1 -0
  148. package/lib/command/markup/AcApMarkupVisibilityCmd.d.ts +17 -0
  149. package/lib/command/markup/AcApMarkupVisibilityCmd.d.ts.map +1 -0
  150. package/lib/command/{review/AcApRevVisibilityCmd.js → markup/AcApMarkupVisibilityCmd.js} +30 -27
  151. package/lib/command/markup/AcApMarkupVisibilityCmd.js.map +1 -0
  152. package/lib/command/markup/entity/AcApMarkupCalloutEntity.d.ts +48 -0
  153. package/lib/command/markup/entity/AcApMarkupCalloutEntity.d.ts.map +1 -0
  154. package/lib/command/markup/entity/AcApMarkupCalloutEntity.js +291 -0
  155. package/lib/command/markup/entity/AcApMarkupCalloutEntity.js.map +1 -0
  156. package/lib/command/markup/entity/AcApMarkupEntity.d.ts +131 -0
  157. package/lib/command/markup/entity/AcApMarkupEntity.d.ts.map +1 -0
  158. package/lib/command/markup/entity/AcApMarkupEntity.js +191 -0
  159. package/lib/command/markup/entity/AcApMarkupEntity.js.map +1 -0
  160. package/lib/command/markup/entity/AcApMarkupEntityFactory.d.ts +20 -0
  161. package/lib/command/markup/entity/AcApMarkupEntityFactory.d.ts.map +1 -0
  162. package/lib/command/markup/entity/AcApMarkupEntityFactory.js +43 -0
  163. package/lib/command/markup/entity/AcApMarkupEntityFactory.js.map +1 -0
  164. package/lib/command/markup/entity/AcApMarkupEntityGrips.d.ts +94 -0
  165. package/lib/command/markup/entity/AcApMarkupEntityGrips.d.ts.map +1 -0
  166. package/lib/command/markup/entity/AcApMarkupEntityGrips.js +204 -0
  167. package/lib/command/markup/entity/AcApMarkupEntityGrips.js.map +1 -0
  168. package/lib/command/markup/entity/AcApMarkupHighlightEntity.d.ts +27 -0
  169. package/lib/command/markup/entity/AcApMarkupHighlightEntity.d.ts.map +1 -0
  170. package/lib/command/markup/entity/AcApMarkupHighlightEntity.js +124 -0
  171. package/lib/command/markup/entity/AcApMarkupHighlightEntity.js.map +1 -0
  172. package/lib/command/markup/entity/AcApMarkupSegmentEntity.d.ts +40 -0
  173. package/lib/command/markup/entity/AcApMarkupSegmentEntity.d.ts.map +1 -0
  174. package/lib/command/markup/entity/AcApMarkupSegmentEntity.js +294 -0
  175. package/lib/command/markup/entity/AcApMarkupSegmentEntity.js.map +1 -0
  176. package/lib/command/markup/entity/AcApMarkupShapeEntity.d.ts +32 -0
  177. package/lib/command/markup/entity/AcApMarkupShapeEntity.d.ts.map +1 -0
  178. package/lib/command/markup/entity/AcApMarkupShapeEntity.js +241 -0
  179. package/lib/command/markup/entity/AcApMarkupShapeEntity.js.map +1 -0
  180. package/lib/command/markup/entity/AcApMarkupStampEntity.d.ts +23 -0
  181. package/lib/command/markup/entity/AcApMarkupStampEntity.d.ts.map +1 -0
  182. package/lib/command/markup/entity/AcApMarkupStampEntity.js +125 -0
  183. package/lib/command/markup/entity/AcApMarkupStampEntity.js.map +1 -0
  184. package/lib/command/markup/entity/AcApMarkupTextEntity.d.ts +23 -0
  185. package/lib/command/markup/entity/AcApMarkupTextEntity.d.ts.map +1 -0
  186. package/lib/command/markup/entity/AcApMarkupTextEntity.js +129 -0
  187. package/lib/command/markup/entity/AcApMarkupTextEntity.js.map +1 -0
  188. package/lib/command/markup/entity/index.d.ts +13 -0
  189. package/lib/command/markup/entity/index.d.ts.map +1 -0
  190. package/lib/command/markup/entity/index.js +13 -0
  191. package/lib/command/markup/entity/index.js.map +1 -0
  192. package/lib/command/markup/index.d.ts +27 -0
  193. package/lib/command/markup/index.d.ts.map +1 -0
  194. package/lib/command/markup/index.js +27 -0
  195. package/lib/command/markup/index.js.map +1 -0
  196. package/lib/command/measure/AcApClearMeasurementsCmd.d.ts +5 -12
  197. package/lib/command/measure/AcApClearMeasurementsCmd.d.ts.map +1 -1
  198. package/lib/command/measure/AcApClearMeasurementsCmd.js +42 -20
  199. package/lib/command/measure/AcApClearMeasurementsCmd.js.map +1 -1
  200. package/lib/command/measure/AcApMeasureAngleCmd.d.ts +13 -3
  201. package/lib/command/measure/AcApMeasureAngleCmd.d.ts.map +1 -1
  202. package/lib/command/measure/AcApMeasureAngleCmd.js +76 -210
  203. package/lib/command/measure/AcApMeasureAngleCmd.js.map +1 -1
  204. package/lib/command/measure/AcApMeasureArcCmd.d.ts +21 -1
  205. package/lib/command/measure/AcApMeasureArcCmd.d.ts.map +1 -1
  206. package/lib/command/measure/AcApMeasureArcCmd.js +103 -97
  207. package/lib/command/measure/AcApMeasureArcCmd.js.map +1 -1
  208. package/lib/command/measure/AcApMeasureAreaCmd.d.ts +11 -1
  209. package/lib/command/measure/AcApMeasureAreaCmd.d.ts.map +1 -1
  210. package/lib/command/measure/AcApMeasureAreaCmd.js +126 -144
  211. package/lib/command/measure/AcApMeasureAreaCmd.js.map +1 -1
  212. package/lib/command/measure/AcApMeasureDistanceCmd.d.ts +24 -15
  213. package/lib/command/measure/AcApMeasureDistanceCmd.d.ts.map +1 -1
  214. package/lib/command/measure/AcApMeasureDistanceCmd.js +52 -52
  215. package/lib/command/measure/AcApMeasureDistanceCmd.js.map +1 -1
  216. package/lib/command/measure/AcApMeasurePointCmd.d.ts +24 -0
  217. package/lib/command/measure/AcApMeasurePointCmd.d.ts.map +1 -0
  218. package/lib/command/measure/AcApMeasurePointCmd.js +114 -0
  219. package/lib/command/measure/AcApMeasurePointCmd.js.map +1 -0
  220. package/lib/command/measure/AcApMeasurementGeometry.d.ts +22 -0
  221. package/lib/command/measure/AcApMeasurementGeometry.d.ts.map +1 -0
  222. package/lib/command/measure/AcApMeasurementGeometry.js +127 -0
  223. package/lib/command/measure/AcApMeasurementGeometry.js.map +1 -0
  224. package/lib/command/measure/AcApMeasurementHistory.d.ts +78 -0
  225. package/lib/command/measure/AcApMeasurementHistory.d.ts.map +1 -0
  226. package/lib/command/measure/AcApMeasurementHistory.js +387 -0
  227. package/lib/command/measure/AcApMeasurementHistory.js.map +1 -0
  228. package/lib/command/measure/AcApMeasurementImportExportCmd.d.ts +17 -0
  229. package/lib/command/measure/AcApMeasurementImportExportCmd.d.ts.map +1 -0
  230. package/lib/command/measure/AcApMeasurementImportExportCmd.js +207 -0
  231. package/lib/command/measure/AcApMeasurementImportExportCmd.js.map +1 -0
  232. package/lib/command/measure/AcApMeasurementPlace.d.ts +9 -0
  233. package/lib/command/measure/AcApMeasurementPlace.d.ts.map +1 -0
  234. package/lib/command/measure/AcApMeasurementPlace.js +33 -0
  235. package/lib/command/measure/AcApMeasurementPlace.js.map +1 -0
  236. package/lib/command/measure/AcApMeasurementSidecar.d.ts +19 -0
  237. package/lib/command/measure/AcApMeasurementSidecar.d.ts.map +1 -0
  238. package/lib/command/measure/AcApMeasurementSidecar.js +173 -0
  239. package/lib/command/measure/AcApMeasurementSidecar.js.map +1 -0
  240. package/lib/command/measure/AcApMeasurementStore.d.ts +90 -0
  241. package/lib/command/measure/AcApMeasurementStore.d.ts.map +1 -0
  242. package/lib/command/measure/AcApMeasurementStore.js +364 -0
  243. package/lib/command/measure/AcApMeasurementStore.js.map +1 -0
  244. package/lib/command/measure/AcApMeasurementTypes.d.ts +56 -0
  245. package/lib/command/measure/AcApMeasurementTypes.d.ts.map +1 -0
  246. package/lib/command/measure/AcApMeasurementTypes.js +2 -0
  247. package/lib/command/measure/AcApMeasurementTypes.js.map +1 -0
  248. package/lib/command/measure/AcApMeasurementVisibilityCmd.d.ts +10 -0
  249. package/lib/command/measure/AcApMeasurementVisibilityCmd.d.ts.map +1 -0
  250. package/lib/command/measure/AcApMeasurementVisibilityCmd.js +78 -0
  251. package/lib/command/measure/AcApMeasurementVisibilityCmd.js.map +1 -0
  252. package/lib/command/measure/entity/AcApMeasureAngleEntity.d.ts +68 -0
  253. package/lib/command/measure/entity/AcApMeasureAngleEntity.d.ts.map +1 -0
  254. package/lib/command/measure/entity/AcApMeasureAngleEntity.js +188 -0
  255. package/lib/command/measure/entity/AcApMeasureAngleEntity.js.map +1 -0
  256. package/lib/command/measure/entity/AcApMeasureArcEntity.d.ts +85 -0
  257. package/lib/command/measure/entity/AcApMeasureArcEntity.d.ts.map +1 -0
  258. package/lib/command/measure/entity/AcApMeasureArcEntity.js +159 -0
  259. package/lib/command/measure/entity/AcApMeasureArcEntity.js.map +1 -0
  260. package/lib/command/measure/entity/AcApMeasureAreaEntity.d.ts +60 -0
  261. package/lib/command/measure/entity/AcApMeasureAreaEntity.d.ts.map +1 -0
  262. package/lib/command/measure/entity/AcApMeasureAreaEntity.js +184 -0
  263. package/lib/command/measure/entity/AcApMeasureAreaEntity.js.map +1 -0
  264. package/lib/command/measure/entity/AcApMeasureDistanceEntity.d.ts +60 -0
  265. package/lib/command/measure/entity/AcApMeasureDistanceEntity.d.ts.map +1 -0
  266. package/lib/command/measure/entity/AcApMeasureDistanceEntity.js +166 -0
  267. package/lib/command/measure/entity/AcApMeasureDistanceEntity.js.map +1 -0
  268. package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts +129 -0
  269. package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts.map +1 -0
  270. package/lib/command/measure/entity/AcApMeasureDrawUtil.js +257 -0
  271. package/lib/command/measure/entity/AcApMeasureDrawUtil.js.map +1 -0
  272. package/lib/command/measure/entity/AcApMeasureEntity.d.ts +148 -0
  273. package/lib/command/measure/entity/AcApMeasureEntity.d.ts.map +1 -0
  274. package/lib/command/measure/entity/AcApMeasureEntity.js +141 -0
  275. package/lib/command/measure/entity/AcApMeasureEntity.js.map +1 -0
  276. package/lib/command/measure/entity/AcApMeasureEntityFactory.d.ts +15 -0
  277. package/lib/command/measure/entity/AcApMeasureEntityFactory.d.ts.map +1 -0
  278. package/lib/command/measure/entity/AcApMeasureEntityFactory.js +35 -0
  279. package/lib/command/measure/entity/AcApMeasureEntityFactory.js.map +1 -0
  280. package/lib/command/measure/entity/AcApMeasurePointEntity.d.ts +56 -0
  281. package/lib/command/measure/entity/AcApMeasurePointEntity.d.ts.map +1 -0
  282. package/lib/command/measure/entity/AcApMeasurePointEntity.js +125 -0
  283. package/lib/command/measure/entity/AcApMeasurePointEntity.js.map +1 -0
  284. package/lib/command/measure/entity/index.d.ts +12 -0
  285. package/lib/command/measure/entity/index.d.ts.map +1 -0
  286. package/lib/command/measure/entity/index.js +12 -0
  287. package/lib/command/measure/entity/index.js.map +1 -0
  288. package/lib/command/measure/index.d.ts +10 -0
  289. package/lib/command/measure/index.d.ts.map +1 -1
  290. package/lib/command/measure/index.js +10 -0
  291. package/lib/command/measure/index.js.map +1 -1
  292. package/lib/command/modify/AcApCopyCmd.d.ts +1 -1
  293. package/lib/command/modify/AcApCopyCmd.js +2 -2
  294. package/lib/command/modify/AcApCopyCmd.js.map +1 -1
  295. package/lib/command/modify/AcApMoveCmd.js +1 -1
  296. package/lib/command/modify/AcApMoveCmd.js.map +1 -1
  297. package/lib/command/modify/AcApOffsetCmd.d.ts +1 -1
  298. package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
  299. package/lib/command/modify/AcApOffsetCmd.js +5 -10
  300. package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
  301. package/lib/command/modify/AcApRotateCmd.d.ts +1 -1
  302. package/lib/command/modify/AcApRotateCmd.js +2 -2
  303. package/lib/command/modify/AcApRotateCmd.js.map +1 -1
  304. package/lib/command/overlay/AcApHtmlLivePreview.d.ts +121 -0
  305. package/lib/command/overlay/AcApHtmlLivePreview.d.ts.map +1 -0
  306. package/lib/command/overlay/AcApHtmlLivePreview.js +193 -0
  307. package/lib/command/overlay/AcApHtmlLivePreview.js.map +1 -0
  308. package/lib/command/overlay/AcApOverlayDrawUtil.d.ts +63 -0
  309. package/lib/command/overlay/AcApOverlayDrawUtil.d.ts.map +1 -0
  310. package/lib/command/overlay/AcApOverlayDrawUtil.js +115 -0
  311. package/lib/command/overlay/AcApOverlayDrawUtil.js.map +1 -0
  312. package/lib/command/overlay/AcApOverlayEntity.d.ts +93 -0
  313. package/lib/command/overlay/AcApOverlayEntity.d.ts.map +1 -0
  314. package/lib/command/overlay/AcApOverlayEntity.js +65 -0
  315. package/lib/command/overlay/AcApOverlayEntity.js.map +1 -0
  316. package/lib/command/overlay/AcApOverlayGripHost.d.ts +105 -0
  317. package/lib/command/overlay/AcApOverlayGripHost.d.ts.map +1 -0
  318. package/lib/command/overlay/AcApOverlayGripHost.js +207 -0
  319. package/lib/command/overlay/AcApOverlayGripHost.js.map +1 -0
  320. package/lib/command/overlay/AcApOverlaySerializable.d.ts +20 -0
  321. package/lib/command/overlay/AcApOverlaySerializable.d.ts.map +1 -0
  322. package/lib/command/overlay/AcApOverlaySerializable.js +2 -0
  323. package/lib/command/overlay/AcApOverlaySerializable.js.map +1 -0
  324. package/lib/command/overlay/index.d.ts +13 -0
  325. package/lib/command/overlay/index.d.ts.map +1 -0
  326. package/lib/command/overlay/index.js +13 -0
  327. package/lib/command/overlay/index.js.map +1 -0
  328. package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
  329. package/lib/editor/command/AcEdCommand.js +1 -0
  330. package/lib/editor/command/AcEdCommand.js.map +1 -1
  331. package/lib/editor/global/AcEdUiLayout.d.ts +3 -3
  332. package/lib/editor/global/AcEdUiLayout.d.ts.map +1 -1
  333. package/lib/editor/global/AcEdUiLayout.js +3 -3
  334. package/lib/editor/global/AcEdUiLayout.js.map +1 -1
  335. package/lib/editor/global/AcEdUiTheme.d.ts +1 -1
  336. package/lib/editor/global/AcEdUiTheme.d.ts.map +1 -1
  337. package/lib/editor/global/AcEdUiTheme.js +1 -1
  338. package/lib/editor/global/AcEdUiTheme.js.map +1 -1
  339. package/lib/editor/global/eventBus.d.ts +5 -0
  340. package/lib/editor/global/eventBus.d.ts.map +1 -1
  341. package/lib/editor/global/eventBus.js.map +1 -1
  342. package/lib/editor/input/ui/AcEdMTextEditor.js +3 -3
  343. package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
  344. package/lib/i18n/cs/command.d.ts +60 -0
  345. package/lib/i18n/cs/command.d.ts.map +1 -1
  346. package/lib/i18n/cs/command.js +63 -3
  347. package/lib/i18n/cs/command.js.map +1 -1
  348. package/lib/i18n/cs/jig.d.ts +1227 -1
  349. package/lib/i18n/cs/jig.d.ts.map +1 -1
  350. package/lib/i18n/cs/jig.js +1226 -6
  351. package/lib/i18n/cs/jig.js.map +1 -1
  352. package/lib/i18n/cs/main.d.ts +5 -0
  353. package/lib/i18n/cs/main.d.ts.map +1 -1
  354. package/lib/i18n/cs/main.js +5 -0
  355. package/lib/i18n/cs/main.js.map +1 -1
  356. package/lib/i18n/en/command.d.ts +57 -0
  357. package/lib/i18n/en/command.d.ts.map +1 -1
  358. package/lib/i18n/en/command.js +60 -3
  359. package/lib/i18n/en/command.js.map +1 -1
  360. package/lib/i18n/en/jig.d.ts +180 -0
  361. package/lib/i18n/en/jig.d.ts.map +1 -1
  362. package/lib/i18n/en/jig.js +181 -1
  363. package/lib/i18n/en/jig.js.map +1 -1
  364. package/lib/i18n/en/main.d.ts +5 -0
  365. package/lib/i18n/en/main.d.ts.map +1 -1
  366. package/lib/i18n/en/main.js +5 -0
  367. package/lib/i18n/en/main.js.map +1 -1
  368. package/lib/i18n/tr/command.d.ts +57 -0
  369. package/lib/i18n/tr/command.d.ts.map +1 -1
  370. package/lib/i18n/tr/command.js +60 -3
  371. package/lib/i18n/tr/command.js.map +1 -1
  372. package/lib/i18n/tr/jig.d.ts +180 -0
  373. package/lib/i18n/tr/jig.d.ts.map +1 -1
  374. package/lib/i18n/tr/jig.js +181 -1
  375. package/lib/i18n/tr/jig.js.map +1 -1
  376. package/lib/i18n/tr/main.d.ts +7 -0
  377. package/lib/i18n/tr/main.d.ts.map +1 -1
  378. package/lib/i18n/tr/main.js +7 -0
  379. package/lib/i18n/tr/main.js.map +1 -1
  380. package/lib/i18n/zh/command.d.ts +57 -0
  381. package/lib/i18n/zh/command.d.ts.map +1 -1
  382. package/lib/i18n/zh/command.js +60 -3
  383. package/lib/i18n/zh/command.js.map +1 -1
  384. package/lib/i18n/zh/jig.d.ts +180 -0
  385. package/lib/i18n/zh/jig.d.ts.map +1 -1
  386. package/lib/i18n/zh/jig.js +181 -1
  387. package/lib/i18n/zh/jig.js.map +1 -1
  388. package/lib/i18n/zh/main.d.ts +5 -0
  389. package/lib/i18n/zh/main.d.ts.map +1 -1
  390. package/lib/i18n/zh/main.js +5 -0
  391. package/lib/i18n/zh/main.js.map +1 -1
  392. package/lib/plugin/AcApPluginManager.d.ts.map +1 -1
  393. package/lib/plugin/AcApPluginManager.js +2 -1
  394. package/lib/plugin/AcApPluginManager.js.map +1 -1
  395. package/lib/service/AcApEntitySelection.d.ts +0 -3
  396. package/lib/service/AcApEntitySelection.d.ts.map +1 -1
  397. package/lib/service/AcApEntitySelection.js +42 -36
  398. package/lib/service/AcApEntitySelection.js.map +1 -1
  399. package/lib/ui/AcApDrawStyle.d.ts +63 -0
  400. package/lib/ui/AcApDrawStyle.d.ts.map +1 -0
  401. package/lib/ui/AcApDrawStyle.js +149 -0
  402. package/lib/ui/AcApDrawStyle.js.map +1 -0
  403. package/lib/ui/AcApDrawStyleToolbar.d.ts +124 -0
  404. package/lib/ui/AcApDrawStyleToolbar.d.ts.map +1 -0
  405. package/lib/ui/AcApDrawStyleToolbar.js +486 -0
  406. package/lib/ui/AcApDrawStyleToolbar.js.map +1 -0
  407. package/lib/ui/AcUiDialog.d.ts.map +1 -1
  408. package/lib/ui/AcUiDialog.js +2 -2
  409. package/lib/ui/AcUiDialog.js.map +1 -1
  410. package/lib/ui/index.d.ts +2 -0
  411. package/lib/ui/index.d.ts.map +1 -1
  412. package/lib/ui/index.js +2 -0
  413. package/lib/ui/index.js.map +1 -1
  414. package/lib/util/AcApDatabaseEdit.d.ts.map +1 -1
  415. package/lib/util/AcApDatabaseEdit.js +1 -0
  416. package/lib/util/AcApDatabaseEdit.js.map +1 -1
  417. package/lib/util/AcApMeasurementUnits.d.ts +52 -0
  418. package/lib/util/AcApMeasurementUnits.d.ts.map +1 -0
  419. package/lib/util/AcApMeasurementUnits.js +137 -0
  420. package/lib/util/AcApMeasurementUnits.js.map +1 -0
  421. package/lib/util/AcApMeasurementUtil.d.ts +42 -0
  422. package/lib/util/AcApMeasurementUtil.d.ts.map +1 -0
  423. package/lib/util/AcApMeasurementUtil.js +98 -0
  424. package/lib/util/AcApMeasurementUtil.js.map +1 -0
  425. package/lib/util/AcApScreenHitTest.d.ts +35 -0
  426. package/lib/util/AcApScreenHitTest.d.ts.map +1 -0
  427. package/lib/util/AcApScreenHitTest.js +98 -0
  428. package/lib/util/AcApScreenHitTest.js.map +1 -0
  429. package/lib/util/index.d.ts +3 -1
  430. package/lib/util/index.d.ts.map +1 -1
  431. package/lib/util/index.js +3 -1
  432. package/lib/util/index.js.map +1 -1
  433. package/lib/view/AcEdReviewOverlayPick.d.ts +25 -0
  434. package/lib/view/AcEdReviewOverlayPick.d.ts.map +1 -0
  435. package/lib/view/AcEdReviewOverlayPick.js +229 -0
  436. package/lib/view/AcEdReviewOverlayPick.js.map +1 -0
  437. package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -1
  438. package/lib/view/AcEdViewKeyHandler.js +53 -0
  439. package/lib/view/AcEdViewKeyHandler.js.map +1 -1
  440. package/lib/view/AcTrScene.d.ts +15 -1
  441. package/lib/view/AcTrScene.d.ts.map +1 -1
  442. package/lib/view/AcTrScene.js +25 -2
  443. package/lib/view/AcTrScene.js.map +1 -1
  444. package/lib/view/AcTrView2d.d.ts +35 -5
  445. package/lib/view/AcTrView2d.d.ts.map +1 -1
  446. package/lib/view/AcTrView2d.js +127 -70
  447. package/lib/view/AcTrView2d.js.map +1 -1
  448. package/lib/view/index.d.ts +1 -0
  449. package/lib/view/index.d.ts.map +1 -1
  450. package/lib/view/index.js +1 -0
  451. package/lib/view/index.js.map +1 -1
  452. package/package.json +5 -6
  453. package/dist/libredwg-parser-worker.js +0 -7525
  454. package/lib/app/AcApAnnotation.d.ts +0 -47
  455. package/lib/app/AcApAnnotation.d.ts.map +0 -1
  456. package/lib/app/AcApAnnotation.js +0 -135
  457. package/lib/app/AcApAnnotation.js.map +0 -1
  458. package/lib/command/review/AcApBaseRevCmd.d.ts +0 -36
  459. package/lib/command/review/AcApBaseRevCmd.d.ts.map +0 -1
  460. package/lib/command/review/AcApBaseRevCmd.js +0 -68
  461. package/lib/command/review/AcApBaseRevCmd.js.map +0 -1
  462. package/lib/command/review/AcApRevCircleCmd.d.ts +0 -18
  463. package/lib/command/review/AcApRevCircleCmd.d.ts.map +0 -1
  464. package/lib/command/review/AcApRevCircleCmd.js.map +0 -1
  465. package/lib/command/review/AcApRevCloudCmd.d.ts +0 -26
  466. package/lib/command/review/AcApRevCloudCmd.d.ts.map +0 -1
  467. package/lib/command/review/AcApRevCloudCmd.js +0 -240
  468. package/lib/command/review/AcApRevCloudCmd.js.map +0 -1
  469. package/lib/command/review/AcApRevRectCmd.d.ts +0 -18
  470. package/lib/command/review/AcApRevRectCmd.d.ts.map +0 -1
  471. package/lib/command/review/AcApRevRectCmd.js +0 -155
  472. package/lib/command/review/AcApRevRectCmd.js.map +0 -1
  473. package/lib/command/review/AcApRevVisibilityCmd.d.ts +0 -15
  474. package/lib/command/review/AcApRevVisibilityCmd.d.ts.map +0 -1
  475. package/lib/command/review/AcApRevVisibilityCmd.js.map +0 -1
  476. package/lib/command/review/AcApSketchCmd.d.ts +0 -32
  477. package/lib/command/review/AcApSketchCmd.d.ts.map +0 -1
  478. package/lib/command/review/AcApSketchCmd.js +0 -175
  479. package/lib/command/review/AcApSketchCmd.js.map +0 -1
  480. package/lib/command/review/index.d.ts +0 -7
  481. package/lib/command/review/index.d.ts.map +0 -1
  482. package/lib/command/review/index.js +0 -7
  483. package/lib/command/review/index.js.map +0 -1
  484. package/lib/util/AcApMeasurementElementGenerator.d.ts +0 -36
  485. package/lib/util/AcApMeasurementElementGenerator.d.ts.map +0 -1
  486. package/lib/util/AcApMeasurementElementGenerator.js +0 -92
  487. package/lib/util/AcApMeasurementElementGenerator.js.map +0 -1
@@ -49,67 +49,88 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
49
49
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
50
  }
51
51
  };
52
- import { AcDbLine, AcGiLineWeight } from '@mlightcad/data-model';
52
+ import { AcTrHtmlBadge } from '@mlightcad/three-renderer';
53
53
  import { AcEdCommand, AcEdCorsorType, AcEdOpenMode, AcEdPreviewJig, AcEdPromptPointOptions, AcEdPromptStatus, AcEdViewMode } from '../../editor';
54
54
  import { AcApI18n } from '../../i18n';
55
- import { makeBadge, makeDot, makeLiveBadge, measurementColor } from '../../util';
56
- import { registerMeasurementCleanup } from './AcApClearMeasurementsCmd';
55
+ import { acapGetCurrentMeasurementStyle, acapGetMeasurementColor, acapGetMeasurementFontSize, acapGetMeasurementLineWeight, acapMeasurementCanvasLineWidth, formatMeasurementLength } from '../../util';
56
+ import { AcApHtmlLivePreview, acapStrokeLiveSegment } from '../overlay/AcApHtmlLivePreview';
57
+ import { MEASUREMENT_LIVE_LAYER } from './AcApMeasurementStore';
58
+ import { AcApMeasureDistanceEntity } from './entity';
57
59
  /** Returns the 2D Euclidean distance between two world points. */
58
60
  function calcDist(p1, p2) {
59
61
  var dx = p2.x - p1.x;
60
62
  var dy = p2.y - p1.y;
61
63
  return Math.sqrt(dx * dx + dy * dy);
62
64
  }
65
+ /**
66
+ * Commit a distance measurement overlay (also used when importing a sidecar).
67
+ */
68
+ export function placeDistanceMeasurement(view, db, p1, p2, style, options) {
69
+ AcApMeasureDistanceEntity.create(p1, p2, style, options).commit(view, db);
70
+ }
63
71
  /**
64
72
  * Preview jig for the distance measurement command.
65
73
  *
66
- * Renders a live rubber-band line from the fixed first point to the current
67
- * cursor position. The badge showing the live distance is rendered by the
68
- * jig itself and is removed when the jig ends — it is intentionally short-lived
69
- * and intrinsic to the interactive input UX.
74
+ * Renders a live HTML rubber-band segment and length badge (no AcDb preview).
70
75
  */
71
76
  var AcApMeasureDistanceJig = /** @class */ (function (_super) {
72
77
  __extends(AcApMeasureDistanceJig, _super);
73
78
  function AcApMeasureDistanceJig(view, db, p1, color) {
74
79
  var _this = _super.call(this, view) || this;
75
- _this._p1 = p1;
76
80
  _this._view = view;
81
+ _this._p1 = p1;
82
+ _this._p2 = p1;
77
83
  _this._db = db;
78
- _this._line = new AcDbLine(p1, p1);
79
- _this._line.color = color;
80
- _this._line.lineWeight = AcGiLineWeight.LineWeight070;
81
- // Live badge — short-lived, cleaned up in end()
82
- _this._badge = makeLiveBadge(color);
84
+ _this._color = color;
85
+ _this._badgeId = "live-dist-badge-".concat(Date.now());
86
+ _this._htManager = _this._view.htmlTransientManager;
87
+ _this._badge = new AcTrHtmlBadge({
88
+ id: _this._badgeId,
89
+ color: color,
90
+ worldPosition: p1,
91
+ layer: MEASUREMENT_LIVE_LAYER,
92
+ layoutId: _this._view.activeLayoutBtrId,
93
+ fontSize: acapGetMeasurementFontSize()
94
+ });
95
+ _this._badge.object.visible = false;
96
+ _this._htManager.add(_this._badge);
97
+ _this._preview = new AcApHtmlLivePreview(_this._view, "live-dist-stroke-".concat(Date.now()), MEASUREMENT_LIVE_LAYER);
83
98
  return _this;
84
99
  }
85
100
  Object.defineProperty(AcApMeasureDistanceJig.prototype, "entity", {
101
+ /** HTML-only preview — no CAD transient. */
86
102
  get: function () {
87
- return this._line;
103
+ return null;
88
104
  },
89
105
  enumerable: false,
90
106
  configurable: true
91
107
  });
92
108
  AcApMeasureDistanceJig.prototype.update = function (p2) {
93
- this._line.endPoint = p2;
109
+ var _this = this;
110
+ this._p2 = p2;
111
+ this._color = acapGetMeasurementColor(this._db);
112
+ this._badge.setColor(this._color);
113
+ this._badge.setFontSize(acapGetMeasurementFontSize());
94
114
  var dist = calcDist(this._p1, p2);
115
+ var lineWidth = acapMeasurementCanvasLineWidth(acapGetMeasurementLineWeight());
116
+ this._preview.acapSetDraw(function (ctx, view) {
117
+ acapStrokeLiveSegment(ctx, view, _this._p1, _this._p2, _this._color, lineWidth);
118
+ });
95
119
  if (dist < 0.0001) {
96
- this._badge.style.display = 'none';
120
+ this._badge.object.visible = false;
97
121
  return;
98
122
  }
99
- this._badge.textContent = this._db.formatter.formatLength(dist, {
100
- showUnits: true,
101
- showApproximate: true
123
+ this._badge.setText(formatMeasurementLength(this._db, dist));
124
+ this._badge.setPosition({
125
+ x: (this._p1.x + p2.x) / 2,
126
+ y: (this._p1.y + p2.y) / 2
102
127
  });
103
- this._badge.style.display = 'block';
104
- var mid = { x: (this._p1.x + p2.x) / 2, y: (this._p1.y + p2.y) / 2 };
105
- var rect = this._view.canvas.getBoundingClientRect();
106
- var s = this._view.worldToScreen(mid);
107
- this._badge.style.left = "".concat(s.x + rect.left, "px");
108
- this._badge.style.top = "".concat(s.y + rect.top, "px");
128
+ this._badge.object.visible = true;
109
129
  };
110
130
  AcApMeasureDistanceJig.prototype.end = function () {
111
131
  _super.prototype.end.call(this);
112
- this._badge.remove();
132
+ this._preview.acapDispose();
133
+ this._htManager.remove(this._badgeId);
113
134
  };
114
135
  return AcApMeasureDistanceJig;
115
136
  }(AcEdPreviewJig));
@@ -117,10 +138,8 @@ export { AcApMeasureDistanceJig };
117
138
  /**
118
139
  * Command that measures the straight-line distance between two points.
119
140
  *
120
- * Prompts the user to pick two world points, then registers a transient CAD
121
- * line between them. Persistent DOM overlays (dots + badge) are placed via
122
- * {@link AcTrHtmlTransientManager} using CSS2DObject, so they track zoom/pan
123
- * automatically without manual viewChanged listeners.
141
+ * Prompts for two world points, then commits a measurement overlay.
142
+ * Interactive preview is HTML-only (canvas stroke + badge).
124
143
  */
125
144
  var AcApMeasureDistanceCmd = /** @class */ (function (_super) {
126
145
  __extends(AcApMeasureDistanceCmd, _super);
@@ -138,10 +157,10 @@ var AcApMeasureDistanceCmd = /** @class */ (function (_super) {
138
157
  case 0:
139
158
  editor = context.view.editor;
140
159
  db = context.doc.database;
141
- color = measurementColor(db);
160
+ color = acapGetMeasurementColor(db);
142
161
  return [4 /*yield*/, context.view.withMode(AcEdViewMode.SELECTION, function () {
143
162
  return editor.withCursor(AcEdCorsorType.Crosshair, function () { return __awaiter(_this, void 0, void 0, function () {
144
- var p1Prompt, p1Result, p1, p2Prompt, p2Result, p2, dist, line, htManager, id, mid;
163
+ var p1Prompt, p1Result, p1, p2Prompt, p2Result, p2;
145
164
  return __generator(this, function (_a) {
146
165
  switch (_a.label) {
147
166
  case 0:
@@ -161,26 +180,7 @@ var AcApMeasureDistanceCmd = /** @class */ (function (_super) {
161
180
  if (p2Result.status !== AcEdPromptStatus.OK)
162
181
  return [2 /*return*/];
163
182
  p2 = p2Result.value;
164
- dist = calcDist(p1, p2);
165
- line = new AcDbLine(p1, p2);
166
- line.color = color;
167
- line.lineWeight = AcGiLineWeight.LineWeight070;
168
- context.view.addTransientEntity(line);
169
- htManager = context.view.htmlTransientManager;
170
- id = "dist-".concat(Date.now());
171
- mid = { x: (p1.x + p2.x) / 2, y: (p1.y + p2.y) / 2 };
172
- htManager.add("".concat(id, "-dot1"), makeDot(color), p1, 'measurement');
173
- htManager.add("".concat(id, "-dot2"), makeDot(color), p2, 'measurement');
174
- htManager.add("".concat(id, "-badge"), makeBadge(color, db.formatter.formatLength(dist, {
175
- showUnits: true,
176
- showApproximate: true
177
- })), mid, 'measurement');
178
- registerMeasurementCleanup(function () {
179
- context.view.removeTransientEntity(line.objectId);
180
- htManager.remove("".concat(id, "-dot1"));
181
- htManager.remove("".concat(id, "-dot2"));
182
- htManager.remove("".concat(id, "-badge"));
183
- });
183
+ placeDistanceMeasurement(context.view, db, p1, p2, acapGetCurrentMeasurementStyle(db));
184
184
  return [2 /*return*/];
185
185
  }
186
186
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AcApMeasureDistanceCmd.js","sourceRoot":"","sources":["../../../src/command/measure/AcApMeasureDistanceCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAGL,QAAQ,EAER,cAAc,EACf,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAEL,WAAW,EACX,cAAc,EACd,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EACb,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAEhF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BA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;;;qCACH,CAAC;4BAnDF,CAmDE,CACH,EAAA;;wBArDD,SAqDC,CAAA;;;;;KACF;IACH,6BAAC;AAAD,CAAC,AAlED,CAA4C,WAAW,GAkEtD"}
1
+ {"version":3,"file":"AcApMeasureDistanceCmd.js","sourceRoot":"","sources":["../../../src/command/measure/AcApMeasureDistanceCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,EACL,aAAa,EAEd,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EAEL,WAAW,EACX,cAAc,EACd,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EACb,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,EAE9B,uBAAuB,EACxB,MAAM,YAAY,CAAA;AAEnB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AAEpD,kEAAkE;AAClE,SAAS,QAAQ,CAAC,EAAmB,EAAE,EAAmB;IACxD,IAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IACtB,IAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IACtB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,IAAgB,EAChB,EAAgB,EAChB,EAAmB,EACnB,EAAmB,EACnB,KAA2B,EAC3B,OAA4C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AAQ,CAAC,GAAG,GAAG,IAAI,sBAAsB,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAA;gDACrD,qBAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAA;;gDAA1C,QAAQ,GAAG,SAA+B;gDAChD,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,EAAE;oDAAE,sBAAM;gDAC7C,EAAE,GAAG,QAAQ,CAAC,KAAM,CAAA;gDAE1B,wBAAwB,CACtB,OAAO,CAAC,IAAkB,EAC1B,EAAE,EACF,EAAE,EACF,EAAE,EACF,8BAA8B,CAAC,EAAE,CAAC,CACnC,CAAA;;;;qCACF,CAAC;4BAxBF,CAwBE,CACH,EAAA;;wBA1BD,SA0BC,CAAA;;;;;KACF;IACH,6BAAC;AAAD,CAAC,AAvCD,CAA4C,WAAW,GAuCtD"}
@@ -0,0 +1,24 @@
1
+ import { AcDbDatabase, AcGePoint3dLike } from '@mlightcad/data-model';
2
+ import { AcApContext } from '../../app';
3
+ import { AcEdCommand } from '../../editor';
4
+ import { type AcApMeasurementStyle } from '../../util';
5
+ import { AcTrView2d } from '../../view';
6
+ /**
7
+ * Commit a coordinate measurement overlay (also used when importing a sidecar).
8
+ */
9
+ export declare function placePointMeasurement(view: AcTrView2d, db: AcDbDatabase, point: AcGePoint3dLike, style: AcApMeasurementStyle, options?: {
10
+ id?: string;
11
+ layoutId?: string;
12
+ }): void;
13
+ /**
14
+ * Command that measures the world X/Y coordinates of a picked point.
15
+ *
16
+ * Prompts the user to pick one world point, then places a persistent dot and
17
+ * coordinate badge via {@link AcTrHtmlTransientManager}. The overlays are
18
+ * cleared by {@link commitMeasurementGroup}.
19
+ */
20
+ export declare class AcApMeasurePointCmd extends AcEdCommand {
21
+ constructor();
22
+ execute(context: AcApContext): Promise<void>;
23
+ }
24
+ //# sourceMappingURL=AcApMeasurePointCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMeasurePointCmd.d.ts","sourceRoot":"","sources":["../../../src/command/measure/AcApMeasurePointCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EACL,WAAW,EAMZ,MAAM,cAAc,CAAA;AAErB,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAGvC;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,UAAU,EAChB,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,oBAAoB,EAC3B,OAAO,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3C,IAAI,CAEN;AAED;;;;;;GAMG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;;IAM5C,OAAO,CAAC,OAAO,EAAE,WAAW;CAqBnC"}
@@ -0,0 +1,114 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ var __generator = (this && this.__generator) || function (thisArg, body) {
26
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
27
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ function verb(n) { return function (v) { return step([n, v]); }; }
29
+ function step(op) {
30
+ if (f) throw new TypeError("Generator is already executing.");
31
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
32
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
33
+ if (y = 0, t) op = [op[0] & 2, t.value];
34
+ switch (op[0]) {
35
+ case 0: case 1: t = op; break;
36
+ case 4: _.label++; return { value: op[1], done: false };
37
+ case 5: _.label++; y = op[1]; op = [0]; continue;
38
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
39
+ default:
40
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
41
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
42
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
43
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
44
+ if (t[2]) _.ops.pop();
45
+ _.trys.pop(); continue;
46
+ }
47
+ op = body.call(thisArg, _);
48
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
49
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
+ }
51
+ };
52
+ import { AcEdCommand, AcEdCorsorType, AcEdOpenMode, AcEdPromptPointOptions, AcEdPromptStatus, AcEdViewMode } from '../../editor';
53
+ import { AcApI18n } from '../../i18n';
54
+ import { acapGetCurrentMeasurementStyle } from '../../util';
55
+ import { AcApMeasurePointEntity } from './entity';
56
+ /**
57
+ * Commit a coordinate measurement overlay (also used when importing a sidecar).
58
+ */
59
+ export function placePointMeasurement(view, db, point, style, options) {
60
+ AcApMeasurePointEntity.create(point, style, options).commit(view, db);
61
+ }
62
+ /**
63
+ * Command that measures the world X/Y coordinates of a picked point.
64
+ *
65
+ * Prompts the user to pick one world point, then places a persistent dot and
66
+ * coordinate badge via {@link AcTrHtmlTransientManager}. The overlays are
67
+ * cleared by {@link commitMeasurementGroup}.
68
+ */
69
+ var AcApMeasurePointCmd = /** @class */ (function (_super) {
70
+ __extends(AcApMeasurePointCmd, _super);
71
+ function AcApMeasurePointCmd() {
72
+ var _this = _super.call(this) || this;
73
+ _this.mode = AcEdOpenMode.Read;
74
+ return _this;
75
+ }
76
+ AcApMeasurePointCmd.prototype.execute = function (context) {
77
+ return __awaiter(this, void 0, void 0, function () {
78
+ var editor, db;
79
+ var _this = this;
80
+ return __generator(this, function (_a) {
81
+ switch (_a.label) {
82
+ case 0:
83
+ editor = context.view.editor;
84
+ db = context.doc.database;
85
+ return [4 /*yield*/, context.view.withMode(AcEdViewMode.SELECTION, function () {
86
+ return editor.withCursor(AcEdCorsorType.Crosshair, function () { return __awaiter(_this, void 0, void 0, function () {
87
+ var pointPrompt, pointResult, point;
88
+ return __generator(this, function (_a) {
89
+ switch (_a.label) {
90
+ case 0:
91
+ pointPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.measurePoint.point'));
92
+ return [4 /*yield*/, editor.getPoint(pointPrompt)];
93
+ case 1:
94
+ pointResult = _a.sent();
95
+ if (pointResult.status !== AcEdPromptStatus.OK)
96
+ return [2 /*return*/];
97
+ point = pointResult.value;
98
+ placePointMeasurement(context.view, db, point, acapGetCurrentMeasurementStyle(db));
99
+ return [2 /*return*/];
100
+ }
101
+ });
102
+ }); });
103
+ })];
104
+ case 1:
105
+ _a.sent();
106
+ return [2 /*return*/];
107
+ }
108
+ });
109
+ });
110
+ };
111
+ return AcApMeasurePointCmd;
112
+ }(AcEdCommand));
113
+ export { AcApMeasurePointCmd };
114
+ //# sourceMappingURL=AcApMeasurePointCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMeasurePointCmd.js","sourceRoot":"","sources":["../../../src/command/measure/AcApMeasurePointCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,OAAO,EACL,WAAW,EACX,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EACb,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EACL,8BAA8B,EAE/B,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEjD;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,IAAgB,EAChB,EAAgB,EAChB,KAAsB,EACtB,KAA2B,EAC3B,OAA4C;IAE5C,sBAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AACvE,CAAC;AAED;;;;;;GAMG;AACH;IAAyC,uCAAW;IAClD;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAA;;IAC/B,CAAC;IAEK,qCAAO,GAAb,UAAc,OAAoB;;;;;;;wBAC1B,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAA;wBAC5B,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA;wBAE/B,qBAAM,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE;gCAClD,OAAA,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,EAAE;;;;;gDACpC,WAAW,GAAG,IAAI,sBAAsB,CAC5C,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC,CACrC,CAAA;gDACmB,qBAAM,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAA;;gDAAhD,WAAW,GAAG,SAAkC;gDACtD,IAAI,WAAW,CAAC,MAAM,KAAK,gBAAgB,CAAC,EAAE;oDAAE,sBAAM;gDAChD,KAAK,GAAG,WAAW,CAAC,KAAM,CAAA;gDAChC,qBAAqB,CACnB,OAAO,CAAC,IAAkB,EAC1B,EAAE,EACF,KAAK,EACL,8BAA8B,CAAC,EAAE,CAAC,CACnC,CAAA;;;;qCACF,CAAC;4BAbF,CAaE,CACH,EAAA;;wBAfD,SAeC,CAAA;;;;;KACF;IACH,0BAAC;AAAD,CAAC,AA3BD,CAAyC,WAAW,GA2BnD"}
@@ -0,0 +1,22 @@
1
+ import { AcGeBox2d } from '@mlightcad/data-model';
2
+ import { type AcApScreenPoint } from '../../util/AcApScreenHitTest';
3
+ import type { AcApMeasurementGeometry } from './AcApMeasurementTypes';
4
+ type WorldToScreen = (point: {
5
+ x: number;
6
+ y: number;
7
+ }) => AcApScreenPoint;
8
+ /**
9
+ * Axis-aligned world bounds of a measurement's control geometry.
10
+ *
11
+ * Used for window / crossing box selection. Point measurements use their
12
+ * position; arcs use the full circle AABB of `center` ± `radius`.
13
+ */
14
+ export declare function measurementGeometryBounds(geometry: AcApMeasurementGeometry): AcGeBox2d | undefined;
15
+ /**
16
+ * Whether a canvas-space pick hits a measurement's drawn stroke or fill.
17
+ *
18
+ * Point measurements are skipped — they are selected via HTML badges / dots.
19
+ */
20
+ export declare function hitTestMeasurementGeometry(geometry: AcApMeasurementGeometry, canvas: AcApScreenPoint, worldToScreen: WorldToScreen, threshold: number): boolean;
21
+ export {};
22
+ //# sourceMappingURL=AcApMeasurementGeometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMeasurementGeometry.d.ts","sourceRoot":"","sources":["../../../src/command/measure/AcApMeasurementGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,OAAO,EACL,KAAK,eAAe,EAMrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAErE,KAAK,aAAa,GAAG,CAAC,KAAK,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,eAAe,CAAA;AAQzE;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,uBAAuB,GAChC,SAAS,GAAG,SAAS,CAmCvB;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,uBAAuB,EACjC,MAAM,EAAE,eAAe,EACvB,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,MAAM,GAChB,OAAO,CA4FT"}
@@ -0,0 +1,127 @@
1
+ var __values = (this && this.__values) || function(o) {
2
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3
+ if (m) return m.call(o);
4
+ if (o && typeof o.length === "number") return {
5
+ next: function () {
6
+ if (o && i >= o.length) o = void 0;
7
+ return { value: o && o[i++], done: !o };
8
+ }
9
+ };
10
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11
+ };
12
+ import { AcGeBox2d } from '@mlightcad/data-model';
13
+ import { distPointToArcPx, distPointToCirclePx, distPointToPolylinePx, distPointToSegmentPx, pointInPolygonPx } from '../../util/AcApScreenHitTest';
14
+ var TWO_PI = Math.PI * 2;
15
+ function normaliseAngle(a) {
16
+ return ((a % TWO_PI) + TWO_PI) % TWO_PI;
17
+ }
18
+ /**
19
+ * Axis-aligned world bounds of a measurement's control geometry.
20
+ *
21
+ * Used for window / crossing box selection. Point measurements use their
22
+ * position; arcs use the full circle AABB of `center` ± `radius`.
23
+ */
24
+ export function measurementGeometryBounds(geometry) {
25
+ var e_1, _a;
26
+ var box = new AcGeBox2d();
27
+ switch (geometry.type) {
28
+ case 'distance':
29
+ box.expandByPoint(geometry.start).expandByPoint(geometry.end);
30
+ break;
31
+ case 'angle':
32
+ box
33
+ .expandByPoint(geometry.vertex)
34
+ .expandByPoint(geometry.arm1)
35
+ .expandByPoint(geometry.arm2);
36
+ break;
37
+ case 'area':
38
+ try {
39
+ for (var _b = __values(geometry.points), _c = _b.next(); !_c.done; _c = _b.next()) {
40
+ var point = _c.value;
41
+ box.expandByPoint(point);
42
+ }
43
+ }
44
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
45
+ finally {
46
+ try {
47
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
48
+ }
49
+ finally { if (e_1) throw e_1.error; }
50
+ }
51
+ break;
52
+ case 'arc':
53
+ box
54
+ .expandByPoint({
55
+ x: geometry.center.x - geometry.radius,
56
+ y: geometry.center.y - geometry.radius
57
+ })
58
+ .expandByPoint({
59
+ x: geometry.center.x + geometry.radius,
60
+ y: geometry.center.y + geometry.radius
61
+ });
62
+ break;
63
+ case 'point':
64
+ box.expandByPoint(geometry.position);
65
+ break;
66
+ default:
67
+ return undefined;
68
+ }
69
+ return box.isEmpty() ? undefined : box;
70
+ }
71
+ /**
72
+ * Whether a canvas-space pick hits a measurement's drawn stroke or fill.
73
+ *
74
+ * Point measurements are skipped — they are selected via HTML badges / dots.
75
+ */
76
+ export function hitTestMeasurementGeometry(geometry, canvas, worldToScreen, threshold) {
77
+ switch (geometry.type) {
78
+ case 'distance': {
79
+ var a = worldToScreen(geometry.start);
80
+ var b = worldToScreen(geometry.end);
81
+ return (distPointToSegmentPx(canvas.x, canvas.y, a.x, a.y, b.x, b.y) <=
82
+ threshold);
83
+ }
84
+ case 'angle': {
85
+ var vertex = worldToScreen(geometry.vertex);
86
+ var arm1 = worldToScreen(geometry.arm1);
87
+ var arm2 = worldToScreen(geometry.arm2);
88
+ if (distPointToSegmentPx(canvas.x, canvas.y, vertex.x, vertex.y, arm1.x, arm1.y) <= threshold ||
89
+ distPointToSegmentPx(canvas.x, canvas.y, vertex.x, vertex.y, arm2.x, arm2.y) <= threshold) {
90
+ return true;
91
+ }
92
+ var len1 = Math.hypot(arm1.x - vertex.x, arm1.y - vertex.y);
93
+ var len2 = Math.hypot(arm2.x - vertex.x, arm2.y - vertex.y);
94
+ var r = Math.max(Math.min(len1, len2) * 0.3, 15);
95
+ var startAngle = Math.atan2(arm1.y - vertex.y, arm1.x - vertex.x);
96
+ var endAngle = Math.atan2(arm2.y - vertex.y, arm2.x - vertex.x);
97
+ var antiClockwise = normaliseAngle(endAngle - startAngle) > Math.PI;
98
+ return (distPointToArcPx(canvas.x, canvas.y, vertex.x, vertex.y, r, startAngle, endAngle, antiClockwise) <= threshold);
99
+ }
100
+ case 'area': {
101
+ var verts = geometry.points.map(worldToScreen);
102
+ if (verts.length < 2)
103
+ return false;
104
+ if (pointInPolygonPx(canvas.x, canvas.y, verts))
105
+ return true;
106
+ return (distPointToPolylinePx(canvas.x, canvas.y, verts, true) <= threshold);
107
+ }
108
+ case 'arc': {
109
+ var center = worldToScreen(geometry.center);
110
+ var start = worldToScreen(geometry.start);
111
+ var end = worldToScreen(geometry.end);
112
+ var radius = Math.hypot(start.x - center.x, start.y - center.y);
113
+ if (!(radius > 0)) {
114
+ return (distPointToCirclePx(canvas.x, canvas.y, center.x, center.y, 0) <=
115
+ threshold);
116
+ }
117
+ var startAngle = Math.atan2(start.y - center.y, start.x - center.x);
118
+ var endAngle = Math.atan2(end.y - center.y, end.x - center.x);
119
+ var cwSpan = normaliseAngle(endAngle - startAngle);
120
+ var antiClockwise = cwSpan > Math.PI;
121
+ return (distPointToArcPx(canvas.x, canvas.y, center.x, center.y, radius, startAngle, endAngle, antiClockwise) <= threshold);
122
+ }
123
+ case 'point':
124
+ return false;
125
+ }
126
+ }
127
+ //# sourceMappingURL=AcApMeasurementGeometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMeasurementGeometry.js","sourceRoot":"","sources":["../../../src/command/measure/AcApMeasurementGeometry.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,OAAO,EAEL,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,8BAA8B,CAAA;AAKrC,IAAM,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAA;AAE1B,SAAS,cAAc,CAAC,CAAS;IAC/B,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAA;AACzC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CACvC,QAAiC;;IAEjC,IAAM,GAAG,GAAG,IAAI,SAAS,EAAE,CAAA;IAC3B,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;QACtB,KAAK,UAAU;YACb,GAAG,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;YAC7D,MAAK;QACP,KAAK,OAAO;YACV,GAAG;iBACA,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAC9B,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC;iBAC5B,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;YAC/B,MAAK;QACP,KAAK,MAAM;;gBACT,KAAoB,IAAA,KAAA,SAAA,QAAQ,CAAC,MAAM,CAAA,gBAAA,4BAA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AE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;YACjE,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;gBAClB,OAAO,CACL,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;oBAC9D,SAAS,CACV,CAAA;YACH,CAAC;YACD,IAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;YACrE,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;YAC/D,IAAM,MAAM,GAAG,cAAc,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAA;YACpD,IAAM,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;YACtC,OAAO,CACL,gBAAgB,CACd,MAAM,CAAC,CAAC,EACR,MAAM,CAAC,CAAC,EACR,MAAM,CAAC,CAAC,EACR,MAAM,CAAC,CAAC,EACR,MAAM,EACN,UAAU,EACV,QAAQ,EACR,aAAa,CACd,IAAI,SAAS,CACf,CAAA;QACH,CAAC;QACD,KAAK,OAAO;YACV,OAAO,KAAK,CAAA;IAChB,CAAC;AACH,CAAC"}
@@ -0,0 +1,78 @@
1
+ import type { AcEdBaseView } from '../../editor';
2
+ /**
3
+ * Snapshot-based undo/redo for measurement HTML overlays.
4
+ *
5
+ * Measurements are not DWG objects. Groups are
6
+ * {@link AcTrHtmlTransientManager.detach}ed (kept alive) so undo can
7
+ * {@link AcTrHtmlTransientManager.reattach} them.
8
+ */
9
+ export declare class AcApMeasurementHistory {
10
+ /** Undo stack of measurement overlay mutations (oldest first). */
11
+ private readonly undoStack;
12
+ /** Redo stack of measurement overlay mutations (oldest first). */
13
+ private readonly redoStack;
14
+ /**
15
+ * Nesting depth of {@link run} / {@link apply}. Greater than zero means a
16
+ * mutation is in progress and nested {@link run} calls are not recorded.
17
+ */
18
+ private depth;
19
+ /** True while applying undo/redo or nested inside {@link run}. */
20
+ get isBusy(): boolean;
21
+ /** Whether there is at least one measurement overlay undo step. */
22
+ canUndo(): boolean;
23
+ /** Whether there is at least one measurement overlay redo step. */
24
+ canRedo(): boolean;
25
+ /**
26
+ * Drop redo entries and dispose detached groups they still hold.
27
+ * Called after a new undoable edit so redo cannot jump over it.
28
+ */
29
+ clearRedo(): void;
30
+ /**
31
+ * Drop history. Detached groups still referenced by the stacks are disposed.
32
+ * Groups that remain on the view are left for {@link AcTrView2d.clear}.
33
+ */
34
+ clear(): void;
35
+ /**
36
+ * Run a measurement mutation and record one undo step when the committed
37
+ * measurement groups on the view change. Nested calls do not create extra
38
+ * entries.
39
+ * @param view - View whose measurement HTML overlays are snapshotted.
40
+ * @param label - Human-readable undo label.
41
+ * @param mutate - Mutation that adds or removes measurement groups.
42
+ */
43
+ run(view: AcEdBaseView, label: string, mutate: () => void): void;
44
+ /**
45
+ * Undo the last measurement overlay mutation.
46
+ * @returns true when an entry was applied.
47
+ */
48
+ undo(): boolean;
49
+ /**
50
+ * Redo the last undone measurement overlay mutation.
51
+ * @returns true when an entry was applied.
52
+ */
53
+ redo(): boolean;
54
+ /**
55
+ * Apply one history entry by detaching and reattaching HTML groups.
56
+ * @param entry - Snapshot of groups added and removed by the original edit.
57
+ * @param direction - `'undo'` restores the pre-edit set; `'redo'` restores
58
+ * the post-edit set.
59
+ */
60
+ private apply;
61
+ }
62
+ /** Shared measurement overlay history for the active session. */
63
+ export declare function getMeasurementHistory(): AcApMeasurementHistory;
64
+ /**
65
+ * Record an undoable measurement overlay edit.
66
+ * @param view - View whose measurement HTML overlays are snapshotted.
67
+ * @param label - Human-readable undo label.
68
+ * @param mutate - Mutation that adds or removes measurement groups.
69
+ */
70
+ export declare function runMeasurementEdit(view: AcEdBaseView, label: string, mutate: () => void): void;
71
+ /**
72
+ * Drop measurement overlay history (document open / close).
73
+ * Detached groups are disposed; attached groups stay for view.clear().
74
+ */
75
+ export declare function resetMeasurementSession(): void;
76
+ /** Bind this history into session undo (also runs at module load). */
77
+ export declare function bindMeasurementOverlayHistory(): void;
78
+ //# sourceMappingURL=AcApMeasurementHistory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMeasurementHistory.d.ts","sourceRoot":"","sources":["../../../src/command/measure/AcApMeasurementHistory.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AA2ChD;;;;;;GAMG;AACH,qBAAa,sBAAsB;IACjC,kEAAkE;IAClE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoC;IAC9D,kEAAkE;IAClE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoC;IAC9D;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAI;IAEjB,kEAAkE;IAClE,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,mEAAmE;IACnE,OAAO,IAAI,OAAO;IAIlB,mEAAmE;IACnE,OAAO,IAAI,OAAO;IAIlB;;;OAGG;IACH,SAAS,IAAI,IAAI;IAOjB;;;OAGG;IACH,KAAK,IAAI,IAAI;IAQb;;;;;;;OAOG;IACH,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,GAAG,IAAI;IA0ChE;;;OAGG;IACH,IAAI,IAAI,OAAO;IAQf;;;OAGG;IACH,IAAI,IAAI,OAAO;IAQf;;;;;OAKG;IACH,OAAO,CAAC,KAAK;CAyBd;AAiED,iEAAiE;AACjE,wBAAgB,qBAAqB,IAAI,sBAAsB,CAG9D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,IAAI,GACjB,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAK9C;AAED,sEAAsE;AACtE,wBAAgB,6BAA6B,IAAI,IAAI,CASpD"}