高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】exploded arc is in the wrong direction
exploded arc is in the wrong direction
exploded arc is in the wrong direction
i am exploding a polyline, then re-joining the individual entities in my application, but one of the arcs is getting added backwards.
pt 1 to 2 is a line
pt 2 to 3 is an arc -141 degrees to -51 degrees
pt 3 to 4 is a line
pt 4 ot 5 is an arc -51 to 94
*pt 5 to 6 is an arc -122 to -85
pt 6 to 1 is an arc 57 to 211
*the arc from 5 to 6 is concave, all others are convex. it should be -85 to -122 in my mind. does anyone know what is going on?
this causes the arc from 5 to 6 to be added in the wrong direction, adding an extra line segment to the combined line.
attached files
oddbarc always has counter-clock-wise direction (end angle is always greater than start angle).
to preserve direction is was possible to flip normal and use (0,0,-1) instead of (0,0,1). but we mimic autocad's behavior.
sergey slezkin
is there a better way?
i guess i will check which end point of the arc (start or end) is closer to the last point in the combined object to determine if the arc was created in the wrong direction. if you can think of a beter way, please let me know.
|