@mlightcad/cad-simple-viewer 1.4.11 → 1.4.13
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 +20139 -12511
- package/dist/index.umd.cjs +102 -94
- package/dist/libredwg-parser-worker.js +6958 -12596
- package/lib/app/AcApAnnotation.d.ts.map +1 -1
- package/lib/app/AcApAnnotation.js +3 -3
- package/lib/app/AcApAnnotation.js.map +1 -1
- package/lib/app/AcApDocManager.d.ts +61 -4
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +162 -29
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApDocument.d.ts +6 -0
- package/lib/app/AcApDocument.d.ts.map +1 -1
- package/lib/app/AcApDocument.js +12 -0
- package/lib/app/AcApDocument.js.map +1 -1
- package/lib/app/AcApProgress.d.ts.map +1 -1
- package/lib/app/AcApProgress.js +3 -3
- package/lib/app/AcApProgress.js.map +1 -1
- package/lib/app/AcApSettingManager.d.ts.map +1 -1
- package/lib/app/AcApSettingManager.js +3 -1
- package/lib/app/AcApSettingManager.js.map +1 -1
- package/lib/app/AcDbOpenDatabaseOptions.d.ts.map +1 -1
- package/lib/command/AcApArcCmd.d.ts +140 -0
- package/lib/command/AcApArcCmd.d.ts.map +1 -0
- package/lib/command/AcApArcCmd.js +1009 -0
- package/lib/command/AcApArcCmd.js.map +1 -0
- package/lib/command/AcApCircleCmd.d.ts +59 -0
- package/lib/command/AcApCircleCmd.d.ts.map +1 -1
- package/lib/command/AcApCircleCmd.js +490 -13
- package/lib/command/AcApCircleCmd.js.map +1 -1
- package/lib/command/AcApClearMeasurementsCmd.d.ts +1 -1
- package/lib/command/AcApClearMeasurementsCmd.d.ts.map +1 -1
- package/lib/command/AcApClearMeasurementsCmd.js +2 -4
- package/lib/command/AcApClearMeasurementsCmd.js.map +1 -1
- package/lib/command/AcApConvertToDxfCmd.d.ts +9 -0
- package/lib/command/AcApConvertToDxfCmd.d.ts.map +1 -0
- package/lib/command/{AcApZoomToBoxCmd.js → AcApConvertToDxfCmd.js} +14 -40
- package/lib/command/AcApConvertToDxfCmd.js.map +1 -0
- package/lib/command/AcApConvertToPngCmd.d.ts +35 -0
- package/lib/command/AcApConvertToPngCmd.d.ts.map +1 -0
- package/lib/command/AcApConvertToPngCmd.js +127 -0
- package/lib/command/AcApConvertToPngCmd.js.map +1 -0
- package/lib/command/AcApDimLinearCmd.d.ts.map +1 -1
- package/lib/command/AcApDimLinearCmd.js +14 -5
- package/lib/command/AcApDimLinearCmd.js.map +1 -1
- package/lib/command/AcApDxfConvertor.d.ts +12 -0
- package/lib/command/AcApDxfConvertor.d.ts.map +1 -0
- package/lib/command/AcApDxfConvertor.js +37 -0
- package/lib/command/AcApDxfConvertor.js.map +1 -0
- package/lib/command/AcApEllipseCmd.d.ts +87 -0
- package/lib/command/AcApEllipseCmd.d.ts.map +1 -0
- package/lib/command/AcApEllipseCmd.js +583 -0
- package/lib/command/AcApEllipseCmd.js.map +1 -0
- package/lib/command/AcApEraseCmd.d.ts.map +1 -1
- package/lib/command/AcApEraseCmd.js +10 -6
- package/lib/command/AcApEraseCmd.js.map +1 -1
- package/lib/command/AcApHatchCmd.d.ts +210 -0
- package/lib/command/AcApHatchCmd.d.ts.map +1 -0
- package/lib/command/AcApHatchCmd.js +808 -0
- package/lib/command/AcApHatchCmd.js.map +1 -0
- package/lib/command/AcApLayerCmd.d.ts +217 -0
- package/lib/command/AcApLayerCmd.d.ts.map +1 -0
- package/lib/command/AcApLayerCmd.js +768 -0
- package/lib/command/AcApLayerCmd.js.map +1 -0
- package/lib/command/AcApLineCmd.d.ts +36 -1
- package/lib/command/AcApLineCmd.d.ts.map +1 -1
- package/lib/command/AcApLineCmd.js +159 -16
- package/lib/command/AcApLineCmd.js.map +1 -1
- package/lib/command/AcApMTextCmd.d.ts.map +1 -1
- package/lib/command/AcApMTextCmd.js +6 -3
- package/lib/command/AcApMTextCmd.js.map +1 -1
- package/lib/command/AcApMeasureAngleCmd.d.ts.map +1 -1
- package/lib/command/AcApMeasureAngleCmd.js +134 -123
- package/lib/command/AcApMeasureAngleCmd.js.map +1 -1
- package/lib/command/AcApMeasureArcCmd.d.ts.map +1 -1
- package/lib/command/AcApMeasureArcCmd.js +165 -147
- package/lib/command/AcApMeasureArcCmd.js.map +1 -1
- package/lib/command/AcApMeasureAreaCmd.d.ts.map +1 -1
- package/lib/command/AcApMeasureAreaCmd.js +186 -175
- package/lib/command/AcApMeasureAreaCmd.js.map +1 -1
- package/lib/command/AcApMeasureDistanceCmd.d.ts.map +1 -1
- package/lib/command/AcApMeasureDistanceCmd.js +51 -39
- package/lib/command/AcApMeasureDistanceCmd.js.map +1 -1
- package/lib/command/AcApMoveCmd.d.ts +16 -0
- package/lib/command/AcApMoveCmd.d.ts.map +1 -0
- package/lib/command/AcApMoveCmd.js +278 -0
- package/lib/command/AcApMoveCmd.js.map +1 -0
- package/lib/command/AcApPngConvertor.d.ts +95 -0
- package/lib/command/AcApPngConvertor.d.ts.map +1 -0
- package/lib/command/AcApPngConvertor.js +205 -0
- package/lib/command/AcApPngConvertor.js.map +1 -0
- package/lib/command/AcApPolygonCmd.d.ts +69 -0
- package/lib/command/AcApPolygonCmd.d.ts.map +1 -0
- package/lib/command/AcApPolygonCmd.js +422 -0
- package/lib/command/AcApPolygonCmd.js.map +1 -0
- package/lib/command/AcApPolylineCmd.d.ts +71 -0
- package/lib/command/AcApPolylineCmd.d.ts.map +1 -0
- package/lib/command/AcApPolylineCmd.js +569 -0
- package/lib/command/AcApPolylineCmd.js.map +1 -0
- package/lib/command/AcApRectCmd.d.ts +149 -4
- package/lib/command/AcApRectCmd.d.ts.map +1 -1
- package/lib/command/AcApRectCmd.js +717 -29
- package/lib/command/AcApRectCmd.js.map +1 -1
- package/lib/command/AcApRevCircleCmd.d.ts +8 -0
- package/lib/command/AcApRevCircleCmd.d.ts.map +1 -1
- package/lib/command/AcApRevCircleCmd.js +30 -6
- package/lib/command/AcApRevCircleCmd.js.map +1 -1
- package/lib/command/AcApRevCloudCmd.d.ts.map +1 -1
- package/lib/command/AcApRevCloudCmd.js +10 -4
- package/lib/command/AcApRevCloudCmd.js.map +1 -1
- package/lib/command/AcApRevRectCmd.d.ts +8 -0
- package/lib/command/AcApRevRectCmd.d.ts.map +1 -1
- package/lib/command/AcApRevRectCmd.js +78 -6
- package/lib/command/AcApRevRectCmd.js.map +1 -1
- package/lib/command/AcApSketchCmd.d.ts.map +1 -1
- package/lib/command/AcApSketchCmd.js +11 -7
- package/lib/command/AcApSketchCmd.js.map +1 -1
- package/lib/command/AcApSplineCmd.d.ts +85 -0
- package/lib/command/AcApSplineCmd.d.ts.map +1 -0
- package/lib/command/AcApSplineCmd.js +620 -0
- package/lib/command/AcApSplineCmd.js.map +1 -0
- package/lib/command/AcApSysVarCmd.d.ts.map +1 -1
- package/lib/command/AcApSysVarCmd.js +6 -3
- package/lib/command/AcApSysVarCmd.js.map +1 -1
- package/lib/command/AcApZoomCmd.d.ts +91 -20
- package/lib/command/AcApZoomCmd.d.ts.map +1 -1
- package/lib/command/AcApZoomCmd.js +288 -23
- package/lib/command/AcApZoomCmd.js.map +1 -1
- package/lib/command/index.d.ts +12 -1
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +12 -1
- package/lib/command/index.js.map +1 -1
- package/lib/editor/command/AcEdCommandIterator.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommandIterator.js.map +1 -1
- package/lib/editor/command/AcEdCommandStack.d.ts +54 -1
- package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommandStack.js +207 -25
- package/lib/editor/command/AcEdCommandStack.js.map +1 -1
- package/lib/editor/global/AcEdUiTheme.d.ts +4 -0
- package/lib/editor/global/AcEdUiTheme.d.ts.map +1 -0
- package/lib/editor/global/AcEdUiTheme.js +44 -0
- package/lib/editor/global/AcEdUiTheme.js.map +1 -0
- package/lib/editor/global/index.d.ts +1 -0
- package/lib/editor/global/index.d.ts.map +1 -1
- package/lib/editor/global/index.js +1 -0
- package/lib/editor/global/index.js.map +1 -1
- package/lib/editor/input/AcEdCursorManager.d.ts +10 -0
- package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
- package/lib/editor/input/AcEdCursorManager.js +24 -4
- package/lib/editor/input/AcEdCursorManager.js.map +1 -1
- package/lib/editor/input/AcEdInputModifiers.d.ts +39 -0
- package/lib/editor/input/AcEdInputModifiers.d.ts.map +1 -0
- package/lib/editor/input/AcEdInputModifiers.js +2 -0
- package/lib/editor/input/AcEdInputModifiers.js.map +1 -0
- package/lib/editor/input/AcEdInputToggles.d.ts +24 -0
- package/lib/editor/input/AcEdInputToggles.d.ts.map +1 -0
- package/lib/editor/input/AcEdInputToggles.js +2 -0
- package/lib/editor/input/AcEdInputToggles.js.map +1 -0
- package/lib/editor/input/AcEdPromptStateMachine.d.ts +110 -0
- package/lib/editor/input/AcEdPromptStateMachine.d.ts.map +1 -0
- package/lib/editor/input/AcEdPromptStateMachine.js +147 -0
- package/lib/editor/input/AcEdPromptStateMachine.js.map +1 -0
- package/lib/editor/input/AcEdSelectionFilter.d.ts +79 -0
- package/lib/editor/input/AcEdSelectionFilter.d.ts.map +1 -0
- package/lib/editor/input/AcEdSelectionFilter.js +231 -0
- package/lib/editor/input/AcEdSelectionFilter.js.map +1 -0
- package/lib/editor/input/AcEditor.d.ts +77 -10
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +162 -1
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/index.d.ts +4 -0
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +4 -0
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.d.ts.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.js +3 -3
- package/lib/editor/input/marker/AcEdMarker.js.map +1 -1
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts +47 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdKeywordCollection.js +30 -4
- package/lib/editor/input/prompt/AcEdKeywordCollection.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +8 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +19 -2
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptBoxResult.d.ts +12 -0
- package/lib/editor/input/prompt/AcEdPromptBoxResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptBoxResult.js +30 -0
- package/lib/editor/input/prompt/AcEdPromptBoxResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleResult.d.ts +9 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleResult.js +28 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptEntityOptions.d.ts +18 -1
- package/lib/editor/input/prompt/AcEdPromptEntityOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptEntityOptions.js +32 -5
- package/lib/editor/input/prompt/AcEdPromptEntityOptions.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptEntityResult.d.ts +14 -0
- package/lib/editor/input/prompt/AcEdPromptEntityResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptEntityResult.js +31 -0
- package/lib/editor/input/prompt/AcEdPromptEntityResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerResult.d.ts +9 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerResult.js +28 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptKeywordOptions.d.ts +1 -1
- package/lib/editor/input/prompt/AcEdPromptKeywordOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptKeywordOptions.js +2 -2
- package/lib/editor/input/prompt/AcEdPromptKeywordOptions.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts +1 -1
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js +2 -2
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts +9 -3
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptOptions.js +22 -4
- package/lib/editor/input/prompt/AcEdPromptOptions.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts +1 -1
- package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptPointOptions.js +2 -2
- package/lib/editor/input/prompt/AcEdPromptPointOptions.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts +3 -3
- package/lib/editor/input/prompt/AcEdPromptSelectionOptions.d.ts +1 -1
- package/lib/editor/input/prompt/AcEdPromptSelectionOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptSelectionOptions.js +2 -2
- package/lib/editor/input/prompt/AcEdPromptSelectionOptions.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptSelectionResult.d.ts +12 -0
- package/lib/editor/input/prompt/AcEdPromptSelectionResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptSelectionResult.js +30 -0
- package/lib/editor/input/prompt/AcEdPromptSelectionResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts +1 -1
- package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptStringOptions.js +2 -2
- package/lib/editor/input/prompt/AcEdPromptStringOptions.js.map +1 -1
- package/lib/editor/input/prompt/index.d.ts +9 -0
- package/lib/editor/input/prompt/index.d.ts.map +1 -1
- package/lib/editor/input/prompt/index.js +9 -0
- package/lib/editor/input/prompt/index.js.map +1 -1
- package/lib/editor/input/session/AcEdKeywordSession.d.ts +67 -1
- package/lib/editor/input/session/AcEdKeywordSession.d.ts.map +1 -1
- package/lib/editor/input/session/AcEdKeywordSession.js +78 -1
- package/lib/editor/input/session/AcEdKeywordSession.js.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +27 -1
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.js +75 -10
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +24 -1
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.js +147 -27
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts +2 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBox.js +4 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts +30 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +46 -15
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +33 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingMessage.d.ts +12 -0
- package/lib/editor/input/ui/AcEdFloatingMessage.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingMessage.js +61 -2
- package/lib/editor/input/ui/AcEdFloatingMessage.js.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts +403 -29
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +1313 -414
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/input/ui/AcEdRubberBand.d.ts +15 -1
- package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdRubberBand.js +43 -11
- package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -1
- package/lib/editor/view/AcEdBaseView.d.ts +66 -0
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +170 -0
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts.map +1 -1
- package/lib/i18n/en/command.d.ts +36 -3
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +36 -3
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/en/jig.d.ts +553 -0
- package/lib/i18n/en/jig.d.ts.map +1 -1
- package/lib/i18n/en/jig.js +557 -4
- package/lib/i18n/en/jig.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +36 -3
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +36 -3
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/i18n/zh/jig.d.ts +553 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -1
- package/lib/i18n/zh/jig.js +557 -4
- package/lib/i18n/zh/jig.js.map +1 -1
- package/lib/plugin/AcApPluginManager.d.ts.map +1 -1
- package/lib/plugin/AcApPluginManager.js.map +1 -1
- package/lib/util/AcApMeasurementElementGenerator.d.ts +36 -0
- package/lib/util/AcApMeasurementElementGenerator.d.ts.map +1 -0
- package/lib/util/AcApMeasurementElementGenerator.js +92 -0
- package/lib/util/AcApMeasurementElementGenerator.js.map +1 -0
- package/lib/util/index.d.ts +1 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +1 -1
- package/lib/util/index.js.map +1 -1
- package/lib/view/AcTrLayer.d.ts.map +1 -1
- package/lib/view/AcTrLayer.js +5 -3
- package/lib/view/AcTrLayer.js.map +1 -1
- package/lib/view/AcTrLayoutView.d.ts +6 -0
- package/lib/view/AcTrLayoutView.d.ts.map +1 -1
- package/lib/view/AcTrLayoutView.js +20 -0
- package/lib/view/AcTrLayoutView.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +0 -1
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +103 -50
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +15 -13
- package/lib/command/AcApZoomToBoxCmd.d.ts +0 -29
- package/lib/command/AcApZoomToBoxCmd.d.ts.map +0 -1
- package/lib/command/AcApZoomToBoxCmd.js.map +0 -1
- package/lib/util/AcApMeasurementUtils.d.ts +0 -12
- package/lib/util/AcApMeasurementUtils.d.ts.map +0 -1
- package/lib/util/AcApMeasurementUtils.js +0 -36
- package/lib/util/AcApMeasurementUtils.js.map +0 -1
|
@@ -49,53 +49,27 @@ 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 {
|
|
53
|
-
import {
|
|
54
|
-
import { AcApI18n } from '../i18n';
|
|
52
|
+
import { AcEdCommand } from '../command';
|
|
53
|
+
import { AcApDxfConvertor } from './AcApDxfConvertor';
|
|
55
54
|
/**
|
|
56
|
-
* Command for
|
|
57
|
-
*
|
|
58
|
-
* This command initiates an interactive zoom-to-box operation where:
|
|
59
|
-
* - User selects a rectangular area by dragging
|
|
60
|
-
* - The view zooms to fit the selected area
|
|
61
|
-
* - The zoom level is adjusted to show the entire selected region
|
|
62
|
-
*
|
|
63
|
-
* This provides precise navigation control, allowing users to quickly
|
|
64
|
-
* focus on specific areas of large drawings.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```typescript
|
|
68
|
-
* const zoomToBoxCmd = new AcApZoomToBoxCmd();
|
|
69
|
-
* await zoomToBoxCmd.execute(context); // User selects area to zoom to
|
|
70
|
-
* ```
|
|
55
|
+
* Command for exporting the current CAD drawing to DXF format.
|
|
71
56
|
*/
|
|
72
|
-
var
|
|
73
|
-
__extends(
|
|
74
|
-
function
|
|
57
|
+
var AcApConvertToDxfCmd = /** @class */ (function (_super) {
|
|
58
|
+
__extends(AcApConvertToDxfCmd, _super);
|
|
59
|
+
function AcApConvertToDxfCmd() {
|
|
75
60
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
76
61
|
}
|
|
77
|
-
|
|
78
|
-
* Executes the zoom-to-box command.
|
|
79
|
-
*
|
|
80
|
-
* @param context - The application context containing the view
|
|
81
|
-
* @returns Promise that resolves when the zoom operation completes
|
|
82
|
-
*/
|
|
83
|
-
AcApZoomToBoxCmd.prototype.execute = function (context) {
|
|
62
|
+
AcApConvertToDxfCmd.prototype.execute = function (_context) {
|
|
84
63
|
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
-
var
|
|
64
|
+
var converter;
|
|
86
65
|
return __generator(this, function (_a) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return [4 /*yield*/, AcApDocManager.instance.editor.getBox(options)];
|
|
91
|
-
case 1:
|
|
92
|
-
box = _a.sent();
|
|
93
|
-
return [2 /*return*/, context.view.zoomTo(box, 1)];
|
|
94
|
-
}
|
|
66
|
+
converter = new AcApDxfConvertor();
|
|
67
|
+
converter.convert();
|
|
68
|
+
return [2 /*return*/];
|
|
95
69
|
});
|
|
96
70
|
});
|
|
97
71
|
};
|
|
98
|
-
return
|
|
72
|
+
return AcApConvertToDxfCmd;
|
|
99
73
|
}(AcEdCommand));
|
|
100
|
-
export {
|
|
101
|
-
//# sourceMappingURL=
|
|
74
|
+
export { AcApConvertToDxfCmd };
|
|
75
|
+
//# sourceMappingURL=AcApConvertToDxfCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApConvertToDxfCmd.js","sourceRoot":"","sources":["../../src/command/AcApConvertToDxfCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD;;GAEG;AACH;IAAyC,uCAAW;IAApD;;IAKA,CAAC;IAJO,qCAAO,GAAb,UAAc,QAAqB;;;;gBAC3B,SAAS,GAAG,IAAI,gBAAgB,EAAE,CAAA;gBACxC,SAAS,CAAC,OAAO,EAAE,CAAA;;;;KACpB;IACH,0BAAC;AAAD,CAAC,AALD,CAAyC,WAAW,GAKnD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AcApContext } from '../app';
|
|
2
|
+
import { AcEdCommand } from '../editor';
|
|
3
|
+
/**
|
|
4
|
+
* Command for exporting the current CAD drawing to PNG format.
|
|
5
|
+
*
|
|
6
|
+
* This command creates a PNG converter and initiates the conversion
|
|
7
|
+
* process to export the current drawing as a PNG file. The command:
|
|
8
|
+
* - Creates a new PNG converter instance
|
|
9
|
+
* - Prompts for optional bounding box (or press Enter to use drawing extents)
|
|
10
|
+
* - Prompts for optional long side pixel value (or press Enter for default)
|
|
11
|
+
* - Converts the current view to PNG format
|
|
12
|
+
* - Automatically downloads the PNG file
|
|
13
|
+
*
|
|
14
|
+
* This is useful for exporting drawings to a raster image format
|
|
15
|
+
* that can be displayed in browsers or used in other applications.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const convertCmd = new AcApConvertToPngCmd();
|
|
20
|
+
* convertCmd.execute(context); // User prompted for bounds and longside
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class AcApConvertToPngCmd extends AcEdCommand {
|
|
24
|
+
/**
|
|
25
|
+
* Executes the PNG conversion command.
|
|
26
|
+
*
|
|
27
|
+
* Prompts the user for:
|
|
28
|
+
* 1. Optional bounding box (press Enter to skip and use drawing extents)
|
|
29
|
+
* 2. Optional long side pixel value (press Enter for default 8000)
|
|
30
|
+
*
|
|
31
|
+
* @param _context - The application context (unused in this command)
|
|
32
|
+
*/
|
|
33
|
+
execute(_context: AcApContext): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=AcApConvertToPngCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApConvertToPngCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApConvertToPngCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EACL,WAAW,EAIZ,MAAM,WAAW,CAAA;AAIlB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;;;;;;;OAQG;IACG,OAAO,CAAC,QAAQ,EAAE,WAAW;CAqCpC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
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 { AcGeBox2d, AcGePoint2d } from '@mlightcad/data-model';
|
|
53
|
+
import { AcApDocManager } from '../app';
|
|
54
|
+
import { AcEdCommand, AcEdPromptBoxOptions, AcEdPromptDoubleOptions, AcEdPromptStatus } from '../editor';
|
|
55
|
+
import { AcApI18n } from '../i18n';
|
|
56
|
+
import { AcApPngConvertor } from './AcApPngConvertor';
|
|
57
|
+
/**
|
|
58
|
+
* Command for exporting the current CAD drawing to PNG format.
|
|
59
|
+
*
|
|
60
|
+
* This command creates a PNG converter and initiates the conversion
|
|
61
|
+
* process to export the current drawing as a PNG file. The command:
|
|
62
|
+
* - Creates a new PNG converter instance
|
|
63
|
+
* - Prompts for optional bounding box (or press Enter to use drawing extents)
|
|
64
|
+
* - Prompts for optional long side pixel value (or press Enter for default)
|
|
65
|
+
* - Converts the current view to PNG format
|
|
66
|
+
* - Automatically downloads the PNG file
|
|
67
|
+
*
|
|
68
|
+
* This is useful for exporting drawings to a raster image format
|
|
69
|
+
* that can be displayed in browsers or used in other applications.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* const convertCmd = new AcApConvertToPngCmd();
|
|
74
|
+
* convertCmd.execute(context); // User prompted for bounds and longside
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
var AcApConvertToPngCmd = /** @class */ (function (_super) {
|
|
78
|
+
__extends(AcApConvertToPngCmd, _super);
|
|
79
|
+
function AcApConvertToPngCmd() {
|
|
80
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Executes the PNG conversion command.
|
|
84
|
+
*
|
|
85
|
+
* Prompts the user for:
|
|
86
|
+
* 1. Optional bounding box (press Enter to skip and use drawing extents)
|
|
87
|
+
* 2. Optional long side pixel value (press Enter for default 8000)
|
|
88
|
+
*
|
|
89
|
+
* @param _context - The application context (unused in this command)
|
|
90
|
+
*/
|
|
91
|
+
AcApConvertToPngCmd.prototype.execute = function (_context) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
93
|
+
var converter, boxOptions, boxResult, bounds, db, ext, longSidePrompt, longSideResult, longSide;
|
|
94
|
+
return __generator(this, function (_a) {
|
|
95
|
+
switch (_a.label) {
|
|
96
|
+
case 0:
|
|
97
|
+
converter = new AcApPngConvertor();
|
|
98
|
+
boxOptions = new AcEdPromptBoxOptions(AcApI18n.t('pngout.boundsFirstCorner'), AcApI18n.t('pngout.boundsSecondCorner'));
|
|
99
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getBox(boxOptions)];
|
|
100
|
+
case 1:
|
|
101
|
+
boxResult = _a.sent();
|
|
102
|
+
if (boxResult.status === AcEdPromptStatus.OK && boxResult.value) {
|
|
103
|
+
bounds = boxResult.value;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
db = AcApDocManager.instance.curDocument.database;
|
|
107
|
+
ext = db.extents;
|
|
108
|
+
bounds = new AcGeBox2d(new AcGePoint2d(ext.min.x, ext.min.y), new AcGePoint2d(ext.max.x, ext.max.y));
|
|
109
|
+
}
|
|
110
|
+
longSidePrompt = new AcEdPromptDoubleOptions(AcApI18n.t('pngout.longSidePrompt'));
|
|
111
|
+
longSidePrompt.allowNone = true;
|
|
112
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getDouble(longSidePrompt)];
|
|
113
|
+
case 2:
|
|
114
|
+
longSideResult = _a.sent();
|
|
115
|
+
longSide = longSideResult.status === AcEdPromptStatus.OK && longSideResult.value !== undefined
|
|
116
|
+
? longSideResult.value
|
|
117
|
+
: 8000;
|
|
118
|
+
converter.convert(bounds, longSide);
|
|
119
|
+
return [2 /*return*/];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
return AcApConvertToPngCmd;
|
|
125
|
+
}(AcEdCommand));
|
|
126
|
+
export { AcApConvertToPngCmd };
|
|
127
|
+
//# sourceMappingURL=AcApConvertToPngCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApConvertToPngCmd.js","sourceRoot":"","sources":["../../src/command/AcApConvertToPngCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAE9D,OAAO,EAAe,cAAc,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAAyC,uCAAW;IAApD;;IA+CA,CAAC;IA9CC;;;;;;;;OAQG;IACG,qCAAO,GAAb,UAAc,QAAqB;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AAI,CAAA;wBAEV,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;;;;;KACpC;IACH,0BAAC;AAAD,CAAC,AA/CD,CAAyC,WAAW,GA+CnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApDimLinearCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApDimLinearCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,YAAY,EAGZ,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EACL,YAAY,EACZ,WAAW,EAEX,cAAc,
|
|
1
|
+
{"version":3,"file":"AcApDimLinearCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApDimLinearCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,YAAY,EAGZ,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EACL,YAAY,EACZ,WAAW,EAEX,cAAc,EAGf,MAAM,WAAW,CAAA;AAGlB,qBAAa,UAAW,SAAQ,cAAc,CAAC,eAAe,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAc;IACzB,OAAO,CAAC,IAAI,CAAsB;IAClC,OAAO,CAAC,aAAa,CAAU;IAE/B;;;;OAIG;gBAED,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,YAAY,EAChB,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,eAAe;IAW9B,IAAI,MAAM,IAAI,oBAAoB,CAEjC;IAED,MAAM,CAAC,KAAK,EAAE,eAAe;IAgB7B,GAAG;IAKH,OAAO,CAAC,cAAc;CAKvB;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;;IAMzC,OAAO,CAAC,OAAO,EAAE,WAAW;IA6ClC,OAAO,CAAC,uBAAuB;CAiBhC"}
|
|
@@ -62,7 +62,7 @@ var __values = (this && this.__values) || function(o) {
|
|
|
62
62
|
};
|
|
63
63
|
import { AcDbAlignedDimension, AcDbDataGenerator } from '@mlightcad/data-model';
|
|
64
64
|
import { AcApDocManager } from '../app';
|
|
65
|
-
import { AcEdCommand, AcEdOpenMode, AcEdPreviewJig, AcEdPromptPointOptions } from '../editor';
|
|
65
|
+
import { AcEdCommand, AcEdOpenMode, AcEdPreviewJig, AcEdPromptPointOptions, AcEdPromptStatus } from '../editor';
|
|
66
66
|
import { AcApI18n } from '../i18n';
|
|
67
67
|
var AcApDimJig = /** @class */ (function (_super) {
|
|
68
68
|
__extends(AcApDimJig, _super);
|
|
@@ -124,24 +124,33 @@ var AcApDimLinearCmd = /** @class */ (function (_super) {
|
|
|
124
124
|
}
|
|
125
125
|
AcApDimLinearCmd.prototype.execute = function (context) {
|
|
126
126
|
return __awaiter(this, void 0, void 0, function () {
|
|
127
|
-
var xLine1PointPrompt, xLine1Point, xLine2PointPrompt, xLine2Point, dimLinePointPrompt, dimLinePoint, db, dimension, blockName;
|
|
127
|
+
var xLine1PointPrompt, xLine1PointResult, xLine1Point, xLine2PointPrompt, xLine2PointResult, xLine2Point, dimLinePointPrompt, dimLinePointResult, dimLinePoint, db, dimension, blockName;
|
|
128
128
|
return __generator(this, function (_a) {
|
|
129
129
|
switch (_a.label) {
|
|
130
130
|
case 0:
|
|
131
131
|
xLine1PointPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.dimlinear.xLine1Point'));
|
|
132
132
|
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(xLine1PointPrompt)];
|
|
133
133
|
case 1:
|
|
134
|
-
|
|
134
|
+
xLine1PointResult = _a.sent();
|
|
135
|
+
if (xLine1PointResult.status !== AcEdPromptStatus.OK)
|
|
136
|
+
return [2 /*return*/];
|
|
137
|
+
xLine1Point = xLine1PointResult.value;
|
|
135
138
|
xLine2PointPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.dimlinear.xLine2Point'));
|
|
136
139
|
xLine2PointPrompt.useBasePoint = true;
|
|
137
140
|
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(xLine2PointPrompt)];
|
|
138
141
|
case 2:
|
|
139
|
-
|
|
142
|
+
xLine2PointResult = _a.sent();
|
|
143
|
+
if (xLine2PointResult.status !== AcEdPromptStatus.OK)
|
|
144
|
+
return [2 /*return*/];
|
|
145
|
+
xLine2Point = xLine2PointResult.value;
|
|
140
146
|
dimLinePointPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.dimlinear.dimLinePoint'));
|
|
141
147
|
dimLinePointPrompt.jig = new AcApDimJig(context.view, context.doc.database, xLine1Point, xLine2Point);
|
|
142
148
|
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(dimLinePointPrompt)];
|
|
143
149
|
case 3:
|
|
144
|
-
|
|
150
|
+
dimLinePointResult = _a.sent();
|
|
151
|
+
if (dimLinePointResult.status !== AcEdPromptStatus.OK)
|
|
152
|
+
return [2 /*return*/];
|
|
153
|
+
dimLinePoint = dimLinePointResult.value;
|
|
145
154
|
db = context.doc.database;
|
|
146
155
|
dimension = new AcDbAlignedDimension(xLine1Point, xLine2Point, dimLinePoint);
|
|
147
156
|
blockName = this.getAvaiableDimBlockName(db);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApDimLinearCmd.js","sourceRoot":"","sources":["../../src/command/AcApDimLinearCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,EAGlB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAe,cAAc,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,EAEL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,sBAAsB,
|
|
1
|
+
{"version":3,"file":"AcApDimLinearCmd.js","sourceRoot":"","sources":["../../src/command/AcApDim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AAC,CAAA;wBAClD,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAA;wBAC7D,SAAS,CAAC,UAAU,GAAG,SAAS,CAAA;wBAChC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;;;;;KACxD;IAEO,kDAAuB,GAA/B,UAAgC,EAAgB;;QAC9C,IAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA;QAEjD,IAAI,MAAM,GAAG,CAAC,CAAA;;YAEd,KAAoB,IAAA,WAAA,SAAA,MAAM,CAAA,8BAAA,kDAAE,CAAC;gBAAxB,IAAM,KAAK,mBAAA;gBACd,IAAM,MAAI,GAAG,KAAK,CAAC,IAAI,CAAA;gBACvB,IAAI,CAAC,MAAI,CAAC,UAAU,CAAC,IAAI,CAAC;oBAAE,SAAQ;gBAEpC,IAAM,GAAG,GAAG,MAAM,CAAC,MAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,kBAAkB;gBACpD,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,MAAM,EAAE,CAAC;oBAC1C,MAAM,GAAG,GAAG,CAAA;gBACd,CAAC;YACH,CAAC;;;;;;;;;QAED,OAAO,YAAK,MAAM,GAAG,CAAC,CAAE,CAAA;IAC1B,CAAC;IACH,uBAAC;AAAD,CAAC,AApED,CAAsC,WAAW,GAoEhD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility class for exporting the current CAD drawing to DXF format.
|
|
3
|
+
*/
|
|
4
|
+
export declare class AcApDxfConvertor {
|
|
5
|
+
/**
|
|
6
|
+
* Exports the current drawing database to a DXF file and downloads it.
|
|
7
|
+
*/
|
|
8
|
+
convert(): void;
|
|
9
|
+
private createFileAndDownloadIt;
|
|
10
|
+
private getBaseName;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=AcApDxfConvertor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApDxfConvertor.d.ts","sourceRoot":"","sources":["../../src/command/AcApDxfConvertor.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IACH,OAAO;IAOP,OAAO,CAAC,uBAAuB;IAc/B,OAAO,CAAC,WAAW;CAIpB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AcApDocManager } from '../app';
|
|
2
|
+
/**
|
|
3
|
+
* Utility class for exporting the current CAD drawing to DXF format.
|
|
4
|
+
*/
|
|
5
|
+
var AcApDxfConvertor = /** @class */ (function () {
|
|
6
|
+
function AcApDxfConvertor() {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Exports the current drawing database to a DXF file and downloads it.
|
|
10
|
+
*/
|
|
11
|
+
AcApDxfConvertor.prototype.convert = function () {
|
|
12
|
+
var document = AcApDocManager.instance.curDocument;
|
|
13
|
+
var dxfContent = document.database.dxfOut(undefined, 6);
|
|
14
|
+
var baseName = this.getBaseName(document.fileName || document.docTitle);
|
|
15
|
+
this.createFileAndDownloadIt(dxfContent, "".concat(baseName, ".dxf"));
|
|
16
|
+
};
|
|
17
|
+
AcApDxfConvertor.prototype.createFileAndDownloadIt = function (dxfContent, fileName) {
|
|
18
|
+
var dxfBlob = new Blob([dxfContent], {
|
|
19
|
+
type: 'application/dxf;charset=utf-8'
|
|
20
|
+
});
|
|
21
|
+
var url = URL.createObjectURL(dxfBlob);
|
|
22
|
+
var downloadLink = document.createElement('a');
|
|
23
|
+
downloadLink.href = url;
|
|
24
|
+
downloadLink.download = fileName;
|
|
25
|
+
document.body.appendChild(downloadLink);
|
|
26
|
+
downloadLink.click();
|
|
27
|
+
document.body.removeChild(downloadLink);
|
|
28
|
+
URL.revokeObjectURL(url);
|
|
29
|
+
};
|
|
30
|
+
AcApDxfConvertor.prototype.getBaseName = function (fileName) {
|
|
31
|
+
var normalizedName = (fileName === null || fileName === void 0 ? void 0 : fileName.trim()) || 'drawing';
|
|
32
|
+
return normalizedName.replace(/\.[^.]+$/, '') || 'drawing';
|
|
33
|
+
};
|
|
34
|
+
return AcApDxfConvertor;
|
|
35
|
+
}());
|
|
36
|
+
export { AcApDxfConvertor };
|
|
37
|
+
//# sourceMappingURL=AcApDxfConvertor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApDxfConvertor.js","sourceRoot":"","sources":["../../src/command/AcApDxfConvertor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAEvC;;GAEG;AACH;IAAA;IA6BA,CAAC;IA5BC;;OAEG;IACH,kCAAO,GAAP;QACE,IAAM,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC,WAAW,CAAA;QACpD,IAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;QACzD,IAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAA;QACzE,IAAI,CAAC,uBAAuB,CAAC,UAAU,EAAE,UAAG,QAAQ,SAAM,CAAC,CAAA;IAC7D,CAAC;IAEO,kDAAuB,GAA/B,UAAgC,UAAkB,EAAE,QAAgB;QAClE,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,CAAC,UAAU,CAAC,EAAE;YACrC,IAAI,EAAE,+BAA+B;SACtC,CAAC,CAAA;QACF,IAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;QACxC,IAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;QAChD,YAAY,CAAC,IAAI,GAAG,GAAG,CAAA;QACvB,YAAY,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAChC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;QACvC,YAAY,CAAC,KAAK,EAAE,CAAA;QACpB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;QACvC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;IAEO,sCAAW,GAAnB,UAAoB,QAAgB;QAClC,IAAM,cAAc,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,EAAE,KAAI,SAAS,CAAA;QACpD,OAAO,cAAc,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,SAAS,CAAA;IAC5D,CAAC;IACH,uBAAC;AAAD,CAAC,AA7BD,IA6BC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { AcApContext } from '../app';
|
|
2
|
+
import { AcEdCommand } from '../editor';
|
|
3
|
+
/**
|
|
4
|
+
* Command to create one ellipse or ellipse arc.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AcApEllipseCmd extends AcEdCommand {
|
|
7
|
+
/**
|
|
8
|
+
* Creates ELLIPSE command instance.
|
|
9
|
+
*/
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Command entry point.
|
|
13
|
+
*
|
|
14
|
+
* Supported branches:
|
|
15
|
+
* - Axis endpoint workflow
|
|
16
|
+
* - Center-first workflow
|
|
17
|
+
* - Arc-prefixed variants for ellipse arc creation
|
|
18
|
+
*
|
|
19
|
+
* @param context - Current application/document context.
|
|
20
|
+
*/
|
|
21
|
+
execute(context: AcApContext): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Adds one localized keyword to a point prompt.
|
|
24
|
+
*
|
|
25
|
+
* @param prompt - Target point prompt.
|
|
26
|
+
* @param key - Keyword i18n key suffix.
|
|
27
|
+
*/
|
|
28
|
+
private addKeyword;
|
|
29
|
+
/**
|
|
30
|
+
* Appends final ellipse entity to model space.
|
|
31
|
+
*
|
|
32
|
+
* @param context - Current application/document context.
|
|
33
|
+
* @param definition - Ellipse geometric definition to append.
|
|
34
|
+
*/
|
|
35
|
+
private appendEllipse;
|
|
36
|
+
/**
|
|
37
|
+
* Emits one warning message for invalid ellipse input.
|
|
38
|
+
*
|
|
39
|
+
* @param key - Invalid-input category key.
|
|
40
|
+
*/
|
|
41
|
+
private warnInvalidInput;
|
|
42
|
+
/**
|
|
43
|
+
* Runs `Arc` entry branch where user can provide axis endpoints or center.
|
|
44
|
+
*
|
|
45
|
+
* @param context - Current application/document context.
|
|
46
|
+
*/
|
|
47
|
+
private runArcEntryFlow;
|
|
48
|
+
/**
|
|
49
|
+
* Runs center-first workflow:
|
|
50
|
+
* center -> first axis endpoint -> other axis/rotation -> optional arc angles.
|
|
51
|
+
*
|
|
52
|
+
* @param context - Current application/document context.
|
|
53
|
+
* @param arcMode - Whether to continue into arc-angle prompts.
|
|
54
|
+
*/
|
|
55
|
+
private runCenterFlow;
|
|
56
|
+
/**
|
|
57
|
+
* Runs axis-endpoint workflow:
|
|
58
|
+
* first axis endpoint -> second axis endpoint -> other axis/rotation.
|
|
59
|
+
*
|
|
60
|
+
* @param context - Current application/document context.
|
|
61
|
+
* @param firstAxisEndpoint - First endpoint of major/minor axis line.
|
|
62
|
+
* @param arcMode - Whether to continue into arc-angle prompts.
|
|
63
|
+
*/
|
|
64
|
+
private runAxisEndFlow;
|
|
65
|
+
/**
|
|
66
|
+
* Prompts for the second axis radius by point or rotation angle option.
|
|
67
|
+
*
|
|
68
|
+
* In arc mode, this method also continues into arc start/end angle prompts.
|
|
69
|
+
*
|
|
70
|
+
* @param context - Current application/document context.
|
|
71
|
+
* @param center - Ellipse center point.
|
|
72
|
+
* @param firstAxisUnit - Unit direction of first specified axis.
|
|
73
|
+
* @param firstAxisRadius - Radius length along first specified axis.
|
|
74
|
+
* @param arcMode - Whether to return an ellipse arc definition.
|
|
75
|
+
* @returns Final ellipse definition, or `undefined` on cancel/invalid.
|
|
76
|
+
*/
|
|
77
|
+
private promptOtherAxis;
|
|
78
|
+
/**
|
|
79
|
+
* Prompts start and end angles for ellipse-arc creation.
|
|
80
|
+
*
|
|
81
|
+
* @param context - Current application/document context.
|
|
82
|
+
* @param baseEllipse - Base full-ellipse definition before arc trimming.
|
|
83
|
+
* @returns Arc ellipse definition, or `undefined` when canceled.
|
|
84
|
+
*/
|
|
85
|
+
private promptArcAngles;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=AcApEllipseCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApEllipseCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApEllipseCmd.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EAEL,WAAW,EAQZ,MAAM,WAAW,CAAA;AA0PlB;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;OAEG;;IAMH;;;;;;;;;OASG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;IAuBlC;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAQlB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAarB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;;;OAIG;YACW,eAAe;IAgB7B;;;;;;OAMG;YACW,aAAa;IAqC3B;;;;;;;OAOG;YACW,cAAc;IAsC5B;;;;;;;;;;;OAWG;YACW,eAAe;IA6F7B;;;;;;OAMG;YACW,eAAe;CAqE9B"}
|