From cbbbf90271503df48db69b9aeda9f0f900e51845 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 3 May 2012 10:39:45 +0000 Subject: [PATCH] 0021572: EDF 2229 GHS3DPLUGIN: Hole in a flattened hollowed sphere is meshed by ghs3d do not use BRepTools::OuterShell() which works wrong --- src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx | 35 +++++++++++++++------------ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index 6b58f37..65fdf0b 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -382,22 +382,25 @@ static int findShapeID(SMESH_Mesh& mesh, if ( toMeshHoles ) return meshDS->ShapeToIndex( solid1 ); + //////////// UNCOMMENT AS SOON AS + //////////// http://tracker.dev.opencascade.org/view.php?id=23129 + //////////// IS SOLVED // - Are we at a hole boundary face? - if ( shells(1).IsSame( BRepTools::OuterShell( solid1 )) ) - { // - No, but maybe a hole is bound by two shapes? Does shells(1) touches another shell? - bool touch = false; - TopExp_Explorer eExp( shells(1), TopAbs_EDGE ); - // check if any edge of shells(1) belongs to another shell - for ( ; eExp.More() && !touch; eExp.Next() ) { - ansIt = mesh.GetAncestors( eExp.Current() ); - for ( ; ansIt.More() && !touch; ansIt.Next() ) { - if ( ansIt.Value().ShapeType() == TopAbs_SHELL ) - touch = ( !ansIt.Value().IsSame( shells(1) )); - } - } - if (!touch) - return meshDS->ShapeToIndex( solid1 ); - } + // if ( shells(1).IsSame( BRepTools::OuterShell( solid1 )) ) + // { // - No, but maybe a hole is bound by two shapes? Does shells(1) touches another shell? + // bool touch = false; + // TopExp_Explorer eExp( shells(1), TopAbs_EDGE ); + // // check if any edge of shells(1) belongs to another shell + // for ( ; eExp.More() && !touch; eExp.Next() ) { + // ansIt = mesh.GetAncestors( eExp.Current() ); + // for ( ; ansIt.More() && !touch; ansIt.Next() ) { + // if ( ansIt.Value().ShapeType() == TopAbs_SHELL ) + // touch = ( !ansIt.Value().IsSame( shells(1) )); + // } + // } + // if (!touch) + // return meshDS->ShapeToIndex( solid1 ); + // } } // find orientation of geom face within the first solid TopExp_Explorer fExp( solid1, TopAbs_FACE ); @@ -1100,7 +1103,7 @@ static bool readGMFFile(const char* theFile, // --------------------------------- int nbElem = 0, nbRef = 0; - int aGMFNodeID = 0, shapeID; + int aGMFNodeID = 0/*, shapeID*/; //int *nodeAssigne; const SMDS_MeshNode** GMFNode; #ifdef _DEBUG_ -- 2.39.2