青华模具培训学校

 找回密码
 注册

QQ登录

只需一步,快速开始

青华模具培训学院
查看: 2243|回复: 3

[疑难] 求截面曲线

[复制链接]
发表于 2008-7-14 17:06 | 显示全部楼层 |阅读模式
用平面去截一个特征(比如圆柱),求截面曲线,我用下面的代码怎么生成不了截面曲线?请各位帮忙看看错在什么地方?谢谢了5 s; `& V: {. P% u" g. ]
                     tag_t display_tag;! [) |, j% u1 y+ l5 x  H' z$ m
                tag_t section_curves;5 p( t5 h" n2 o& P2 y* l2 i
                char sMessage[]="选择几何特征";
* L( }' j9 K, o* b                int iCount,response;% w- ]+ g1 D0 k0 \- `; F
                tag_t *feature;
! ~2 ~. i3 N6 v. X9 ^                UF_UI_select_feature(sMessage,NULL,&iCount,&feature,&response);//指定特征几何体        
/ X% w. w. P# h& y, W% s' P" t) R9 w6 u" ?
                double orientation[9]={0,0,0,0,0,0,0,0,0};
% Z$ m& w( v! n5 h' i                double origin[3]={0,0,0};  y' r% O1 o4 |6 a
                double pts[6]={0,0,0,0,0,0};
# u0 p- f7 z, \& Z$ Z                int error_code=0;
1 G% [  v( h- [/ V/ r9 h9 P! n! z: Z$ a                int mode,display;
- ^4 \& y: N' ?& P                 tag_t plane_eid;
. a* `$ m) x  q* T9 Z* o+ F* l/ p                mode=1;
) ^( X$ v9 E. G" j$ {2 o                display=0;
4 f, J$ ]+ X1 x, e                error_code=UF_UI_specify_plane("指定平面",&mode,display,&response,orientation,origin,&plane_eid);//调用拾取平面对话框
6 |, @6 l2 M: O% _$ h0 m: Z
! p$ |; ?& l8 y# T! ~        UF_CURVE_section_planes_data_t planes_data={&plane_eid,1};  
1 b2 O0 G  C# g3 f/ Q3 d7 ]# W3 Q
! r7 i0 G  \7 d) ?' c$ w        UF_CURVE_section_general_data_t objects_section={feature,1,0,1,2,0.1};  5 E5 x* ~% M5 i( Z4 ~+ ]$ F3 \

4 D3 ~! z0 A# Z0 i0 k& Z$ I        UF_CURVE_section_from_planes (&objects_section,&planes_data, &section_curves); //生成截面线
 楼主| 发表于 2008-7-15 10:06 | 显示全部楼层

回复 1楼 的帖子

发表于 2008-11-2 16:38 | 显示全部楼层
哪用这么麻烦啊,,UG本来就有找个指令!把曲线工具条调出来,有一个剖面曲线指令!!
发表于 2009-8-9 22:07 | 显示全部楼层
还不错啊
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|关于我们|sitemap|小黑屋|Archiver|手机版|UG网-UG技术论坛-青华数控模具培训学校 ( 粤ICP备15108561号 )

GMT+8, 2025-5-11 01:42 , Processed in 0.163552 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表