|
楼主 |
发表于 2012-8-30 15:19
|
显示全部楼层
用UGOPEN的下列代码也可以实现插入prt,但前面程序获得的originPoint是个Point3d型,如何转换成double型,又搞不懂了- const char *file_name = List4v.GetText(); //导入的prt文件名' X1 Z+ v, Z% q0 T6 L
- UF_import_part_modes_t modes;0 y1 d' J8 c1 l, [6 Y( K7 v
- modes.layer_mode = 0;//0层不变为工作层2 H& t3 k- f& f: K8 B
- modes.group_mode = 1;
A6 _' y" ], h5 S - modes.csys_mode = 0;
( T' g6 V/ @3 A B) n - modes.plist_mode = 0;
- V+ ?/ {* G& }: C - modes.view_mode = 0;5 }% M& [; i! P( J6 j$ K! V8 F) S
- double dest_csys[6]={1,0,0,0,1,0};
' K" B) _' w7 u- T& R - tag_t group=NULL_TAG;
, r$ U1 Z$ V8 Q* X+ ]; j; Z1 X - UF_PART_import (file_name, &modes, dest_csys, originPoint, 1, &group);
复制代码 |
|