- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Reversing an edge
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-16-2009 10:29 AM
Hi. Is there any other way to reverse an edge so that the sense will be reverse and the start and end points will be flipped? I found a code in "scm/scmext/cstr/edge_scm.cpp" that does exactly this, but upon testing sometimes the edge gets messed up. On some of the edges, the length changes and sometimes the edge length becomes 0 and the start and end point becomes the same. Are there any other alternatives in implementing this kind of operation? The code that I was referring to is indicated below.
VERTEX * old_start = e->start();
VERTEX * old_end = e->end();
e->set_sense (e->sense() == FORWARD ? REVERSED : FORWARD);
e->set_start (old_end);
e->set_end (old_start);
// Switch the sense flags on the coedges also
COEDGE *first_coedge = e->coedge();
// STI let (r7769): Don't operate on coedges that don't exist
if (first_coedge) {
COEDGE *flip_coedge = first_coedge;
flip_coedge->set_sense (flip_coedge->sense() == FORWARD ?
REVERSED : FORWARD);
while(flip_coedge->partner() && flip_coedge->partner() != first_coedge)
{
flip_coedge = flip_coedge->partner();
flip_coedge->set_sense (flip_coedge->sense() == FORWARD ?
REVERSED : FORWARD);
}
}
Thank you,
Raymond
Re: Reversing an edge
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-01-2009 11:00 AM
Hi Raymond,
Do you have any examples off where this code isn't working for you?
Thanks,
Robert
Re: Reversing an edge
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-01-2009 11:09 AM
Hi Robert,
Actually the failure is only observed in a particular CAD model. Sadly I cannot post the CAD model here. We already sent this problem to Spatial support but I was just wondering if there was some other way to do this.
Thank you,
Raymond
Re: Reversing an edge
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2009 07:50 AM
Did you submit an incident for this issue? if so, would you please post the incident number, so we can take a look at them?
thanks
Re: Reversing an edge
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2009 08:50 AM
It would be Incident: 090921-000008.
Thank you,
Raymond
Re: Reversing an edge
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2009 08:34 PM
Raymond,
We looked at this incident and we determined that there was a bug with reversing the edges. However, there are problems with the original Parasolid file you provided and we need more information from you to process this. Please look at the incident for more information.
Thanks

