From afb2a8e7814693a4c0b7348fa38fd05a340e7d97 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 3 Aug 2015 20:45:26 +0300 Subject: [PATCH] 23126: [CEA 1562] Regression : Wrong nodes position using SetEnforcedVertex on a sphere Fix SMESH_MesherHelper::IsQuadraticSubMesh() IPAL52836: A sub-face of a box can't be selected in OB to be added to Viscous Layers hypothesis Fix StdMeshersGUI_SubShapeSelectorWdg::selectionIntoArgument() --- src/SMESH/SMESH_MesherHelper.cxx | 7 ++-- .../StdMeshersGUI_SubShapeSelectorWdg.cxx | 37 ++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 9f4d616d2..aec095ec3 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -192,11 +192,12 @@ bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh) } // if ( nbOldLinks == myTLinkNodeMap.size() ) -- 0023068 - // myCreateQuadratic = false; + if ( myTLinkNodeMap.empty() ) + myCreateQuadratic = false; - if(!myCreateQuadratic) { + if ( !myCreateQuadratic ) myTLinkNodeMap.clear(); - } + SetSubShape( aSh ); return myCreateQuadratic; diff --git a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx index 6cddeb013..808abf83f 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx @@ -255,24 +255,27 @@ void StdMeshersGUI_SubShapeSelectorWdg::selectionIntoArgument() GEOM::GEOM_Object_var aGeomObj = GetGeomObjectByEntry( IO->getEntry() ); if ( !CORBA::is_nil( aGeomObj ) ) { // Selected Object From Study - GEOM::GEOM_Object_var aGeomFatherObj = aGeomObj->GetMainShape(); - QString aFatherEntry = ""; - QString aMainFatherEntry = ""; - TopoDS_Shape shape; - if ( !CORBA::is_nil( aGeomFatherObj ) ) { - // Get Main Shape - GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry.c_str() ); - if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) { // Main Shape is a Group - GEOM::GEOM_Object_var aMainFatherObj = aGeomMain->GetMainShape(); - if ( !CORBA::is_nil( aMainFatherObj ) ) - aMainFatherEntry = aMainFatherObj->GetStudyEntry(); - } - aFatherEntry = aGeomFatherObj->GetStudyEntry(); - } - - if (( ! aFatherEntry.isEmpty() ) && - ( aFatherEntry == myEntry.c_str() || aFatherEntry == aMainFatherEntry ) ) + // commented for IPAL52836 + // + // GEOM::GEOM_Object_var aGeomFatherObj = aGeomObj->GetMainShape(); + // QString aFatherEntry = ""; + // QString aMainFatherEntry = ""; + // TopoDS_Shape shape; + // if ( !CORBA::is_nil( aGeomFatherObj ) ) { + // // Get Main Shape + // GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry.c_str() ); + // if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) { // Main Shape is a Group + // GEOM::GEOM_Object_var aMainFatherObj = aGeomMain->GetMainShape(); + // if ( !CORBA::is_nil( aMainFatherObj ) ) + // aMainFatherEntry = aMainFatherObj->GetStudyEntry(); + // } + // aFatherEntry = aGeomFatherObj->GetStudyEntry(); + // } + + // if (( ! aFatherEntry.isEmpty() ) && + // ( aFatherEntry == myEntry.c_str() || aFatherEntry == aMainFatherEntry ) ) { + TopoDS_Shape shape; if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object GEOMBase::GetShape(aGeomObj, shape); if ( !shape.IsNull() ) { -- 2.39.2