Programmer's Documentation

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CapComponent Class Reference

Detailed Description

MeshComponent holding an end cap surface.

CapComponent overloads the MeshComponent interface to account for the mesh dependency between main (parent) surface and an explicitely meshed end cap. The specialized mesh generation stage for end caps is necessary because end cap surfaces usually contain parametrization singularities which makes them unsuitable for the regular mesh generation procedure.

See Also
MeshComponent, LongCap, RingCap

#include <capcomponent.h>

Inheritance diagram for CapComponent:
Collaboration diagram for CapComponent:

Public Types

enum  Shape { LongCap, RingCap }
 use long (grid) or ring-shaped (polar) cap

Public Member Functions

 CapComponent (MeshComponentPtr parent, side_t side, Shape shape, Real hgt=0)
 initialize cap surface
virtual ~CapComponent ()
virtual void premesh (const PointGrid< 2 > &pgi=PointGrid< 2 >())
 overloaded to call specialized mesh generation
virtual void premesh (const PointList< 2 > &, const Indices &)
 overloaded to call specialized mesh generation
virtual void adapt ()
 adapt to parent surface component
- Public Member Functions inherited from MeshComponent
 MeshComponent (const SurfacePtr &s)
 every component is attached to a surface object
 MeshComponent (const SurfacePtr &s, const DnRefineCriterionPtr &pc)
 every component is attached to a surface object
virtual ~MeshComponent ()
const SurfacePtr & surface () const
 access bound surface
void surface (const SurfacePtr &srf)
 access bound surface
void criterion (const DnRefineCriterionPtr &pc)
 change mesh generation criterion
const DnRefineCriterionPtr & criterion () const
 access criterion
void tag (uint t)
 set section tag
uint tag () const
 access section tag
void allowRefinement (bool flag)
 set iterative refinement flag
void surfaceChanged (bool flag=true)
 set dirty flag whenever surface changed
bool freshMesh () const
 access flag indicating if mesh is up-to-date
void stretchedMesh (bool flag)
 use algorithm to generate streched mesh
bool stretchedMesh () const
 access anisotropic mesh setting
void smoothingIterations (uint n)
 access smoothing parameters
uint smoothingIterations ()
 access smoothing parameters
void smoothingFactor (Real w)
 access smoothing parameters
Real smoothingFactor ()
 access smoothing parameters
void kinkLimit (Real k)
 access kink limiter
Real kinkLimit () const
 access kink limiter
uint nNeighbors () const
 return number of neighbors registered
void registerNeighbor (const MeshComponent *nb)
 register another surface as touching neighbor
bool isNeighbor (const MeshComponent *a) const
 test if surface a is a non-intersecting neighbor
void clearNeighbors ()
 erase neighborhood information
uint nParents () const
 number of components which need to be meshed first
void registerParent (const MeshComponent *nb)
 register another component as parent of this one
bool isParent (const MeshComponent *a) const
 test if surface a is a non-intersecting neighbor
bool isChild (const MeshComponent *a) const
 test if component a is a child of this one
void clearParents ()
 clear dependency information
const Vct2 & parameter (uint k) const
 access parameter coordinates
void boundary (side_t s, Indices &si) const
 extract the mesh vertices which are on a boundary
bool constrain (const PointList< 2 > &uvc, const PointList< 3 > &rep)
 add constraint in uv-space, return false if that failed
bool reconstrain ()
 apply the same set of constraints again
uint nConstraint () const
 number of constraints defined
bool insertBoundaryPoints (const PointList< 2 > &uvc, const PointList< 3 > &rep)
 insert boundary point into mesh
virtual void refine ()
 perform a refinement step on the constrained mesh
virtual void refineAround (const Indices &vlist)
 perform a refinement step around vertices vlist
virtual void clear ()
 clear all data, but keep constraints
void clearConstraints ()
 clear constraints only
const std::string & lastError () const
 access error message from DnMesh
void dbStoreMesh (const std::string &fname) const
 debugging: write current mesh to file
- Public Member Functions inherited from TriMesh
 TriMesh (const TriMesh &msh)
