# RecognizeCAD **Repository Path**: phm720/RecognizeCAD ## Basic Information - **Project Name**: RecognizeCAD - **Description**: No description available - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-24 - **Last Updated**: 2026-04-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # RecognizeCAD - 飞机工装智能设计系统 ## 项目结构 ``` RecognizeCAD/ ├── launch_nx.bat # NX 启动脚本 ├── run_in_nx.py # NX 中运行的主脚本 ├── view_stp.py # STEP 文件查看器 ├── requirements.txt # 依赖列表 ├── my_nx_module/ # 开发模块 │ ├── __init__.py │ ├── feature_recognition.py # 特征识别 │ ├── smart_design.py # 智能设计 │ └── ai_integration.py # AI 集成 └── example2.stp # 示例文件 ``` ## 快速开始 ### 1. 配置环境 ```bash # 修改 launch_nx.bat 中的路径 # NX_PATH: 你的 NX 安装路径 # CONDA_ENV_PATH: 你的 conda 环境路径 ``` ### 2. 启动 NX ```bash # 双击运行 launch_nx.bat ``` ### 3. 在 NX 中运行脚本 1. 打开 NX 2. `文件 → 实用工具 → 执行 NX Open` 3. 选择 `run_in_nx.py` ### 4. 查看 STEP 文件 ```bash python view_stp.py ``` ## 开发指南 ### 添加新功能 在 `my_nx_module/` 目录下创建新模块: ```python # my_nx_module/my_new_feature.py import sys import os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) def my_new_function(): pass ``` ### 在 NX 脚本中使用 ```python from my_nx_module.my_new_feature import my_new_function def main(): my_new_function() ``` ## 依赖安装 ```bash # 在 conda 环境中安装 conda activate pyocc_env pip install -r requirements.txt ``` ## 注意事项 1. **NX 路径配置**:确保 `launch_nx.bat` 中的路径正确 2. **Python 版本**:建议使用 Python 3.11+ 3. **API Key**:使用大模型功能需要配置 API Key ## 常见问题 ### Q: NXOpen 模块找不到 A: 确保在 NX 环境中运行脚本,或通过 `launch_nx.bat` 启动 ### Q: pythonocc-core 无法导入 A: 确保已正确配置 PYTHONPATH 指向 conda 环境