@mlightcad/cad-simple-viewer 1.5.6 → 1.5.7
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 +66 -1
- package/dist/cad-simple-viewer.js +30394 -28405
- package/dist/cad-simple-viewer.umd.cjs +150 -158
- package/dist/dxf-parser-worker.js +796 -707
- package/lib/app/AcApContext.d.ts.map +1 -1
- package/lib/app/AcApContext.js +15 -5
- package/lib/app/AcApContext.js.map +1 -1
- package/lib/app/AcApDocManager.d.ts +56 -0
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +112 -14
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApDocument.d.ts +81 -0
- package/lib/app/AcApDocument.d.ts.map +1 -1
- package/lib/app/AcApDocument.js +154 -0
- package/lib/app/AcApDocument.js.map +1 -1
- package/lib/app/AcApLayerSessionState.d.ts +15 -0
- package/lib/app/AcApLayerSessionState.d.ts.map +1 -0
- package/lib/app/AcApLayerSessionState.js +2 -0
- package/lib/app/AcApLayerSessionState.js.map +1 -0
- package/lib/app/AcApOpenFileDialog.d.ts +35 -0
- package/lib/app/AcApOpenFileDialog.d.ts.map +1 -0
- package/lib/app/AcApOpenFileDialog.js +192 -0
- package/lib/app/AcApOpenFileDialog.js.map +1 -0
- package/lib/app/AcApWebworkerReadiness.d.ts +18 -0
- package/lib/app/AcApWebworkerReadiness.d.ts.map +1 -0
- package/lib/app/AcApWebworkerReadiness.js +126 -0
- package/lib/app/AcApWebworkerReadiness.js.map +1 -0
- package/lib/app/index.d.ts +3 -0
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +2 -0
- package/lib/app/index.js.map +1 -1
- package/lib/command/AcApOpenCmd.d.ts +3 -22
- package/lib/command/AcApOpenCmd.d.ts.map +1 -1
- package/lib/command/AcApOpenCmd.js +3 -22
- package/lib/command/AcApOpenCmd.js.map +1 -1
- package/lib/command/AcApRedoCmd.d.ts +10 -0
- package/lib/command/AcApRedoCmd.d.ts.map +1 -0
- package/lib/command/AcApRedoCmd.js +85 -0
- package/lib/command/AcApRedoCmd.js.map +1 -0
- package/lib/command/AcApUndoCmd.d.ts +10 -0
- package/lib/command/AcApUndoCmd.d.ts.map +1 -0
- package/lib/command/AcApUndoCmd.js +85 -0
- package/lib/command/AcApUndoCmd.js.map +1 -0
- package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApEllipseCmd.js +12 -4
- package/lib/command/draw/AcApEllipseCmd.js.map +1 -1
- package/lib/command/draw/AcApLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApLineCmd.js +8 -2
- package/lib/command/draw/AcApLineCmd.js.map +1 -1
- package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApMLineCmd.js +2 -0
- package/lib/command/draw/AcApMLineCmd.js.map +1 -1
- package/lib/command/draw/AcApPolylineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApPolylineCmd.js +3 -0
- package/lib/command/draw/AcApPolylineCmd.js.map +1 -1
- package/lib/command/draw/AcApSplineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApSplineCmd.js +2 -0
- package/lib/command/draw/AcApSplineCmd.js.map +1 -1
- package/lib/command/index.d.ts +2 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +2 -0
- package/lib/command/index.js.map +1 -1
- package/lib/command/layer/AcApLayerCmd.d.ts +3 -187
- package/lib/command/layer/AcApLayerCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerCmd.js +52 -376
- package/lib/command/layer/AcApLayerCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerCurCmd.d.ts +2 -27
- package/lib/command/layer/AcApLayerCurCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerCurCmd.js +18 -67
- package/lib/command/layer/AcApLayerCurCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerDelCmd.d.ts +2 -25
- package/lib/command/layer/AcApLayerDelCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerDelCmd.js +22 -155
- package/lib/command/layer/AcApLayerDelCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerFreezeCmd.d.ts +2 -9
- package/lib/command/layer/AcApLayerFreezeCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerFreezeCmd.js +27 -39
- package/lib/command/layer/AcApLayerFreezeCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerIsoCmd.d.ts +2 -24
- package/lib/command/layer/AcApLayerIsoCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerIsoCmd.js +14 -183
- package/lib/command/layer/AcApLayerIsoCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerLockCmd.d.ts +2 -33
- package/lib/command/layer/AcApLayerLockCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerLockCmd.js +18 -55
- package/lib/command/layer/AcApLayerLockCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerMutationCmd.d.ts +13 -0
- package/lib/command/layer/AcApLayerMutationCmd.d.ts.map +1 -0
- package/lib/command/layer/AcApLayerMutationCmd.js +42 -0
- package/lib/command/layer/AcApLayerMutationCmd.js.map +1 -0
- package/lib/command/layer/AcApLayerOffCmd.d.ts +2 -2
- package/lib/command/layer/AcApLayerOffCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerOffCmd.js +27 -28
- package/lib/command/layer/AcApLayerOffCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerOnCmd.d.ts +2 -15
- package/lib/command/layer/AcApLayerOnCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerOnCmd.js +6 -49
- package/lib/command/layer/AcApLayerOnCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerPCmd.d.ts +2 -68
- package/lib/command/layer/AcApLayerPCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerPCmd.js +4 -152
- package/lib/command/layer/AcApLayerPCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerThawCmd.d.ts +2 -22
- package/lib/command/layer/AcApLayerThawCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerThawCmd.js +6 -61
- package/lib/command/layer/AcApLayerThawCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerUnisoCmd.d.ts +2 -37
- package/lib/command/layer/AcApLayerUnisoCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerUnisoCmd.js +7 -108
- package/lib/command/layer/AcApLayerUnisoCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerUnlockCmd.d.ts +2 -33
- package/lib/command/layer/AcApLayerUnlockCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerUnlockCmd.js +18 -55
- package/lib/command/layer/AcApLayerUnlockCmd.js.map +1 -1
- package/lib/command/modify/AcApCopyCmd.d.ts +12 -0
- package/lib/command/modify/AcApCopyCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApCopyCmd.js +67 -177
- package/lib/command/modify/AcApCopyCmd.js.map +1 -1
- package/lib/command/modify/AcApCopyPreviewJig.d.ts +21 -0
- package/lib/command/modify/AcApCopyPreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApCopyPreviewJig.js +61 -0
- package/lib/command/modify/AcApCopyPreviewJig.js.map +1 -0
- package/lib/command/modify/AcApEraseCmd.d.ts +0 -6
- package/lib/command/modify/AcApEraseCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApEraseCmd.js +11 -38
- package/lib/command/modify/AcApEraseCmd.js.map +1 -1
- package/lib/command/modify/AcApHideObjectsCmd.d.ts +0 -7
- package/lib/command/modify/AcApHideObjectsCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApHideObjectsCmd.js +0 -7
- package/lib/command/modify/AcApHideObjectsCmd.js.map +1 -1
- package/lib/command/modify/AcApMoveCmd.d.ts +0 -6
- package/lib/command/modify/AcApMoveCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApMoveCmd.js +26 -105
- package/lib/command/modify/AcApMoveCmd.js.map +1 -1
- package/lib/command/modify/AcApMovePreviewJig.d.ts +18 -0
- package/lib/command/modify/AcApMovePreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApMovePreviewJig.js +45 -0
- package/lib/command/modify/AcApMovePreviewJig.js.map +1 -0
- package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.js +5 -33
- package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
- package/lib/command/modify/AcApRotateCmd.d.ts +2 -2
- package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApRotateCmd.js +37 -200
- package/lib/command/modify/AcApRotateCmd.js.map +1 -1
- package/lib/command/modify/AcApRotatePreviewJig.d.ts +47 -0
- package/lib/command/modify/AcApRotatePreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApRotatePreviewJig.js +97 -0
- package/lib/command/modify/AcApRotatePreviewJig.js.map +1 -0
- package/lib/editor/command/AcEdCommand.d.ts +8 -0
- package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommand.js +48 -5
- package/lib/editor/command/AcEdCommand.js.map +1 -1
- package/lib/editor/global/eventBus.d.ts +10 -2
- package/lib/editor/global/eventBus.d.ts.map +1 -1
- package/lib/editor/global/eventBus.js.map +1 -1
- package/lib/editor/grip/AcEdGripAppearance.d.ts +18 -0
- package/lib/editor/grip/AcEdGripAppearance.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripAppearance.js +30 -0
- package/lib/editor/grip/AcEdGripAppearance.js.map +1 -0
- package/lib/editor/grip/AcEdGripEditSession.d.ts.map +1 -1
- package/lib/editor/grip/AcEdGripEditSession.js +9 -2
- package/lib/editor/grip/AcEdGripEditSession.js.map +1 -1
- package/lib/editor/grip/AcEdGripHandle.d.ts +3 -2
- package/lib/editor/grip/AcEdGripHandle.d.ts.map +1 -1
- package/lib/editor/grip/AcEdGripHandle.js +9 -6
- package/lib/editor/grip/AcEdGripHandle.js.map +1 -1
- package/lib/editor/grip/AcEdGripManager.d.ts +13 -1
- package/lib/editor/grip/AcEdGripManager.d.ts.map +1 -1
- package/lib/editor/grip/AcEdGripManager.js +54 -14
- package/lib/editor/grip/AcEdGripManager.js.map +1 -1
- package/lib/editor/input/AcEdBatchPreview.d.ts +96 -0
- package/lib/editor/input/AcEdBatchPreview.d.ts.map +1 -0
- package/lib/editor/input/AcEdBatchPreview.js +125 -0
- package/lib/editor/input/AcEdBatchPreview.js.map +1 -0
- package/lib/editor/input/AcEdPreviewJig.d.ts +1 -1
- package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -1
- package/lib/editor/input/AcEdPreviewJig.js +14 -0
- package/lib/editor/input/AcEdPreviewJig.js.map +1 -1
- package/lib/editor/input/AcEdSelectionPreviewJig.d.ts +109 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.d.ts.map +1 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.js +185 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.js.map +1 -0
- package/lib/editor/input/index.d.ts +2 -0
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +2 -0
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +7 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +17 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBox.js +10 -2
- package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +9 -4
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -1
- package/lib/editor/view/AcEdBaseView.d.ts +37 -2
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +14 -12
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts +28 -0
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.js +65 -1
- package/lib/editor/view/AcEdSpatialQueryResult.js.map +1 -1
- package/lib/i18n/AcApI18n.d.ts +42 -0
- package/lib/i18n/AcApI18n.d.ts.map +1 -1
- package/lib/i18n/AcApI18n.js +56 -4
- package/lib/i18n/AcApI18n.js.map +1 -1
- package/lib/i18n/en/command.d.ts +23 -0
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +23 -0
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +23 -0
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +23 -0
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/service/AcApEntitySelection.d.ts +42 -0
- package/lib/service/AcApEntitySelection.d.ts.map +1 -0
- package/lib/service/AcApEntitySelection.js +156 -0
- package/lib/service/AcApEntitySelection.js.map +1 -0
- package/lib/service/AcApEntityService.d.ts +115 -0
- package/lib/service/AcApEntityService.d.ts.map +1 -0
- package/lib/service/AcApEntityService.js +194 -0
- package/lib/service/AcApEntityService.js.map +1 -0
- package/lib/{command/layer → service}/AcApLayerIsoState.d.ts +6 -24
- package/lib/service/AcApLayerIsoState.d.ts.map +1 -0
- package/lib/service/AcApLayerIsoState.js +28 -0
- package/lib/service/AcApLayerIsoState.js.map +1 -0
- package/lib/service/AcApLayerService.d.ts +400 -0
- package/lib/service/AcApLayerService.d.ts.map +1 -0
- package/lib/service/AcApLayerService.js +1240 -0
- package/lib/service/AcApLayerService.js.map +1 -0
- package/lib/service/AcApLayerStore.d.ts +198 -0
- package/lib/service/AcApLayerStore.d.ts.map +1 -0
- package/lib/service/AcApLayerStore.js +335 -0
- package/lib/service/AcApLayerStore.js.map +1 -0
- package/lib/service/AcApServiceEdit.d.ts +18 -0
- package/lib/service/AcApServiceEdit.d.ts.map +1 -0
- package/lib/service/AcApServiceEdit.js +34 -0
- package/lib/service/AcApServiceEdit.js.map +1 -0
- package/lib/service/index.d.ts +16 -0
- package/lib/service/index.d.ts.map +1 -0
- package/lib/service/index.js +16 -0
- package/lib/service/index.js.map +1 -0
- package/lib/service/types.d.ts +116 -0
- package/lib/service/types.d.ts.map +1 -0
- package/lib/service/types.js +5 -0
- package/lib/service/types.js.map +1 -0
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +21 -6
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +56 -10
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts +2 -2
- package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrLinearSpatialIndex.js +9 -3
- package/lib/spatialIndex/AcTrLinearSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts +2 -2
- package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrRBushSpatialIndex.js +19 -5
- package/lib/spatialIndex/AcTrRBushSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrSpatialIndex.d.ts +10 -1
- package/lib/spatialIndex/AcTrSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrSpatialIndex.js +7 -1
- package/lib/spatialIndex/AcTrSpatialIndex.js.map +1 -1
- package/lib/util/AcApDatabaseEdit.d.ts +11 -0
- package/lib/util/AcApDatabaseEdit.d.ts.map +1 -0
- package/lib/util/AcApDatabaseEdit.js +20 -0
- package/lib/util/AcApDatabaseEdit.js.map +1 -0
- package/lib/util/AcApGeTransform.d.ts +10 -0
- package/lib/util/AcApGeTransform.d.ts.map +1 -0
- package/lib/util/AcApGeTransform.js +15 -0
- package/lib/util/AcApGeTransform.js.map +1 -0
- package/lib/util/index.d.ts +2 -0
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -0
- package/lib/util/index.js.map +1 -1
- package/lib/view/AcEdViewKeyHandler.d.ts +32 -0
- package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -0
- package/lib/view/AcEdViewKeyHandler.js +101 -0
- package/lib/view/AcEdViewKeyHandler.js.map +1 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts +16 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts.map +1 -1
- package/lib/view/AcTrGroupWcsBboxAssert.js +19 -0
- package/lib/view/AcTrGroupWcsBboxAssert.js.map +1 -1
- package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts +49 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts.map +1 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.js +138 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.js.map +1 -0
- package/lib/view/AcTrLayer.d.ts +26 -2
- package/lib/view/AcTrLayer.d.ts.map +1 -1
- package/lib/view/AcTrLayer.js +64 -0
- package/lib/view/AcTrLayer.js.map +1 -1
- package/lib/view/AcTrLayerAppearanceController.d.ts +55 -0
- package/lib/view/AcTrLayerAppearanceController.d.ts.map +1 -0
- package/lib/view/AcTrLayerAppearanceController.js +86 -0
- package/lib/view/AcTrLayerAppearanceController.js.map +1 -0
- package/lib/view/AcTrLayout.d.ts +36 -1
- package/lib/view/AcTrLayout.d.ts.map +1 -1
- package/lib/view/AcTrLayout.js +160 -14
- package/lib/view/AcTrLayout.js.map +1 -1
- package/lib/view/AcTrScene.d.ts +47 -1
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +78 -3
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +50 -53
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +195 -312
- package/lib/view/AcTrView2d.js.map +1 -1
- package/lib/view/index.d.ts +3 -0
- package/lib/view/index.d.ts.map +1 -1
- package/lib/view/index.js +3 -0
- package/lib/view/index.js.map +1 -1
- package/package.json +7 -7
- package/lib/command/layer/AcApLayerIsoState.d.ts.map +0 -1
- package/lib/command/layer/AcApLayerIsoState.js +0 -53
- package/lib/command/layer/AcApLayerIsoState.js.map +0 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { AcGeMatrix3d } from '@mlightcad/data-model';
|
|
2
|
+
import { createRotationMatrix } from '../util/AcApGeTransform';
|
|
3
|
+
import { acapRunServiceEdit, ENTITY_EDIT_LABEL } from './AcApServiceEdit';
|
|
4
|
+
/**
|
|
5
|
+
* Centralizes entity mutations for modify commands and non-command callers.
|
|
6
|
+
*
|
|
7
|
+
* Provides geometric transforms, cloning, erasure, layer reassignment,
|
|
8
|
+
* and undo-wrapped edit helpers against a single {@link AcDbDatabase}.
|
|
9
|
+
*/
|
|
10
|
+
var AcApEntityService = /** @class */ (function () {
|
|
11
|
+
/**
|
|
12
|
+
* Creates an entity service bound to a database.
|
|
13
|
+
*
|
|
14
|
+
* @param db - Database whose entities will be mutated.
|
|
15
|
+
*/
|
|
16
|
+
function AcApEntityService(db) {
|
|
17
|
+
this.db = db;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Returns entity instances for the given object ids.
|
|
21
|
+
*
|
|
22
|
+
* @param ids - Entity object ids to look up.
|
|
23
|
+
* @returns Entities that exist in the block table.
|
|
24
|
+
*/
|
|
25
|
+
AcApEntityService.prototype.getEntitiesByIds = function (ids) {
|
|
26
|
+
var _this = this;
|
|
27
|
+
return ids
|
|
28
|
+
.map(function (id) { return _this.db.tables.blockTable.getEntityById(id); })
|
|
29
|
+
.filter(function (entity) { return !!entity; });
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Applies a transform matrix to entities opened for write.
|
|
33
|
+
*
|
|
34
|
+
* @param entities - Entities to transform.
|
|
35
|
+
* @param matrix - Transform to apply via {@link AcDbEntity.transformBy}.
|
|
36
|
+
* @returns Number of entities successfully transformed.
|
|
37
|
+
*/
|
|
38
|
+
AcApEntityService.prototype.transformEntities = function (entities, matrix) {
|
|
39
|
+
var _this = this;
|
|
40
|
+
var count = 0;
|
|
41
|
+
entities.forEach(function (entity) {
|
|
42
|
+
var opened = _this.db.openEntityForWrite(entity);
|
|
43
|
+
if (!opened)
|
|
44
|
+
return;
|
|
45
|
+
opened.transformBy(matrix);
|
|
46
|
+
count++;
|
|
47
|
+
});
|
|
48
|
+
return count;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Translates entities by a displacement vector.
|
|
52
|
+
*
|
|
53
|
+
* @param entities - Entities to move.
|
|
54
|
+
* @param displacement - Translation vector in WCS.
|
|
55
|
+
* @returns Number of entities successfully translated.
|
|
56
|
+
*/
|
|
57
|
+
AcApEntityService.prototype.translateEntities = function (entities, displacement) {
|
|
58
|
+
var matrix = new AcGeMatrix3d().makeTranslation(displacement.x, displacement.y, displacement.z);
|
|
59
|
+
return this.transformEntities(entities, matrix);
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Rotates entities around a base point.
|
|
63
|
+
*
|
|
64
|
+
* @param entities - Entities to rotate.
|
|
65
|
+
* @param basePoint - Rotation origin in WCS.
|
|
66
|
+
* @param angleRad - Rotation angle in radians.
|
|
67
|
+
* @returns Number of entities successfully rotated.
|
|
68
|
+
*/
|
|
69
|
+
AcApEntityService.prototype.rotateEntities = function (entities, basePoint, angleRad) {
|
|
70
|
+
var matrix = createRotationMatrix(basePoint, angleRad);
|
|
71
|
+
return this.transformEntities(entities, matrix);
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Clones entities, transforms them, and optionally appends to model space.
|
|
75
|
+
*
|
|
76
|
+
* @param sourceEntities - Entities to clone.
|
|
77
|
+
* @param matrix - Transform applied to each clone.
|
|
78
|
+
* @param options - Append behavior.
|
|
79
|
+
* @returns Transformed clone instances.
|
|
80
|
+
*/
|
|
81
|
+
AcApEntityService.prototype.cloneAndTransform = function (sourceEntities, matrix, options) {
|
|
82
|
+
var _a;
|
|
83
|
+
if (options === void 0) { options = {}; }
|
|
84
|
+
var append = (_a = options.append) !== null && _a !== void 0 ? _a : true;
|
|
85
|
+
var clones = sourceEntities
|
|
86
|
+
.map(function (entity) { return entity.clone(); })
|
|
87
|
+
.filter(function (entity) { return !!entity; });
|
|
88
|
+
clones.forEach(function (entity) { return entity.transformBy(matrix); });
|
|
89
|
+
if (append && clones.length > 0) {
|
|
90
|
+
this.db.tables.blockTable.modelSpace.appendEntity(clones);
|
|
91
|
+
}
|
|
92
|
+
return clones;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Erases entities by object id.
|
|
96
|
+
*
|
|
97
|
+
* @param objectIds - Entity ids to erase.
|
|
98
|
+
* @returns Number of entities successfully erased.
|
|
99
|
+
*/
|
|
100
|
+
AcApEntityService.prototype.eraseEntities = function (objectIds) {
|
|
101
|
+
var _this = this;
|
|
102
|
+
var count = 0;
|
|
103
|
+
objectIds.forEach(function (objectId) {
|
|
104
|
+
var entity = _this.db.openEntityForWrite(objectId);
|
|
105
|
+
if (!entity)
|
|
106
|
+
return;
|
|
107
|
+
entity.erase();
|
|
108
|
+
count++;
|
|
109
|
+
});
|
|
110
|
+
return count;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Moves entities to the current layer (`CLAYER`).
|
|
114
|
+
*
|
|
115
|
+
* @param objectIds - Entity ids to reassign.
|
|
116
|
+
* @returns Counts of changed, skipped, and missing entities.
|
|
117
|
+
*/
|
|
118
|
+
AcApEntityService.prototype.moveEntitiesToCurrentLayer = function (objectIds) {
|
|
119
|
+
var _this = this;
|
|
120
|
+
var _a;
|
|
121
|
+
var currentLayerName = (_a = this.db.clayer) === null || _a === void 0 ? void 0 : _a.trim();
|
|
122
|
+
var currentLayer = currentLayerName
|
|
123
|
+
? this.db.tables.layerTable.getAt(currentLayerName)
|
|
124
|
+
: undefined;
|
|
125
|
+
if (!currentLayer) {
|
|
126
|
+
return {
|
|
127
|
+
changedCount: 0,
|
|
128
|
+
alreadyCurrent: 0,
|
|
129
|
+
missing: 0,
|
|
130
|
+
currentLayerMissing: true
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
var changedCount = 0;
|
|
134
|
+
var alreadyCurrent = 0;
|
|
135
|
+
var missing = 0;
|
|
136
|
+
new Set(objectIds).forEach(function (objectId) {
|
|
137
|
+
var entity = _this.db.tables.blockTable.getEntityById(objectId);
|
|
138
|
+
if (!entity) {
|
|
139
|
+
missing++;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (entity.layer === currentLayer.name) {
|
|
143
|
+
alreadyCurrent++;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
var opened = _this.db.openEntityForWrite(objectId);
|
|
147
|
+
if (!opened) {
|
|
148
|
+
missing++;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
opened.layer = currentLayer.name;
|
|
152
|
+
changedCount++;
|
|
153
|
+
});
|
|
154
|
+
return { changedCount: changedCount, alreadyCurrent: alreadyCurrent, missing: missing, currentLayerMissing: false };
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Copies display traits from one entity to another.
|
|
158
|
+
*
|
|
159
|
+
* Copies layer, color, linetype, line weight, linetype scale, transparency,
|
|
160
|
+
* and visibility.
|
|
161
|
+
*
|
|
162
|
+
* @param source - Entity to copy traits from.
|
|
163
|
+
* @param target - Entity to receive traits.
|
|
164
|
+
*/
|
|
165
|
+
AcApEntityService.copyDisplayTraits = function (source, target) {
|
|
166
|
+
target.layer = source.layer;
|
|
167
|
+
target.color = source.color.clone();
|
|
168
|
+
target.lineType = source.lineType;
|
|
169
|
+
target.lineWeight = source.lineWeight;
|
|
170
|
+
target.linetypeScale = source.linetypeScale;
|
|
171
|
+
target.transparency = source.transparency;
|
|
172
|
+
target.visibility = source.visibility;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Runs an entity edit with undo when outside a command transaction.
|
|
176
|
+
*
|
|
177
|
+
* @param label - Undo group label.
|
|
178
|
+
* @param fn - Mutation callback.
|
|
179
|
+
*/
|
|
180
|
+
AcApEntityService.prototype.runEdit = function (label, fn) {
|
|
181
|
+
acapRunServiceEdit(this.db, label, fn);
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Runs an entity edit with the default entity undo label.
|
|
185
|
+
*
|
|
186
|
+
* @param fn - Mutation callback.
|
|
187
|
+
*/
|
|
188
|
+
AcApEntityService.prototype.runEntityEdit = function (fn) {
|
|
189
|
+
acapRunServiceEdit(this.db, ENTITY_EDIT_LABEL, fn);
|
|
190
|
+
};
|
|
191
|
+
return AcApEntityService;
|
|
192
|
+
}());
|
|
193
|
+
export { AcApEntityService };
|
|
194
|
+
//# sourceMappingURL=AcApEntityService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApEntityService.js","sourceRoot":"","sources":["../../src/service/AcApEntityService.ts"],"names":[],"mappings":"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"}
|
|
@@ -32,37 +32,19 @@ export interface AcApLayerIsoSnapshot {
|
|
|
32
32
|
/** Layers whose state changed during `LAYISO`. */
|
|
33
33
|
layers: AcApLayerIsoLayerSnapshot[];
|
|
34
34
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Stores the most recent `LAYISO` snapshot for `LAYUNISO`.
|
|
37
|
-
*/
|
|
38
|
-
export declare class AcApLayerIsoState {
|
|
39
|
-
private static _snapshot;
|
|
40
|
-
/**
|
|
41
|
-
* Replaces the previous isolation snapshot.
|
|
42
|
-
*
|
|
43
|
-
* @param snapshot - Snapshot captured by the latest `LAYISO` run.
|
|
44
|
-
*/
|
|
45
|
-
static set(snapshot: AcApLayerIsoSnapshot): void;
|
|
46
|
-
/**
|
|
47
|
-
* Consumes the current snapshot so `LAYUNISO` behaves as a one-shot restore.
|
|
48
|
-
*
|
|
49
|
-
* @returns Latest isolation snapshot, or `undefined` if `LAYISO` has not run.
|
|
50
|
-
*/
|
|
51
|
-
static consume(): AcApLayerIsoSnapshot | undefined;
|
|
52
|
-
}
|
|
53
35
|
/**
|
|
54
36
|
* Captures the layer state relevant to isolation.
|
|
55
37
|
*
|
|
56
|
-
* @param layer - Layer table record to
|
|
57
|
-
* @returns
|
|
38
|
+
* @param layer - Layer table record to snapshot.
|
|
39
|
+
* @returns Off, frozen, and locked flags for the layer.
|
|
58
40
|
*/
|
|
59
41
|
export declare function getLayerIsoState(layer: AcDbLayerTableRecord): AcApLayerIsoLayerState;
|
|
60
42
|
/**
|
|
61
|
-
* Compares two isolation layer states.
|
|
43
|
+
* Compares two isolation layer states for equality.
|
|
62
44
|
*
|
|
63
|
-
* @param a - First state.
|
|
64
|
-
* @param b - Second state.
|
|
65
|
-
* @returns `true` when
|
|
45
|
+
* @param a - First layer state.
|
|
46
|
+
* @param b - Second layer state.
|
|
47
|
+
* @returns `true` when off, frozen, and locked flags match.
|
|
66
48
|
*/
|
|
67
49
|
export declare function isSameLayerIsoState(a: AcApLayerIsoLayerState, b: AcApLayerIsoLayerState): boolean;
|
|
68
50
|
//# sourceMappingURL=AcApLayerIsoState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApLayerIsoState.d.ts","sourceRoot":"","sources":["../../src/service/AcApLayerIsoState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAI5D;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,uCAAuC;IACvC,KAAK,EAAE,OAAO,CAAA;IAEd,mCAAmC;IACnC,QAAQ,EAAE,OAAO,CAAA;IAEjB,mCAAmC;IACnC,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IAEZ,8CAA8C;IAC9C,MAAM,EAAE,sBAAsB,CAAA;IAE9B,uDAAuD;IACvD,QAAQ,EAAE,sBAAsB,CAAA;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,kBAAkB,EAAE,MAAM,CAAA;IAE1B,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,CAAA;IAEzB,kDAAkD;IAClD,MAAM,EAAE,yBAAyB,EAAE,CAAA;CACpC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,oBAAoB,GAC1B,sBAAsB,CAMxB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,sBAAsB,EACzB,CAAC,EAAE,sBAAsB,WAO1B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LAYER_LOCKED_FLAG } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Captures the layer state relevant to isolation.
|
|
4
|
+
*
|
|
5
|
+
* @param layer - Layer table record to snapshot.
|
|
6
|
+
* @returns Off, frozen, and locked flags for the layer.
|
|
7
|
+
*/
|
|
8
|
+
export function getLayerIsoState(layer) {
|
|
9
|
+
var _a;
|
|
10
|
+
return {
|
|
11
|
+
isOff: layer.isOff,
|
|
12
|
+
isFrozen: layer.isFrozen,
|
|
13
|
+
isLocked: (((_a = layer.standardFlags) !== null && _a !== void 0 ? _a : 0) & LAYER_LOCKED_FLAG) !== 0
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Compares two isolation layer states for equality.
|
|
18
|
+
*
|
|
19
|
+
* @param a - First layer state.
|
|
20
|
+
* @param b - Second layer state.
|
|
21
|
+
* @returns `true` when off, frozen, and locked flags match.
|
|
22
|
+
*/
|
|
23
|
+
export function isSameLayerIsoState(a, b) {
|
|
24
|
+
return (a.isOff === b.isOff &&
|
|
25
|
+
a.isFrozen === b.isFrozen &&
|
|
26
|
+
a.isLocked === b.isLocked);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=AcApLayerIsoState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApLayerIsoState.js","sourceRoot":"","sources":["../../src/service/AcApLayerIsoState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AA4C3C;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAA2B;;IAE3B,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,CAAC,CAAC,MAAA,KAAK,CAAC,aAAa,mCAAI,CAAC,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC;KACjE,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,CAAyB,EACzB,CAAyB;IAEzB,OAAO,CACL,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAC1B,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import { AcCmColor, AcDbDatabase, AcDbLayerTableRecord, AcDbObjectId, AcGiSubEntityTraits } from '@mlightcad/data-model';
|
|
2
|
+
import type { AcApLayerPreviousSnapshot } from '../app/AcApLayerSessionState';
|
|
3
|
+
import { AcApLayerIsoSnapshot } from './AcApLayerIsoState';
|
|
4
|
+
import { AcApDeleteLayerResult, AcApLaydelEntitySnapshot, AcApLayerByEntityResult, AcApLayerIsolateResult, AcApLayerIsolationMode, AcApSetLayerOnOptions, AcApSetLayersVisibilityOptions } from './types';
|
|
5
|
+
/** Summary row for layer listing commands and UI. */
|
|
6
|
+
export interface AcApLayerSummary {
|
|
7
|
+
/** Layer name. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** `*` when this layer is the current layer (`CLAYER`). */
|
|
10
|
+
current: string;
|
|
11
|
+
/** `Yes` or `No` visibility indicator. */
|
|
12
|
+
on: string;
|
|
13
|
+
/** `Yes` or `No` frozen indicator. */
|
|
14
|
+
frozen: string;
|
|
15
|
+
/** `Yes` or `No` locked indicator. */
|
|
16
|
+
locked: string;
|
|
17
|
+
/** String representation of the layer color. */
|
|
18
|
+
color: string;
|
|
19
|
+
}
|
|
20
|
+
/** Result of creating layers via the LAYER command New branch. */
|
|
21
|
+
export interface AcApCreateLayersResult {
|
|
22
|
+
/** Number of layers created. */
|
|
23
|
+
created: number;
|
|
24
|
+
/** Names that already existed and were skipped. */
|
|
25
|
+
existed: string[];
|
|
26
|
+
}
|
|
27
|
+
/** Result of resolving layer names to table records. */
|
|
28
|
+
export interface AcApResolveLayersResult {
|
|
29
|
+
/** Resolved layer table records. */
|
|
30
|
+
layers: AcDbLayerTableRecord[];
|
|
31
|
+
/** Names that were not found in the layer table. */
|
|
32
|
+
missing: string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Result of isolating layers, including the snapshot for `LAYUNISO`.
|
|
36
|
+
*/
|
|
37
|
+
export interface AcApLayerIsolateLayersResult extends AcApLayerIsolateResult {
|
|
38
|
+
/** Snapshot to store on the owning document for `LAYUNISO`. */
|
|
39
|
+
isoSnapshot: AcApLayerIsoSnapshot;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Centralizes layer table mutations for commands and UI consumers.
|
|
43
|
+
*
|
|
44
|
+
* Wraps on/off, freeze/thaw, lock/unlock, color, isolation (`LAYISO`/`LAYUNISO`),
|
|
45
|
+
* deletion (`LAYDEL`), and related operations with consistent undo handling.
|
|
46
|
+
* Document-scoped session state (`LAYERP`, `LAYUNISO` snapshots) lives on
|
|
47
|
+
* {@link AcApDocument}.
|
|
48
|
+
*/
|
|
49
|
+
export declare class AcApLayerService {
|
|
50
|
+
private readonly db;
|
|
51
|
+
/**
|
|
52
|
+
* Creates a layer service bound to a database.
|
|
53
|
+
*
|
|
54
|
+
* @param db - Database whose layer table will be mutated.
|
|
55
|
+
*/
|
|
56
|
+
constructor(db: AcDbDatabase);
|
|
57
|
+
/** Opens an existing layer table record for write.
|
|
58
|
+
*
|
|
59
|
+
* @param db - Database containing the layer table.
|
|
60
|
+
* @param layerOrName - Layer record or name to open.
|
|
61
|
+
* @returns Opened layer record, or `undefined` when not found.
|
|
62
|
+
*/
|
|
63
|
+
static openLayerForWrite(db: AcDbDatabase, layerOrName: AcDbLayerTableRecord | string): AcDbLayerTableRecord | undefined;
|
|
64
|
+
/** Sets or clears the frozen bit on a layer record.
|
|
65
|
+
*
|
|
66
|
+
* @param layer - Layer record to modify.
|
|
67
|
+
* @param frozen - Desired frozen state.
|
|
68
|
+
*/
|
|
69
|
+
static setLayerFrozenState(layer: AcDbLayerTableRecord, frozen: boolean): void;
|
|
70
|
+
/** Sets or clears the locked bit on a layer record.
|
|
71
|
+
*
|
|
72
|
+
* @param layer - Layer record to modify.
|
|
73
|
+
* @param locked - Desired locked state.
|
|
74
|
+
*/
|
|
75
|
+
static setLayerLockedState(layer: AcDbLayerTableRecord, locked: boolean): void;
|
|
76
|
+
/** Returns whether a layer is locked according to its standard flags.
|
|
77
|
+
*
|
|
78
|
+
* @param layer - Layer record to inspect.
|
|
79
|
+
* @returns `true` when the locked bit is set.
|
|
80
|
+
*/
|
|
81
|
+
static isLayerLocked(layer: AcDbLayerTableRecord): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Applies a captured `LAYERP` snapshot to a database.
|
|
84
|
+
*
|
|
85
|
+
* @param db - Database whose layer table should be updated.
|
|
86
|
+
* @param snapshot - Snapshot previously captured on the owning document.
|
|
87
|
+
* @returns `true` when the snapshot's current layer still exists.
|
|
88
|
+
*/
|
|
89
|
+
static applyLayerPreviousSnapshot(db: AcDbDatabase, snapshot: AcApLayerPreviousSnapshot): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Parses layer name input supporting `*` and comma-separated names.
|
|
92
|
+
*
|
|
93
|
+
* @param input - Raw user input (e.g. `A,B` or `*`).
|
|
94
|
+
* @returns Deduplicated list of layer names.
|
|
95
|
+
*/
|
|
96
|
+
parseLayerNameInput(input: string): string[];
|
|
97
|
+
/**
|
|
98
|
+
* Resolves layer records by name.
|
|
99
|
+
*
|
|
100
|
+
* @param names - Layer names to look up.
|
|
101
|
+
* @returns Resolved records and names that were not found.
|
|
102
|
+
*/
|
|
103
|
+
resolveLayers(names: string[]): AcApResolveLayersResult;
|
|
104
|
+
/**
|
|
105
|
+
* Returns summary rows for all layers.
|
|
106
|
+
*
|
|
107
|
+
* @returns Display-oriented summary for each layer in the table.
|
|
108
|
+
*/
|
|
109
|
+
getLayerSummaries(): AcApLayerSummary[];
|
|
110
|
+
/**
|
|
111
|
+
* Creates missing layers.
|
|
112
|
+
*
|
|
113
|
+
* @param names - Layer names to create.
|
|
114
|
+
* @returns Count of created layers and names that already existed.
|
|
115
|
+
*/
|
|
116
|
+
createLayers(names: string[]): AcApCreateLayersResult;
|
|
117
|
+
/**
|
|
118
|
+
* Sets current layer (`CLAYER`), ensuring it is on and thawed.
|
|
119
|
+
*
|
|
120
|
+
* @param name - Layer name to make current.
|
|
121
|
+
* @returns `true` when the layer exists and was set current.
|
|
122
|
+
*/
|
|
123
|
+
setCurrentLayer(name: string): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Creates a layer if missing, then makes it current.
|
|
126
|
+
*
|
|
127
|
+
* @param name - Layer name to create or activate.
|
|
128
|
+
* @returns `true` when the layer is current after the operation.
|
|
129
|
+
*/
|
|
130
|
+
makeLayer(name: string): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Turns a single layer on or off.
|
|
133
|
+
*
|
|
134
|
+
* When turning off the current layer, pass `{ switchCurrentLayer: true }`
|
|
135
|
+
* (as {@link AcApLayerStore} does) to move `CLAYER` first. CLI commands leave
|
|
136
|
+
* the default `false` and rely on batch helpers to skip the current layer.
|
|
137
|
+
*
|
|
138
|
+
* @param layerName - Target layer name.
|
|
139
|
+
* @param isOn - Desired visibility (`true` = on).
|
|
140
|
+
* @param options - Optional behavior when turning off the current layer.
|
|
141
|
+
* @returns `true` when the layer exists and was updated.
|
|
142
|
+
*/
|
|
143
|
+
setLayerOn(layerName: string, isOn: boolean, options?: AcApSetLayerOnOptions): boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Freezes or thaws a single layer.
|
|
146
|
+
*
|
|
147
|
+
* UI callers should pass `{ switchCurrentLayer: true }` when freezing the
|
|
148
|
+
* current layer so drawing continues on a visible, thawed layer.
|
|
149
|
+
*
|
|
150
|
+
* @param layerName - Target layer name.
|
|
151
|
+
* @param frozen - Desired frozen state.
|
|
152
|
+
* @param options - Optional behavior when freezing the current layer.
|
|
153
|
+
* @returns `true` when the layer exists and was updated.
|
|
154
|
+
*/
|
|
155
|
+
setLayerFrozen(layerName: string, frozen: boolean, options?: AcApSetLayerOnOptions): boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Locks or unlocks a single layer.
|
|
158
|
+
*
|
|
159
|
+
* @param layerName - Target layer name.
|
|
160
|
+
* @param locked - Desired locked state.
|
|
161
|
+
* @returns `true` when the layer exists and was updated.
|
|
162
|
+
*/
|
|
163
|
+
setLayerLocked(layerName: string, locked: boolean): boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Assigns line weight to a single layer.
|
|
166
|
+
*
|
|
167
|
+
* @param layerName - Target layer name.
|
|
168
|
+
* @param lineWeight - Line weight value to assign.
|
|
169
|
+
* @returns `true` when the layer exists and line weight was set.
|
|
170
|
+
*/
|
|
171
|
+
setLayerLineWeight(layerName: string, lineWeight: number): boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Keeps one layer visible and turns all others off (UI quick-isolate).
|
|
174
|
+
*
|
|
175
|
+
* Does not capture a `LAYUNISO` snapshot; use {@link isolateLayers} for
|
|
176
|
+
* command semantics.
|
|
177
|
+
*
|
|
178
|
+
* @param layerName - Layer to keep visible.
|
|
179
|
+
* @returns `true` when the layer exists and isolation was applied.
|
|
180
|
+
*/
|
|
181
|
+
isolateSingleLayer(layerName: string): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Batch toggles layer visibility.
|
|
184
|
+
*
|
|
185
|
+
* @param names - Layer names to update.
|
|
186
|
+
* @param off - `true` to turn layers off, `false` to turn them on.
|
|
187
|
+
* @param options - Optional skip rules for the current layer.
|
|
188
|
+
* @returns Names of current layers skipped when turning off.
|
|
189
|
+
*/
|
|
190
|
+
setLayersVisibility(names: string[], off: boolean, options?: AcApSetLayersVisibilityOptions): {
|
|
191
|
+
skippedCurrent: string[];
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Turns on every layer in the table.
|
|
195
|
+
*
|
|
196
|
+
* @returns Number of layers changed from off to on.
|
|
197
|
+
*/
|
|
198
|
+
setAllLayersOn(): number;
|
|
199
|
+
/**
|
|
200
|
+
* Turns off every layer except the current layer.
|
|
201
|
+
*
|
|
202
|
+
* @returns Number of layers turned off.
|
|
203
|
+
*/
|
|
204
|
+
setAllLayersOffExceptCurrent(): number;
|
|
205
|
+
/**
|
|
206
|
+
* Batch toggles frozen state.
|
|
207
|
+
*
|
|
208
|
+
* @param names - Layer names to update.
|
|
209
|
+
* @param freeze - `true` to freeze, `false` to thaw.
|
|
210
|
+
* @param options - Optional skip rules for the current layer.
|
|
211
|
+
* @returns Names of current layers skipped when freezing.
|
|
212
|
+
*/
|
|
213
|
+
setLayersFrozen(names: string[], freeze: boolean, options?: AcApSetLayersVisibilityOptions): {
|
|
214
|
+
skippedCurrent: string[];
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Thaws all frozen layers in the table.
|
|
218
|
+
*
|
|
219
|
+
* @returns Number of layers thawed.
|
|
220
|
+
*/
|
|
221
|
+
thawAllLayers(): number;
|
|
222
|
+
/**
|
|
223
|
+
* Batch toggles lock state.
|
|
224
|
+
*
|
|
225
|
+
* @param names - Layer names to update.
|
|
226
|
+
* @param lock - `true` to lock, `false` to unlock.
|
|
227
|
+
*/
|
|
228
|
+
setLayersLocked(names: string[], lock: boolean): void;
|
|
229
|
+
/**
|
|
230
|
+
* Parses color input for layer color assignment.
|
|
231
|
+
*
|
|
232
|
+
* Accepts ACI index (1–255) or color strings understood by {@link AcCmColor.fromString}.
|
|
233
|
+
*
|
|
234
|
+
* @param input - Raw color string from the user or UI.
|
|
235
|
+
* @returns Parsed color, or `undefined` when invalid.
|
|
236
|
+
*/
|
|
237
|
+
parseColorInput(input: string): AcCmColor | undefined;
|
|
238
|
+
/**
|
|
239
|
+
* Assigns color to a single layer.
|
|
240
|
+
*
|
|
241
|
+
* @param layerName - Target layer name.
|
|
242
|
+
* @param color - Color to assign.
|
|
243
|
+
* @returns `true` when the layer exists and color was set.
|
|
244
|
+
*/
|
|
245
|
+
setLayerColor(layerName: string, color: AcCmColor): boolean;
|
|
246
|
+
/**
|
|
247
|
+
* Assigns the same color to multiple layers.
|
|
248
|
+
*
|
|
249
|
+
* @param names - Layer names to update.
|
|
250
|
+
* @param color - Color to assign to each resolved layer.
|
|
251
|
+
*/
|
|
252
|
+
setLayersColor(names: string[], color: AcCmColor): void;
|
|
253
|
+
/**
|
|
254
|
+
* Updates a layer description.
|
|
255
|
+
*
|
|
256
|
+
* @param name - Target layer name.
|
|
257
|
+
* @param description - New description text.
|
|
258
|
+
* @returns `true` when the layer exists and description was set.
|
|
259
|
+
*/
|
|
260
|
+
setLayerDescription(name: string, description: string): boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Moves `CLAYER` away from a layer before turning it off or freezing it.
|
|
263
|
+
*
|
|
264
|
+
* @param targetLayerName - Layer that will be turned off or frozen.
|
|
265
|
+
* @returns `true` when `CLAYER` is no longer the target layer, or target was not current.
|
|
266
|
+
*/
|
|
267
|
+
switchCurrentLayerIfNeeded(targetLayerName: string): boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Resolves the layer name of an entity.
|
|
270
|
+
*
|
|
271
|
+
* @param objectId - Entity object id.
|
|
272
|
+
* @returns Trimmed layer name, or `undefined` when the entity is missing.
|
|
273
|
+
*/
|
|
274
|
+
getLayerNameFromEntity(objectId: AcDbObjectId): string | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* Collects distinct layer names from a set of entity ids.
|
|
277
|
+
*
|
|
278
|
+
* @param objectIds - Entity ids to inspect.
|
|
279
|
+
* @returns Resolved layer names and names missing from the layer table.
|
|
280
|
+
*/
|
|
281
|
+
collectLayerNamesFromEntities(objectIds: AcDbObjectId[]): {
|
|
282
|
+
layerNames: string[];
|
|
283
|
+
missingLayerNames: string[];
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* Freezes the layer of a picked entity (`LAYFRZ`).
|
|
287
|
+
*
|
|
288
|
+
* @param objectId - Selected entity id.
|
|
289
|
+
* @returns Outcome with previous frozen state for session undo, or a failure reason.
|
|
290
|
+
*/
|
|
291
|
+
freezeLayerByEntity(objectId: AcDbObjectId): AcApLayerByEntityResult;
|
|
292
|
+
/**
|
|
293
|
+
* Restores frozen state by layer name for `LAYFRZ` session undo.
|
|
294
|
+
*
|
|
295
|
+
* @param layerName - Target layer name.
|
|
296
|
+
* @param frozen - Frozen state to restore.
|
|
297
|
+
* @returns `true` when the layer exists and state was applied.
|
|
298
|
+
*/
|
|
299
|
+
setLayerFrozenByName(layerName: string, frozen: boolean): boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Turns off the layer of a picked entity (`LAYOFF`).
|
|
302
|
+
*
|
|
303
|
+
* @param objectId - Selected entity id.
|
|
304
|
+
* @returns Outcome with previous off state for session undo, or a failure reason.
|
|
305
|
+
*/
|
|
306
|
+
turnOffLayerByEntity(objectId: AcDbObjectId): AcApLayerByEntityResult;
|
|
307
|
+
/**
|
|
308
|
+
* Restores off state by layer name for `LAYOFF` session undo.
|
|
309
|
+
*
|
|
310
|
+
* @param layerName - Target layer name.
|
|
311
|
+
* @param off - Off state to restore.
|
|
312
|
+
* @returns `true` when the layer exists and state was applied.
|
|
313
|
+
*/
|
|
314
|
+
setLayerOffByName(layerName: string, off: boolean): boolean;
|
|
315
|
+
/**
|
|
316
|
+
* Locks the layer of a picked entity (`LAYLCK`).
|
|
317
|
+
*
|
|
318
|
+
* @param objectId - Selected entity id.
|
|
319
|
+
* @returns Success or failure outcome.
|
|
320
|
+
*/
|
|
321
|
+
lockLayerByEntity(objectId: AcDbObjectId): AcApLayerByEntityResult;
|
|
322
|
+
/**
|
|
323
|
+
* Unlocks the layer of a picked entity (`LAYULK`).
|
|
324
|
+
*
|
|
325
|
+
* @param objectId - Selected entity id.
|
|
326
|
+
* @returns Success or failure outcome.
|
|
327
|
+
*/
|
|
328
|
+
unlockLayerByEntity(objectId: AcDbObjectId): AcApLayerByEntityResult;
|
|
329
|
+
/**
|
|
330
|
+
* Isolates layers by name using `LAYISO` semantics.
|
|
331
|
+
*
|
|
332
|
+
* Target layers are turned on, thawed, and unlocked. Other layers are turned off
|
|
333
|
+
* or locked depending on `isolationMode`. `LockAndFade` locks only; the viewer
|
|
334
|
+
* does not render a fade effect.
|
|
335
|
+
*
|
|
336
|
+
* @param layerNames - Names of layers to keep visible.
|
|
337
|
+
* @param isolationMode - How non-isolated layers are hidden.
|
|
338
|
+
* @returns Isolation result with undo snapshot, or `undefined` when `layerNames` is empty.
|
|
339
|
+
*/
|
|
340
|
+
isolateLayers(layerNames: string[], isolationMode: AcApLayerIsolationMode): AcApLayerIsolateLayersResult | undefined;
|
|
341
|
+
/**
|
|
342
|
+
* Restores a `LAYISO` snapshot.
|
|
343
|
+
*
|
|
344
|
+
* @param snapshot - Snapshot previously produced by {@link isolateLayers}.
|
|
345
|
+
* @returns Number of layers whose state was restored.
|
|
346
|
+
*/
|
|
347
|
+
unisolateFromSnapshot(snapshot: AcApLayerIsoSnapshot): number;
|
|
348
|
+
/**
|
|
349
|
+
* Collects entity snapshots on a layer for `LAYDEL` undo.
|
|
350
|
+
*
|
|
351
|
+
* @param layerName - Layer whose entities should be snapshotted.
|
|
352
|
+
* @returns Cloned entities with owner and object ids.
|
|
353
|
+
*/
|
|
354
|
+
collectLayerEntities(layerName: string): AcApLaydelEntitySnapshot[];
|
|
355
|
+
/**
|
|
356
|
+
* Removes entities previously captured for `LAYDEL`.
|
|
357
|
+
*
|
|
358
|
+
* @param deletedEntities - Entity snapshots to erase from their owners.
|
|
359
|
+
*/
|
|
360
|
+
removeLayerEntities(deletedEntities: AcApLaydelEntitySnapshot[]): void;
|
|
361
|
+
/**
|
|
362
|
+
* Deletes a layer and all entities on it (`LAYDEL`).
|
|
363
|
+
*
|
|
364
|
+
* Layer `0` and the current layer cannot be deleted.
|
|
365
|
+
*
|
|
366
|
+
* @param layerName - Name of the layer to delete.
|
|
367
|
+
* @returns Success with undo snapshots, or a failure reason.
|
|
368
|
+
*/
|
|
369
|
+
deleteLayer(layerName: string): AcApDeleteLayerResult;
|
|
370
|
+
/**
|
|
371
|
+
* Restores a deleted layer and its entities for `LAYDEL` session undo.
|
|
372
|
+
*
|
|
373
|
+
* @param layer - Cloned layer table record to re-add.
|
|
374
|
+
* @param entities - Entity snapshots to append back to their owners.
|
|
375
|
+
*/
|
|
376
|
+
restoreDeletedLayer(layer: AcDbLayerTableRecord, entities: AcApLaydelEntitySnapshot[]): void;
|
|
377
|
+
/**
|
|
378
|
+
* Restores one layer from an isolation snapshot when its post-isolation state still matches.
|
|
379
|
+
*
|
|
380
|
+
* @param snapshot - Per-layer before/after isolation snapshot.
|
|
381
|
+
* @returns `true` when at least one flag was restored.
|
|
382
|
+
*/
|
|
383
|
+
private restoreLayerIfUnchanged;
|
|
384
|
+
/**
|
|
385
|
+
* Resolves live layer-table traits for rendering and style synchronization.
|
|
386
|
+
*
|
|
387
|
+
* @param layerName - Name of the layer to resolve from the layer table.
|
|
388
|
+
* @returns Resolved sub-entity traits, or undefined when the layer is missing.
|
|
389
|
+
*/
|
|
390
|
+
getEffectiveLayerTraits(layerName: string): Partial<AcGiSubEntityTraits> | undefined;
|
|
391
|
+
/**
|
|
392
|
+
* Resolves live layer-table traits from the given database.
|
|
393
|
+
*
|
|
394
|
+
* @param db - Database whose layer table supplies the record.
|
|
395
|
+
* @param layerName - Name of the layer to resolve.
|
|
396
|
+
* @returns Resolved sub-entity traits, or undefined when the layer is missing.
|
|
397
|
+
*/
|
|
398
|
+
static resolveLayerTraits(db: AcDbDatabase, layerName: string): Partial<AcGiSubEntityTraits> | undefined;
|
|
399
|
+
}
|
|
400
|
+
//# sourceMappingURL=AcApLayerService.d.ts.map
|