几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】oddb3dpolyline vertex issue (http://www.dimcax.com/hust/showthread.php?t=17458)

yang686526 2009-05-06 07:19 PM

【转帖】oddb3dpolyline vertex issue
 
oddb3dpolyline vertex issue
oddb3dpolyline vertex issue
hi
i got stuck extracting informations of oddb3dpolyline. i am extracting the vertices of the polyline in the following ways
code:
oddbobjectiteratorptr iter = polyline->vertexiterator();
for(; !iter->done(); iter->step()){
oddb3dpolylinevertexptr vertex = polyline->openvertex(iter->objectid(), oddb::kforread);
}
if the polyline is a simple polyline then it is returning the vertices fine. but if we change the smoothness of the polyline as quadratic or cubic it gives me a set of vertices which are superset of the control points of the polyline.
if a, b, c, d, e are the control points of the polyline then it returns me the vertices set as follows.
a, [a set of other points] b, c, d, e. if we connect all these points we can draw the the polyline but it shows other lines which connects these control points also b-c, c-d, d-e. please note there is no api to get the no of vertices in the polyline except interating the vertex list..
kindly help me.
with regards
anirban talukdar
you can ask vertex for vertextype() which can be one of oddb::vertex3dtype
vladimir


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