Integration some new classes for working of core mesher

This commit is contained in:
skl 2005-10-04 06:04:02 +00:00
parent bb608ced0c
commit 56e741c0f7
5 changed files with 64 additions and 7 deletions

View File

@ -47,7 +47,9 @@ EXPORT_HEADERS= \
SMESH_MeshEditor.hxx \ SMESH_MeshEditor.hxx \
SMESH_Block.hxx \ SMESH_Block.hxx \
SMESH_Pattern.hxx \ SMESH_Pattern.hxx \
SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx \
SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx \
SMESH_SequenceOfElemPtr.hxx
EXPORT_PYSCRIPTS = EXPORT_PYSCRIPTS =

View File

@ -0,0 +1,31 @@
// File: SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx
// Created: 26.09.05 17:41:10
// Author: Sergey KUUL
// Copyright: Airbus Industries 2004
#ifndef SMESH_DataMapOfElemPtrSequenceOfElemPtr_HeaderFile
#define SMESH_DataMapOfElemPtrSequenceOfElemPtr_HeaderFile
#include <SMESH_SequenceOfElemPtr.hxx>
#include <NCollection_DefineDataMap.hxx>
inline Standard_Integer HashCode(SMDS_MeshElementPtr theElem,
const Standard_Integer theUpper)
{
SMDS_MeshElement * anElem = (SMDS_MeshElement *) theElem;
return HashCode(anElem,theUpper);
}
inline Standard_Boolean IsEqual(SMDS_MeshElementPtr theOne,
SMDS_MeshElementPtr theTwo)
{
return theOne == theTwo;
}
DEFINE_BASECOLLECTION (SMESH_BaseCollectionSequenceOfElemPtr, SMESH_SequenceOfElemPtr)
DEFINE_DATAMAP (SMESH_DataMapOfElemPtrSequenceOfElemPtr,
SMESH_BaseCollectionSequenceOfElemPtr,
SMDS_MeshElementPtr, SMESH_SequenceOfElemPtr)
#endif

View File

@ -2467,13 +2467,16 @@ void SMESH_MeshEditor::ExtrusionSweep(set<const SMDS_MeshElement*> & theElems,
sweepElement( aMesh, elem, newNodesItVec, newElemsMap[elem] ); sweepElement( aMesh, elem, newNodesItVec, newElemsMap[elem] );
// fill history // fill history
TColStd_ListOfInteger ListNewID; //TColStd_ListOfInteger ListNewID;
SMESH_SequenceOfElemPtr SeqNewME;
list<const SMDS_MeshElement*> tmpList = newElemsMap[elem]; list<const SMDS_MeshElement*> tmpList = newElemsMap[elem];
for(list<const SMDS_MeshElement*>::iterator ite = tmpList.begin(); for(list<const SMDS_MeshElement*>::iterator ite = tmpList.begin();
ite!=tmpList.end(); ite++) { ite!=tmpList.end(); ite++) {
ListNewID.Append((*ite)->GetID()); //ListNewID.Append((*ite)->GetID());
SeqNewME.Append(*ite);
} }
myExtrusionHistory.Bind(elem->GetID(),ListNewID); //myExtrusionHistory.Bind(elem->GetID(),ListNewID);
myExtrusionHistory.Bind(elem,SeqNewME);
// end fill history // end fill history
} }

View File

@ -35,7 +35,8 @@
#include <list> #include <list>
#include <map> #include <map>
#include <TColStd_DataMapOfIntegerListOfInteger.hxx> //#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
#include <SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx>
class SMDS_MeshElement; class SMDS_MeshElement;
class SMDS_MeshFace; class SMDS_MeshFace;
@ -305,14 +306,14 @@ class SMESH_MeshEditor {
SMESHDS_Mesh * GetMeshDS() { return myMesh->GetMeshDS(); } SMESHDS_Mesh * GetMeshDS() { return myMesh->GetMeshDS(); }
const TColStd_DataMapOfIntegerListOfInteger& GetExtrusionHistory() const const SMESH_DataMapOfElemPtrSequenceOfElemPtr& GetExtrusionHistory() const
{ return myExtrusionHistory; } { return myExtrusionHistory; }
private: private:
SMESH_Mesh * myMesh; SMESH_Mesh * myMesh;
TColStd_DataMapOfIntegerListOfInteger myExtrusionHistory; SMESH_DataMapOfElemPtrSequenceOfElemPtr myExtrusionHistory;
}; };

View File

@ -0,0 +1,20 @@
// File: SMESH_SequenceOfElemPtr.hxx
// Created: 26.09.05 17:41:10
// Author: Sergey KUUL
// Copyright: Airbus Industries 2004
#ifndef SMESH_SequenceOfElemPtr_HeaderFile
#define SMESH_SequenceOfElemPtr_HeaderFile
#include <NCollection_DefineSequence.hxx>
//#include <Handle_SMDS_MeshElement.hxx>
#include <SMDS_MeshElement.hxx>
typedef const SMDS_MeshElement* SMDS_MeshElementPtr;
DEFINE_BASECOLLECTION (SMESH_BaseCollectionElemPtr, SMDS_MeshElementPtr)
DEFINE_SEQUENCE (SMESH_SequenceOfElemPtr, SMESH_BaseCollectionElemPtr, SMDS_MeshElementPtr)
#endif