MeshLink
Computational geometry access
MeshSheet Class Reference

2D (surface) mesh topology More...

#include <MeshSheet.h>

Inheritance diagram for MeshSheet:

Public Member Functions

 MeshSheet (MLINT mid, MLINT aref, MLINT gref, const std::string &name)
 Constructor with no application-defined reference data. More...
 
 MeshSheet (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name)
 Constructor with application-defined reference data. More...
 
virtual bool addFace (MLINT i1, MLINT i2, MLINT i3, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2, ParamVertex *pv3, bool mapID)
 Add a triangular MeshFace to the MeshSheet using indices. More...
 
virtual MeshFacefindFaceByInds (MLINT i1, MLINT i2, MLINT i3, MLINT i4=MESH_TOPO_INDEX_UNUSED) const
 Find a MeshFace in the MeshSheet associativity data. More...
 
virtual void deleteFaceByInds (MLINT i1, MLINT i2, MLINT i3, MLINT i4=MESH_TOPO_INDEX_UNUSED)
 Delete a MeshFace from the MeshSheet associativity data. More...
 
virtual bool addFace (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2, ParamVertex *pv3, bool mapID)
 Add a triangular MeshFace to the MeshSheet using reference. More...
 
virtual bool addFace (MLINT i1, MLINT i2, MLINT i3, MLINT i4, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2, ParamVertex *pv3, ParamVertex *pv4, bool mapID)
 Add a quadrilateral MeshFace to the MeshSheet using indices. More...
 
virtual bool addFace (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2, ParamVertex *pv3, ParamVertex *pv4, bool mapID)
 Add a quadrilateral MeshFace to the MeshSheet using reference. More...
 
virtual MeshFacegetMeshFaceByName (const std::string &name) const
 Find a MeshFace by name. More...
 
virtual MeshFacegetMeshFaceByRef (const std::string &ref) const
 Find a MeshFace by reference. More...
 
virtual void addFaceEdge (MLINT i1, MLINT i2, MLINT mid, MLINT aref, MLINT gref, ParamVertex *pv1=NULL, ParamVertex *pv2=NULL)
 Add a face-edge to the MeshSheet. More...
 
virtual MeshEdgefindFaceEdgeByInds (MLINT i1, MLINT i2) const
 Find a face-edge in the associativity data. More...
 
virtual void deleteFaceEdgeByInds (MLINT i1, MLINT i2)
 Delete a face-edge from the associativity data. More...
 
virtual MLINT getNumFaceEdges () const
 Return the number of face-edges in the MeshSheet. More...
 
virtual MLINT getNumFaces () const
 Return the number of MeshFaces in the MeshSheet. More...
 
virtual void getFaceEdges (std::vector< const MeshEdge * > &faceEdges) const
 Return array of face-edges in the MeshSheet. More...
 
virtual void getMeshFaces (std::vector< const MeshFace * > &faces) const
 Return array of MeshFaces in the MeshSheet. More...
 
 MeshSheet ()
 Default constructor. More...
 
 ~MeshSheet ()
 Destructor. More...
 
virtual const std::string & getBaseName () const
 Return the base name used for generating unique names for sheets. More...
 
virtual MLUINTgetNameCounter ()
 Return the current value used for generating unique names for sheets. More...
 
- Public Member Functions inherited from MeshTopo
 MeshTopo (MLINT mid, MLINT aref, MLINT gref, const std::string &name)
 Construct without application-defined reference. More...
 
 MeshTopo (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name)
 Construct with application-defined reference to entity in mesh data. More...
 
virtual MLINT getID () const
 Return the ID of this MeshTopo. More...
 
virtual MLINT getGref () const
 Return the GID of GeometryGroup associated with this MeshTopo. More...
 
virtual MLINT getAref () const
 Return the AttID of MeshLinkAttribute associated with this MeshTopo. More...
 
virtual void getName (const char **name) const
 Return the name of this MeshTopo. More...
 
virtual const std::string & getName () const
 Return the name of this MeshTopo. More...
 
virtual const std::string & getRef () const
 Return the application-defined mesh data reference of this MeshTopo. More...
 
virtual void addParamVertex (ParamVertex *pv, bool mapID)
 Add a ParamVertex. More...
 
virtual ParamVertexgetParamVertByVref (const std::string &vref) const
 Find a ParamVertex by vertex reference. More...
 
virtual ParamVertexgetParamVertByID (MLINT id) const
 Find a ParamVertex by ID. More...
 
