Salome HOME
0022216: EDF 2613 SMESH: Projection 1D with multi-dimensional algo (Netgen 1D-2D...
authoreap <eap@opencascade.com>
Mon, 27 May 2013 14:01:40 +0000 (14:01 +0000)
committereap <eap@opencascade.com>
Mon, 27 May 2013 14:01:40 +0000 (14:01 +0000)
 int GetHypotheses(const TopoDS_Shape &                aSubShape,
                   const SMESH_HypoFilter&             aFilter,
                   list <const SMESHDS_Hypothesis * >& aHypList,
                   const bool                          andAncestors,
+                  list< TopoDS_Shape > *              assignedTo=0) const

src/SMESH/SMESH_Mesh.cxx
src/SMESH/SMESH_Mesh.hxx

index 22fd2e44e51e28713d2213b04adf2bccfaa680db..9bf36fb1ff7b6aad47aae73802111b7a9d2dd6bf 100644 (file)
@@ -813,7 +813,8 @@ const SMESH_Hypothesis * SMESH_Mesh::GetHypothesis(const TopoDS_Shape &    aSubS
 int SMESH_Mesh::GetHypotheses(const TopoDS_Shape &                aSubShape,
                               const SMESH_HypoFilter&             aFilter,
                               list <const SMESHDS_Hypothesis * >& aHypList,
 int SMESH_Mesh::GetHypotheses(const TopoDS_Shape &                aSubShape,
                               const SMESH_HypoFilter&             aFilter,
                               list <const SMESHDS_Hypothesis * >& aHypList,
-                              const bool                          andAncestors) const
+                              const bool                          andAncestors,
+                              list< TopoDS_Shape > *              assignedTo/*=0*/) const
 {
   set<string> hypTypes; // to exclude same type hypos from the result list
   int nbHyps = 0;
 {
   set<string> hypTypes; // to exclude same type hypos from the result list
   int nbHyps = 0;
@@ -842,6 +843,7 @@ int SMESH_Mesh::GetHypotheses(const TopoDS_Shape &                aSubShape,
         nbHyps++;
         if ( !cSMESH_Hyp(*hyp)->IsAuxiliary() )
           mainHypFound = true;
         nbHyps++;
         if ( !cSMESH_Hyp(*hyp)->IsAuxiliary() )
           mainHypFound = true;
+        if ( assignedTo ) assignedTo->push_back( aSubShape );
       }
   }
 
       }
   }
 
@@ -868,6 +870,7 @@ int SMESH_Mesh::GetHypotheses(const TopoDS_Shape &                aSubShape,
           nbHyps++;
           if ( !cSMESH_Hyp(*hyp)->IsAuxiliary() )
             mainHypFound = true;
           nbHyps++;
           if ( !cSMESH_Hyp(*hyp)->IsAuxiliary() )
             mainHypFound = true;
+          if ( assignedTo ) assignedTo->push_back( curSh );
         }
     }
   }
         }
     }
   }
index 06c4e78023904dd298c3acce8aa478ea35e38d3e..e329e031336add63684b14a373634b4e1dea226b 100644 (file)
@@ -144,8 +144,9 @@ public:
   
   int GetHypotheses(const TopoDS_Shape &                     aSubShape,
                     const SMESH_HypoFilter&                  aFilter,
   
   int GetHypotheses(const TopoDS_Shape &                     aSubShape,
                     const SMESH_HypoFilter&                  aFilter,
-                    std::list <const SMESHDS_Hypothesis * >& aHypList,
-                    const bool                               andAncestors) const;
+                    std::list< const SMESHDS_Hypothesis * >& aHypList,
+                    const bool                               andAncestors,
+                    std::list< TopoDS_Shape > *              assignedTo=0) const;
 
   const std::list<SMESHDS_Command*> & GetLog() throw(SALOME_Exception);
   
 
   const std::list<SMESHDS_Command*> & GetLog() throw(SALOME_Exception);