Salome HOME
PR: synchro V6_main tag mergeto_V7_main_11Feb13 distribGeom_11Feb13
authorprascle <prascle>
Mon, 18 Feb 2013 21:29:21 +0000 (21:29 +0000)
committerprascle <prascle>
Mon, 18 Feb 2013 21:29:21 +0000 (21:29 +0000)
configure.ac
doc/salome/gui/NETGENPLUGIN/input/netgen_2d_3d_hypo.doc
src/GUI/NETGENPluginGUI.cxx
src/GUI/NETGENPluginGUI_HypothesisCreator.cxx
src/NETGENPlugin/NETGENPlugin_Mesher.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx

index ea2d0fa17d4857f45795720433a3702bf43b5161..625f85275ff6a8421b313c118a68af4bbdf0d8b3 100644 (file)
@@ -37,7 +37,7 @@ AM_INIT_AUTOMAKE([-Wno-portability])
 
 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
 AC_SUBST(XVERSION)
-VERSION_DEV=0
+VERSION_DEV=1
 AC_SUBST(VERSION_DEV)
 
 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
index 87e31cbd2fe2e9758306f28fc24d9034f61a30cf..8cc306e08d41ec41036b57be2b6838a9145795b1 100644 (file)
@@ -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.
+
 */
 
 
index 1484062ce2a2536769b02d80da03be2727626444..eff78f60daf4a78c7565634750762d034038c868 100755 (executable)
@@ -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;
   }
 }
index 31b3f7e0b4926d559a5b5eb2950239a29f8378b8..408b01fe64c47c9a2395d52dd15790f52dbfa8ee 100644 (file)
@@ -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 );
index d8b8e932632e182e06f0bd657ab4852a3ac5ff01..e3cc305e064d7bced1a377ce140ee6a36f87a46f 100644 (file)
@@ -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 <edge> within <edges>
     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;
   }
 }
index 131c40a77b5eb175eb538b61a10e8c88e7bf8548..0e5a87f5f3346c8ab16942160817b51ede7fffc2 100644 (file)
@@ -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);
   }