24#ifndef __SMESH_ProxyMesh_HXX__
25#define __SMESH_ProxyMesh_HXX__
33#include <TopoDS_Shape.hxx>
34#include <NCollection_DataMap.hxx>
35#include <smIdType.hxx>
39#include <boost/shared_ptr.hpp>
54 typedef boost::shared_ptr<SMESH_ProxyMesh>
Ptr;
56 typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*, TIDCompare >
TN2NMap;
70 virtual smIdType NbElements()
const;
71 virtual smIdType NbNodes()
const;
77 template<
class ITERATOR >
82 _elements.assign( it,
end );
98 virtual void clear() { Clear(); }
152 int shapeIndex(
const TopoDS_Shape& shape)
const;
154 virtual SubMesh*
newSubmesh(
int index=0)
const;
180 const SubMesh* subMesh);
199 std::vector< const SMDS_MeshElement* >,
SMDSAbs_ElementType
Type (node, edge, face or volume) of elements.
Definition: SMDSAbs_ElementType.hxx:34
boost::shared_ptr< SMDS_Iterator< const SMDS_MeshElement * > > SMDS_ElemIteratorPtr
Definition: SMDS_ElemIterator.hxx:43
boost::shared_ptr< SMDS_Iterator< const SMDS_MeshNode * > > SMDS_NodeIteratorPtr
Definition: SMDS_ElemIterator.hxx:46
#define SMESH_EXPORT
Definition: SMESH_SMESH.hxx:37
std::vector< UVPtStruct > UVPtStructVec
Definition: SMESH_TypeDefs.hxx:294
IMAP::const_iterator end(const IMAP &m)
Definition: StdMeshers_Projection_2D.cxx:106
Base class for elements.
Definition: SMDS_MeshElement.hxx:56
Definition: SMDS_MeshNode.hxx:36
Definition: SMDS_Mesh.hxx:53
Definition: SMESHDS_Mesh.hxx:98
Definition: SMESHDS_SubMesh.hxx:48
Definition: SMESH_Mesh.hxx:80
Proxy sub-mesh.
Definition: SMESH_ProxyMesh.hxx:63
virtual void add(const SMDS_MeshElement *)
the descendant squeeze its element storage after re-adding elements
Definition: SMESH_ProxyMesh.hxx:96
std::vector< const SMDS_MeshElement * > _elements
Definition: SMESH_ProxyMesh.hxx:88
virtual void compact()
allow the descendant treat its elements before mesh clearing
Definition: SMESH_ProxyMesh.hxx:97
TN2NMap * _n2n
Definition: SMESH_ProxyMesh.hxx:89
UVPtStructVec _uvPtStructVec
Definition: SMESH_ProxyMesh.hxx:90
virtual void tmpClear()
the descendant object re-add its elements after the mesh compacting
Definition: SMESH_ProxyMesh.hxx:95
const UVPtStructVec & GetUVPtStructVec() const
Definition: SMESH_ProxyMesh.hxx:68
const TN2NMap * GetNodeNodeMap() const
Definition: SMESH_ProxyMesh.hxx:66
virtual void clear()
Definition: SMESH_ProxyMesh.hxx:98
void ChangeElements(ITERATOR it, ITERATOR end)
Definition: SMESH_ProxyMesh.hxx:78
virtual SMDS_ElemIteratorPtr getElements()
< the descendant object return its elements just before the mesh compacting
Definition: SMESH_ProxyMesh.hxx:94
virtual ~SubMesh()
Definition: SMESH_ProxyMesh.hxx:85
Container of xD mesh elements substituting other ones in the input mesh of an (x+1)D algorithm.
Definition: SMESH_ProxyMesh.hxx:51
int NbProxySubMeshes() const
Returns number of proxy sub-meshes.
Definition: SMESH_ProxyMesh.cxx:242
SMDS_ElemIteratorPtr GetInverseElementIterator(const SMDS_MeshNode *node, SMDSAbs_ElementType type) const
Return iterator on inverse elements of a node that may be a proxy one.
Definition: SMESH_ProxyMesh.cxx:603
std::vector< SMDSAbs_EntityType > _allowedTypes
Definition: SMESH_ProxyMesh.hxx:185
const SMESH_Mesh * _mesh
Definition: SMESH_ProxyMesh.hxx:189
SMESH_Mesh * GetMesh() const
Definition: SMESH_ProxyMesh.hxx:142
std::set< const SMDS_MeshElement * > _elemsInMesh
Definition: SMESH_ProxyMesh.hxx:195
static bool HasPrismsOnTwoSides(SMESHDS_SubMesh *faceSM)
Check if a FACE has prisms on its both sides.
Definition: SMESH_ProxyMesh.cxx:651
SMDS_ElemIteratorPtr GetFaces() const
Returns iterator on all faces of the mesh taking into account substitutions To be used in case of mes...
Definition: SMESH_ProxyMesh.cxx:375
std::vector< SubMesh * > _subMeshes
Definition: SMESH_ProxyMesh.hxx:192
TNodeElemVecMap _inverseElements
Definition: SMESH_ProxyMesh.hxx:201
SubMesh * findProxySubMesh(int shapeIndex=0) const
Returns a proxy sub-mesh.
Definition: SMESH_ProxyMesh.cxx:473
SMESHDS_Mesh * GetMeshDS() const
Returns mesh DS.
Definition: SMESH_ProxyMesh.cxx:484
smIdType NbFaces() const
Return total nb of faces taking into account substitutions.
Definition: SMESH_ProxyMesh.cxx:405
int shapeIndex(const TopoDS_Shape &shape) const
Returns index of a shape.
Definition: SMESH_ProxyMesh.cxx:150
void setMesh(const SMESH_Mesh &mesh)
Set mesh.
Definition: SMESH_ProxyMesh.cxx:137
void setNode2Node(const SMDS_MeshNode *srcNode, const SMDS_MeshNode *proxyNode, const SubMesh *subMesh)
Set node-node correspondence.
Definition: SMESH_ProxyMesh.cxx:575
bool IsTemporary(const SMDS_MeshElement *elem) const
Return true if the element is a temporary one.
Definition: SMESH_ProxyMesh.cxx:591
const SMDS_MeshNode * GetProxyNode(const SMDS_MeshNode *node) const
Returns the proxy node of a node; the input node is returned if no proxy exists.
Definition: SMESH_ProxyMesh.cxx:216
NCollection_DataMap< const SMDS_MeshNode *, std::vector< const SMDS_MeshElement * >, SMESH_Hasher > TNodeElemVecMap
Definition: SMESH_ProxyMesh.hxx:200
SubMesh * _subContainer
Definition: SMESH_ProxyMesh.hxx:204
void storeTmpElement(const SMDS_MeshElement *elem)
Stores tmp element residing the _mesh.
Definition: SMESH_ProxyMesh.cxx:564
virtual ~SMESH_ProxyMesh()
Destructor deletes proxy submeshes and tmp elements.
Definition: SMESH_ProxyMesh.cxx:117
boost::shared_ptr< SMESH_ProxyMesh > Ptr
Definition: SMESH_ProxyMesh.hxx:54
SMESH_ProxyMesh()
Constructor; mesh must be set by a descendant class.
Definition: SMESH_ProxyMesh.cxx:44
bool takeProxySubMesh(const TopoDS_Shape &shape, SMESH_ProxyMesh *proxyMesh)
Move proxy sub-mesh from other proxy mesh to this, returns true if sub-mesh found.
Definition: SMESH_ProxyMesh.cxx:495
void takeTmpElemsInMesh(SMESH_ProxyMesh *proxyMesh)
Move tmp elements residing the _mesh from other proxy mesh to this.
Definition: SMESH_ProxyMesh.cxx:519
SubMesh * getProxySubMesh(int shapeIndex)
Returns a proxy sub-mesh; it is created if not yet exists.
Definition: SMESH_ProxyMesh.cxx:447
const SubMesh * GetProxySubMesh(const TopoDS_Shape &shape) const
Returns the proxy sub-mesh of a shape; it can be NULL.
Definition: SMESH_ProxyMesh.cxx:204
void removeTmpElement(const SMDS_MeshElement *elem)
Removes tmp elements from the _mesh.
Definition: SMESH_ProxyMesh.cxx:535
virtual SubMesh * newSubmesh(int index=0) const
Create a SubMesh.
Definition: SMESH_ProxyMesh.cxx:163
const SMESHDS_SubMesh * GetSubMesh(const TopoDS_Shape &shape) const
Returns the submesh of a shape; it can be a proxy sub-mesh.
Definition: SMESH_ProxyMesh.cxx:174
std::map< const SMDS_MeshNode *, const SMDS_MeshNode *, TIDCompare > TN2NMap
Definition: SMESH_ProxyMesh.hxx:56
Definition: SMESH_TypeDefs.hxx:246