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

2dpolyline::explode question
2dpolyline::explode question
when i explode a 2dpolyline, i get an array of oddbline pointers that appear to represent both the line segments that approximate the curve as well as the control polygon. how do i distinguish between the control polygon oddblines and the ones that approximate the curve?
btw, the first segment of the control polygon appears to be wrong...
thanks,
david
oddb2dpolyline::explode() should not produce segments from control vertices - only approximation segments. this is dd bug.
sergey slezkin
ok, thanks - i'll wait for the update - btw do you have any suggestions for a workaround in the mean time?
if modifying database is ok for you try to erase spline control vertices before calling explode():
code:
oddbobjectiteratorptr pit = ppolyline->vertexiterator();
while (!pvi->done())
{
pv = pit->entity();
pit->step();
if (pv->vertextype() == oddb::k2dsplinectlvertex)
{
pv->erase();
}
}
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)