几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】2dpolylineexplode question (http://www.dimcax.com/hust/showthread.php?t=14919)

yang686526 2009-05-04 02:58 PM

【转帖】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


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