高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|