Home
Reply
Regular Contributor
bheld
Posts: 41

Is there a reliable way to reverse the direction of an edge?

Such that the 2 vertices are switched?  I'd like to do this for lines and also possible arcs.  I've tried swapping the vertex pointers but that seems to cause instabilities in future operations on the edges. 

Spatial Moderator
ybiyani
Posts: 223

Re: Is there a reliable way to reverse the direction of an edge?

Please see the implementation of edge:reverse (http://doc.spatial.com/index.php/SchemeExt:Edge:reverse...) in scm\scmext\cstr\edge_scm.cpp to see if that gives you any ideas.

 

 

BTW why are you trying to reverse the direction of the edge?