@mlightcad/cad-simple-viewer 1.2.4 → 1.2.5
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.
- package/dist/index.js +11406 -8892
- package/dist/index.umd.cjs +314 -24
- package/dist/libredwg-parser-worker.js +7267 -7238
- package/dist/mtext-renderer-worker.js +32 -9
- package/lib/app/AcApDocManager.d.ts +20 -3
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +66 -11
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApProgress.d.ts +133 -0
- package/lib/app/AcApProgress.d.ts.map +1 -0
- package/lib/app/AcApProgress.js +148 -0
- package/lib/app/AcApProgress.js.map +1 -0
- package/lib/app/AcApSettingManager.d.ts +42 -0
- package/lib/app/AcApSettingManager.d.ts.map +1 -1
- package/lib/app/AcApSettingManager.js +63 -0
- package/lib/app/AcApSettingManager.js.map +1 -1
- package/lib/app/index.d.ts +0 -1
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +0 -1
- package/lib/app/index.js.map +1 -1
- package/lib/command/AcApCircleCmd.d.ts +21 -0
- package/lib/command/AcApCircleCmd.d.ts.map +1 -0
- package/lib/command/AcApCircleCmd.js +115 -0
- package/lib/command/AcApCircleCmd.js.map +1 -0
- package/lib/command/AcApDimCmd.d.ts +57 -0
- package/lib/command/AcApDimCmd.d.ts.map +1 -0
- package/lib/command/AcApDimCmd.js +228 -0
- package/lib/command/AcApDimCmd.js.map +1 -0
- package/lib/command/AcApLogCmd.d.ts +13 -0
- package/lib/command/AcApLogCmd.d.ts.map +1 -0
- package/lib/command/AcApLogCmd.js +97 -0
- package/lib/command/AcApLogCmd.js.map +1 -0
- package/lib/command/AcApSysVarCmd.d.ts +15 -0
- package/lib/command/AcApSysVarCmd.d.ts.map +1 -0
- package/lib/command/AcApSysVarCmd.js +94 -0
- package/lib/command/AcApSysVarCmd.js.map +1 -0
- package/lib/command/AcApZoomToBoxCmd.d.ts +0 -36
- package/lib/command/AcApZoomToBoxCmd.d.ts.map +1 -1
- package/lib/command/AcApZoomToBoxCmd.js +4 -61
- package/lib/command/AcApZoomToBoxCmd.js.map +1 -1
- package/lib/command/index.d.ts +4 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +4 -0
- package/lib/command/index.js.map +1 -1
- package/lib/editor/command/AcEdCommandStack.d.ts +19 -1
- package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommandStack.js +40 -0
- package/lib/editor/command/AcEdCommandStack.js.map +1 -1
- package/lib/editor/input/AcEdCursorManager.d.ts +14 -30
- package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
- package/lib/editor/input/AcEdCursorManager.js +32 -31
- package/lib/editor/input/AcEdCursorManager.js.map +1 -1
- package/lib/editor/input/AcEdPreviewJig.d.ts +103 -0
- package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -0
- package/lib/editor/input/AcEdPreviewJig.js +82 -0
- package/lib/editor/input/AcEdPreviewJig.js.map +1 -0
- package/lib/editor/input/AcEditor.d.ts +58 -11
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +86 -22
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts +12 -0
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js +25 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.d.ts +8 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.js +29 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.d.ts +7 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.js +28 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdInputHandler.d.ts +14 -0
- package/lib/editor/input/handler/AcEdInputHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdInputHandler.js +2 -0
- package/lib/editor/input/handler/AcEdInputHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.d.ts +11 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.js +44 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts +11 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js +24 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdPointHandler.d.ts +16 -0
- package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdPointHandler.js +19 -0
- package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdStringHandler.d.ts +12 -0
- package/lib/editor/input/handler/AcEdStringHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdStringHandler.js +24 -0
- package/lib/editor/input/handler/AcEdStringHandler.js.map +1 -0
- package/lib/editor/input/handler/index.d.ts +9 -0
- package/lib/editor/input/handler/index.d.ts.map +1 -0
- package/lib/editor/input/handler/index.js +9 -0
- package/lib/editor/input/handler/index.js.map +1 -0
- package/lib/editor/input/index.d.ts +4 -1
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +4 -1
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.d.ts +72 -0
- package/lib/editor/input/marker/AcEdMarker.d.ts.map +1 -0
- package/lib/editor/input/marker/AcEdMarker.js +124 -0
- package/lib/editor/input/marker/AcEdMarker.js.map +1 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts +52 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts.map +1 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js +91 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js.map +1 -0
- package/lib/editor/input/marker/index.d.ts +3 -0
- package/lib/editor/input/marker/index.d.ts.map +1 -0
- package/lib/editor/input/marker/index.js +3 -0
- package/lib/editor/input/marker/index.js.map +1 -0
- package/lib/editor/input/prompt/AcEdKeyword.d.ts +63 -0
- package/lib/editor/input/prompt/AcEdKeyword.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdKeyword.js +120 -0
- package/lib/editor/input/prompt/AcEdKeyword.js.map +1 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts +52 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.js +103 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +75 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +182 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts +46 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js +114 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts +10 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js +31 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts +39 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js +84 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts +59 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js +140 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts +19 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.js +36 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts +61 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.js +179 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts +46 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.js +113 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts +25 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.js +38 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptResult.d.ts +27 -0
- package/lib/editor/input/prompt/AcEdPromptResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptResult.js +19 -0
- package/lib/editor/input/prompt/AcEdPromptResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.d.ts +22 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.js +23 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts +54 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.js +124 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.js.map +1 -0
- package/lib/editor/input/prompt/index.d.ts +11 -0
- package/lib/editor/input/prompt/index.d.ts.map +1 -0
- package/lib/editor/input/prompt/index.js +11 -0
- package/lib/editor/input/prompt/index.js.map +1 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +114 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdCommandLine.js +453 -0
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +151 -0
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInput.js +239 -0
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts +60 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.js +113 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts +104 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +154 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +113 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.js +2 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.js.map +1 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts +132 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdInputManager.js +477 -0
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -0
- package/lib/editor/input/ui/AcEdRubberBand.d.ts +66 -0
- package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdRubberBand.js +276 -0
- package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -0
- package/lib/editor/input/ui/index.d.ts +3 -0
- package/lib/editor/input/ui/index.d.ts.map +1 -0
- package/lib/editor/input/ui/index.js +3 -0
- package/lib/editor/input/ui/index.js.map +1 -0
- package/lib/editor/view/AcEdBaseView.d.ts +35 -11
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +14 -11
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/i18n/AcApI18n.d.ts +135 -0
- package/lib/i18n/AcApI18n.d.ts.map +1 -0
- package/lib/i18n/AcApI18n.js +208 -0
- package/lib/i18n/AcApI18n.js.map +1 -0
- package/lib/i18n/en/command.d.ts +18 -0
- package/lib/i18n/en/command.d.ts.map +1 -0
- package/lib/i18n/en/command.js +17 -0
- package/lib/i18n/en/command.js.map +1 -0
- package/lib/i18n/en/jig.d.ts +11 -0
- package/lib/i18n/en/jig.d.ts.map +1 -0
- package/lib/i18n/en/jig.js +10 -0
- package/lib/i18n/en/jig.js.map +1 -0
- package/lib/i18n/en/main.d.ts +37 -0
- package/lib/i18n/en/main.d.ts.map +1 -0
- package/lib/i18n/en/main.js +36 -0
- package/lib/i18n/en/main.js.map +1 -0
- package/lib/i18n/index.d.ts +6 -0
- package/lib/i18n/index.d.ts.map +1 -0
- package/lib/i18n/index.js +31 -0
- package/lib/i18n/index.js.map +1 -0
- package/lib/i18n/zh/command.d.ts +18 -0
- package/lib/i18n/zh/command.d.ts.map +1 -0
- package/lib/i18n/zh/command.js +17 -0
- package/lib/i18n/zh/command.js.map +1 -0
- package/lib/i18n/zh/jig.d.ts +11 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -0
- package/lib/i18n/zh/jig.js +10 -0
- package/lib/i18n/zh/jig.js.map +1 -0
- package/lib/i18n/zh/main.d.ts +37 -0
- package/lib/i18n/zh/main.d.ts.map +1 -0
- package/lib/i18n/zh/main.js +36 -0
- package/lib/i18n/zh/main.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/view/AcTrScene.d.ts +19 -6
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +25 -6
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +11 -1
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +73 -35
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +7 -7
- package/lib/editor/input/AcEdBaseInput.d.ts +0 -89
- package/lib/editor/input/AcEdBaseInput.d.ts.map +0 -1
- package/lib/editor/input/AcEdBaseInput.js +0 -166
- package/lib/editor/input/AcEdBaseInput.js.map +0 -1
- package/lib/editor/input/AcEdBoxSelector.d.ts +0 -108
- package/lib/editor/input/AcEdBoxSelector.d.ts.map +0 -1
- package/lib/editor/input/AcEdBoxSelector.js +0 -220
- package/lib/editor/input/AcEdBoxSelector.js.map +0 -1
- package/lib/editor/input/AcEdInputPoint.d.ts +0 -51
- package/lib/editor/input/AcEdInputPoint.d.ts.map +0 -1
- package/lib/editor/input/AcEdInputPoint.js +0 -78
- package/lib/editor/input/AcEdInputPoint.js.map +0 -1
- package/lib/editor/input/AcEdJig.d.ts +0 -180
- package/lib/editor/input/AcEdJig.d.ts.map +0 -1
- package/lib/editor/input/AcEdJig.js +0 -256
- package/lib/editor/input/AcEdJig.js.map +0 -1
- package/lib/editor/input/AcEdJigLoop.d.ts +0 -63
- package/lib/editor/input/AcEdJigLoop.d.ts.map +0 -1
- package/lib/editor/input/AcEdJigLoop.js +0 -91
- package/lib/editor/input/AcEdJigLoop.js.map +0 -1
|
@@ -27,6 +27,12 @@ export interface AcApSettings {
|
|
|
27
27
|
isShowCommandLine: boolean;
|
|
28
28
|
/** Whether coordinate display is visible */
|
|
29
29
|
isShowCoordinate: boolean;
|
|
30
|
+
/** Whether entity info card is visible */
|
|
31
|
+
isShowEntityInfo: boolean;
|
|
32
|
+
/** Whether language selector is visible */
|
|
33
|
+
isShowLanguageSelector: boolean;
|
|
34
|
+
/** Whether main menu is visible */
|
|
35
|
+
isShowMainMenu: boolean;
|
|
30
36
|
/** Whether the toolbar is visible */
|
|
31
37
|
isShowToolbar: boolean;
|
|
32
38
|
/** Whether performance statistics are displayed */
|
|
@@ -177,6 +183,42 @@ export declare class AcApSettingManager<T extends AcApSettings = AcApSettings> {
|
|
|
177
183
|
* @param value - True to show coordinates
|
|
178
184
|
*/
|
|
179
185
|
set isShowCoordinate(value: boolean);
|
|
186
|
+
/**
|
|
187
|
+
* Gets whether entity info card is visible.
|
|
188
|
+
*
|
|
189
|
+
* @returns True if entity info card should be displayed
|
|
190
|
+
*/
|
|
191
|
+
get isShowEntityInfo(): boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Sets whether entity info card is visible.
|
|
194
|
+
*
|
|
195
|
+
* @param value - True to show entity info card
|
|
196
|
+
*/
|
|
197
|
+
set isShowEntityInfo(value: boolean);
|
|
198
|
+
/**
|
|
199
|
+
* Gets whether language selector is visible.
|
|
200
|
+
*
|
|
201
|
+
* @returns True if language selector should be displayed
|
|
202
|
+
*/
|
|
203
|
+
get isShowLanguageSelector(): boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Sets whether language selector is visible.
|
|
206
|
+
*
|
|
207
|
+
* @param value - True to show language selector
|
|
208
|
+
*/
|
|
209
|
+
set isShowLanguageSelector(value: boolean);
|
|
210
|
+
/**
|
|
211
|
+
* Gets whether the main menu is visible.
|
|
212
|
+
*
|
|
213
|
+
* @returns True if the main menu should be displayed
|
|
214
|
+
*/
|
|
215
|
+
get isShowMainMenu(): boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Sets whether the main menu is visible.
|
|
218
|
+
*
|
|
219
|
+
* @param value - True to show the main menu
|
|
220
|
+
*/
|
|
221
|
+
set isShowMainMenu(value: boolean);
|
|
180
222
|
/**
|
|
181
223
|
* Gets whether the toolbar is visible.
|
|
182
224
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApSettingManager.d.ts","sourceRoot":"","sources":["../../src/app/AcApSettingManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAGxD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,OAAO,EAAE,OAAO,CAAA;IAChB,oDAAoD;IACpD,iBAAiB,EAAE,OAAO,CAAA;IAC1B,4CAA4C;IAC5C,gBAAgB,EAAE,OAAO,CAAA;IACzB,qCAAqC;IACrC,aAAa,EAAE,OAAO,CAAA;IACtB,mDAAmD;IACnD,WAAW,EAAE,OAAO,CAAA;IACpB,oDAAoD;IACpD,WAAW,EAAE,eAAe,CAAA;CAC7B;
|
|
1
|
+
{"version":3,"file":"AcApSettingManager.d.ts","sourceRoot":"","sources":["../../src/app/AcApSettingManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAGxD;;;;;;;;;;;;;GAa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kCAIX;CACF"}
|
|
@@ -5,6 +5,9 @@ var DEFAULT_VALUES = {
|
|
|
5
5
|
isDebug: false,
|
|
6
6
|
isShowCommandLine: true,
|
|
7
7
|
isShowCoordinate: true,
|
|
8
|
+
isShowEntityInfo: false,
|
|
9
|
+
isShowLanguageSelector: true,
|
|
10
|
+
isShowMainMenu: true,
|
|
8
11
|
isShowToolbar: true,
|
|
9
12
|
isShowStats: false,
|
|
10
13
|
fontMapping: {}
|
|
@@ -190,6 +193,66 @@ var AcApSettingManager = /** @class */ (function () {
|
|
|
190
193
|
enumerable: false,
|
|
191
194
|
configurable: true
|
|
192
195
|
});
|
|
196
|
+
Object.defineProperty(AcApSettingManager.prototype, "isShowEntityInfo", {
|
|
197
|
+
/**
|
|
198
|
+
* Gets whether entity info card is visible.
|
|
199
|
+
*
|
|
200
|
+
* @returns True if entity info card should be displayed
|
|
201
|
+
*/
|
|
202
|
+
get: function () {
|
|
203
|
+
return this.get('isShowEntityInfo');
|
|
204
|
+
},
|
|
205
|
+
/**
|
|
206
|
+
* Sets whether entity info card is visible.
|
|
207
|
+
*
|
|
208
|
+
* @param value - True to show entity info card
|
|
209
|
+
*/
|
|
210
|
+
set: function (value) {
|
|
211
|
+
this.set('isShowEntityInfo', value);
|
|
212
|
+
},
|
|
213
|
+
enumerable: false,
|
|
214
|
+
configurable: true
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(AcApSettingManager.prototype, "isShowLanguageSelector", {
|
|
217
|
+
/**
|
|
218
|
+
* Gets whether language selector is visible.
|
|
219
|
+
*
|
|
220
|
+
* @returns True if language selector should be displayed
|
|
221
|
+
*/
|
|
222
|
+
get: function () {
|
|
223
|
+
return this.get('isShowLanguageSelector');
|
|
224
|
+
},
|
|
225
|
+
/**
|
|
226
|
+
* Sets whether language selector is visible.
|
|
227
|
+
*
|
|
228
|
+
* @param value - True to show language selector
|
|
229
|
+
*/
|
|
230
|
+
set: function (value) {
|
|
231
|
+
this.set('isShowLanguageSelector', value);
|
|
232
|
+
},
|
|
233
|
+
enumerable: false,
|
|
234
|
+
configurable: true
|
|
235
|
+
});
|
|
236
|
+
Object.defineProperty(AcApSettingManager.prototype, "isShowMainMenu", {
|
|
237
|
+
/**
|
|
238
|
+
* Gets whether the main menu is visible.
|
|
239
|
+
*
|
|
240
|
+
* @returns True if the main menu should be displayed
|
|
241
|
+
*/
|
|
242
|
+
get: function () {
|
|
243
|
+
return this.get('isShowMainMenu');
|
|
244
|
+
},
|
|
245
|
+
/**
|
|
246
|
+
* Sets whether the main menu is visible.
|
|
247
|
+
*
|
|
248
|
+
* @param value - True to show the main menu
|
|
249
|
+
*/
|
|
250
|
+
set: function (value) {
|
|
251
|
+
this.set('isShowMainMenu', value);
|
|
252
|
+
},
|
|
253
|
+
enumerable: false,
|
|
254
|
+
configurable: true
|
|
255
|
+
});
|
|
193
256
|
Object.defineProperty(AcApSettingManager.prototype, "isShowToolbar", {
|
|
194
257
|
/**
|
|
195
258
|
* Gets whether the toolbar is visible.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApSettingManager.js","sourceRoot":"","sources":["../../src/app/AcApSettingManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"AcApSettingManager.js","sourceRoot":"","sources":["../../src/app/AcApSettingManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AA6CpC,kDAAkD;AAClD,IAAM,cAAc,GAAiB;IACnC,OAAO,EAAE,KAAK;IACd,iBAAiB,EAAE,IAAI;IACvB,gBAAgB,EAAE,IAAI;IACtB,gBAAgB,EAAE,KAAK;IACvB,sBAAsB,EAAE,IAAI;IAC5B,cAAc,EAAE,IAAI;IACpB,aAAa,E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AC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAM,CAAA;YAC/D,OAAO,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAA;QAC1C,CAAC;;;OAAA;IACH,yBAAC;AAAD,CAAC,AAlRD,IAkRC"}
|
package/lib/app/index.d.ts
CHANGED
package/lib/app/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
|
package/lib/app/index.js
CHANGED
package/lib/app/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AcDbCircle, AcGePoint3dLike } from '@mlightcad/data-model';
|
|
2
|
+
import { AcApContext } from '../app';
|
|
3
|
+
import { AcEdBaseView, AcEdCommand, AcEdPreviewJig } from '../editor';
|
|
4
|
+
export declare class AcApCircleJig extends AcEdPreviewJig<number> {
|
|
5
|
+
private _circle;
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new zoom-to-box jig.
|
|
8
|
+
*
|
|
9
|
+
* @param view - The view that will be zoomed
|
|
10
|
+
*/
|
|
11
|
+
constructor(view: AcEdBaseView, center: AcGePoint3dLike);
|
|
12
|
+
get entity(): AcDbCircle;
|
|
13
|
+
update(radius: number): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Example Command to create one circle to demostrate how to use Jig.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AcApCircleCmd extends AcEdCommand {
|
|
19
|
+
execute(context: AcApContext): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=AcApCircleCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApCircleCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApCircleCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EACL,YAAY,EACZ,WAAW,EACX,cAAc,EAGf,MAAM,WAAW,CAAA;AAGlB,qBAAa,aAAc,SAAQ,cAAc,CAAC,MAAM,CAAC;IACvD,OAAO,CAAC,OAAO,CAAY;IAE3B;;;;OAIG;gBACS,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe;IAKvD,IAAI,MAAM,IAAI,UAAU,CAEvB;IAED,MAAM,CAAC,MAAM,EAAE,MAAM;CAGtB;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,WAAW;IACtC,OAAO,CAAC,OAAO,EAAE,WAAW;CAiBnC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
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 { AcDbCircle } from '@mlightcad/data-model';
|
|
53
|
+
import { AcApDocManager } from '../app';
|
|
54
|
+
import { AcEdCommand, AcEdPreviewJig, AcEdPromptDistanceOptions, AcEdPromptPointOptions } from '../editor';
|
|
55
|
+
import { AcApI18n } from '../i18n';
|
|
56
|
+
var AcApCircleJig = /** @class */ (function (_super) {
|
|
57
|
+
__extends(AcApCircleJig, _super);
|
|
58
|
+
/**
|
|
59
|
+
* Creates a new zoom-to-box jig.
|
|
60
|
+
*
|
|
61
|
+
* @param view - The view that will be zoomed
|
|
62
|
+
*/
|
|
63
|
+
function AcApCircleJig(view, center) {
|
|
64
|
+
var _this = _super.call(this, view) || this;
|
|
65
|
+
_this._circle = new AcDbCircle(center, 0);
|
|
66
|
+
return _this;
|
|
67
|
+
}
|
|
68
|
+
Object.defineProperty(AcApCircleJig.prototype, "entity", {
|
|
69
|
+
get: function () {
|
|
70
|
+
return this._circle;
|
|
71
|
+
},
|
|
72
|
+
enumerable: false,
|
|
73
|
+
configurable: true
|
|
74
|
+
});
|
|
75
|
+
AcApCircleJig.prototype.update = function (radius) {
|
|
76
|
+
this._circle.radius = radius;
|
|
77
|
+
};
|
|
78
|
+
return AcApCircleJig;
|
|
79
|
+
}(AcEdPreviewJig));
|
|
80
|
+
export { AcApCircleJig };
|
|
81
|
+
/**
|
|
82
|
+
* Example Command to create one circle to demostrate how to use Jig.
|
|
83
|
+
*/
|
|
84
|
+
var AcApCircleCmd = /** @class */ (function (_super) {
|
|
85
|
+
__extends(AcApCircleCmd, _super);
|
|
86
|
+
function AcApCircleCmd() {
|
|
87
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
88
|
+
}
|
|
89
|
+
AcApCircleCmd.prototype.execute = function (context) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
+
var centerPrompt, center, radiusPrompt, radius, db, circle;
|
|
92
|
+
return __generator(this, function (_a) {
|
|
93
|
+
switch (_a.label) {
|
|
94
|
+
case 0:
|
|
95
|
+
centerPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.circle.center'));
|
|
96
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(centerPrompt)];
|
|
97
|
+
case 1:
|
|
98
|
+
center = _a.sent();
|
|
99
|
+
radiusPrompt = new AcEdPromptDistanceOptions(AcApI18n.t('jig.circle.radius'));
|
|
100
|
+
radiusPrompt.jig = new AcApCircleJig(context.view, center);
|
|
101
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getDistance(radiusPrompt)];
|
|
102
|
+
case 2:
|
|
103
|
+
radius = _a.sent();
|
|
104
|
+
db = context.doc.database;
|
|
105
|
+
circle = new AcDbCircle(center, radius);
|
|
106
|
+
db.tables.blockTable.modelSpace.appendEntity(circle);
|
|
107
|
+
return [2 /*return*/];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
return AcApCircleCmd;
|
|
113
|
+
}(AcEdCommand));
|
|
114
|
+
export { AcApCircleCmd };
|
|
115
|
+
//# sourceMappingURL=AcApCircleCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApCircleCmd.js","sourceRoot":"","sources":["../../src/command/AcApCircleCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,uBAAuB,CAAA;AAEnE,OAAO,EAAe,cAAc,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,EAEL,WAAW,EACX,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC;IAAmC,iCAAsB;IAGvD;;;;OAIG;IACH,uBAAY,IAAkB,EAAE,MAAuB;QACrD,YAAA,MAAK,YAAC,IAAI,CAAC,SAAA;QACX,KAAI,CAAC,OAAO,GAAG,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;;IAC1C,CAAC;IAED,sBAAI,iCAAM;aAAV;YACE,OAAO,IAAI,CAAC,OAAO,CAAA;QACrB,CAAC;;;OAAA;IAED,8BAAM,GAAN,UAAO,MAAc;QACnB,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAA;IAC9B,CAAC;IACH,oBAAC;AAAD,CAAC,AApBD,CAAmC,cAAc,GAoBhD;;AAED;;GAEG;AACH;IAAmC,iCAAW;IAA9C;;IAkBA,CAAC;IAjBO,+BAAO,GAAb,UAAc,OAAoB;;;;;;wBAC1B,YAAY,GAAG,IAAI,sBAAsB,CAC7C,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAChC,CAAA;wBACc,qBAAM,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAA;;wBAApE,MAAM,GAAG,SAA2D;wBAEpE,YAAY,GAAG,IAAI,yBAAyB,CAChD,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAChC,CAAA;wBACD,YAAY,CAAC,GAAG,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;wBAExD,qBAAM,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,EAAA;;wBAD1D,MAAM,GACV,SAA8D;wBAE1D,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA;wBACzB,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;wBAC7C,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;;;;;KACrD;IACH,oBAAC;AAAD,CAAC,AAlBD,CAAmC,WAAW,GAkB7C"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { AcDbAlignedDimension, AcDbDatabase, AcGePoint2dLike, AcGePoint3dLike } from '@mlightcad/data-model';
|
|
2
|
+
import { AcApContext } from '../app';
|
|
3
|
+
import { AcEdBaseView, AcEdCommand, AcEdPreviewJig } from '../editor';
|
|
4
|
+
export declare class AcApDimJig extends AcEdPreviewJig<AcGePoint3dLike> {
|
|
5
|
+
private _db;
|
|
6
|
+
private _dim;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new zoom-to-box jig.
|
|
9
|
+
*
|
|
10
|
+
* @param view - The view that will be zoomed
|
|
11
|
+
*/
|
|
12
|
+
constructor(view: AcEdBaseView, db: AcDbDatabase, xline1Point: AcGePoint3dLike);
|
|
13
|
+
get entity(): AcDbAlignedDimension;
|
|
14
|
+
update(point: AcGePoint3dLike): void;
|
|
15
|
+
private updateBlock;
|
|
16
|
+
private calculateDimPoint;
|
|
17
|
+
private calculateAngle;
|
|
18
|
+
/**
|
|
19
|
+
* Adjust start point and end point of extension line
|
|
20
|
+
* @param extensionLine Input extension line to adjust its start point and end point
|
|
21
|
+
*/
|
|
22
|
+
private adjustExtensionLine;
|
|
23
|
+
/**
|
|
24
|
+
* Return one array which contains three lines of the alinged dimension.
|
|
25
|
+
* - The first line in the array is dimension line.
|
|
26
|
+
* - The second line and the third line in the array are extension lines.
|
|
27
|
+
* @returns Return three lines of the alinged dimension
|
|
28
|
+
*/
|
|
29
|
+
private createLines;
|
|
30
|
+
/**
|
|
31
|
+
* Find the point `p2` on a line starting from `p1` at a specified angle
|
|
32
|
+
* and at a distance `length` from `p1`.
|
|
33
|
+
*
|
|
34
|
+
* @param p1 - The start point of the line.
|
|
35
|
+
* @param angle - The angle of the line in radians relative to the x-axis.
|
|
36
|
+
* @param length - The distance from `p1` to `p2`.
|
|
37
|
+
* @returns Return the point `p2`.
|
|
38
|
+
*/
|
|
39
|
+
protected findPointOnLine(p1: AcGePoint2dLike, angle: number, length: number): AcGePoint2dLike;
|
|
40
|
+
private createExtensionLine;
|
|
41
|
+
/**
|
|
42
|
+
* Compute the intersection point between a line 'line1' and a line 'line2' that passes through
|
|
43
|
+
* a given point 'p' and is perpendicular to line 'line1'.
|
|
44
|
+
*
|
|
45
|
+
* @param line The 'line1'.
|
|
46
|
+
* @param p The point through which the perpendicular 'line2' passes.
|
|
47
|
+
* @returns Returns the intersection point of 'line1' and 'line2'.
|
|
48
|
+
*/
|
|
49
|
+
private findIntersectionPoint;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Example Command to create one aligned dimension.
|
|
53
|
+
*/
|
|
54
|
+
export declare class AcApDimCmd extends AcEdCommand {
|
|
55
|
+
execute(context: AcApContext): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=AcApDimCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApDimCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApDimCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAEpB,YAAY,EAGZ,eAAe,EACf,eAAe,EAEhB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EACL,YAAY,EACZ,WAAW,EACX,cAAc,EAEf,MAAM,WAAW,CAAA;AAGlB,qBAAa,UAAW,SAAQ,cAAc,CAAC,eAAe,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAc;IACzB,OAAO,CAAC,IAAI,CAAsB;IAElC;;;;OAIG;gBAED,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,YAAY,EAChB,WAAW,EAAE,eAAe;IAQ9B,IAAI,MAAM,IAAI,oBAAoB,CAEjC;IAED,MAAM,CAAC,KAAK,EAAE,eAAe;IAa7B,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,iBAAiB;IAUzB,OAAO,CAAC,cAAc;IAMtB;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAK3B;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IA8BnB;;;;;;;;OAQG;IACH,SAAS,CAAC,eAAe,CACvB,EAAE,EAAE,eAAe,EACnB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,eAAe;IAOlB,OAAO,CAAC,mBAAmB;IAM3B;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;CAqB9B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACnC,OAAO,CAAC,OAAO,EAAE,WAAW;CAiBnC"}
|
|
@@ -0,0 +1,228 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
31
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
32
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
33
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
37
|
+
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);
|
|
38
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
39
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
40
|
+
function step(op) {
|
|
41
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
42
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
43
|
+
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;
|
|
44
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
45
|
+
switch (op[0]) {
|
|
46
|
+
case 0: case 1: t = op; break;
|
|
47
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
48
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
49
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
50
|
+
default:
|
|
51
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
52
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
53
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
54
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
55
|
+
if (t[2]) _.ops.pop();
|
|
56
|
+
_.trys.pop(); continue;
|
|
57
|
+
}
|
|
58
|
+
op = body.call(thisArg, _);
|
|
59
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
60
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
import { AcDbAlignedDimension, AcDbBlockTableRecord, AcDbLine, AcGeLine3d, AcGeVector3d } from '@mlightcad/data-model';
|
|
64
|
+
import { AcApDocManager } from '../app';
|
|
65
|
+
import { AcEdCommand, AcEdPreviewJig, AcEdPromptPointOptions } from '../editor';
|
|
66
|
+
import { AcApI18n } from '../i18n';
|
|
67
|
+
var AcApDimJig = /** @class */ (function (_super) {
|
|
68
|
+
__extends(AcApDimJig, _super);
|
|
69
|
+
/**
|
|
70
|
+
* Creates a new zoom-to-box jig.
|
|
71
|
+
*
|
|
72
|
+
* @param view - The view that will be zoomed
|
|
73
|
+
*/
|
|
74
|
+
function AcApDimJig(view, db, xline1Point) {
|
|
75
|
+
var _this = _super.call(this, view) || this;
|
|
76
|
+
_this._db = db;
|
|
77
|
+
_this._dim = new AcDbAlignedDimension(xline1Point, xline1Point, xline1Point);
|
|
78
|
+
_this._dim.rotation = 0;
|
|
79
|
+
return _this;
|
|
80
|
+
}
|
|
81
|
+
Object.defineProperty(AcApDimJig.prototype, "entity", {
|
|
82
|
+
get: function () {
|
|
83
|
+
return this._dim;
|
|
84
|
+
},
|
|
85
|
+
enumerable: false,
|
|
86
|
+
configurable: true
|
|
87
|
+
});
|
|
88
|
+
AcApDimJig.prototype.update = function (point) {
|
|
89
|
+
this._dim.xLine2Point = point;
|
|
90
|
+
this._dim.rotation = this.calculateAngle(this._dim.xLine2Point, this._dim.xLine1Point);
|
|
91
|
+
this._dim.dimLinePoint = this.calculateDimPoint(100);
|
|
92
|
+
var blockName = '*UDIM';
|
|
93
|
+
this.updateBlock(blockName);
|
|
94
|
+
this._dim.dimBlockId = blockName;
|
|
95
|
+
};
|
|
96
|
+
AcApDimJig.prototype.updateBlock = function (blockName) {
|
|
97
|
+
this._db.tables.blockTable.remove(blockName);
|
|
98
|
+
// Create block and add the hatch entity in this block
|
|
99
|
+
var block = new AcDbBlockTableRecord();
|
|
100
|
+
block.name = blockName;
|
|
101
|
+
var lines = this.createLines();
|
|
102
|
+
lines.forEach(function (line) {
|
|
103
|
+
return block.appendEntity(new AcDbLine(line.startPoint, line.endPoint));
|
|
104
|
+
});
|
|
105
|
+
this._db.tables.blockTable.add(block);
|
|
106
|
+
return block;
|
|
107
|
+
};
|
|
108
|
+
AcApDimJig.prototype.calculateDimPoint = function (distance) {
|
|
109
|
+
var angle = this._dim.rotation + Math.PI / 2;
|
|
110
|
+
var dimPoint = this.findPointOnLine(this._dim.xLine1Point, angle, distance);
|
|
111
|
+
return __assign(__assign({}, dimPoint), { z: 0 });
|
|
112
|
+
};
|
|
113
|
+
AcApDimJig.prototype.calculateAngle = function (p1, p2) {
|
|
114
|
+
var dx = p2.x - p1.x;
|
|
115
|
+
var dy = p2.y - p1.y;
|
|
116
|
+
return Math.atan2(dy, dx);
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Adjust start point and end point of extension line
|
|
120
|
+
* @param extensionLine Input extension line to adjust its start point and end point
|
|
121
|
+
*/
|
|
122
|
+
AcApDimJig.prototype.adjustExtensionLine = function (extensionLine) {
|
|
123
|
+
extensionLine.extend(10);
|
|
124
|
+
extensionLine.extend(-10, true);
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Return one array which contains three lines of the alinged dimension.
|
|
128
|
+
* - The first line in the array is dimension line.
|
|
129
|
+
* - The second line and the third line in the array are extension lines.
|
|
130
|
+
* @returns Return three lines of the alinged dimension
|
|
131
|
+
*/
|
|
132
|
+
AcApDimJig.prototype.createLines = function () {
|
|
133
|
+
var lines = [];
|
|
134
|
+
var extensionLine1 = this.createExtensionLine(this._dim.xLine1Point);
|
|
135
|
+
var extensionLine2 = this.createExtensionLine(this._dim.xLine2Point);
|
|
136
|
+
var intersectionPoint1 = this.findIntersectionPoint(extensionLine1, this._dim.dimLinePoint);
|
|
137
|
+
var intersectionPoint2 = this.findIntersectionPoint(extensionLine2, this._dim.dimLinePoint);
|
|
138
|
+
var dimensionLine = new AcGeLine3d(intersectionPoint1, intersectionPoint2);
|
|
139
|
+
lines.push(dimensionLine);
|
|
140
|
+
// Create the first extension line with extension
|
|
141
|
+
extensionLine1.endPoint = intersectionPoint1;
|
|
142
|
+
this.adjustExtensionLine(extensionLine1);
|
|
143
|
+
lines.push(extensionLine1);
|
|
144
|
+
// Create the second extension line with extension
|
|
145
|
+
extensionLine2.endPoint = intersectionPoint2;
|
|
146
|
+
this.adjustExtensionLine(extensionLine2);
|
|
147
|
+
lines.push(extensionLine2);
|
|
148
|
+
return lines;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Find the point `p2` on a line starting from `p1` at a specified angle
|
|
152
|
+
* and at a distance `length` from `p1`.
|
|
153
|
+
*
|
|
154
|
+
* @param p1 - The start point of the line.
|
|
155
|
+
* @param angle - The angle of the line in radians relative to the x-axis.
|
|
156
|
+
* @param length - The distance from `p1` to `p2`.
|
|
157
|
+
* @returns Return the point `p2`.
|
|
158
|
+
*/
|
|
159
|
+
AcApDimJig.prototype.findPointOnLine = function (p1, angle, length) {
|
|
160
|
+
// Calculate the new point p2
|
|
161
|
+
var x = p1.x + length * Math.cos(angle);
|
|
162
|
+
var y = p1.y + length * Math.sin(angle);
|
|
163
|
+
return { x: x, y: y };
|
|
164
|
+
};
|
|
165
|
+
AcApDimJig.prototype.createExtensionLine = function (point) {
|
|
166
|
+
var angle = this._dim.rotation + Math.PI / 2;
|
|
167
|
+
var anotherPoint = this.findPointOnLine(point, angle, 200);
|
|
168
|
+
return new AcGeLine3d(point, __assign(__assign({}, anotherPoint), { z: point.z }));
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Compute the intersection point between a line 'line1' and a line 'line2' that passes through
|
|
172
|
+
* a given point 'p' and is perpendicular to line 'line1'.
|
|
173
|
+
*
|
|
174
|
+
* @param line The 'line1'.
|
|
175
|
+
* @param p The point through which the perpendicular 'line2' passes.
|
|
176
|
+
* @returns Returns the intersection point of 'line1' and 'line2'.
|
|
177
|
+
*/
|
|
178
|
+
AcApDimJig.prototype.findIntersectionPoint = function (line1, p) {
|
|
179
|
+
var p1 = line1.startPoint;
|
|
180
|
+
var p2 = line1.endPoint;
|
|
181
|
+
// Direction of line1 (p1 - p2)
|
|
182
|
+
var directionOfLine1 = new AcGeVector3d().subVectors(p2, p1).normalize();
|
|
183
|
+
// Vector from point 'p1' to point 'p3'
|
|
184
|
+
var vectorFromP1ToP3 = new AcGeVector3d().subVectors(p, p1);
|
|
185
|
+
// Project vectorAP onto directionL to get the projection vector
|
|
186
|
+
var projectionLength = vectorFromP1ToP3.dot(directionOfLine1);
|
|
187
|
+
var projectionVector = new AcGeVector3d()
|
|
188
|
+
.copy(directionOfLine1)
|
|
189
|
+
.multiplyScalar(projectionLength);
|
|
190
|
+
// Intersection point is the point on line L at the projection
|
|
191
|
+
var intersection = new AcGeVector3d().addVectors(p1, projectionVector);
|
|
192
|
+
return intersection;
|
|
193
|
+
};
|
|
194
|
+
return AcApDimJig;
|
|
195
|
+
}(AcEdPreviewJig));
|
|
196
|
+
export { AcApDimJig };
|
|
197
|
+
/**
|
|
198
|
+
* Example Command to create one aligned dimension.
|
|
199
|
+
*/
|
|
200
|
+
var AcApDimCmd = /** @class */ (function (_super) {
|
|
201
|
+
__extends(AcApDimCmd, _super);
|
|
202
|
+
function AcApDimCmd() {
|
|
203
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
204
|
+
}
|
|
205
|
+
AcApDimCmd.prototype.execute = function (context) {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
207
|
+
var xLine1PointPrompt, xLine1Point, xLine2PointPrompt;
|
|
208
|
+
return __generator(this, function (_a) {
|
|
209
|
+
switch (_a.label) {
|
|
210
|
+
case 0:
|
|
211
|
+
xLine1PointPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.circle.center'));
|
|
212
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(xLine1PointPrompt)];
|
|
213
|
+
case 1:
|
|
214
|
+
xLine1Point = _a.sent();
|
|
215
|
+
xLine2PointPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.circle.center'));
|
|
216
|
+
xLine2PointPrompt.jig = new AcApDimJig(context.view, context.doc.database, xLine1Point);
|
|
217
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(xLine2PointPrompt)];
|
|
218
|
+
case 2:
|
|
219
|
+
_a.sent();
|
|
220
|
+
return [2 /*return*/];
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
return AcApDimCmd;
|
|
226
|
+
}(AcEdCommand));
|
|
227
|
+
export { AcApDimCmd };
|
|
228
|
+
//# sourceMappingURL=AcApDimCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApDimCmd.js","sourceRoot":"","sources":["../../src/command/AcApDimCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EAEpB,QAAQ,EACR,UAAU,EAGV,YAAY,EACb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAe,cAAc,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,EAEL,WAAW,EACX,cAAc,EACd,sBAAsB,EACvB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC;IAAgC,8BAA+B;IAI7D;;;;OAIG;IACH,oBACE,IAAkB,EAClB,EAAgB,EAChB,WAA4B;QAE5B,YAAA,MAAK,YAAC,IAAI,CAAC,SAAA;QACX,KAAI,CAAC,GAAG,GAAG,EAAE,CAAA;QACb,KAAI,CAAC,IAAI,GAAG,IAAI,oBAAoB,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,CAAC,CAAA;QAC3E,KAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;;IACxB,CAAC;IAED,sBAAI,8BAAM;aAAV;YACE,OAAO,IAAI,CAAC,IAAI,CAAA;QA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ACjE;IACH,iBAAC;AAAD,CAAC,AAlBD,CAAgC,WAAW,GAkB1C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AcApContext } from '../app';
|
|
2
|
+
import { AcEdCommand } from '../command';
|
|
3
|
+
/**
|
|
4
|
+
* This is an internal command used to log some debug information in console.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class AcApLogCmd extends AcEdCommand {
|
|
8
|
+
execute(context: AcApContext): void;
|
|
9
|
+
private printSelectionSet;
|
|
10
|
+
private printStats;
|
|
11
|
+
private printPerformanceData;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=AcApLogCmd.d.ts.map
|