![]() |
【转帖】polylines and plineproc in vectorizer
polylines and plineproc in vectorizer
polylines and plineproc in vectorizer not sure, but if i made no mistake, where is a problem with the plineproc: in the attached drawing are two polylines (originally 'old' 2dpolylines from autocad 13 or so). one polyline has widths, but plineproc 'ignores' the width, the pointer to the database polyline even so. and all polylines have wrong coordinates, it seems, that the coordinates are in the entity coordinate space, the database polyline has the real coordinates. i added the following test code in the exgssimpledevice :: plineproc from exgssimpledevice.cpp: code: oddbpolylineptr pline = lwbuf.getdbpolyline(); odgepoint2d pt_2d_from_lwbuf; lwbuf.getpointat(0, pt_2d_from_lwbuf); odgepoint3d pt_3d_from_lwbuf(odgepoint3d(pt_2d_from_lwbuf.y, pt_2d_from_lwbuf.y, 0)); pt_3d_from_lwbuf.transformby(*pxform); odgepoint3d pt_from_dbobject; pline->getpointat(0, pt_from_dbobject); //the oddbpolylineptr points are ok, but the odgipolyline seems to have //coordinates in the entity coordinate space // //applying xform does not matter ////////////////////////////////////////////////////////////////////////// double sw_from_lwbuf, ew_from_lwbuf; lwbuf.getwidthsat(0, ew_from_lwbuf, sw_from_lwbuf); double sw_from_db_object, ew_from_db_object; pline->getwidthsat(0, sw_from_db_object, ew_from_db_object); //the widhts for the "disc-like" polyline are always zero, for both polylines woho attached files it is plineproc with constant width. you can obtain constant width by odgipolyline::getconstantwidth(). in case it is zero, you should use odgipolyline::getwidthsat() to get width that is not constant. sincerely yours, george udov in what cases do we get a non-constant width for a segment? can we directly create something in autocad which shows this behavior or is this a feature of the vectorizor? i don't think it is distinguishable in autocad gui is it a const-width or value-width polyline. in dxf there are groupcode 43 (lwpolyline)... sincerely yours, george udov |
所有的时间均为北京时间。 现在的时间是 10:47 PM. |