CreoPluging9.0/Readme.md
2026-01-15 16:23:23 +08:00

73 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Creo 9.0 Shrinkwrap 插件
## 1. 项目概述
适用于 Creo 9.0 的 Shrinkwrap 外壳导出插件,通过 Creo 界面按钮直接执行。
## 2. 功能说明
### 2.1 核心功能
- 将当前零件或装配体导出为 Shrinkwrap 简化模型
- 自动以当前模型名 + `_shrinkwrap.prt` 作为输出文件名
- 导出到 Creo 当前工作目录
### 2.2 默认参数
```cpp
quality = 5; // 质量等级 (1-10)
ignore_quilts = true; // 忽略面片
ignore_skeleton = true; // 忽略骨架
assign_mass_properties = false;
```
## 3. 安装与使用
### 3.1 安装
1. 编译项目生成 `CreoPluging9.0.dll`
2.`protk.dat` 复制到 Creo 的 `text` 目录,或配置 Creo 加载该文件
3. 启动 Creo
### 3.2 配置 protk.dat
```
name CreoShrinkwrap
startup dll
exec_file D:\App\C++\CreoPluging9.0\x64\Debug\CreoPluging9.0.dll
text_dir D:\App\C++\CreoPluging9.0\text
revision 9.0
end
```
### 3.3 使用方法
1. 启动 Creo确认插件加载成功消息窗口显示 `Application "CreoShrinkwrap" started successfully`
2. 打开零件或装配体
3. 在 Ribbon 自定义中添加 "Shrinkwrap Export" 命令:
- File > Options > Customize Ribbon
- 从 "Choose commands from" 选择 "All Commands"
- 搜索 "Shrinkwrap"
- 添加到 Ribbon
4. 点击按钮执行导出
## 4. 技术架构
### 4.1 核心组件
- **Creo90Manager**: Creo 会话管理与模型获取
- **Shrinkwrap90Manager**: Shrinkwrap 导出功能封装
- **dllmain.cpp**: Pro/TOOLKIT 入口,注册命令和按钮
### 4.2 文件结构
```
CreoPluging9.0/
├── Creo90Manager.cpp/h # Creo 会话管理
├── Shrinkwrap90Manager.cpp/h # Shrinkwrap 导出
├── ShrinkwrapTypes.h # 数据类型定义
├── dllmain.cpp # 插件入口
├── protk.dat # 插件注册文件
└── text/
└── shrinkwrap_msg.txt # 消息文件
```
## 5. 注意事项
- 确保 Creo 9.0 已正确安装
- 编译时需要配置 Pro/TOOLKIT 和 OTK 的包含目录和库目录
- 导出前确保有活动的零件或装配体模型