明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1844|回复: 1

问一个关于acedcmd()函数的问题

[复制链接]
发表于 2003-5-4 15:31 | 显示全部楼层 |阅读模式
是这样的,我现在有一个ads_point的二维数组30×30,里面装了900个点,现在我想用3dmesh命令将这900个点构成一个网格曲面,因为3dmesh命令必须要把每一个网格点的坐标选定,显然如果手工选点的话实在太麻烦了,用acedCommand()函数显然也是不行的,于是就只剩下acedCmd()了,因为acedCmd()的参数是一个结果缓冲区链表,于是我如下试验构造了一个只有四个点的结果缓冲区链表,但是老成功不了,自己找不到原因,希望大侠帮忙

struct resbuf eb0,eb1,eb2,eb3,eb4,eb5,eb6;
   char seb0[10];
   strcpy(seb0,"3dmesh");
   ads_point p1,p2,p3,p4;
   p1[X]=1;p1[Y]=1;p1[Z]=0;
   p2[X]=0;p2[Y]=1;p2[Z]=0;
   p3[X]=1;p3[Y]=0;p3[Z]=0;
   p4[X]=0;p4[Y]=0;p4[Z]=0;
   eb0.restype=RTSTR;
   eb1.restype=RT3DPOINT;
   eb2.restype=RT3DPOINT;
   eb3.restype=RT3DPOINT;
   eb4.restype=RT3DPOINT;
   eb5.restype=RTSHORT;
   eb6.restype=RTSHORT;

   eb0.resval.rstring=seb0;
   eb1.resval.rpoint[3]=p1[X],p1[Y],p1[Z];
   eb2.resval.rpoint[3]=p2[X],p2[Y],p2[Z];
   eb3.resval.rpoint[3]=p3[X],p3[Y],p3[Z];
   eb4.resval.rpoint[3]=p4[X],p4[Y],p4[Z];
   eb5.resval.rint=2;
   eb6.resval.rint=2;

   eb0.rbnext=&eb5;
   eb5.rbnext=&eb6;
   eb6.rbnext=&eb1;
   eb1.rbnext=&eb2;
   eb2.rbnext=&eb3;
   eb3.rbnext=&eb4;
   eb4.rbnext=NULL;
  acedCmd(&e0);//
发表于 2003-5-11 11:30 | 显示全部楼层

你应该这样做

你应该这样做
cmdlist = acutBuildList(RTSTR, "._3dmesh",                                                 RT3DPOINT, p1,
                 RT3DPOINT, p2,
                 RT3DPOINT, p3,
                 RT3DPOINT, p4,
RTSTR, "", 0);
acedCmd(cmdlist);
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-20 18:54 , Processed in 0.295954 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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