TriMeshoperator= (const TriMesh &msh)
void reserve (size_t nv, size_t nf)
uint addVertex (const Vct3 &p)
uint addVertex (const Vct3 &p, const Vct3 &n)
uint addFace (uint a, uint b, uint c, int t=0)
uint addFace (const uint vi[], int t=0)
void triangulate (const PointGrid< 3 > &pg, GridPattern gpt=XPattern)
void merge (const TriMesh &msh)
void merge (const Triangulation &t)
void importMesh (const PointList< 3 > &pts, const Indices &tri, bool udrop=false)
void importMesh (const PointList< 3 > &pts, const PointList< 3 > &nmv, const Indices &tri, bool udrop=false)
void exportMesh (PointList< 3 > &pts, Indices &tri) const
void exportMesh (PointList< 3 > &pts, PointList< 3 > &nmv, Indices &tri) const
void buildConnectivity (bool udrop=false)
void fixate (bool udrop=false)
uint nvertices () const
uint nfaces () const
uint nedges () const
const Vct3 & vertex (uint i) const
Vct3 & vertex (uint i)
const Vct3 & normal (uint i) const
Vct3 & normal (uint i)
const PointList< 3 > & vertices () const
PointList< 3 > & vertices ()
const PointList< 3 > & normals () const
PointList< 3 > & normals ()
const TriFaceface (uint i) const
TriFaceface (uint i)
const TriEdge & edge (uint i) const
TriEdge & edge (uint i)
uint vdegree (uint i) const
uint edegree (uint i) const
const uint * firstEdgeIndex (uint iface) const
const uint * firstFaceIndex (uint iedge) const
void boundaries (Indices &bde) const
void gradient (uint i, SpMatrix &gmx) const
Vct3 gradient (uint i, const Vector &x) const
CpxVct3 gradient (uint i, const CpxVector &x) const
bool isClosedManifold () const
bool findInternalPoints (PointList< 3 > &holes) const
uint findFlippedFaces (Indices &fflip, Real maxphi=PI) const
Real area () const
Real volume () const
Vct3 volumeCenter () const
Real shortestEdgeLength () const
Real solidAngle (uint i) const
uint mergeNodes (Real threshold=gmepsilon, Real dphimax=M_PI)
uint cleanup (Real threshold=gmepsilon)
void detectEdges (Real ridgeLimitAngle, Real mergeThreshold=gmepsilon)
void reverse ()
virtual void reorder (const Indices &perm)
virtual void swap (TriMesh &a)
virtual Real megabytes () const
virtual XmlElement toXml (bool share=false) const
virtual void fromXml (const XmlElement &xe)
virtual void writeBin (std::ostream &os) const
virtual void readBin (std::istream &is)
virtual void toCgns (CgnsFile &file) const
virtual void fromCgns (CgnsZone &zone)
void writeCgns (const std::string &fname) const
void readCgns (const std::string &fname)
void readSTL (const std::string &fname)
void readAsciiSTL (const std::string &fname)
void readBinarySTL (const std::string &fname)
void writeBinarySTL (const std::string &fname) const
void writeAsciiSTL (const std::string &fname, const std::string &solid="") const
edge_iterator edgeBegin () const
edge_iterator edgeEnd () const
face_iterator faceBegin () const
face_iterator faceEnd () const
nb_face_iterator v2fBegin (uint i) const
nb_face_iterator v2fEnd (uint i) const
nb_face_iterator e2fBegin (uint i) const
nb_face_iterator e2fEnd (uint i) const
nb_edge_iterator v2eBegin (uint i) const
nb_edge_iterator v2eEnd (uint i) const
nb_edge_iterator f2eBegin (uint i) const
nb_edge_iterator f2eEnd (uint i) const
void bind ()
void estimateNormals ()
uint tsearchEdge (uint s, uint t) const
uint bsearchEdge (uint s, uint t) const
void faceTag (int t)
void allTags (Indices &tgs) const
std::string tagName (int t) const
void tagName (int t, const std::string &s)
void submesh (int t, TriMesh &sub) const
bool enclosedTriangles (const Indices &vloop, Indices &t) const
void icosahedron (const Vct3 &ctr, Real r)
void tetrahedron (const Vct3 &ctr, Real r)
void sphere (const Vct3 &ctr, Real r, int nrefp)
void tsphere (const Vct3 &ctr, Real r, int nrefp)
void quadSplit (int npass=1)
void dropDuplicates ()
uint dropInternalTriangles (uint itx, bool usetags=false)
uint dropInternalTriangles (const Indices &idx, bool usetags=false)
uint dropOrphanRidges (const Indices &killtags)
bool mergeAndDrop (uint itx, Real thrstart, Real thrend)
void joinSingleEdges (Real threshold)
uint dropStretchedTriangles (Real maxstretch, Real maxphi)
uint dropTriStars ()
void splitRidges (Indices &ridges, Real cosphi=0.5)

Static Public Member Functions

static SurfacePtr createCap (const MeshComponent *main, side_t side, Shape shape, Real hgt)
 generate cap surface from parameter set

Private Attributes

side_t m_mainside
 which side of parent is closed by this cap?
Shape m_shape
 cap shape
Real m_height
 cap height parameter

Additional Inherited Members

- Protected Member Functions inherited from MeshComponent
void genStretched ()
 generate stretched mesh
uint fixNormals ()
 check and ensure that the triangle normal matches surface normal
virtual void transfer ()
 transfer mesh from mesh generator
- Protected Attributes inherited from MeshComponent
SurfacePtr psf
 surface to which mesh is pinned
PointList< 2 > ppt
 vertices in parameter space
DnMesh mg
 mesh generator for this patch
DnRefineCriterionPtr pcrit
 criterion for mesh generation
std::vector< PointList< 2 > > pcon
 mesh constraints in parameter space
std::vector< PointList< 3 > > rcon
 replacement points for constrained vertices
std::vector< Indices > icon
 indices of constrained mesh vertices
std::vector< const
MeshComponent * > 
 components marked as non-intersecting neighbors
std::vector< const
MeshComponent * > 
 components which must be meshed first (dependencies)
Real wSmooth
 smoothing parameter, kink limit
Real rKinkLimit
uint nSmooth
 smoothing iterations
uint iTag
 tag to identify mesh sections
bool bFreshMesh
 flag to control mesh generation
bool bRefine
bool bStretchedMesh
- Protected Attributes inherited from TriMesh
PointList< 3 > vtx
TriFaceArray faces
TriEdgeArray edges
ConnectMap v2f
TagMap tagnames

The documentation for this class was generated from the following files:
Generated on Mon Aug 15 2022 03:03:15 for libsurf by   doxygen 1.8.5