查看单个帖子
旧 2009-05-06, 11:26 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】problem with oddbproxyentity

problem with oddbproxyentity
problem with oddbproxyentity
i have a problem with oddbproxyentity i wrote:
oddbproxyentityptr pproxy(pent);
odrxobjectptrarray entityset;
if (pproxy->explode(entityset)==eok)
for(unsigned int c=0;c<entityset.size(); c++)
{
if (entityset[c]->iskindof(oddb2dpolyline::desc()))
{
oddb2dpolylineptr ppoly;
ppoly=oddb2dpolyline::cast(entityset[c]);
oddbobjectiteratorptr piter = ppoly->vertexiterator();
for (; !piter->done(); piter->step())
{
oddb2dvertexptr pvertex = piter->entity();
if (pvertex.get())
{
double d1,d2;
d1= pvertex->position().x;
d2= pvertex->position().y;
}
}
}
}
but the value of d1 and d2 are not correct.if i explode oddb2dpolyline entity into line the result is correct. where is my error? you can download the file at
2d vertices you get from oddb2dpolyline are in polyline's coordinate system which is defined by polyline's normal and elevation.
sergey slezkin
the solution was very simple. thank's a lot sergey
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)