virtual MLINT getNumParamVerts () const
 Return the number of ParamVertex objects for this MeshTopo. More...
 
void getParamVerts (std::vector< const ParamVertex * > &pv) const
 Return vector of ParamVertex objects for this MeshTopo. More...
 
virtual const ParamVertVrefMapgetParamVertVrefMap () const
 Return the map of application-defined reference string to ParamVertex objects for this MeshTopo. More...
 
virtual void setID (MLINT id)
 Set the ID of this MeshTopo. More...
 
virtual void setGref (MLINT gref)
 Set the GeometryGroup GID referenced by this MeshTopo. More...
 
virtual void setAref (MLINT aref)
 Set the MeshLinkAttribute AttID referenced by this MeshTopo. More...
 
virtual void setRef (const char *ref)
 Set the reference of this MeshTopo. More...
 
void setName (const std::string &name)
 Set the name of this MeshTopo. More...
 
void setName (const char *name)
 Set the name of this MeshTopo. More...
 
bool hasID () const
 Whether the MeshTopo has an ID defined. More...
 
bool hasGref () const
 Whether the MeshTopo has a GeometryGroup GID reference defined. More...
 
bool hasAref () const
 Whether the MeshTopo has a MeshLinkAttribute AttID reference defined. More...
 
std::vector< MLINTgetAttributeIDs (const MeshAssociativity &meshAssoc) const
 Return list of MeshLinkAttribute AttIDs referenced by the MeshTopo. More...
 
std::string getNextName ()
 Generate and return a unique name for the entity. More...
 
void setOrderCounter (MLUINT counter)
 Set order counter (in parent topo) More...
 
MLUINT getOrderCounter () const
 Returns order counter (in parent topo) More...
 
 MeshTopo ()
 Default constructor. More...
 
 ~MeshTopo ()
 Destructor. More...
 

Private Attributes

std::map< pwiFnvHash::FNVHash, MeshPoint * > pointMap_
 Map point hash values to points. More...
 
MeshPointNameMap meshPointNameMap_
 Map point names to points. More...
 
MeshTopoIDToNameMap meshPointIDToNameMap_
 Map point IDs to point names. More...
 
std::map< pwiFnvHash::FNVHash, MeshEdge * > faceEdgeMap_
 Map face edge indices hash to edge. More...
 
std::map< pwiFnvHash::FNVHash, MeshFace * > faceMap_
 Map face indices hash to face. More...
 
MeshFaceNameMap meshFaceNameMap_
 Map face names to face. More...
 
MeshTopoIDToNameMap meshFaceIDToNameMap_
 Map face IDs to face names. More...
 
MeshTopoRefToNameMap meshFaceRefToNameMap_
 Map application-defined face reference string to face name. More...
 
MLUINT faceEdgeCounter_
 Serial counter as faceEdges are added to the sheet (zero-based) More...
 
MLUINT faceCounter_
 Serial counter as faces are added to the sheet (zero-based) More...
 

Static Private Attributes

static MLUINT nameCounter_
 The unique name counter for sheets. More...
 

Friends

class MeshAssociativity
 
class MeshModel
 

Additional Inherited Members

- Static Public Member Functions inherited from MeshTopo
static bool OrderCompare (const MeshTopo *topo1, const MeshTopo *topo2)
 
- Protected Attributes inherited from MeshTopo
std::string ref_
 The application-defined reference string. More...
 
MLINT mid_
 The unique entity ID. More...
 
MLINT aref_
 The attribute reference ID (AttID) More...
 
MLINT gref_
 The geometry reference ID. More...
 
std::string name_
 The name of the mesh entity. More...
 
MLUINT orderCounter_
 creation order counter in parent entity More...
 
ParamVertVrefMap paramVertVrefMap_
 ParamVertex objects mapped to this entity by application-defined reference string. More...
 
ParamVertIDToVrefMap paramVertIDToVrefMap_
 ParamVertex objects mapped to this entity by unique entity ID. More...
 

Detailed Description

2D (surface) mesh topology

Provides access to MeshLink schema MeshSheet data

Definition at line 35 of file MeshSheet.h.

Constructor & Destructor Documentation

◆ MeshSheet() [1/3]

MeshSheet::MeshSheet ( MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name 
)

Constructor with no application-defined reference data.

Parameters
midunique ID of the mesh sheet
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh sheet

◆ MeshSheet() [2/3]

