]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
Correction after merge
authornge <nge>
Thu, 8 Oct 2009 11:24:28 +0000 (11:24 +0000)
committernge <nge>
Thu, 8 Oct 2009 11:24:28 +0000 (11:24 +0000)
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx

index 3f520634d1b44f0a3d16f7ea906e1336cc68ac2f..a97223393b18f115fb7a8016a9550b3690d0588f 100644 (file)
@@ -384,39 +384,6 @@ double getT(const TopoDS_Edge& edge, const gp_XYZ& point)
   return projector.LowerDistanceParameter();
 }
 
-/////////////////////////////////////////////////////////
-TopoDS_Shape BLSURFPlugin_BLSURF::entryToShape(std::string entry)
-{
-    MESSAGE("BLSURFPlugin_BLSURF::entryToShape"<<entry );
-    TopoDS_Shape S = TopoDS_Shape();
-    SALOMEDS::SObject_var aSO = myStudy->FindObjectID(entry.c_str());
-    SALOMEDS::GenericAttribute_var anAttr;
-    if (!aSO->_is_nil()){
-      SALOMEDS::SObject_var aRefSObj;
-      GEOM::GEOM_Object_var aShape;
-      SALOMEDS::AttributeIOR_var myAttribute;
-      CORBA::String_var myAttrValue;
-      CORBA::Object_var myCorbaObj;
-      // If selected object is a reference
-      if ( aSO->ReferencedObject( aRefSObj ))
-        aSO = aRefSObj;
-      SALOMEDS::SComponent_var myFatherCpnt = aSO->GetFatherComponent();
-      CORBA::String_var myFatherCpntDataType = myFatherCpnt->ComponentDataType();
-      if (  strcmp(myFatherCpntDataType,"GEOM")==0) {
-        MESSAGE("aSO father component is GEOM");
-        if (!aSO->FindAttribute(anAttr, "AttributeIOR")) return S;
-        myAttribute=SALOMEDS::AttributeIOR::_narrow(anAttr);
-        myAttrValue=myAttribute->Value();
-        MESSAGE("aSO IOR: "<< myAttrValue);
-        myCorbaObj=smeshGen_i->GetORB()->string_to_object(myAttrValue);
-        aShape = GEOM::GEOM_Object::_narrow(myCorbaObj);
-      }
-      if ( !aShape->_is_nil() )
-        S=smeshGen_i->GeomObjectToShape( aShape.in() );
-    }
-    return S;
-}
-
 /////////////////////////////////////////////////////////
 TopoDS_Shape BLSURFPlugin_BLSURF::entryToShape(std::string entry)
 {
@@ -659,9 +626,9 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsu
     // Standard Size Maps
     //
     MESSAGE("Setting a Size Map");
-    const BLSURFPlugin_Hypothesis::TSizeMap & sizeMaps = hyp->GetSizeMapEntries();
-    BLSURFPlugin_Hypothesis::TSizeMap::const_iterator smIt;
-    for ( smIt = sizeMaps.begin(); smIt != sizeMaps.end(); ++smIt ) {
+    const BLSURFPlugin_Hypothesis::TSizeMap sizeMaps = BLSURFPlugin_Hypothesis::GetSizeMapEntries(hyp);
+    BLSURFPlugin_Hypothesis::TSizeMap::const_iterator smIt = sizeMaps.begin();
+    for ( ; smIt != sizeMaps.end(); ++smIt ) {
       if ( !smIt->second.empty() ) {
         MESSAGE("blsurf_set_sizeMap(): " << smIt->first << " = " << smIt->second);
         GeomShape = entryToShape(smIt->first);