Programmer's Documentation

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

Detailed Description

Topological edge, connecting two or more faces.

A topological edge can be the boundary of an isolated face. However, when the full model is a two-manifold, then each edge must have exactly two adjacent faces.

See Also
TopoFace, TopoVertex, Topology

#include <topoedge.h>

Collaboration diagram for TopoEdge:

Public Types

enum  MatchResult {
  NoMatch, ForwardFit, ReverseFit, ForwardOverlap,
enum  Origin { Unknown, Specified, Intersection }

Public Member Functions

 TopoEdge ()
 create empty edge
 TopoEdge (uint a, uint b)
 create edge between existing vertices, not attached yet
 TopoEdge (const Topology &topo, uint iface, uint a, uint b)
 initialize boundary edge with vertex indices
void assign (uint a, uint b)
 assign vertices
int edgeOrigin () const
 determine how edge was created
void edgeOrigin (Origin flag)
 change origin flag
uint source () const
 access source vertex
uint target () const
 access target vertex
bool operator< (const TopoEdge &e) const
 compare edges
bool operator== (const TopoEdge &e) const
 edge equality
Vct3 eval (uint lfi, Real t) const
 evaluate curve underlying this edge
int compare (const Topology &topo, const TopoEdge &e, Real tol=gmepsilon) const
 compare geometry with another edge
bool circular () const
 a circular edge starts and ends at the same vertex
uint nfaces () const
 number of connected faces
uint face (uint i) const
 access face i
uint & face (uint i)
 access face i
AbstractUvCurvePtr curve (uint k) const
 access curve with local index k
uint findFace (uint fix) const
 return local index of face i
uint attachFace (uint fix, AbstractUvCurvePtr pcv)
 connect with curve cv on face fix
bool detachFace (uint gfi)
 drop face with global index fix from connectivity
void detach ()
 detach edge from all faces
int connects (uint gfi, const Vct2 &q1, const Vct2 &q2, Real tol=gmepsilon) const
 check whether this edge connects two points on global face gfi
void split (Real t, uint v, TopoEdge &other)
 split edge by inserting vertex v, make this the edge (a,v) and other (v,b)
void enforcePoint (Real t)
 enforce a point to be present in discretization
const Vector & discretize (const Topology &topo)
 discretize while satisfying mesh refinement criteria on all faces
const Vector & discretize (const DcMeshCritBase &mcrit)
 discretize using simple criteria on first face
void discretize (const Vector &t)
 enforce discretization
const Vector & pattern () const
 access discretization pattern
bool injectPoint (uint kf, const Vct2 &p, Real tol=gmepsilon)
 change discretization to include point p
void injectIntersections (const Topology &topo, TopoEdge &e)
 make compatible with another edge - inject intersections
bool pointInjected () const
 determine whether a point was injected into edge after discretization
void pointInjected (bool flag)
 reset injection status
uint npoints () const
 number of points on discretized edge
Vct2 uvpoint (uint kface, uint ipoint) const
 retrieve discrete points in (u,v) space of face k
Vct3 point (uint ipoint) const
 retrieve discrete point in 3D space
void toMx (MxMesh &mx) const
 generate lines for debugging
void print (uint k, std::ostream &os) const
 plain text output for debugging
void tabulate (const std::string &fn) const
 write plain text table for debugging

Static Public Member Functions

static AbstractUvCurvePtr boundaryCurve (const Topology &topo, uint iface, uint a, uint b)
 create default curve, straight in parameter space
static bool intersects (uint fix, const TopoEdge &ea, const TopoEdge &eb, Vct2 &t)
 test two edges for intersection in space of face index fix

Private Member Functions

void inject (const Topology &topo, uint iface, const Vector &ti)
 inject a set of parameter values

Private Attributes

AbstractUvCurveArray m_pcv
 continuous geometry representation in parameter space
Vector m_tp
 discretization in curve parameter space
Vector m_ftp
 curve parameter points enforced in discretization
Indices m_faces
 faces connected to this edge
uint m_vix [2]
 vertex indices
Origin m_orig
 tag which indicates how this edge was created
bool m_bInjected
 flag indicating whether point was inserted on edge

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