iCAx开思工具箱

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 24600|回复: 2
打印 上一主题 下一主题

eric老大!跪求help!

[复制链接]
跳转到指定楼层
楼主
发表于 2009-4-17 14:10:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
proselect() 函数运行了,可是却无法在界面上交互选择啊!求教高手!!!!


#include "ProToolkit.h"
#include "ProMdl.h"
#include "ProSolid.h"
#include "ProObjects.h"
#include "ProWstring.h"
#include "ProUtil.h"
#include "ProWindows.h"
#include "ProEdge.h"
#include "ProMessage.h"



int user_initialize(int argc,char*argv[])
{
        
        double h;
        double seleedges();
        h=seleedges();
        printf("h is %f",h);
        return(0);
}
void user_terminate()
{
//printf("pro/toolkit application terminated successfully\n");
return;
}
double seleedges()
{
        ProMdl model;
ProSelection *sel=NULL;
int n_sel,i;
int b;
ProModelitem current_model_item;
double length,totlength=0.0;
ProEdge currentedge;
ProWindowRepaint(PRO_VALUE_UNUSED);

ProSelect("edge",-1,NULL,NULL,NULL,NULL,&sel,&n_sel);
for(i=0;i<n_sel;i++)
{
ProSelectionModelitemGet(sel[i],&current_model_item);
ProGeomitemToEdge(&current_model_item,&currentedge);
ProEdgeLengthEval(currentedge,&length);
totlength=totlength+length;

}

return totlength;
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 支持支持
沙发
发表于 2009-4-17 22:30:58 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
板凳
 楼主| 发表于 2009-4-18 10:08:46 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

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

本版积分规则

手板模型制作,在线3D打印服务

QQ|小黑屋|手机版|开思工具箱 CAD工具箱_CAM工具箱  

GMT+8, 2024-6-3 08:16 , Processed in 0.010945 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

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