几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   【转帖】[arx]如何得到acdbregion面域的顶点坐标(不explode)? (http://www.dimcax.com/hust/showthread.php?t=6458)

yang686526 2009-04-16 12:06 PM

【转帖】[arx]如何得到acdbregion面域的顶点坐标(不explode)?
 
[arx]如何得到acdbregion面域的顶点坐标(不explode)?
[arx]如何得到acdbregion面域的顶点坐标(不explode)?
我用4个line画了一个封闭的四边形,利用region命令生成了一个acdbregion对象
如何取得这个region的四个顶点坐标?如同pline可以得到顶点坐标一样?
或者通过region的四个捕捉点,怎么转换成坐标?
提前获取line的坐标不更简单?
利用acdbpolyline类生成多段线后,利用getvertexat()获取顶点
菜鸟问一句:利用acdbpolyline类怎么生成多段线啊
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
acdb2dpolyline生成多段线后利用顶点浏览器 举例说明:
ads_name entname;
ads_point ptt;
acdbobjectid entid;
acdb2dpolyline *pent;
acedentsel("\n选择多段线",entname,ptt);
acdbgetobjectid(entid,entname);
acdbopenobject(pent,entid,acdb::kforread);
acdbobjectiterator *pvertexiter=pent->vertexiterator();//
pent->close();
acdb2dvertex *pvertex;
acgepoint3d location;
acdbobjectid vertexid;
for(int i=0;!pvertexiter->done();i++,pvertexiter->step())
{
vertexid=pvertexiter->objectid();
acdbopenobject(pvertex,vertexid,acdb::kforread);
location=pvertex->position();
pvertex->close();
acutprintf("\n 坐标 x=%0.3f,y=%0.3f,z=%0.3f",location[x],location[y],location[z]);
}
delete pvertexiter;


所有的时间均为北京时间。 现在的时间是 06:37 AM.