From: vsr Date: Tue, 12 Feb 2013 14:44:36 +0000 (+0000) Subject: Merge from V6_main 11/02/2013 X-Git-Tag: V7_1_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV7_siman;p=plugins%2Fnetgenplugin.git Merge from V6_main 11/02/2013 --- diff --git a/doc/salome/gui/NETGENPLUGIN/input/netgen_2d_3d_hypo.doc b/doc/salome/gui/NETGENPLUGIN/input/netgen_2d_3d_hypo.doc index 87e31cb..8cc306e 100644 --- a/doc/salome/gui/NETGENPLUGIN/input/netgen_2d_3d_hypo.doc +++ b/doc/salome/gui/NETGENPLUGIN/input/netgen_2d_3d_hypo.doc @@ -94,6 +94,8 @@ each other. NETGEN differ from those in the 1D mesh generated by Regular_1D algorithm, resulting in different 2D and 3D meshes. +\note In the case where two points are geometrically confounded, a single node is generated. + */ diff --git a/src/GUI/NETGENPluginGUI.cxx b/src/GUI/NETGENPluginGUI.cxx index 1484062..eff78f6 100755 --- a/src/GUI/NETGENPluginGUI.cxx +++ b/src/GUI/NETGENPluginGUI.cxx @@ -41,12 +41,18 @@ extern "C" SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& aHypType ) { SMESHGUI_GenericHypothesisCreator* aCreator = NULL; - if( aHypType=="NETGEN_Parameters_2D" || aHypType=="NETGEN_Parameters" || - aHypType=="NETGEN_Parameters_2D_ONLY" || aHypType=="NETGEN_Parameters_3D" ) + if( aHypType=="NETGEN_Parameters_2D" || // 1D-2D + aHypType=="NETGEN_Parameters" || // 1D-2D-3D + aHypType=="NETGEN_Parameters_2D_ONLY" || // 2D + aHypType=="NETGEN_Parameters_3D" ) // 3D + { aCreator = new NETGENPluginGUI_HypothesisCreator( aHypType ); + } else if ( aHypType=="NETGEN_SimpleParameters_2D" || aHypType=="NETGEN_SimpleParameters_3D" ) + { aCreator = new NETGENPluginGUI_SimpleCreator( aHypType ); + } return aCreator; } } diff --git a/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx b/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx index 31b3f7e..408b01f 100644 --- a/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx @@ -206,7 +206,7 @@ QFrame* NETGENPluginGUI_HypothesisCreator::buildFrame() row++; } myAllowQuadrangles = 0; - if ( true /*myIs2D*/ ) // issue 0021676 + if ( myIs2D || !myIsONLY ) // issue 0021676 { myAllowQuadrangles = new QCheckBox( tr( "NETGEN_ALLOW_QUADRANGLES" ), GroupC1 ); aGroupLayout->addWidget( myAllowQuadrangles, row, 0 ); diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index d8b8e93..e3cc305 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -230,12 +230,10 @@ void NETGENPlugin_Mesher::SetParameters(const NETGENPlugin_Hypothesis* hyp) GEOM::GEOM_Object_var aGeomObj; TopoDS_Shape S = TopoDS_Shape(); SALOMEDS::SObject_var aSObj = myStudy->FindObjectID( entry.c_str() ); - SALOMEDS::GenericAttribute_var anAttr; - if (!aSObj->_is_nil() && aSObj->FindAttribute(anAttr, "AttributeIOR")) { - SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - CORBA::String_var aVal = anIOR->Value(); - CORBA::Object_var obj = myStudy->ConvertIORToObject(aVal); + if (!aSObj->_is_nil()) { + CORBA::Object_var obj = aSObj->GetObject(); aGeomObj = GEOM::GEOM_Object::_narrow(obj); + aSObj->UnRegister(); } if ( !aGeomObj->_is_nil() ) S = smeshGen_i->GeomObjectToShape( aGeomObj.in() ); @@ -322,10 +320,9 @@ namespace map< SMESH_subMesh*, set< int > >& addedEdgeSM2Faces) { // get ordered EDGEs - TopoDS_Vertex v1; list< TopoDS_Edge > edges; list< int > nbEdgesInWire; - int nbWires = SMESH_Block::GetOrderedEdges( face, v1, edges, nbEdgesInWire); + int nbWires = SMESH_Block::GetOrderedEdges( face, edges, nbEdgesInWire); // find within list< TopoDS_Edge >::iterator eItFwd = edges.begin(); @@ -2031,7 +2028,9 @@ namespace std::string text(netgen::NgException& ex) { SMESH_Comment str("NgException"); - str << " at " << netgen::multithread.task << ": " << ex.What(); + if ( strlen( netgen::multithread.task ) > 0 ) + str << " at " << netgen::multithread.task; + str << ": " << ex.What(); return str; } } diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index 131c40a..0e5a87f 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -403,10 +403,19 @@ bool NETGENPlugin_NETGEN_3D::compute(SMESH_Mesh& aMesh, str << ": " << ex.GetMessageString(); error(str); } + catch (netgen::NgException exc) + { + SMESH_Comment str("NgException"); + if ( strlen( netgen::multithread.task ) > 0 ) + str << " at " << netgen::multithread.task; + str << ": " << exc.What(); + error(str); + } catch (...) { SMESH_Comment str("Exception in netgen::OCCGenerateMesh()"); - str << " at " << netgen::multithread.task; + if ( strlen( netgen::multithread.task ) > 0 ) + str << " at " << netgen::multithread.task; error(str); }