corrections due to improvement of SMDS

This commit is contained in:
msv 2005-01-14 13:44:21 +00:00
parent 5ffc6f2991
commit e9160b6567
2 changed files with 8 additions and 7 deletions

View File

@ -2145,7 +2145,7 @@ void ManifoldPart::getFacesByLink( const ManifoldPart::Link& theLink,
SMDS_MeshFace* aFace = (SMDS_MeshFace*)anItr->next(); SMDS_MeshFace* aFace = (SMDS_MeshFace*)anItr->next();
if ( !aFace ) if ( !aFace )
continue; continue;
aSetOfFaces.insert( aFace ); aSetOfFaces.Add( aFace );
} }
// take all faces that shared second node // take all faces that shared second node
anItr = theLink.myNode2->facesIterator(); anItr = theLink.myNode2->facesIterator();
@ -2153,7 +2153,7 @@ void ManifoldPart::getFacesByLink( const ManifoldPart::Link& theLink,
for ( ; anItr->more(); ) for ( ; anItr->more(); )
{ {
SMDS_MeshFace* aFace = (SMDS_MeshFace*)anItr->next(); SMDS_MeshFace* aFace = (SMDS_MeshFace*)anItr->next();
if ( aSetOfFaces.find( aFace ) != aSetOfFaces.end() ) if ( aSetOfFaces.Contains( aFace ) )
theFaces.push_back( aFace ); theFaces.push_back( aFace );
} }
} }

View File

@ -42,6 +42,7 @@
#include <TopoDS_Face.hxx> #include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx> #include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx> #include <TopoDS_Edge.hxx>
#include <map>
//Not portable see http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#5_4 to know more. //Not portable see http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#5_4 to know more.
#ifdef __GNUC__ #ifdef __GNUC__
@ -178,12 +179,12 @@ public:
bool HasMeshElements(const TopoDS_Shape & S); bool HasMeshElements(const TopoDS_Shape & S);
SMESHDS_SubMesh * MeshElements(const TopoDS_Shape & S); SMESHDS_SubMesh * MeshElements(const TopoDS_Shape & S);
SMESHDS_SubMesh * MeshElements(const int Index); SMESHDS_SubMesh * MeshElements(const int Index);
list<int> SubMeshIndices(); std::list<int> SubMeshIndices();
const std::map<int,SMESHDS_SubMesh*>& SubMeshes() const std::map<int,SMESHDS_SubMesh*>& SubMeshes()
{ return myShapeIndexToSubMesh; } { return myShapeIndexToSubMesh; }
bool HasHypothesis(const TopoDS_Shape & S); bool HasHypothesis(const TopoDS_Shape & S);
const list<const SMESHDS_Hypothesis*>& GetHypothesis(const TopoDS_Shape & S) const; const std::list<const SMESHDS_Hypothesis*>& GetHypothesis(const TopoDS_Shape & S) const;
SMESHDS_Script * GetScript(); SMESHDS_Script * GetScript();
void ClearScript(); void ClearScript();
int ShapeToIndex(const TopoDS_Shape & aShape); int ShapeToIndex(const TopoDS_Shape & aShape);
@ -200,7 +201,7 @@ public:
void AddGroup (SMESHDS_GroupBase* theGroup) { myGroups.insert(theGroup); } void AddGroup (SMESHDS_GroupBase* theGroup) { myGroups.insert(theGroup); }
void RemoveGroup (SMESHDS_GroupBase* theGroup) { myGroups.erase(theGroup); } void RemoveGroup (SMESHDS_GroupBase* theGroup) { myGroups.erase(theGroup); }
int GetNbGroups() const { return myGroups.size(); } int GetNbGroups() const { return myGroups.size(); }
const set<SMESHDS_GroupBase*>& GetGroups() const { return myGroups; } const std::set<SMESHDS_GroupBase*>& GetGroups() const { return myGroups; }
bool IsGroupOfSubShapes (const TopoDS_Shape& aSubShape) const; bool IsGroupOfSubShapes (const TopoDS_Shape& aSubShape) const;
@ -219,8 +220,8 @@ private:
int myMeshID; int myMeshID;
TopoDS_Shape myShape; TopoDS_Shape myShape;
TopTools_IndexedMapOfShape myIndexToShape; TopTools_IndexedMapOfShape myIndexToShape;
map<int,SMESHDS_SubMesh*> myShapeIndexToSubMesh; std::map<int,SMESHDS_SubMesh*> myShapeIndexToSubMesh;
set<SMESHDS_GroupBase*> myGroups; std::set<SMESHDS_GroupBase*> myGroups;
SMESHDS_Script* myScript; SMESHDS_Script* myScript;
}; };