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;
}
}
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() );
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();
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;
}
}
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);
}