- UID
- 400656
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2006-3-14
- 最后登录
- 1970-1-1
|
发表于 2006-3-14 16:12:18
|
显示全部楼层
处理,连接,等是我在CAD中事先画好的块.
问题是我想画数据流程图因此需要记录图形的一些信息
在画流程图线的时候判断要连线的两个图形之间有没有障碍有的话
将自动绕开中间的障碍
我想的是用一个结构体链表,
我非常的着急
请各位帮帮忙好么
struct flowchart
{
ads_point insertp;
ads_real width,length;
char name[20];
struct flowchart *next;
};
static void My4t(void)
{
int stat;
ads_point point;
char conent[20];
char strID [133];
struct flowchart *p1,*p2,*head;
p1=p2=new flowchart;
head=p1;
while(strcmp ("EXIT", strID)&&strcmp ("exit", strID)&&strcmp ("E", strID)&&strcmp ("e", strID)&&strcmp ("退出", strID))
{
stat=acedGetString (0, "请输入要放入的块名: [处理(R)/连接(C)穿孔卡片/(D)] : ", strID);
switch (stat) {
case RTCAN: // User termination
return ;
case RTNORM:
p1=new flowchart;
p2->next=p1;
p2=p1;
srtcpy(p2->name,strID);
if ( !strcmp ("r", strID)||!strcmp ("R", strID)||!strcmp ("处理", strID) ){
acedGetPoint(NULL,"\n请点插入点:",point);
acedGetString (0, "\n请输入内容:",conent);
acedCommand(RTSTR,"-insert",RTSTR, "处理",RTPOINT,point,RTREAL,1.0,RTREAL,1.0,RTREAL,0.0,RTSTR,conent,0);
}
else if( !strcmp ("c", strID)||!strcmp ("C", strID)||!strcmp ("连接", strID) ){
acedGetPoint(NULL,"\n请点插入点:",point);
acedGetString (0, "\n请输入内容:",conent);
acedCommand(RTSTR,"-insert",RTSTR, "连接",RTPOINT,point,RTREAL,1.0,RTREAL,1.0,RTREAL,0.0,RTSTR,conent,0);
}
else if( !strcmp ("D", strID)||!strcmp ("d", strID)||!strcmp ("穿孔卡片", strID) ){
acedGetPoint(NULL,"\n请点插入点:",point);
acedGetString (0, "\n请输入内容:",conent);
acedCommand(RTSTR,"-insert",RTSTR, "穿孔卡片",RTPOINT,point,RTREAL,1.0,RTREAL,1.0,RTREAL,0.0,RTSTR,conent,0);
}
}//switch语句结束
}//while语句结束
}//static void My4t(void)结束 |
|