MeshSheet::MeshSheet ( const std::string &  ref,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name 
)

Constructor with application-defined reference data.

Parameters
refapplication-defined reference data for the mesh sheet
midunique ID of the mesh sheet
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh sheet

◆ MeshSheet() [3/3]

MeshSheet::MeshSheet ( )

Default constructor.

◆ ~MeshSheet()

MeshSheet::~MeshSheet ( )

Destructor.

Member Function Documentation

◆ addFace() [1/4]

virtual bool MeshSheet::addFace ( MLINT  i1,
MLINT  i2,
MLINT  i3,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name,
ParamVertex pv1,
ParamVertex pv2,
ParamVertex pv3,
bool  mapID 
)
virtual

Add a triangular MeshFace to the MeshSheet using indices.

Parameters
i1,i2,i3the point indices of the triangular face
midunique ID of the mesh entity
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh entity
pv1,pv2,pv3(optional) the ParamVertex objects associated with the points
mapIDwhether to map the unique ID to the entity name

◆ addFace() [2/4]

virtual bool MeshSheet::addFace ( const std::string &  ref,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name,
ParamVertex pv1,
ParamVertex pv2,
ParamVertex pv3,
bool  mapID 
)
virtual

Add a triangular MeshFace to the MeshSheet using reference.

Parameters
refthe application-defined reference data for the face
midunique ID of the mesh entity
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh entity
pv1,pv2,pv3(optional) the ParamVertex objects associated with the points
mapIDwhether to map the unique ID to the entity name

◆ addFace() [3/4]

virtual bool MeshSheet::addFace ( MLINT  i1,
MLINT  i2,
MLINT  i3,
MLINT  i4,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name,
ParamVertex pv1,
ParamVertex pv2,
ParamVertex pv3,
ParamVertex pv4,
bool  mapID 
)
virtual

Add a quadrilateral MeshFace to the MeshSheet using indices.

Parameters
i1,i2,i3,i4the point indices of the face
midunique ID of the mesh entity
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh entity
pv1,pv2,pv3,pv4(optional) the ParamVertex objects associated with the face points
mapIDwhether to map the unique ID to the entity name

◆ addFace() [4/4]

virtual bool MeshSheet::addFace ( const std::string &  ref,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name,
ParamVertex pv1,
ParamVertex pv2,
ParamVertex pv3,
ParamVertex pv4,
bool  mapID 
)
virtual

Add a quadrilateral MeshFace to the MeshSheet using reference.

Parameters
refthe application-defined reference data for the face
midunique ID of the mesh entity
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh entity
pv1,pv2,pv3,pv4(optional) the ParamVertex objects associated with the face points
mapIDwhether to map the unique ID to the entity name

◆ addFaceEdge()

virtual void MeshSheet::addFaceEdge ( MLINT  i1,
MLINT  i2,
MLINT  mid,
MLINT  aref,
MLINT  gref,
ParamVertex pv1 = NULL,
ParamVertex pv2 = NULL 
)
virtual

Add a face-edge to the MeshSheet.

Face-edges are a MeshEdge using the MeshFace's associativity data. This is useful when performing MeshEdge operations with MeshFace constraints.

Parameters
i1,i2the point indices for the face-edge
midunique ID of the mesh entity
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
pv1,pv2(optional) the ParamVertex objects associated with the points

◆ deleteFaceByInds()

virtual void MeshSheet::deleteFaceByInds ( MLINT  i1,
MLINT  i2,
MLINT  i3,
MLINT  i4 = MESH_TOPO_INDEX_UNUSED 
)
virtual

Delete a MeshFace from the MeshSheet associativity data.

Parameters
i1,i2,i3the point indices of the triangular or quadrilateral face to delete
i4(optinal) the index of the fourth point in the quadrilateral face to delete

◆ deleteFaceEdgeByInds()

virtual void MeshSheet::deleteFaceEdgeByInds ( MLINT  i1,
MLINT  i2 
)
virtual

Delete a face-edge from the associativity data.

Parameters
i1,i2the indices of the points in the face-edge to delete

◆ findFaceByInds()

virtual MeshFace* MeshSheet::findFaceByInds ( MLINT  i1,
MLINT  i2,
MLINT  i3,
MLINT  i4 = MESH_TOPO_INDEX_UNUSED 
) const
virtual

Find a MeshFace in the MeshSheet associativity data.

Parameters
i1,i2,i3the indices of the points in the desired triangular or quadrilateral face
i4(optinal) the index of the fourth point in the desired quadrilateral face

