mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
Merge branch 'occ_handle_internal_edges' into 'master'
OCC - Handle internal (forward+reversed) edges correctly See merge request ngsolve/netgen!573
This commit is contained in:
commit
2f98144324
@ -63,7 +63,7 @@ namespace netgen
|
||||
auto & orientation = edge_orientation[edgenr];
|
||||
double s0, s1;
|
||||
auto cof = BRep_Tool::CurveOnSurface (edge, face, s0, s1);
|
||||
if(edge.Orientation() == TopAbs_FORWARD)
|
||||
if(edge.Orientation() == TopAbs_FORWARD || edge.Orientation() == TopAbs_INTERNAL)
|
||||
{
|
||||
curve_on_face[FORWARD][edgenr] = cof;
|
||||
orientation += FORWARD;
|
||||
@ -75,6 +75,15 @@ namespace netgen
|
||||
orientation += REVERSED;
|
||||
edge_on_face[REVERSED][edgenr] = edge;
|
||||
}
|
||||
if(edge.Orientation() == TopAbs_INTERNAL)
|
||||
{
|
||||
// add reversed edge
|
||||
auto r_edge = TopoDS::Edge(edge.Reversed());
|
||||
auto cof = BRep_Tool::CurveOnSurface (r_edge, face, s0, s1);
|
||||
curve_on_face[REVERSED][edgenr] = cof;
|
||||
orientation += REVERSED;
|
||||
edge_on_face[REVERSED][edgenr] = r_edge;
|
||||
}
|
||||
|
||||
if(orientation > BOTH)
|
||||
throw Exception("have edge more than twice in face " + ToString(nr) + " " + properties.GetName() + ", orientation: " + ToString(orientation));
|
||||
|
Loading…
Reference in New Issue
Block a user