Programmer's Documentation

Public Member Functions | Protected Member Functions | Private Attributes | List of all members
MeshPatch Class Reference

Detailed Description

Generates the triangulation of a single surface.

MeshPatch is a triangular mesh patch which stores both parametric (u,v) and spatial coordinates (x,y,z). It is used as an intermediate object to compute surface-surface intersections and to generate patch meshes which are later postprocessed and merged by PatchMerger.


#include <meshpatch.h>

Inheritance diagram for MeshPatch:
Collaboration diagram for MeshPatch:

Public Member Functions

 MeshPatch ()
 empty constructor
 MeshPatch (SurfacePtr psf)
 initialize with surface pointer
uint nholes () const
 number of hole markers
Vct2 & phole (uint i)
 access hole marker point (for manual modifications)
void addConstraints (const PointList< 2 > &c)
 add arbitrary additional constraints
void addIntersections (const IsecSet &isl)
 add constraints from intersection lines (manual, no hole processing)
void premesh (const DnRefineCriterion &crit, bool psm=false)
 generate an unconstrained patch mesh (should never fail)
MgError mesh (const DnRefineCriterion &crit, bool psm=true, bool pir=true)
 generate a constrained patch mesh (may fail in constraint handling)
MgError meshCoarse (const DnRefineCriterion &crit)
 specialized version to generate coarse wing mesh
const Vct2 & parameter (uint i) const
 access parameter values
Vct3 eval (Real u, Real v) const
 evaluate underlying surface
Vct3 normal (Real u, Real v) const
 compute normal on underlying surface
const SurfacePtr & surface () const
 access spline surface
virtual void fixate ()
 overload triangulation fixate: create search tree
void boundaryPoints (side_t s, Indices &si) const
 identify boundary points in 3D
- 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 void clear ()
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)

Protected Member Functions

void convert (const IsecLine &line, PointList< 2 > &pts) const
 convert from IsecLine to list of parameter points
void convert (const IsecSet &isl, IpointSet &pts) const
 convert from IsecSet to an array of parameter point vectors
void filterConstraint (const IsecLine &isl, PointList< 2 > &cpt, PointList< 3 > &rpt) const
 construct constraint points and 3D replacements

Private Attributes

SurfacePtr srf
 pointer to surface
PointList< 2 > bdd
 boundary discretization and final parameter point set
PointList< 2 > ppt
PointList< 2 > holes
IpointSet ipl
 intersections and additional constraints for structural model
IpointSet stc
Indices rpi
 indices of replacement points
PointList< 3 > rpp
 coordinates of replacement points
BSearchTree tree
 search tree for nearest neighbor searches

Additional Inherited Members

- 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 Wed Jan 19 2022 03:03:16 for libsurf by   doxygen 1.8.5