Programmer's Documentation

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

Detailed Description

Topological face.

TopoFace represents a single surface which is bounded and constrained by a number of TopoEdges.

Mesh generation concept: As a precondition, each face must be bounded by one or more edges which define the outer boundary of the domain to discretize. Mesh generation starts with tesselating all edges (from Topology) in a manner which conforms to the mesh quality criteria defined on all faces which share the edge. Then, the segments which represent the edges are inserted into the face meshes which are, at first, initialized trivially. The next phase is the generation of a first mesh on each face, followed by the computation and processing of intersection lines in TopoSegmChain. The result of the face intersection process is a set of new edges which represent the intersection lines, which may be remeshed for a better local parameterization.

Starting anew, each face mesh is cleared and the new set of edges, including intersection lines, are enforced to be present in each face mesh.

Faces which are meshed by an external procedure can import a predefined mesh and set the keepExplicitMesh flag to avoid running the internal mesh generation and injection of edges. With this flag set, intersections hitting such surfaces can naturally not be handled.

See Also
Topology, TopoEdge, Surface

#include <topoface.h>

Collaboration diagram for TopoFace:

Public Types

enum  MgBackend { DcMeshGen, JrsTriangle }

Public Member Functions

 TopoFace ()
 create undefined face
 TopoFace (SurfacePtr psf, uint id)
 initialize face with surface
SurfacePtr surface () const
 access surface
void criterion (DcMeshCritBasePtr pmc)
 copy (!) discretization criterion, will be modified locally
Real sqMergeTolerance () const
 access point merge tolerance
void iid (uint id)
 change id
DcMeshCritBasePtr criterion () const
 access discretization criterion
const Indices & edges () const
 edges connected to this
Vct3 eval (Real u, Real v) const
 evaluate surface
void plane (Real u, Real v, Vct3 &S, Vct3 &Su, Vct3 &Sv) const
 evaluate point and derivatives on surface
uint appendEdge (uint e, bool isHole=false)
 connect to edge e
bool replaceEdge (uint a, uint b)
 replace edge a with b, return true if successful
uint findEdge (uint e) const
 find local index of edge e
uint detachEdge (uint e)
 eliminate edge with global index e from connectivity
uint findConnection (const Topology &topo, const Vct2 &q1, const Vct2 &q2, Real tol=gmepsilon) const
 identify the edge (global index) of this face which connects q1 and q2
void clearMesh ()
 clear stored mesh, initialize (u,v) mapping if necessary
uint insertEdges (const Topology &topo, bool allowSplit=true)
 insert edge constraints into (u,v) mesh
void pushSplitsToEdges (Topology &topo) const
 propagate constraint splitting to topological edges
bool keepExplicitMesh () const
 indicates whether face wants to retain an externally generated mesh
uint generateMesh (const Topology &topo)
 create mesh on face, accounting for discretized edges
uint generateMesh (const Topology &topo, const PointList< 2 > &pini)
 create mesh on face, starting with prescribed initial vertices
void importMesh (const PointList< 2 > &uvp, const Indices &tri, bool keepExplicit=true)
 alternatively, import a mesh generated explicitly (call replaceEdgeNodes!)
void replaceEdgeNodes (const Topology &topo, bool isecOnly=true)
 replace edge vertices in order to make edge nodes match exactly
const TriMeshmesh () const
 access mesh (once it has been generated)
TriMeshmesh ()
 access mesh (once it has been generated)
const PointList< 2 > & uvVertices () const
 access mesh coordinates in (u,v) space
void splitBoundaries (Topology &topo)
 split edges which are intersected by newly introduced intersections
void uvDump (const Topology &topo, const std::string &fname) const
 debugging : write mesh and boundaries in (u,v) space
void print (uint k, std::ostream &os) const
 plain-text debugging output

Static Public Member Functions

static void backend (int b)
 change backend to use for mesh generation

Private Member Functions

void constructMeshGen ()
 create internal mesh generator instance
bool carveHole (const TopoEdge &e)
 remove triangles within internal hole edge k

Private Attributes

SurfacePtr m_psf
 each face is backed by exactly one surface
Indices m_edges
 edges on this face
std::vector< bool > m_edgeIsHole
 indicates whether an edge is an internal boundary (a hole)
DcMeshCritBasePtr m_pmc
 criterion used for meshing
MeshGeneratorPtr m_mg
 dispatches to DC or JRS mesh generation
uint m_iid
 integer id (index in Topology)
bool m_keepExplicitMesh
 if true, keep externally/explicitely generated mesh

Static Private Attributes

static int s_backend = TopoFace::DcMeshGen
 mesh generator backend to use

The documentation for this class was generated from the following files:
Generated on Fri Dec 2 2022 03:03:18 for libsurf by   doxygen 1.8.5