refactor(section-managers): adapt to unified clipping API

SectionAxisDialogManager:
- Update activateSectionAxis → activeSection in callbacks

SectionBoxDialogManager:
- Update activateSectionBox → activeSection('box')
- Disable fitSectionBoxToModel and resetSectionBox (not supported)

SectionPlaneDialogManager:
- Add activeSection('face') to onDialogCreated
- Add deactivateSection() to onBeforeDestroy
- Wire onHide to engine.clipping.disabled()
- Keep onReverse/onReset as log-only (not supported)
This commit is contained in:
yuding
2026-02-02 16:25:32 +08:00
parent b36cc3edf3
commit 679d792de2
3 changed files with 19 additions and 10 deletions

View File

@@ -65,10 +65,10 @@ export class SectionBoxDialogManager extends BaseDialogManager {
console.log('[SectionBoxDialogManager] 反向切换(底层暂不支持):', isReversed);
},
onFitToModel: () => {
this.registry.engine3d?.fitSectionBoxToModel();
console.log('[SectionBoxDialogManager] Fit to model not supported in new API');
},
onReset: () => {
this.registry.engine3d?.resetSectionBox();
console.log('[SectionBoxDialogManager] Reset not supported in new API');
},
onRangeChange: (range) => {
this.registry.engine3d?.setSectionBoxRange(range);
@@ -80,7 +80,7 @@ export class SectionBoxDialogManager extends BaseDialogManager {
/** 对话框创建后的回调,激活剖切盒并自适应高度 */
protected onDialogCreated(): void {
this.registry.engine3d?.activateSectionBox();
this.registry.engine3d?.activeSection('box');
this.dialog?.fitHeight(false);
}
@@ -91,7 +91,7 @@ export class SectionBoxDialogManager extends BaseDialogManager {
/** 销毁前的清理,停用剖切盒并销毁面板实例 */
protected onBeforeDestroy(): void {
this.registry.engine3d?.deactivateSectionBox();
this.registry.engine3d?.deactivateSection();
if (this.panel) {
this.panel.destroy();
this.panel = null;