◆ findFaceEdgeByInds()

virtual MeshEdge* MeshSheet::findFaceEdgeByInds ( MLINT  i1,
MLINT  i2 
) const
virtual

Find a face-edge in the associativity data.

Parameters
i1,i2the indices of the points in the desired face-edge

◆ getBaseName()

virtual const std::string& MeshSheet::getBaseName ( ) const
virtual

Return the base name used for generating unique names for sheets.

Reimplemented from MeshTopo.

◆ getFaceEdges()

virtual void MeshSheet::getFaceEdges ( std::vector< const MeshEdge * > &  faceEdges) const
virtual

Return array of face-edges in the MeshSheet.

Face-edges are returned in creation order.

◆ getMeshFaceByName()

virtual MeshFace* MeshSheet::getMeshFaceByName ( const std::string &  name) const
virtual

Find a MeshFace by name.

Parameters
namethe name of the desired face

◆ getMeshFaceByRef()

virtual MeshFace* MeshSheet::getMeshFaceByRef ( const std::string &  ref) const
virtual

Find a MeshFace by reference.

Parameters
refthe application-defined reference string of the desired face

◆ getMeshFaces()

virtual void MeshSheet::getMeshFaces ( std::vector< const MeshFace * > &  faces) const
virtual

Return array of MeshFaces in the MeshSheet.

Faces are returned in creation order.

◆ getNameCounter()

virtual MLUINT& MeshSheet::getNameCounter ( )
virtual

Return the current value used for generating unique names for sheets.

Reimplemented from MeshTopo.

◆ getNumFaceEdges()

virtual MLINT MeshSheet::getNumFaceEdges ( ) const
virtual

Return the number of face-edges in the MeshSheet.

◆ getNumFaces()

virtual MLINT MeshSheet::getNumFaces ( ) const
virtual

Return the number of MeshFaces in the MeshSheet.

Friends And Related Function Documentation

◆ MeshAssociativity

friend class MeshAssociativity
friend

Definition at line 37 of file MeshSheet.h.

◆ MeshModel

friend class MeshModel
friend

Definition at line 38 of file MeshSheet.h.

Member Data Documentation

◆ faceCounter_

MLUINT MeshSheet::faceCounter_
private

Serial counter as faces are added to the sheet (zero-based)

Definition at line 244 of file MeshSheet.h.

◆ faceEdgeCounter_

MLUINT MeshSheet::faceEdgeCounter_
private

Serial counter as faceEdges are added to the sheet (zero-based)

Definition at line 241 of file MeshSheet.h.

◆ faceEdgeMap_

std::map<pwiFnvHash::FNVHash, MeshEdge*> MeshSheet::faceEdgeMap_
private

Map face edge indices hash to edge.

Definition at line 226 of file MeshSheet.h.

◆ faceMap_

std::map<pwiFnvHash::FNVHash, MeshFace*> MeshSheet::faceMap_
private

Map face indices hash to face.

Definition at line 229 of file MeshSheet.h.

◆ meshFaceIDToNameMap_

MeshTopoIDToNameMap MeshSheet::meshFaceIDToNameMap_
private

Map face IDs to face names.

Definition at line 235 of file MeshSheet.h.

◆ meshFaceNameMap_

MeshFaceNameMap MeshSheet::meshFaceNameMap_
private

Map face names to face.

Definition at line 232 of file MeshSheet.h.

◆ meshFaceRefToNameMap_

MeshTopoRefToNameMap MeshSheet::meshFaceRefToNameMap_
private

Map application-defined face reference string to face name.

Definition at line 238 of file MeshSheet.h.

◆ meshPointIDToNameMap_

MeshTopoIDToNameMap MeshSheet::meshPointIDToNameMap_
private

Map point IDs to point names.

Definition at line 223 of file MeshSheet.h.

◆ meshPointNameMap_

MeshPointNameMap MeshSheet::meshPointNameMap_
private

Map point names to points.

Definition at line 221 of file MeshSheet.h.

◆ nameCounter_

MLUINT MeshSheet::nameCounter_
staticprivate

The unique name counter for sheets.

Definition at line 216 of file MeshSheet.h.

◆ pointMap_

std::map<pwiFnvHash::FNVHash, MeshPoint*> MeshSheet::pointMap_
private

Map point hash values to points.

Definition at line 219 of file MeshSheet.h.


The documentation for this class was generated from the following file: