From: gdd Date: Tue, 14 Jun 2011 09:23:21 +0000 (+0000) Subject: rnc: Fixed the regression that groups were no more managed in BLSURF Size Maps X-Git-Tag: V6_3_1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee6e3f8e55939d23c30cf66f1fb3e5c6f244c635;p=plugins%2Fblsurfplugin.git rnc: Fixed the regression that groups were no more managed in BLSURF Size Maps --- diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index f7b61f9..8877339 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -72,6 +72,7 @@ #include "SALOME_LifeCycleCORBA.hxx" #include +#include #include #include #include @@ -799,6 +800,7 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() SM_ShapeTypes.Add( TopAbs_VERTEX ); SM_ShapeTypes.Add( TopAbs_EDGE ); SM_ShapeTypes.Add( TopAbs_FACE ); + SM_ShapeTypes.Add( TopAbs_COMPOUND ); ATT_ShapeTypes.Add( TopAbs_VERTEX ); ATT_ShapeTypes.Add( TopAbs_EDGE ); @@ -2505,6 +2507,21 @@ void BLSURFPluginGUI_HypothesisCreator::insertElement(GEOM::GEOM_Object_var anOb MESSAGE("entry = "<GetName(); shapeType = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( anObject ).ShapeType(); + // Group management : the type of entities in the group is stored in the SMPShapeTypeMap + // in order to write the size map with the right syntax in StoreParamsToHypo + // (f(t) for edges, f(u,v) for faces ...) + if (shapeType == TopAbs_COMPOUND){ + TopoDS_Shape theShape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( anObject ); + TopoDS_Shape childShape; + TopoDS_Iterator anIt(theShape); + for(;anIt.More();anIt.Next()){ + childShape = anIt.Value(); + shapeType = childShape.ShapeType(); + if(!childShape.IsNull()){ + break; + } + } + } mySizeMapTable->setFocus(); QString shapeEntry; shapeEntry = QString::fromStdString(entry);