Commit Graph

6 Commits

Author SHA1 Message Date
16f414e2a7 优化几何算法 2026-01-04 15:51:54 +08:00
04edf96378 feat: 添加子装配体Shrinkwrap支持 - 新增component_path参数支持对子装配体进行Shrinkwrap - 添加FindComponentByPath方法按路径查找子装配体 - 向后兼容,不传component_path时行为不变 2025-12-08 10:25:22 +08:00
83cf963b9d feat: add automatic file renaming for shrinkwrap exports to avoid overwrites
- Add FileExists() function to check if file already exists in filesystem
- Add GenerateUniqueFilePath() function to generate unique file names with _1, _2, etc. suffixes
- Modify ExecuteOTKShrinkwrap() to check for existing files before saving
- Rename Creo model internally if file name needs to be changed
- Use timestamp as fallback when maximum attempts (999) are exhausted
- Ensure proper .prt extension handling

This prevents accidental overwriting of existing shrinkwrap export files by automatically appending incremental suffixes to duplicate file names.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 12:55:01 +08:00
e3b15ef745 优化Shrinkwrap接口 - 修复文件名权限问题并简化执行逻辑
- 新增安全文件名生成函数,基于源模型名清理非法字符
- 移除不必要的递归组件分析和差异计算逻辑
- 简化ExecuteShrinkwrapShell方法,直接调用顶层装配体API
- 解决output_file_path路径权限问题,自动保存到当前工作目录
- 更新文档记录核心优化内容

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 16:59:03 +08:00
444307aea3 优化Shrinkwrap接口 - 解决复杂模型500错误问题
## 主要改进
- 新增动态超时机制:支持timeout_seconds参数(10-300秒)
- 增强异常处理:细分OTK异常类型,提供具体错误信息
- 保持向后兼容:新参数可选,不影响现有API

## 技术细节
- ShrinkwrapManager.h: 添加timeout_seconds字段
- ShellExportHandler.cpp: 实现超时参数解析和验证
- MFCCreoDll.cpp: HTTP层支持动态超时控制
- ShrinkwrapManager.cpp: 细分pfcXToolkitError等异常类型

## 解决问题
- 复杂模型处理超时导致的504错误
- 异常信息不明确难以定位问题
- 固定30秒超时限制了大模型处理能力

## 文档和测试
- SHRINKWRAP_OPTIMIZATION.md: 完整使用说明
- test_timeout.py/bat: 自动化和手动测试工具
- 更新CLAUDE.md项目文档

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-28 16:05:46 +08:00
root
60ea4cef1c 实现完整的Shrinkwrap外壳导出功能 - 高性能优化版本
主要功能:
- 新增Shrinkwrap外壳导出API (/api/creo/shrinkwrap/shell)
- 使用OTK SurfaceSubsetInstructions实现真正的外壳导出
- 智能重名处理,自动生成唯一文件名
- 完全使用用户参数配置,无硬编码限制

性能优化:
- 移除耗时的装配体分析和差异计算
- 简化文件保存逻辑,统一保存到工作目录
- 精简API响应格式,专注核心导出功能
- 大幅提升导出速度和系统稳定性

技术突破:
- 解决Windows API宏冲突问题 (GetCurrentDirectory)
- 实现SurfaceSubset vs MergedSolid性能差异优化
- 建立稳定的跨线程OTK操作机制
- 支持装配体和零件的统一外壳导出

文件变更:
+ ShrinkwrapManager.h/cpp - 核心Shrinkwrap功能实现
+ ShellExportHandler.h/cpp - HTTP API处理逻辑
* MFCCreoDll.cpp - 集成新的消息处理和路由
* CLAUDE.md - 更新项目文档

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-02 16:21:03 +08:00