Skip to content
Snippets Groups Projects
Commit 49432c58 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

patch for embedded edges in OCC surfaces

parent 21014511
No related branches found
No related tags found
No related merge requests found
...@@ -108,7 +108,7 @@ void OCC_Internals::addShapeToLists(TopoDS_Shape _shape) ...@@ -108,7 +108,7 @@ void OCC_Internals::addShapeToLists(TopoDS_Shape _shape)
if(fmap.FindIndex(face) < 1){ if(fmap.FindIndex(face) < 1){
fmap.Add(face); fmap.Add(face);
for(exp3.Init(exp2.Current(), TopAbs_WIRE); exp3.More(); exp3.Next()){ for(exp3.Init(exp2.Current().Oriented(TopAbs_FORWARD), TopAbs_WIRE); exp3.More(); exp3.Next()){
TopoDS_Wire wire = TopoDS::Wire(exp3.Current()); TopoDS_Wire wire = TopoDS::Wire(exp3.Current());
if(wmap.FindIndex(wire) < 1){ if(wmap.FindIndex(wire) < 1){
wmap.Add(wire); wmap.Add(wire);
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#endif #endif
OCCFace::OCCFace(GModel *m, TopoDS_Face _s, int num) OCCFace::OCCFace(GModel *m, TopoDS_Face _s, int num)
: GFace(m, num), s(_s) : GFace(m, num), s(TopoDS::Face(_s.Oriented(TopAbs_FORWARD)))
{ {
setup(); setup();
model()->getOCCInternals()->bind(s, num); model()->getOCCInternals()->bind(s, num);
......
...@@ -36,14 +36,20 @@ void OCCRegion::setup() ...@@ -36,14 +36,20 @@ void OCCRegion::setup()
for(exp3.Init(shell, TopAbs_FACE); exp3.More(); exp3.Next()){ for(exp3.Init(shell, TopAbs_FACE); exp3.More(); exp3.Next()){
TopoDS_Face face = TopoDS::Face(exp3.Current()); TopoDS_Face face = TopoDS::Face(exp3.Current());
GFace *f = model()->getOCCInternals()->getOCCFaceByNativePtr(model(),face); GFace *f = model()->getOCCInternals()->getOCCFaceByNativePtr(model(),face);
if(f){ if(!f){
Msg::Error("Unknown face in region %d", tag());
}
else if (face.Orientation() == TopAbs_INTERNAL){
Msg::Info("Adding embedded face %d", f->tag());
embedded_faces.push_back(f);
}
else{
l_faces.push_back(f); l_faces.push_back(f);
f->addRegion(this); f->addRegion(this);
} }
else
Msg::Error("Unknown face in region %d", tag());
} }
} }
Msg::Debug("OCC Region %d with %d faces", tag(), l_faces.size()); Msg::Debug("OCC Region %d with %d faces", tag(), l_faces.size());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment