@mlightcad/cad-simple-viewer 1.5.10 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -8
- package/dist/cad-simple-viewer.js +35023 -70495
- package/dist/cad-simple-viewer.umd.cjs +143 -420
- package/lib/app/AcApDocManager.d.ts +50 -39
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +146 -72
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApSettingManager.d.ts +24 -10
- package/lib/app/AcApSettingManager.d.ts.map +1 -1
- package/lib/app/AcApSettingManager.js +49 -10
- package/lib/app/AcApSettingManager.js.map +1 -1
- package/lib/app/AcApWebworkerReadiness.d.ts +7 -2
- package/lib/app/AcApWebworkerReadiness.d.ts.map +1 -1
- package/lib/app/AcApWebworkerReadiness.js +13 -8
- package/lib/app/AcApWebworkerReadiness.js.map +1 -1
- package/lib/app/AcApWorkerAssets.d.ts +14 -1
- package/lib/app/AcApWorkerAssets.d.ts.map +1 -1
- package/lib/app/AcApWorkerAssets.js +14 -1
- package/lib/app/AcApWorkerAssets.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/AcApRedoCmd.d.ts +1 -1
- package/lib/command/AcApRedoCmd.d.ts.map +1 -1
- package/lib/command/AcApRedoCmd.js +9 -4
- package/lib/command/AcApRedoCmd.js.map +1 -1
- package/lib/command/AcApUndoCmd.d.ts +1 -1
- package/lib/command/AcApUndoCmd.d.ts.map +1 -1
- package/lib/command/AcApUndoCmd.js +9 -4
- package/lib/command/AcApUndoCmd.js.map +1 -1
- package/lib/command/convert/AcApConvertToPngCmd.d.ts.map +1 -1
- package/lib/command/convert/AcApConvertToPngCmd.js +5 -1
- package/lib/command/convert/AcApConvertToPngCmd.js.map +1 -1
- package/lib/command/convert/AcApPngConvertor.d.ts +4 -1
- package/lib/command/convert/AcApPngConvertor.d.ts.map +1 -1
- package/lib/command/convert/AcApPngConvertor.js +131 -78
- package/lib/command/convert/AcApPngConvertor.js.map +1 -1
- package/lib/command/draw/AcApRevCloudCmd.d.ts +48 -0
- package/lib/command/draw/AcApRevCloudCmd.d.ts.map +1 -0
- package/lib/command/draw/AcApRevCloudCmd.js +747 -0
- package/lib/command/draw/AcApRevCloudCmd.js.map +1 -0
- package/lib/command/draw/AcApRevCloudGeom.d.ts +57 -0
- package/lib/command/draw/AcApRevCloudGeom.d.ts.map +1 -0
- package/lib/command/draw/AcApRevCloudGeom.js +373 -0
- package/lib/command/draw/AcApRevCloudGeom.js.map +1 -0
- package/lib/command/draw/AcApSketchCmd.d.ts +59 -0
- package/lib/command/draw/AcApSketchCmd.d.ts.map +1 -0
- package/lib/command/draw/AcApSketchCmd.js +537 -0
- package/lib/command/draw/AcApSketchCmd.js.map +1 -0
- package/lib/command/draw/index.d.ts +3 -0
- package/lib/command/draw/index.d.ts.map +1 -1
- package/lib/command/draw/index.js +3 -0
- package/lib/command/draw/index.js.map +1 -1
- package/lib/command/index.d.ts +2 -1
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +2 -1
- package/lib/command/index.js.map +1 -1
- package/lib/command/markup/AcApClearMarkupsCmd.d.ts +10 -0
- package/lib/command/markup/AcApClearMarkupsCmd.d.ts.map +1 -0
- package/lib/command/{review/AcApRevCircleCmd.js → markup/AcApClearMarkupsCmd.js} +19 -49
- package/lib/command/markup/AcApClearMarkupsCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupArrowCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupArrowCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupArrowCmd.js +164 -0
- package/lib/command/markup/AcApMarkupArrowCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupCalloutCmd.d.ts +17 -0
- package/lib/command/markup/AcApMarkupCalloutCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupCalloutCmd.js +259 -0
- package/lib/command/markup/AcApMarkupCalloutCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupCalloutDrag.d.ts +78 -0
- package/lib/command/markup/AcApMarkupCalloutDrag.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupCalloutDrag.js +78 -0
- package/lib/command/markup/AcApMarkupCalloutDrag.js.map +1 -0
- package/lib/command/markup/AcApMarkupCircleCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupCircleCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupCircleCmd.js +174 -0
- package/lib/command/markup/AcApMarkupCircleCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupCloudCmd.d.ts +11 -0
- package/lib/command/markup/AcApMarkupCloudCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupCloudCmd.js +178 -0
- package/lib/command/markup/AcApMarkupCloudCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupCmdUtil.d.ts +43 -0
- package/lib/command/markup/AcApMarkupCmdUtil.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupCmdUtil.js +133 -0
- package/lib/command/markup/AcApMarkupCmdUtil.js.map +1 -0
- package/lib/command/markup/AcApMarkupGeometry.d.ts +57 -0
- package/lib/command/markup/AcApMarkupGeometry.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupGeometry.js +231 -0
- package/lib/command/markup/AcApMarkupGeometry.js.map +1 -0
- package/lib/command/markup/AcApMarkupHighlightCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupHighlightCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupHighlightCmd.js +166 -0
- package/lib/command/markup/AcApMarkupHighlightCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupHistory.d.ts +139 -0
- package/lib/command/markup/AcApMarkupHistory.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupHistory.js +336 -0
- package/lib/command/markup/AcApMarkupHistory.js.map +1 -0
- package/lib/command/markup/AcApMarkupImportExportCmd.d.ts +17 -0
- package/lib/command/markup/AcApMarkupImportExportCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupImportExportCmd.js +182 -0
- package/lib/command/markup/AcApMarkupImportExportCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupLineCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupLineCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupLineCmd.js +185 -0
- package/lib/command/markup/AcApMarkupLineCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupPresenter.d.ts +62 -0
- package/lib/command/markup/AcApMarkupPresenter.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupPresenter.js +288 -0
- package/lib/command/markup/AcApMarkupPresenter.js.map +1 -0
- package/lib/command/markup/AcApMarkupRectCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupRectCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupRectCmd.js +174 -0
- package/lib/command/markup/AcApMarkupRectCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupRepublish.d.ts +29 -0
- package/lib/command/markup/AcApMarkupRepublish.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupRepublish.js +28 -0
- package/lib/command/markup/AcApMarkupRepublish.js.map +1 -0
- package/lib/command/markup/AcApMarkupShapeBuilder.d.ts +88 -0
- package/lib/command/markup/AcApMarkupShapeBuilder.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupShapeBuilder.js +246 -0
- package/lib/command/markup/AcApMarkupShapeBuilder.js.map +1 -0
- package/lib/command/markup/AcApMarkupShapeCallout.d.ts +46 -0
- package/lib/command/markup/AcApMarkupShapeCallout.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupShapeCallout.js +356 -0
- package/lib/command/markup/AcApMarkupShapeCallout.js.map +1 -0
- package/lib/command/markup/AcApMarkupSidecar.d.ts +14 -0
- package/lib/command/markup/AcApMarkupSidecar.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupSidecar.js +196 -0
- package/lib/command/markup/AcApMarkupSidecar.js.map +1 -0
- package/lib/command/markup/AcApMarkupStampCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupStampCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupStampCmd.js +158 -0
- package/lib/command/markup/AcApMarkupStampCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupStore.d.ts +94 -0
- package/lib/command/markup/AcApMarkupStore.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupStore.js +327 -0
- package/lib/command/markup/AcApMarkupStore.js.map +1 -0
- package/lib/command/markup/AcApMarkupTextCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupTextCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupTextCmd.js +141 -0
- package/lib/command/markup/AcApMarkupTextCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupTextEdit.d.ts +88 -0
- package/lib/command/markup/AcApMarkupTextEdit.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupTextEdit.js +249 -0
- package/lib/command/markup/AcApMarkupTextEdit.js.map +1 -0
- package/lib/command/markup/AcApMarkupTypes.d.ts +118 -0
- package/lib/command/markup/AcApMarkupTypes.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupTypes.js +8 -0
- package/lib/command/markup/AcApMarkupTypes.js.map +1 -0
- package/lib/command/markup/AcApMarkupUtil.d.ts +41 -0
- package/lib/command/markup/AcApMarkupUtil.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupUtil.js +135 -0
- package/lib/command/markup/AcApMarkupUtil.js.map +1 -0
- package/lib/command/markup/AcApMarkupVisibilityCmd.d.ts +17 -0
- package/lib/command/markup/AcApMarkupVisibilityCmd.d.ts.map +1 -0
- package/lib/command/{review/AcApRevVisibilityCmd.js → markup/AcApMarkupVisibilityCmd.js} +30 -27
- package/lib/command/markup/AcApMarkupVisibilityCmd.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupCalloutEntity.d.ts +48 -0
- package/lib/command/markup/entity/AcApMarkupCalloutEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupCalloutEntity.js +291 -0
- package/lib/command/markup/entity/AcApMarkupCalloutEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntity.d.ts +131 -0
- package/lib/command/markup/entity/AcApMarkupEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntity.js +191 -0
- package/lib/command/markup/entity/AcApMarkupEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntityFactory.d.ts +20 -0
- package/lib/command/markup/entity/AcApMarkupEntityFactory.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntityFactory.js +43 -0
- package/lib/command/markup/entity/AcApMarkupEntityFactory.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntityGrips.d.ts +94 -0
- package/lib/command/markup/entity/AcApMarkupEntityGrips.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntityGrips.js +204 -0
- package/lib/command/markup/entity/AcApMarkupEntityGrips.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupHighlightEntity.d.ts +27 -0
- package/lib/command/markup/entity/AcApMarkupHighlightEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupHighlightEntity.js +124 -0
- package/lib/command/markup/entity/AcApMarkupHighlightEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupSegmentEntity.d.ts +40 -0
- package/lib/command/markup/entity/AcApMarkupSegmentEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupSegmentEntity.js +294 -0
- package/lib/command/markup/entity/AcApMarkupSegmentEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupShapeEntity.d.ts +32 -0
- package/lib/command/markup/entity/AcApMarkupShapeEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupShapeEntity.js +241 -0
- package/lib/command/markup/entity/AcApMarkupShapeEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupStampEntity.d.ts +23 -0
- package/lib/command/markup/entity/AcApMarkupStampEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupStampEntity.js +125 -0
- package/lib/command/markup/entity/AcApMarkupStampEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupTextEntity.d.ts +23 -0
- package/lib/command/markup/entity/AcApMarkupTextEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupTextEntity.js +129 -0
- package/lib/command/markup/entity/AcApMarkupTextEntity.js.map +1 -0
- package/lib/command/markup/entity/index.d.ts +13 -0
- package/lib/command/markup/entity/index.d.ts.map +1 -0
- package/lib/command/markup/entity/index.js +13 -0
- package/lib/command/markup/entity/index.js.map +1 -0
- package/lib/command/markup/index.d.ts +27 -0
- package/lib/command/markup/index.d.ts.map +1 -0
- package/lib/command/markup/index.js +27 -0
- package/lib/command/markup/index.js.map +1 -0
- package/lib/command/measure/AcApClearMeasurementsCmd.d.ts +5 -12
- package/lib/command/measure/AcApClearMeasurementsCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApClearMeasurementsCmd.js +42 -20
- package/lib/command/measure/AcApClearMeasurementsCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureAngleCmd.d.ts +13 -3
- package/lib/command/measure/AcApMeasureAngleCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureAngleCmd.js +76 -210
- package/lib/command/measure/AcApMeasureAngleCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureArcCmd.d.ts +21 -1
- package/lib/command/measure/AcApMeasureArcCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureArcCmd.js +103 -97
- package/lib/command/measure/AcApMeasureArcCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureAreaCmd.d.ts +11 -1
- package/lib/command/measure/AcApMeasureAreaCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureAreaCmd.js +126 -144
- package/lib/command/measure/AcApMeasureAreaCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureDistanceCmd.d.ts +24 -15
- package/lib/command/measure/AcApMeasureDistanceCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureDistanceCmd.js +52 -52
- package/lib/command/measure/AcApMeasureDistanceCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasurePointCmd.d.ts +24 -0
- package/lib/command/measure/AcApMeasurePointCmd.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurePointCmd.js +114 -0
- package/lib/command/measure/AcApMeasurePointCmd.js.map +1 -0
- package/lib/command/measure/AcApMeasurementGeometry.d.ts +22 -0
- package/lib/command/measure/AcApMeasurementGeometry.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementGeometry.js +127 -0
- package/lib/command/measure/AcApMeasurementGeometry.js.map +1 -0
- package/lib/command/measure/AcApMeasurementHistory.d.ts +78 -0
- package/lib/command/measure/AcApMeasurementHistory.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementHistory.js +387 -0
- package/lib/command/measure/AcApMeasurementHistory.js.map +1 -0
- package/lib/command/measure/AcApMeasurementImportExportCmd.d.ts +17 -0
- package/lib/command/measure/AcApMeasurementImportExportCmd.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementImportExportCmd.js +207 -0
- package/lib/command/measure/AcApMeasurementImportExportCmd.js.map +1 -0
- package/lib/command/measure/AcApMeasurementPlace.d.ts +9 -0
- package/lib/command/measure/AcApMeasurementPlace.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementPlace.js +33 -0
- package/lib/command/measure/AcApMeasurementPlace.js.map +1 -0
- package/lib/command/measure/AcApMeasurementSidecar.d.ts +19 -0
- package/lib/command/measure/AcApMeasurementSidecar.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementSidecar.js +173 -0
- package/lib/command/measure/AcApMeasurementSidecar.js.map +1 -0
- package/lib/command/measure/AcApMeasurementStore.d.ts +90 -0
- package/lib/command/measure/AcApMeasurementStore.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementStore.js +364 -0
- package/lib/command/measure/AcApMeasurementStore.js.map +1 -0
- package/lib/command/measure/AcApMeasurementTypes.d.ts +56 -0
- package/lib/command/measure/AcApMeasurementTypes.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementTypes.js +2 -0
- package/lib/command/measure/AcApMeasurementTypes.js.map +1 -0
- package/lib/command/measure/AcApMeasurementVisibilityCmd.d.ts +10 -0
- package/lib/command/measure/AcApMeasurementVisibilityCmd.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementVisibilityCmd.js +78 -0
- package/lib/command/measure/AcApMeasurementVisibilityCmd.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureAngleEntity.d.ts +68 -0
- package/lib/command/measure/entity/AcApMeasureAngleEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureAngleEntity.js +188 -0
- package/lib/command/measure/entity/AcApMeasureAngleEntity.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureArcEntity.d.ts +85 -0
- package/lib/command/measure/entity/AcApMeasureArcEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureArcEntity.js +159 -0
- package/lib/command/measure/entity/AcApMeasureArcEntity.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureAreaEntity.d.ts +60 -0
- package/lib/command/measure/entity/AcApMeasureAreaEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureAreaEntity.js +184 -0
- package/lib/command/measure/entity/AcApMeasureAreaEntity.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureDistanceEntity.d.ts +60 -0
- package/lib/command/measure/entity/AcApMeasureDistanceEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureDistanceEntity.js +166 -0
- package/lib/command/measure/entity/AcApMeasureDistanceEntity.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts +129 -0
- package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureDrawUtil.js +257 -0
- package/lib/command/measure/entity/AcApMeasureDrawUtil.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureEntity.d.ts +148 -0
- package/lib/command/measure/entity/AcApMeasureEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureEntity.js +141 -0
- package/lib/command/measure/entity/AcApMeasureEntity.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureEntityFactory.d.ts +15 -0
- package/lib/command/measure/entity/AcApMeasureEntityFactory.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureEntityFactory.js +35 -0
- package/lib/command/measure/entity/AcApMeasureEntityFactory.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasurePointEntity.d.ts +56 -0
- package/lib/command/measure/entity/AcApMeasurePointEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasurePointEntity.js +125 -0
- package/lib/command/measure/entity/AcApMeasurePointEntity.js.map +1 -0
- package/lib/command/measure/entity/index.d.ts +12 -0
- package/lib/command/measure/entity/index.d.ts.map +1 -0
- package/lib/command/measure/entity/index.js +12 -0
- package/lib/command/measure/entity/index.js.map +1 -0
- package/lib/command/measure/index.d.ts +10 -0
- package/lib/command/measure/index.d.ts.map +1 -1
- package/lib/command/measure/index.js +10 -0
- package/lib/command/measure/index.js.map +1 -1
- package/lib/command/modify/AcApCopyCmd.d.ts +1 -1
- package/lib/command/modify/AcApCopyCmd.js +2 -2
- package/lib/command/modify/AcApCopyCmd.js.map +1 -1
- package/lib/command/modify/AcApMoveCmd.js +1 -1
- package/lib/command/modify/AcApMoveCmd.js.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.d.ts +1 -1
- package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.js +5 -10
- package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
- package/lib/command/modify/AcApRotateCmd.d.ts +1 -1
- package/lib/command/modify/AcApRotateCmd.js +2 -2
- package/lib/command/modify/AcApRotateCmd.js.map +1 -1
- package/lib/command/overlay/AcApHtmlLivePreview.d.ts +121 -0
- package/lib/command/overlay/AcApHtmlLivePreview.d.ts.map +1 -0
- package/lib/command/overlay/AcApHtmlLivePreview.js +193 -0
- package/lib/command/overlay/AcApHtmlLivePreview.js.map +1 -0
- package/lib/command/overlay/AcApOverlayDrawUtil.d.ts +63 -0
- package/lib/command/overlay/AcApOverlayDrawUtil.d.ts.map +1 -0
- package/lib/command/overlay/AcApOverlayDrawUtil.js +115 -0
- package/lib/command/overlay/AcApOverlayDrawUtil.js.map +1 -0
- package/lib/command/overlay/AcApOverlayEntity.d.ts +93 -0
- package/lib/command/overlay/AcApOverlayEntity.d.ts.map +1 -0
- package/lib/command/overlay/AcApOverlayEntity.js +65 -0
- package/lib/command/overlay/AcApOverlayEntity.js.map +1 -0
- package/lib/command/overlay/AcApOverlayGripHost.d.ts +105 -0
- package/lib/command/overlay/AcApOverlayGripHost.d.ts.map +1 -0
- package/lib/command/overlay/AcApOverlayGripHost.js +207 -0
- package/lib/command/overlay/AcApOverlayGripHost.js.map +1 -0
- package/lib/command/overlay/AcApOverlaySerializable.d.ts +20 -0
- package/lib/command/overlay/AcApOverlaySerializable.d.ts.map +1 -0
- package/lib/command/overlay/AcApOverlaySerializable.js +2 -0
- package/lib/command/overlay/AcApOverlaySerializable.js.map +1 -0
- package/lib/command/overlay/index.d.ts +13 -0
- package/lib/command/overlay/index.d.ts.map +1 -0
- package/lib/command/overlay/index.js +13 -0
- package/lib/command/overlay/index.js.map +1 -0
- package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommand.js +1 -0
- package/lib/editor/command/AcEdCommand.js.map +1 -1
- package/lib/editor/global/AcEdUiLayout.d.ts +3 -3
- package/lib/editor/global/AcEdUiLayout.d.ts.map +1 -1
- package/lib/editor/global/AcEdUiLayout.js +3 -3
- package/lib/editor/global/AcEdUiLayout.js.map +1 -1
- package/lib/editor/global/AcEdUiTheme.d.ts +1 -1
- package/lib/editor/global/AcEdUiTheme.d.ts.map +1 -1
- package/lib/editor/global/AcEdUiTheme.js +1 -1
- package/lib/editor/global/AcEdUiTheme.js.map +1 -1
- package/lib/editor/global/eventBus.d.ts +5 -0
- package/lib/editor/global/eventBus.d.ts.map +1 -1
- package/lib/editor/global/eventBus.js.map +1 -1
- package/lib/editor/input/AcEditor.d.ts +6 -0
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +10 -0
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts +7 -0
- package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptBoxOptions.js +17 -0
- package/lib/editor/input/prompt/AcEdPromptBoxOptions.js.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts +9 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +17 -0
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/input/ui/AcEdMTextEditor.js +3 -3
- package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
- package/lib/i18n/cs/command.d.ts +60 -0
- package/lib/i18n/cs/command.d.ts.map +1 -1
- package/lib/i18n/cs/command.js +63 -3
- package/lib/i18n/cs/command.js.map +1 -1
- package/lib/i18n/cs/jig.d.ts +1227 -1
- package/lib/i18n/cs/jig.d.ts.map +1 -1
- package/lib/i18n/cs/jig.js +1226 -6
- package/lib/i18n/cs/jig.js.map +1 -1
- package/lib/i18n/cs/main.d.ts +5 -0
- package/lib/i18n/cs/main.d.ts.map +1 -1
- package/lib/i18n/cs/main.js +5 -0
- package/lib/i18n/cs/main.js.map +1 -1
- package/lib/i18n/en/command.d.ts +57 -0
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +60 -3
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/en/jig.d.ts +180 -0
- package/lib/i18n/en/jig.d.ts.map +1 -1
- package/lib/i18n/en/jig.js +181 -1
- package/lib/i18n/en/jig.js.map +1 -1
- package/lib/i18n/en/main.d.ts +5 -0
- package/lib/i18n/en/main.d.ts.map +1 -1
- package/lib/i18n/en/main.js +5 -0
- package/lib/i18n/en/main.js.map +1 -1
- package/lib/i18n/tr/command.d.ts +57 -0
- package/lib/i18n/tr/command.d.ts.map +1 -1
- package/lib/i18n/tr/command.js +60 -3
- package/lib/i18n/tr/command.js.map +1 -1
- package/lib/i18n/tr/jig.d.ts +180 -0
- package/lib/i18n/tr/jig.d.ts.map +1 -1
- package/lib/i18n/tr/jig.js +181 -1
- package/lib/i18n/tr/jig.js.map +1 -1
- package/lib/i18n/tr/main.d.ts +7 -0
- package/lib/i18n/tr/main.d.ts.map +1 -1
- package/lib/i18n/tr/main.js +7 -0
- package/lib/i18n/tr/main.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +57 -0
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +60 -3
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/i18n/zh/jig.d.ts +180 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -1
- package/lib/i18n/zh/jig.js +181 -1
- package/lib/i18n/zh/jig.js.map +1 -1
- package/lib/i18n/zh/main.d.ts +5 -0
- package/lib/i18n/zh/main.d.ts.map +1 -1
- package/lib/i18n/zh/main.js +5 -0
- package/lib/i18n/zh/main.js.map +1 -1
- package/lib/plugin/AcApPluginManager.d.ts.map +1 -1
- package/lib/plugin/AcApPluginManager.js +2 -1
- package/lib/plugin/AcApPluginManager.js.map +1 -1
- package/lib/service/AcApEntitySelection.d.ts +0 -3
- package/lib/service/AcApEntitySelection.d.ts.map +1 -1
- package/lib/service/AcApEntitySelection.js +42 -36
- package/lib/service/AcApEntitySelection.js.map +1 -1
- package/lib/ui/AcApDrawStyle.d.ts +63 -0
- package/lib/ui/AcApDrawStyle.d.ts.map +1 -0
- package/lib/ui/AcApDrawStyle.js +149 -0
- package/lib/ui/AcApDrawStyle.js.map +1 -0
- package/lib/ui/AcApDrawStyleToolbar.d.ts +124 -0
- package/lib/ui/AcApDrawStyleToolbar.d.ts.map +1 -0
- package/lib/ui/AcApDrawStyleToolbar.js +486 -0
- package/lib/ui/AcApDrawStyleToolbar.js.map +1 -0
- package/lib/ui/AcUiDialog.d.ts.map +1 -1
- package/lib/ui/AcUiDialog.js +2 -2
- package/lib/ui/AcUiDialog.js.map +1 -1
- package/lib/ui/index.d.ts +2 -0
- package/lib/ui/index.d.ts.map +1 -1
- package/lib/ui/index.js +2 -0
- package/lib/ui/index.js.map +1 -1
- package/lib/util/AcApDatabaseEdit.d.ts.map +1 -1
- package/lib/util/AcApDatabaseEdit.js +1 -0
- package/lib/util/AcApDatabaseEdit.js.map +1 -1
- package/lib/util/AcApMeasurementUnits.d.ts +52 -0
- package/lib/util/AcApMeasurementUnits.d.ts.map +1 -0
- package/lib/util/AcApMeasurementUnits.js +137 -0
- package/lib/util/AcApMeasurementUnits.js.map +1 -0
- package/lib/util/AcApMeasurementUtil.d.ts +42 -0
- package/lib/util/AcApMeasurementUtil.d.ts.map +1 -0
- package/lib/util/AcApMeasurementUtil.js +98 -0
- package/lib/util/AcApMeasurementUtil.js.map +1 -0
- package/lib/util/AcApScreenHitTest.d.ts +35 -0
- package/lib/util/AcApScreenHitTest.d.ts.map +1 -0
- package/lib/util/AcApScreenHitTest.js +98 -0
- package/lib/util/AcApScreenHitTest.js.map +1 -0
- package/lib/util/AcApScriptParser.d.ts +13 -0
- package/lib/util/AcApScriptParser.d.ts.map +1 -0
- package/lib/util/AcApScriptParser.js +55 -0
- package/lib/util/AcApScriptParser.js.map +1 -0
- package/lib/util/index.d.ts +4 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +4 -1
- package/lib/util/index.js.map +1 -1
- package/lib/view/AcEdReviewOverlayPick.d.ts +25 -0
- package/lib/view/AcEdReviewOverlayPick.d.ts.map +1 -0
- package/lib/view/AcEdReviewOverlayPick.js +229 -0
- package/lib/view/AcEdReviewOverlayPick.js.map +1 -0
- package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -1
- package/lib/view/AcEdViewKeyHandler.js +53 -0
- package/lib/view/AcEdViewKeyHandler.js.map +1 -1
- package/lib/view/AcTrScene.d.ts +15 -1
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +25 -2
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +46 -5
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +179 -74
- package/lib/view/AcTrView2d.js.map +1 -1
- package/lib/view/index.d.ts +1 -0
- package/lib/view/index.d.ts.map +1 -1
- package/lib/view/index.js +1 -0
- package/lib/view/index.js.map +1 -1
- package/package.json +7 -6
- package/dist/libredwg-parser-worker.js +0 -7525
- package/lib/app/AcApAnnotation.d.ts +0 -47
- package/lib/app/AcApAnnotation.d.ts.map +0 -1
- package/lib/app/AcApAnnotation.js +0 -135
- package/lib/app/AcApAnnotation.js.map +0 -1
- package/lib/command/review/AcApBaseRevCmd.d.ts +0 -36
- package/lib/command/review/AcApBaseRevCmd.d.ts.map +0 -1
- package/lib/command/review/AcApBaseRevCmd.js +0 -68
- package/lib/command/review/AcApBaseRevCmd.js.map +0 -1
- package/lib/command/review/AcApRevCircleCmd.d.ts +0 -18
- package/lib/command/review/AcApRevCircleCmd.d.ts.map +0 -1
- package/lib/command/review/AcApRevCircleCmd.js.map +0 -1
- package/lib/command/review/AcApRevCloudCmd.d.ts +0 -26
- package/lib/command/review/AcApRevCloudCmd.d.ts.map +0 -1
- package/lib/command/review/AcApRevCloudCmd.js +0 -240
- package/lib/command/review/AcApRevCloudCmd.js.map +0 -1
- package/lib/command/review/AcApRevRectCmd.d.ts +0 -18
- package/lib/command/review/AcApRevRectCmd.d.ts.map +0 -1
- package/lib/command/review/AcApRevRectCmd.js +0 -155
- package/lib/command/review/AcApRevRectCmd.js.map +0 -1
- package/lib/command/review/AcApRevVisibilityCmd.d.ts +0 -15
- package/lib/command/review/AcApRevVisibilityCmd.d.ts.map +0 -1
- package/lib/command/review/AcApRevVisibilityCmd.js.map +0 -1
- package/lib/command/review/AcApSketchCmd.d.ts +0 -32
- package/lib/command/review/AcApSketchCmd.d.ts.map +0 -1
- package/lib/command/review/AcApSketchCmd.js +0 -175
- package/lib/command/review/AcApSketchCmd.js.map +0 -1
- package/lib/command/review/index.d.ts +0 -7
- package/lib/command/review/index.d.ts.map +0 -1
- package/lib/command/review/index.js +0 -7
- package/lib/command/review/index.js.map +0 -1
- package/lib/util/AcApMeasurementElementGenerator.d.ts +0 -36
- package/lib/util/AcApMeasurementElementGenerator.d.ts.map +0 -1
- package/lib/util/AcApMeasurementElementGenerator.js +0 -92
- package/lib/util/AcApMeasurementElementGenerator.js.map +0 -1
|
@@ -0,0 +1,747 @@
|
|
|
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
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
64
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
65
|
+
if (!m) return o;
|
|
66
|
+
var i = m.call(o), r, ar = [], e;
|
|
67
|
+
try {
|
|
68
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
69
|
+
}
|
|
70
|
+
catch (error) { e = { error: error }; }
|
|
71
|
+
finally {
|
|
72
|
+
try {
|
|
73
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
74
|
+
}
|
|
75
|
+
finally { if (e) throw e.error; }
|
|
76
|
+
}
|
|
77
|
+
return ar;
|
|
78
|
+
};
|
|
79
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
80
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
81
|
+
if (ar || !(i in from)) {
|
|
82
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
83
|
+
ar[i] = from[i];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
87
|
+
};
|
|
88
|
+
import { AcDbPolyline, AcGePoint2d, AcGePoint3d, AcGeTol } from '@mlightcad/data-model';
|
|
89
|
+
import { AcApDocManager } from '../../app';
|
|
90
|
+
import { AcEdCommand, AcEdOpenMode, AcEdPreviewJig, AcEdPromptDistanceOptions, AcEdPromptEntityOptions, AcEdPromptKeywordOptions, AcEdPromptPointOptions, AcEdPromptStateMachine, AcEdPromptStatus } from '../../editor';
|
|
91
|
+
import { AcApI18n } from '../../i18n';
|
|
92
|
+
import { buildRevCloud, defaultRevCloudArcLength, distance2d, isRevCloudCloseToStart, rectanglePath, sampleEntityPath } from './AcApRevCloudGeom';
|
|
93
|
+
var DEFAULT_SETTINGS = {
|
|
94
|
+
mode: 'rectangular',
|
|
95
|
+
style: 'normal',
|
|
96
|
+
variance: true
|
|
97
|
+
};
|
|
98
|
+
function addKeyword(prompt, key) {
|
|
99
|
+
prompt.keywords.add(AcApI18n.t("jig.revcloud.keywords.".concat(key, ".display")), AcApI18n.t("jig.revcloud.keywords.".concat(key, ".global")), AcApI18n.t("jig.revcloud.keywords.".concat(key, ".local")));
|
|
100
|
+
}
|
|
101
|
+
function toPoint2d(point) {
|
|
102
|
+
return new AcGePoint2d(point.x, point.y);
|
|
103
|
+
}
|
|
104
|
+
function applyCloud(cloud, path, closed, settings, reverse) {
|
|
105
|
+
var _a;
|
|
106
|
+
if (reverse === void 0) { reverse = false; }
|
|
107
|
+
return buildRevCloud(cloud, path, closed, {
|
|
108
|
+
arcLength: (_a = settings.arcLength) !== null && _a !== void 0 ? _a : 1,
|
|
109
|
+
style: settings.style,
|
|
110
|
+
variance: settings.variance,
|
|
111
|
+
reverse: reverse
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Live preview for rectangular / polygonal / freehand revision clouds.
|
|
116
|
+
*/
|
|
117
|
+
var AcApRevCloudJig = /** @class */ (function (_super) {
|
|
118
|
+
__extends(AcApRevCloudJig, _super);
|
|
119
|
+
function AcApRevCloudJig(view, path, closed, settings) {
|
|
120
|
+
var _this = _super.call(this, view) || this;
|
|
121
|
+
_this._cloud = new AcDbPolyline();
|
|
122
|
+
_this._path = path.map(toPoint2d);
|
|
123
|
+
_this._closed = closed;
|
|
124
|
+
_this._settings = settings;
|
|
125
|
+
_this.rebuild();
|
|
126
|
+
return _this;
|
|
127
|
+
}
|
|
128
|
+
Object.defineProperty(AcApRevCloudJig.prototype, "entity", {
|
|
129
|
+
get: function () {
|
|
130
|
+
return this._cloud;
|
|
131
|
+
},
|
|
132
|
+
enumerable: false,
|
|
133
|
+
configurable: true
|
|
134
|
+
});
|
|
135
|
+
AcApRevCloudJig.prototype.updatePath = function (path, closed) {
|
|
136
|
+
this._path = path.map(toPoint2d);
|
|
137
|
+
this._closed = closed;
|
|
138
|
+
this.rebuild();
|
|
139
|
+
};
|
|
140
|
+
AcApRevCloudJig.prototype.update = function (point) {
|
|
141
|
+
if (this._path.length === 0)
|
|
142
|
+
return;
|
|
143
|
+
var preview = __spreadArray(__spreadArray([], __read(this._path), false), [toPoint2d(point)], false);
|
|
144
|
+
var closed = this._closed && preview.length >= 3;
|
|
145
|
+
applyCloud(this._cloud, preview, closed, this._settings);
|
|
146
|
+
};
|
|
147
|
+
AcApRevCloudJig.prototype.rebuild = function () {
|
|
148
|
+
if (this._path.length < 2) {
|
|
149
|
+
this._cloud.reset(false);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
applyCloud(this._cloud, this._path, this._closed, this._settings);
|
|
153
|
+
};
|
|
154
|
+
return AcApRevCloudJig;
|
|
155
|
+
}(AcEdPreviewJig));
|
|
156
|
+
export { AcApRevCloudJig };
|
|
157
|
+
var AcApRevCloudRectJig = /** @class */ (function (_super) {
|
|
158
|
+
__extends(AcApRevCloudRectJig, _super);
|
|
159
|
+
function AcApRevCloudRectJig(view, start, settings) {
|
|
160
|
+
var _this = _super.call(this, view) || this;
|
|
161
|
+
_this._cloud = new AcDbPolyline();
|
|
162
|
+
_this._firstPoint = toPoint2d(start);
|
|
163
|
+
_this._settings = settings;
|
|
164
|
+
return _this;
|
|
165
|
+
}
|
|
166
|
+
Object.defineProperty(AcApRevCloudRectJig.prototype, "entity", {
|
|
167
|
+
get: function () {
|
|
168
|
+
return this._cloud;
|
|
169
|
+
},
|
|
170
|
+
enumerable: false,
|
|
171
|
+
configurable: true
|
|
172
|
+
});
|
|
173
|
+
AcApRevCloudRectJig.prototype.update = function (secondPoint) {
|
|
174
|
+
applyCloud(this._cloud, rectanglePath(this._firstPoint, secondPoint), true, this._settings);
|
|
175
|
+
};
|
|
176
|
+
return AcApRevCloudRectJig;
|
|
177
|
+
}(AcEdPreviewJig));
|
|
178
|
+
var AcApRevCloudFreehandJig = /** @class */ (function (_super) {
|
|
179
|
+
__extends(AcApRevCloudFreehandJig, _super);
|
|
180
|
+
function AcApRevCloudFreehandJig(view, start, settings) {
|
|
181
|
+
var _this = _super.call(this, view) || this;
|
|
182
|
+
_this._closed = false;
|
|
183
|
+
_this._cloud = new AcDbPolyline();
|
|
184
|
+
_this._points = [toPoint2d(start)];
|
|
185
|
+
_this._settings = settings;
|
|
186
|
+
return _this;
|
|
187
|
+
}
|
|
188
|
+
Object.defineProperty(AcApRevCloudFreehandJig.prototype, "entity", {
|
|
189
|
+
get: function () {
|
|
190
|
+
return this._cloud;
|
|
191
|
+
},
|
|
192
|
+
enumerable: false,
|
|
193
|
+
configurable: true
|
|
194
|
+
});
|
|
195
|
+
Object.defineProperty(AcApRevCloudFreehandJig.prototype, "points", {
|
|
196
|
+
get: function () {
|
|
197
|
+
return this._points;
|
|
198
|
+
},
|
|
199
|
+
enumerable: false,
|
|
200
|
+
configurable: true
|
|
201
|
+
});
|
|
202
|
+
Object.defineProperty(AcApRevCloudFreehandJig.prototype, "closed", {
|
|
203
|
+
get: function () {
|
|
204
|
+
return this._closed;
|
|
205
|
+
},
|
|
206
|
+
enumerable: false,
|
|
207
|
+
configurable: true
|
|
208
|
+
});
|
|
209
|
+
AcApRevCloudFreehandJig.prototype.addPoint = function (point) {
|
|
210
|
+
var next = toPoint2d(point);
|
|
211
|
+
var last = this._points[this._points.length - 1];
|
|
212
|
+
if (last && distance2d(last, next) < 1e-8)
|
|
213
|
+
return;
|
|
214
|
+
this._points.push(next);
|
|
215
|
+
};
|
|
216
|
+
AcApRevCloudFreehandJig.prototype.update = function (current) {
|
|
217
|
+
var _a;
|
|
218
|
+
var arcLength = (_a = this._settings.arcLength) !== null && _a !== void 0 ? _a : 1;
|
|
219
|
+
var last = this._points[this._points.length - 1];
|
|
220
|
+
if (last && distance2d(last, current) >= arcLength) {
|
|
221
|
+
this._points.push(toPoint2d(current));
|
|
222
|
+
}
|
|
223
|
+
this._closed =
|
|
224
|
+
this._points.length >= 3 &&
|
|
225
|
+
isRevCloudCloseToStart(this._points[0], current, arcLength);
|
|
226
|
+
var preview = this._closed
|
|
227
|
+
? this._points
|
|
228
|
+
: __spreadArray(__spreadArray([], __read(this._points), false), [toPoint2d(current)], false);
|
|
229
|
+
applyCloud(this._cloud, preview, this._closed, this._settings);
|
|
230
|
+
};
|
|
231
|
+
return AcApRevCloudFreehandJig;
|
|
232
|
+
}(AcEdPreviewJig));
|
|
233
|
+
/**
|
|
234
|
+
* Static cloud preview used while prompting for Reverse direction.
|
|
235
|
+
*
|
|
236
|
+
* Keyword prompts do not drive jig updates, so this jig keeps the finished
|
|
237
|
+
* cloud visible and rebuilds it when the user toggles reverse.
|
|
238
|
+
*/
|
|
239
|
+
var AcApRevCloudStaticJig = /** @class */ (function (_super) {
|
|
240
|
+
__extends(AcApRevCloudStaticJig, _super);
|
|
241
|
+
function AcApRevCloudStaticJig(view, path, closed, settings) {
|
|
242
|
+
var _this = _super.call(this, view) || this;
|
|
243
|
+
_this._reverse = false;
|
|
244
|
+
_this._cloud = new AcDbPolyline();
|
|
245
|
+
_this._path = path;
|
|
246
|
+
_this._closed = closed;
|
|
247
|
+
_this._settings = settings;
|
|
248
|
+
_this._valid = applyCloud(_this._cloud, path, closed, settings);
|
|
249
|
+
return _this;
|
|
250
|
+
}
|
|
251
|
+
Object.defineProperty(AcApRevCloudStaticJig.prototype, "entity", {
|
|
252
|
+
get: function () {
|
|
253
|
+
return this._cloud;
|
|
254
|
+
},
|
|
255
|
+
enumerable: false,
|
|
256
|
+
configurable: true
|
|
257
|
+
});
|
|
258
|
+
Object.defineProperty(AcApRevCloudStaticJig.prototype, "valid", {
|
|
259
|
+
get: function () {
|
|
260
|
+
return this._valid;
|
|
261
|
+
},
|
|
262
|
+
enumerable: false,
|
|
263
|
+
configurable: true
|
|
264
|
+
});
|
|
265
|
+
Object.defineProperty(AcApRevCloudStaticJig.prototype, "reverse", {
|
|
266
|
+
get: function () {
|
|
267
|
+
return this._reverse;
|
|
268
|
+
},
|
|
269
|
+
enumerable: false,
|
|
270
|
+
configurable: true
|
|
271
|
+
});
|
|
272
|
+
AcApRevCloudStaticJig.prototype.update = function (_value) {
|
|
273
|
+
// Keyword prompt: geometry is rebuilt only when reverse is toggled.
|
|
274
|
+
};
|
|
275
|
+
AcApRevCloudStaticJig.prototype.toggleReverse = function () {
|
|
276
|
+
this._reverse = !this._reverse;
|
|
277
|
+
this._valid = applyCloud(this._cloud, this._path, this._closed, this._settings, this._reverse);
|
|
278
|
+
this.render();
|
|
279
|
+
};
|
|
280
|
+
return AcApRevCloudStaticJig;
|
|
281
|
+
}(AcEdPreviewJig));
|
|
282
|
+
/**
|
|
283
|
+
* Command to create a revision cloud, aligned with AutoCAD REVCLOUD.
|
|
284
|
+
*
|
|
285
|
+
* Supports Rectangular (default), Polygonal, Freehand, Object conversion,
|
|
286
|
+
* Arc length, Style (Normal/Calligraphy), and Reverse direction.
|
|
287
|
+
*/
|
|
288
|
+
var AcApRevCloudCmd = /** @class */ (function (_super) {
|
|
289
|
+
__extends(AcApRevCloudCmd, _super);
|
|
290
|
+
function AcApRevCloudCmd() {
|
|
291
|
+
var _this = _super.call(this) || this;
|
|
292
|
+
_this.mode = AcEdOpenMode.Write;
|
|
293
|
+
return _this;
|
|
294
|
+
}
|
|
295
|
+
AcApRevCloudCmd.prototype.execute = function (context) {
|
|
296
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
297
|
+
var settings, prompt_1, rectangular, polygonal, freehand, result, keyword, accepted, accepted;
|
|
298
|
+
var _a;
|
|
299
|
+
return __generator(this, function (_b) {
|
|
300
|
+
switch (_b.label) {
|
|
301
|
+
case 0:
|
|
302
|
+
settings = AcApRevCloudCmd._settings;
|
|
303
|
+
if (settings.arcLength == null) {
|
|
304
|
+
settings.arcLength = defaultRevCloudArcLength(context.view);
|
|
305
|
+
}
|
|
306
|
+
_b.label = 1;
|
|
307
|
+
case 1:
|
|
308
|
+
if (!true) return [3 /*break*/, 22];
|
|
309
|
+
prompt_1 = new AcEdPromptPointOptions(AcApI18n.t('jig.revcloud.firstCornerOrOptions'));
|
|
310
|
+
addKeyword(prompt_1, 'arcLength');
|
|
311
|
+
addKeyword(prompt_1, 'object');
|
|
312
|
+
rectangular = prompt_1.keywords.add(AcApI18n.t('jig.revcloud.keywords.rectangular.display'), AcApI18n.t('jig.revcloud.keywords.rectangular.global'), AcApI18n.t('jig.revcloud.keywords.rectangular.local'));
|
|
313
|
+
polygonal = prompt_1.keywords.add(AcApI18n.t('jig.revcloud.keywords.polygonal.display'), AcApI18n.t('jig.revcloud.keywords.polygonal.global'), AcApI18n.t('jig.revcloud.keywords.polygonal.local'));
|
|
314
|
+
freehand = prompt_1.keywords.add(AcApI18n.t('jig.revcloud.keywords.freehand.display'), AcApI18n.t('jig.revcloud.keywords.freehand.global'), AcApI18n.t('jig.revcloud.keywords.freehand.local'));
|
|
315
|
+
addKeyword(prompt_1, 'style');
|
|
316
|
+
prompt_1.keywords.default =
|
|
317
|
+
settings.mode === 'polygonal'
|
|
318
|
+
? polygonal
|
|
319
|
+
: settings.mode === 'freehand'
|
|
320
|
+
? freehand
|
|
321
|
+
: rectangular;
|
|
322
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt_1)];
|
|
323
|
+
case 2:
|
|
324
|
+
result = _b.sent();
|
|
325
|
+
if (!(result.status === AcEdPromptStatus.Keyword)) return [3 /*break*/, 15];
|
|
326
|
+
keyword = (_a = result.stringResult) !== null && _a !== void 0 ? _a : '';
|
|
327
|
+
if (!(keyword === 'ArcLength')) return [3 /*break*/, 4];
|
|
328
|
+
return [4 /*yield*/, this.promptArcLength(settings)];
|
|
329
|
+
case 3:
|
|
330
|
+
accepted = _b.sent();
|
|
331
|
+
if (!accepted)
|
|
332
|
+
return [2 /*return*/];
|
|
333
|
+
return [3 /*break*/, 1];
|
|
334
|
+
case 4:
|
|
335
|
+
if (!(keyword === 'Object')) return [3 /*break*/, 6];
|
|
336
|
+
return [4 /*yield*/, this.convertObject(context, settings)];
|
|
337
|
+
case 5:
|
|
338
|
+
_b.sent();
|
|
339
|
+
return [2 /*return*/];
|
|
340
|
+
case 6:
|
|
341
|
+
if (!(keyword === 'Rectangular')) return [3 /*break*/, 8];
|
|
342
|
+
settings.mode = 'rectangular';
|
|
343
|
+
return [4 /*yield*/, this.drawRectangular(context, settings)];
|
|
344
|
+
case 7:
|
|
345
|
+
_b.sent();
|
|
346
|
+
return [2 /*return*/];
|
|
347
|
+
case 8:
|
|
348
|
+
if (!(keyword === 'Polygonal')) return [3 /*break*/, 10];
|
|
349
|
+
settings.mode = 'polygonal';
|
|
350
|
+
return [4 /*yield*/, this.drawPolygonal(context, settings)];
|
|
351
|
+
case 9:
|
|
352
|
+
_b.sent();
|
|
353
|
+
return [2 /*return*/];
|
|
354
|
+
case 10:
|
|
355
|
+
if (!(keyword === 'Freehand')) return [3 /*break*/, 12];
|
|
356
|
+
settings.mode = 'freehand';
|
|
357
|
+
return [4 /*yield*/, this.drawFreehand(context, settings)];
|
|
358
|
+
case 11:
|
|
359
|
+
_b.sent();
|
|
360
|
+
return [2 /*return*/];
|
|
361
|
+
case 12:
|
|
362
|
+
if (!(keyword === 'Style')) return [3 /*break*/, 14];
|
|
363
|
+
return [4 /*yield*/, this.promptStyle(settings)];
|
|
364
|
+
case 13:
|
|
365
|
+
accepted = _b.sent();
|
|
366
|
+
if (!accepted)
|
|
367
|
+
return [2 /*return*/];
|
|
368
|
+
return [3 /*break*/, 1];
|
|
369
|
+
case 14: return [3 /*break*/, 1];
|
|
370
|
+
case 15:
|
|
371
|
+
if (result.status !== AcEdPromptStatus.OK || !result.value)
|
|
372
|
+
return [2 /*return*/];
|
|
373
|
+
if (!(settings.mode === 'polygonal')) return [3 /*break*/, 17];
|
|
374
|
+
return [4 /*yield*/, this.drawPolygonal(context, settings, result.value)];
|
|
375
|
+
case 16:
|
|
376
|
+
_b.sent();
|
|
377
|
+
return [3 /*break*/, 21];
|
|
378
|
+
case 17:
|
|
379
|
+
if (!(settings.mode === 'freehand')) return [3 /*break*/, 19];
|
|
380
|
+
return [4 /*yield*/, this.drawFreehand(context, settings, result.value)];
|
|
381
|
+
case 18:
|
|
382
|
+
_b.sent();
|
|
383
|
+
return [3 /*break*/, 21];
|
|
384
|
+
case 19: return [4 /*yield*/, this.drawRectangular(context, settings, result.value)];
|
|
385
|
+
case 20:
|
|
386
|
+
_b.sent();
|
|
387
|
+
_b.label = 21;
|
|
388
|
+
case 21: return [2 /*return*/];
|
|
389
|
+
case 22: return [2 /*return*/];
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
});
|
|
393
|
+
};
|
|
394
|
+
AcApRevCloudCmd.prototype.promptArcLength = function (settings) {
|
|
395
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
396
|
+
var prompt, result, value;
|
|
397
|
+
var _a, _b;
|
|
398
|
+
return __generator(this, function (_c) {
|
|
399
|
+
switch (_c.label) {
|
|
400
|
+
case 0:
|
|
401
|
+
prompt = new AcEdPromptDistanceOptions(AcApI18n.t('jig.revcloud.arcLength'));
|
|
402
|
+
prompt.allowNegative = false;
|
|
403
|
+
prompt.allowZero = false;
|
|
404
|
+
prompt.useDefaultValue = settings.arcLength != null;
|
|
405
|
+
prompt.defaultValue = (_a = settings.arcLength) !== null && _a !== void 0 ? _a : 1;
|
|
406
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getDistance(prompt)];
|
|
407
|
+
case 1:
|
|
408
|
+
result = _c.sent();
|
|
409
|
+
if (result.status !== AcEdPromptStatus.OK &&
|
|
410
|
+
result.status !== AcEdPromptStatus.None) {
|
|
411
|
+
return [2 /*return*/, false];
|
|
412
|
+
}
|
|
413
|
+
value = (_b = result.value) !== null && _b !== void 0 ? _b : prompt.defaultValue;
|
|
414
|
+
if (!AcGeTol.isPositive(value)) {
|
|
415
|
+
this.showMessage(AcApI18n.t('jig.revcloud.invalidArcLength'), 'warning');
|
|
416
|
+
return [2 /*return*/, true];
|
|
417
|
+
}
|
|
418
|
+
settings.arcLength = value;
|
|
419
|
+
return [2 /*return*/, true];
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
AcApRevCloudCmd.prototype.promptStyle = function (settings) {
|
|
425
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
426
|
+
var prompt, normal, calligraphy, result;
|
|
427
|
+
return __generator(this, function (_a) {
|
|
428
|
+
switch (_a.label) {
|
|
429
|
+
case 0:
|
|
430
|
+
prompt = new AcEdPromptKeywordOptions(AcApI18n.t('jig.revcloud.style'));
|
|
431
|
+
prompt.allowNone = true;
|
|
432
|
+
normal = prompt.keywords.add(AcApI18n.t('jig.revcloud.keywords.normal.display'), AcApI18n.t('jig.revcloud.keywords.normal.global'), AcApI18n.t('jig.revcloud.keywords.normal.local'));
|
|
433
|
+
calligraphy = prompt.keywords.add(AcApI18n.t('jig.revcloud.keywords.calligraphy.display'), AcApI18n.t('jig.revcloud.keywords.calligraphy.global'), AcApI18n.t('jig.revcloud.keywords.calligraphy.local'));
|
|
434
|
+
prompt.keywords.default =
|
|
435
|
+
settings.style === 'calligraphy' ? calligraphy : normal;
|
|
436
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getKeywords(prompt)];
|
|
437
|
+
case 1:
|
|
438
|
+
result = _a.sent();
|
|
439
|
+
if (result.status === AcEdPromptStatus.Cancel)
|
|
440
|
+
return [2 /*return*/, false];
|
|
441
|
+
if (result.status === AcEdPromptStatus.OK ||
|
|
442
|
+
result.status === AcEdPromptStatus.Keyword) {
|
|
443
|
+
if (result.stringResult === 'Calligraphy') {
|
|
444
|
+
settings.style = 'calligraphy';
|
|
445
|
+
}
|
|
446
|
+
else if (result.stringResult === 'Normal') {
|
|
447
|
+
settings.style = 'normal';
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
return [2 /*return*/, true];
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
});
|
|
454
|
+
};
|
|
455
|
+
AcApRevCloudCmd.prototype.drawRectangular = function (context, settings, firstPoint) {
|
|
456
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
457
|
+
var start, _a, prompt, result, path;
|
|
458
|
+
return __generator(this, function (_b) {
|
|
459
|
+
switch (_b.label) {
|
|
460
|
+
case 0:
|
|
461
|
+
if (!(firstPoint !== null && firstPoint !== void 0)) return [3 /*break*/, 1];
|
|
462
|
+
_a = firstPoint;
|
|
463
|
+
return [3 /*break*/, 3];
|
|
464
|
+
case 1: return [4 /*yield*/, this.promptPoint('firstCorner')];
|
|
465
|
+
case 2:
|
|
466
|
+
_a = (_b.sent());
|
|
467
|
+
_b.label = 3;
|
|
468
|
+
case 3:
|
|
469
|
+
start = _a;
|
|
470
|
+
if (!start)
|
|
471
|
+
return [2 /*return*/];
|
|
472
|
+
prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.revcloud.oppositeCorner'));
|
|
473
|
+
prompt.useBasePoint = true;
|
|
474
|
+
prompt.basePoint = new AcGePoint3d(start.x, start.y, 0);
|
|
475
|
+
prompt.useDashedLine = false;
|
|
476
|
+
prompt.jig = new AcApRevCloudRectJig(context.view, start, settings);
|
|
477
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt)];
|
|
478
|
+
case 4:
|
|
479
|
+
result = _b.sent();
|
|
480
|
+
if (result.status !== AcEdPromptStatus.OK || !result.value)
|
|
481
|
+
return [2 /*return*/];
|
|
482
|
+
path = rectanglePath(start, result.value);
|
|
483
|
+
if (AcGeTol.equalToZero(path[0].x - path[1].x) ||
|
|
484
|
+
AcGeTol.equalToZero(path[0].y - path[3].y)) {
|
|
485
|
+
return [2 /*return*/];
|
|
486
|
+
}
|
|
487
|
+
return [4 /*yield*/, this.commitCloud(context, path, true, settings)];
|
|
488
|
+
case 5:
|
|
489
|
+
_b.sent();
|
|
490
|
+
return [2 /*return*/];
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
});
|
|
494
|
+
};
|
|
495
|
+
AcApRevCloudCmd.prototype.drawPolygonal = function (context, settings, firstPoint) {
|
|
496
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
497
|
+
var start, _a, points, NextPointState, machine;
|
|
498
|
+
return __generator(this, function (_b) {
|
|
499
|
+
switch (_b.label) {
|
|
500
|
+
case 0:
|
|
501
|
+
if (!(firstPoint !== null && firstPoint !== void 0)) return [3 /*break*/, 1];
|
|
502
|
+
_a = firstPoint;
|
|
503
|
+
return [3 /*break*/, 3];
|
|
504
|
+
case 1: return [4 /*yield*/, this.promptPoint('startPoint')];
|
|
505
|
+
case 2:
|
|
506
|
+
_a = (_b.sent());
|
|
507
|
+
_b.label = 3;
|
|
508
|
+
case 3:
|
|
509
|
+
start = _a;
|
|
510
|
+
if (!start)
|
|
511
|
+
return [2 /*return*/];
|
|
512
|
+
points = [toPoint2d(start)];
|
|
513
|
+
NextPointState = /** @class */ (function () {
|
|
514
|
+
function NextPointState() {
|
|
515
|
+
}
|
|
516
|
+
NextPointState.prototype.buildPrompt = function () {
|
|
517
|
+
var prompt = new AcEdPromptPointOptions(AcApI18n.t(points.length >= 2
|
|
518
|
+
? 'jig.revcloud.nextPointOrUndo'
|
|
519
|
+
: 'jig.revcloud.nextPoint'));
|
|
520
|
+
if (points.length >= 2) {
|
|
521
|
+
addKeyword(prompt, 'undo');
|
|
522
|
+
}
|
|
523
|
+
prompt.useDashedLine = false;
|
|
524
|
+
prompt.useBasePoint = true;
|
|
525
|
+
var current = points[points.length - 1];
|
|
526
|
+
prompt.basePoint = new AcGePoint3d(current.x, current.y, 0);
|
|
527
|
+
prompt.allowNone = points.length >= 3;
|
|
528
|
+
prompt.jig = new AcApRevCloudJig(context.view, points, true, settings);
|
|
529
|
+
return prompt;
|
|
530
|
+
};
|
|
531
|
+
NextPointState.prototype.handleResult = function (result) {
|
|
532
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
533
|
+
return __generator(this, function (_a) {
|
|
534
|
+
if (result.status === AcEdPromptStatus.Keyword) {
|
|
535
|
+
if (result.stringResult === 'Undo' && points.length > 1) {
|
|
536
|
+
points.pop();
|
|
537
|
+
}
|
|
538
|
+
return [2 /*return*/, 'continue'];
|
|
539
|
+
}
|
|
540
|
+
if (result.status === AcEdPromptStatus.OK && result.value) {
|
|
541
|
+
points.push(toPoint2d(result.value));
|
|
542
|
+
return [2 /*return*/, 'continue'];
|
|
543
|
+
}
|
|
544
|
+
return [2 /*return*/, 'finish'];
|
|
545
|
+
});
|
|
546
|
+
});
|
|
547
|
+
};
|
|
548
|
+
return NextPointState;
|
|
549
|
+
}());
|
|
550
|
+
machine = new AcEdPromptStateMachine();
|
|
551
|
+
machine.setState(new NextPointState());
|
|
552
|
+
return [4 /*yield*/, machine.run(function (prompt) { return AcApDocManager.instance.editor.getPoint(prompt); })];
|
|
553
|
+
case 4:
|
|
554
|
+
_b.sent();
|
|
555
|
+
if (points.length < 3)
|
|
556
|
+
return [2 /*return*/];
|
|
557
|
+
return [4 /*yield*/, this.commitCloud(context, points, true, settings)];
|
|
558
|
+
case 5:
|
|
559
|
+
_b.sent();
|
|
560
|
+
return [2 /*return*/];
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
});
|
|
564
|
+
};
|
|
565
|
+
AcApRevCloudCmd.prototype.drawFreehand = function (context, settings, firstPoint) {
|
|
566
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
567
|
+
var start, _a, jig, arcLength, prompt_2, result;
|
|
568
|
+
var _b;
|
|
569
|
+
return __generator(this, function (_c) {
|
|
570
|
+
switch (_c.label) {
|
|
571
|
+
case 0:
|
|
572
|
+
if (!(firstPoint !== null && firstPoint !== void 0)) return [3 /*break*/, 1];
|
|
573
|
+
_a = firstPoint;
|
|
574
|
+
return [3 /*break*/, 3];
|
|
575
|
+
case 1: return [4 /*yield*/, this.promptPoint('firstPoint')];
|
|
576
|
+
case 2:
|
|
577
|
+
_a = (_c.sent());
|
|
578
|
+
_c.label = 3;
|
|
579
|
+
case 3:
|
|
580
|
+
start = _a;
|
|
581
|
+
if (!start)
|
|
582
|
+
return [2 /*return*/];
|
|
583
|
+
jig = new AcApRevCloudFreehandJig(context.view, start, settings);
|
|
584
|
+
arcLength = (_b = settings.arcLength) !== null && _b !== void 0 ? _b : 1;
|
|
585
|
+
_c.label = 4;
|
|
586
|
+
case 4:
|
|
587
|
+
if (!true) return [3 /*break*/, 10];
|
|
588
|
+
prompt_2 = new AcEdPromptPointOptions(AcApI18n.t('jig.revcloud.guideCursor'));
|
|
589
|
+
prompt_2.jig = jig;
|
|
590
|
+
prompt_2.useDashedLine = false;
|
|
591
|
+
prompt_2.useBasePoint = true;
|
|
592
|
+
prompt_2.basePoint = new AcGePoint3d(start.x, start.y, 0);
|
|
593
|
+
prompt_2.allowNone = true;
|
|
594
|
+
prompt_2.disableOSnap = true;
|
|
595
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt_2)];
|
|
596
|
+
case 5:
|
|
597
|
+
result = _c.sent();
|
|
598
|
+
if (result.status === AcEdPromptStatus.Cancel)
|
|
599
|
+
return [2 /*return*/];
|
|
600
|
+
if (!(result.status === AcEdPromptStatus.None)) return [3 /*break*/, 7];
|
|
601
|
+
if (jig.points.length < 2)
|
|
602
|
+
return [2 /*return*/];
|
|
603
|
+
return [4 /*yield*/, this.commitCloud(context, jig.points, jig.closed, settings)];
|
|
604
|
+
case 6:
|
|
605
|
+
_c.sent();
|
|
606
|
+
return [2 /*return*/];
|
|
607
|
+
case 7:
|
|
608
|
+
if (result.status !== AcEdPromptStatus.OK || !result.value)
|
|
609
|
+
return [2 /*return*/];
|
|
610
|
+
if (!(jig.points.length >= 3 &&
|
|
611
|
+
isRevCloudCloseToStart(jig.points[0], result.value, arcLength))) return [3 /*break*/, 9];
|
|
612
|
+
return [4 /*yield*/, this.commitCloud(context, jig.points, true, settings)];
|
|
613
|
+
case 8:
|
|
614
|
+
_c.sent();
|
|
615
|
+
return [2 /*return*/];
|
|
616
|
+
case 9:
|
|
617
|
+
jig.addPoint(result.value);
|
|
618
|
+
return [3 /*break*/, 4];
|
|
619
|
+
case 10: return [2 /*return*/];
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
});
|
|
623
|
+
};
|
|
624
|
+
AcApRevCloudCmd.prototype.convertObject = function (context, settings) {
|
|
625
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
626
|
+
var prompt_3, result, entity, sampled, committed;
|
|
627
|
+
var _a;
|
|
628
|
+
return __generator(this, function (_b) {
|
|
629
|
+
switch (_b.label) {
|
|
630
|
+
case 0:
|
|
631
|
+
if (!true) return [3 /*break*/, 3];
|
|
632
|
+
prompt_3 = new AcEdPromptEntityOptions(AcApI18n.t('jig.revcloud.selectObject'));
|
|
633
|
+
prompt_3.setRejectMessage(AcApI18n.t('jig.revcloud.invalidObject'));
|
|
634
|
+
prompt_3.addAllowedClass('Polyline');
|
|
635
|
+
prompt_3.addAllowedClass('Circle');
|
|
636
|
+
prompt_3.addAllowedClass('Ellipse');
|
|
637
|
+
prompt_3.addAllowedClass('Spline');
|
|
638
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getEntity(prompt_3)];
|
|
639
|
+
case 1:
|
|
640
|
+
result = _b.sent();
|
|
641
|
+
if (result.status !== AcEdPromptStatus.OK || !result.objectId)
|
|
642
|
+
return [2 /*return*/];
|
|
643
|
+
entity = context.doc.database.openEntityForRead(result.objectId);
|
|
644
|
+
if (!entity)
|
|
645
|
+
return [2 /*return*/];
|
|
646
|
+
sampled = sampleEntityPath(entity, ((_a = settings.arcLength) !== null && _a !== void 0 ? _a : 1) * 0.5);
|
|
647
|
+
if (!sampled) {
|
|
648
|
+
this.showMessage(AcApI18n.t('jig.revcloud.invalidObject'), 'warning');
|
|
649
|
+
return [3 /*break*/, 0];
|
|
650
|
+
}
|
|
651
|
+
return [4 /*yield*/, this.commitCloud(context, sampled.points, sampled.closed, settings)];
|
|
652
|
+
case 2:
|
|
653
|
+
committed = _b.sent();
|
|
654
|
+
if (committed) {
|
|
655
|
+
this.eraseEntity(context, entity);
|
|
656
|
+
}
|
|
657
|
+
return [2 /*return*/];
|
|
658
|
+
case 3: return [2 /*return*/];
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
});
|
|
662
|
+
};
|
|
663
|
+
AcApRevCloudCmd.prototype.commitCloud = function (context, path, closed, settings) {
|
|
664
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
665
|
+
var preview, cloud;
|
|
666
|
+
return __generator(this, function (_a) {
|
|
667
|
+
switch (_a.label) {
|
|
668
|
+
case 0:
|
|
669
|
+
preview = new AcApRevCloudStaticJig(context.view, path, closed, settings);
|
|
670
|
+
if (!preview.valid)
|
|
671
|
+
return [2 /*return*/, false];
|
|
672
|
+
_a.label = 1;
|
|
673
|
+
case 1:
|
|
674
|
+
_a.trys.push([1, , 5, 6]);
|
|
675
|
+
_a.label = 2;
|
|
676
|
+
case 2:
|
|
677
|
+
if (!true) return [3 /*break*/, 4];
|
|
678
|
+
preview.render();
|
|
679
|
+
return [4 /*yield*/, this.promptReverse(preview)];
|
|
680
|
+
case 3:
|
|
681
|
+
if (!(_a.sent()))
|
|
682
|
+
return [3 /*break*/, 4];
|
|
683
|
+
preview.toggleReverse();
|
|
684
|
+
return [3 /*break*/, 2];
|
|
685
|
+
case 4:
|
|
686
|
+
cloud = new AcDbPolyline();
|
|
687
|
+
if (!applyCloud(cloud, path, closed, settings, preview.reverse)) {
|
|
688
|
+
return [2 /*return*/, false];
|
|
689
|
+
}
|
|
690
|
+
context.doc.database.tables.blockTable.modelSpace.appendEntity(cloud);
|
|
691
|
+
return [2 /*return*/, true];
|
|
692
|
+
case 5:
|
|
693
|
+
preview.end();
|
|
694
|
+
return [7 /*endfinally*/];
|
|
695
|
+
case 6: return [2 /*return*/];
|
|
696
|
+
}
|
|
697
|
+
});
|
|
698
|
+
});
|
|
699
|
+
};
|
|
700
|
+
AcApRevCloudCmd.prototype.promptReverse = function (preview) {
|
|
701
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
702
|
+
var prompt, no, result;
|
|
703
|
+
return __generator(this, function (_a) {
|
|
704
|
+
switch (_a.label) {
|
|
705
|
+
case 0:
|
|
706
|
+
prompt = new AcEdPromptKeywordOptions(AcApI18n.t('jig.revcloud.reverseDirection'));
|
|
707
|
+
prompt.jig = preview;
|
|
708
|
+
prompt.allowNone = true;
|
|
709
|
+
addKeyword(prompt, 'yes');
|
|
710
|
+
no = prompt.keywords.add(AcApI18n.t('jig.revcloud.keywords.no.display'), AcApI18n.t('jig.revcloud.keywords.no.global'), AcApI18n.t('jig.revcloud.keywords.no.local'));
|
|
711
|
+
prompt.keywords.default = no;
|
|
712
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getKeywords(prompt)];
|
|
713
|
+
case 1:
|
|
714
|
+
result = _a.sent();
|
|
715
|
+
return [2 /*return*/, ((result.status === AcEdPromptStatus.OK ||
|
|
716
|
+
result.status === AcEdPromptStatus.Keyword) &&
|
|
717
|
+
result.stringResult === 'Yes')];
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
});
|
|
721
|
+
};
|
|
722
|
+
AcApRevCloudCmd.prototype.promptPoint = function (messageKey) {
|
|
723
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
724
|
+
var prompt, result;
|
|
725
|
+
return __generator(this, function (_a) {
|
|
726
|
+
switch (_a.label) {
|
|
727
|
+
case 0:
|
|
728
|
+
prompt = new AcEdPromptPointOptions(AcApI18n.t("jig.revcloud.".concat(messageKey)));
|
|
729
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt)];
|
|
730
|
+
case 1:
|
|
731
|
+
result = _a.sent();
|
|
732
|
+
if (result.status !== AcEdPromptStatus.OK || !result.value)
|
|
733
|
+
return [2 /*return*/, undefined];
|
|
734
|
+
return [2 /*return*/, result.value];
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
});
|
|
738
|
+
};
|
|
739
|
+
AcApRevCloudCmd.prototype.eraseEntity = function (context, entity) {
|
|
740
|
+
entity.erase();
|
|
741
|
+
context.view.removeEntity(entity);
|
|
742
|
+
};
|
|
743
|
+
AcApRevCloudCmd._settings = __assign({}, DEFAULT_SETTINGS);
|
|
744
|
+
return AcApRevCloudCmd;
|
|
745
|
+
}(AcEdCommand));
|
|
746
|
+
export { AcApRevCloudCmd };
|
|
747
|
+
//# sourceMappingURL=AcApRevCloudCmd.js.map
|