diff --git a/src/managers/engine-manager.ts b/src/managers/engine-manager.ts index b168dc0..ff51888 100644 --- a/src/managers/engine-manager.ts +++ b/src/managers/engine-manager.ts @@ -258,53 +258,28 @@ export class EngineManager extends BaseManager { * 激活轴向剖切 * @param axis 要激活的轴向 ('x' | 'y' | 'z') */ - public activateSectionAxis(axis: 'x' | 'y' | 'z'): void { + public activeSection(mode: 'x' | 'y' | 'z' | 'box' | 'face'): void { if (!this.engineInstance) { console.warn('[EngineManager] 3D Engine not initialized.'); return; } - this.engineInstance.activateSectionAxis(axis); + this.engineInstance.activeSection(mode); } - /** - * 停用轴向剖切 - */ - public deactivateSectionAxis(): void { - if (!this.engineInstance) { - return; - } - this.engineInstance.deactivateSectionAxis(); - } - - /** - * 获取当前剖切轴向 - * @returns 当前激活的轴向 - */ - public getCurrentSectionAxis(): 'x' | 'y' | 'z' | null { + public getCurrentSectionMode(): 'x' | 'y' | 'z' | 'box' | 'face' | null { if (!this.engineInstance) { return null; } - return this.engineInstance.getCurrentSectionAxis(); + return this.engineInstance.getCurrentSectionMode(); } - /** 激活剖切盒 */ - public activateSectionBox(): void { - if (!this.engineInstance) { - console.warn('[EngineManager] 3D Engine not initialized.'); - return; - } - this.engineInstance.activateSectionBox(); - } - - /** 停用剖切盒 */ - public deactivateSectionBox(): void { + public deactivateSection(): void { if (!this.engineInstance) { return; } - this.engineInstance.deactivateSectionBox(); + this.engineInstance.deactivateSection(); } - /** 设置剖切盒范围(百分比 0-100) */ public setSectionBoxRange(range: SectionBoxRange): void { if (!this.engineInstance) { console.warn('[EngineManager] 3D Engine not initialized.'); @@ -313,23 +288,6 @@ export class EngineManager extends BaseManager { this.engineInstance.setSectionBoxRange(range); } - /** 适应剖切盒到模型 */ - public fitSectionBoxToModel(): void { - if (!this.engineInstance) { - console.warn('[EngineManager] 3D Engine not initialized.'); - return; - } - this.engineInstance.fitSectionBoxToModel(); - } - - /** 重置剖切盒 */ - public resetSectionBox(): void { - if (!this.engineInstance) { - return; - } - this.engineInstance.resetSectionBox(); - } - /** 激活框选放大功能 */ public activateZoomBox(): void { if (!this.engineInstance) {