libsurf
Programmer's Documentation

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

Detailed Description

Container for topology information.

Class Topology stores faces and edges along with vertex data.

See Also
TopoVertex, TopoEdge, TopoFace

#include <topology.h>

Collaboration diagram for Topology:
[legend]

Public Member Functions

 Topology ()
 create empty topology object
 
uint nfaces () const
 number of faces defined
 
uint nedges () const
 number of edges defined
 
uint appendFace (SurfacePtr psf, bool uperiodic=false, bool vperiodic=false)
 add surface, generate four boundary edges by default
 
uint appendFace (const TopoFace &f)
 append an existing face
 
uint appendEdge (uint iface, uint a, uint b)
 generate a plain edge between vertices a,b
 
uint appendEdge (const TopoEdge &edg)
 append an existing edge
 
uint appendVertex (uint iface, const Vct2 &uvp)
 add a topological vertex
 
uint appendVertex (uint ifa, const Vct2 &uva, uint ifb, const Vct2 &uvb)
 add a topological vertex
 
bool shareEdge (uint i, uint j) const
 test whether face i is adjacent to face j
 
void connectEdge (uint fa, uint ea, AbstractUvCurvePtr pcv, bool isHole=false)
 introduce connections between face fa and edge ea
 
bool connectFaces (uint a, uint b, uint ea, uint eb, Real tol=gmepsilon)
 connect face fa with face fb along edge ea/eb, return true on success
 
bool connectFaces (uint fa, uint fb, Real tol=gmepsilon)
 try to connect two faces by searching for matching edges
 
bool vEnchain (uint a, uint b, Real tol=gmepsilon)
 connect v = 1 of a to v = 0 of b
 
bool vEnchain (const SurfaceArray &surfaces)
 add a set of faces and connect them in v-direction
 
uint fillPlaneBoundary (uint ebound)
 construct a plane closing surface inside a closed-curve edge, return face index
 
const TopoVertexvertex (uint k) const
 access vertex by index
 
TopoVertexvertex (uint k)
 access vertex by index
 
uint findVertex (uint iface, const Vct2 &uvp)
 linear search for vertex
 
uint findConnection (uint iface, const Vct2 &pa, const Vct2 &pb, Real tol=gmepsilon) const
 find global index of edge connecting pa and pb on face i
 
uint findConnection (uint iface, uint sideTag, Real tol=gmepsilon) const
 find global index of edge identified by tag on face i
 
const TopoFaceface (uint k) const
 access face by index
 
TopoFaceface (uint k)
 access face by index
 
const TopoEdgeedge (uint k) const
 access edge by index
 
TopoEdgeedge (uint k)
 access edge by index
 
void meshEdges ()
 discretize all edges
 
void meshFaces (bool allowConstraintSplit=false)
 discretize all faces
 
void mergeFaceMeshes (TriMesh &globMesh) const
 merge meshes of all faces into one global mesh
 
void intersect (TopoIsecArray &segm) const
 compute intersections between faces which do not share an edge
 
void toMx (MxMesh &mx) const
 join face meshes for debugging
 
void print (std::ostream &os) const
 plain text output for debugging
 

Private Attributes

std::vector< TopoVertexm_vertices
 topological vertices
 
std::vector< TopoFacem_faces
 faces (one for each surface)
 
std::vector< TopoEdgem_edges
 edges
 

The documentation for this class was generated from the following files:
Generated on Wed Jan 19 2022 03:03:19 for libsurf by   doxygen 1.8.5