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

@@ -66,7 +66,7 @@ export class SectionAxisDialogManager extends BaseDialogManager {
},
onAxisChange: (axis) => {
console.log('[SectionAxisDialogManager] 切换轴向:', axis);
this.registry.engine3d?.activateSectionAxis(axis);
this.registry.engine3d?.activeSection(axis);
}
});
this.panel.init();
@@ -84,7 +84,7 @@ export class SectionAxisDialogManager extends BaseDialogManager {
}
// 自动激活默认轴向剖切X轴
this.registry.engine3d.activateSectionAxis('x');
this.registry.engine3d.activeSection('x');
}
/** 对话框关闭时的回调,取消工具栏按钮激活状态 */
@@ -94,8 +94,7 @@ export class SectionAxisDialogManager extends BaseDialogManager {
/** 销毁前的清理,销毁面板实例 */
protected onBeforeDestroy(): void {
// 停用轴向剖切
this.registry.engine3d?.deactivateSectionAxis();
this.registry.engine3d?.deactivateSection();
if (this.panel) {
this.panel.destroy();