Fade2.5D Documentation pages v2.12
Delaunay Features
GEOM_FADE25D::CAF_Component Class Reference

CAF_Component stands for CUT AND FILL COMPONENT. It represents a connected area of the surface. More...

#include <CAF_Component.h>

Public Member Functions

 CAF_Component (std::vector< Triangle2 * > &vT_, std::map< Point2 *, std::pair< double, double > > &mVtx2BeforeAfter_, int label_)
void getBorder (std::vector< Segment2 > &vBorderSegments) const
 Get border. More...
CAFTYP getCAFType () const
 Get Cut&Fill-Type. More...
int getLabel () const
 Get label. More...
void getTriangles (std::vector< Triangle2 * > &vTrianglesOut) const
 Get Triangles. More...
double getVolume () const
 Get the volume. More...

Protected Member Functions

void init (std::map< Point2 *, std::pair< double, double > > &mVtx2BeforeAfter)
void setVolume (std::vector< Point2 > *pvBeforeT, std::vector< Point2 > *pvAfterT, std::vector< Point2 > *pvWallT)
void showGeomview (const char *name, std::vector< Point2 > *pvBeforeT, std::vector< Point2 > *pvAfterT, std::vector< Point2 > *pvWallT) const

Protected Attributes

CAFTYP caftype
int label
std::vector< Triangle2 * > * pVT
double volume

Detailed Description

A CAF_Component object represents a connected part of the surface such that:

  • the first surface is below the second one (CAFTYP=CT_FILL) or
  • the first surface is above the second one (CAFTYP=CT_CUT) or
  • the first surface corresponds to the second one (CAFTYP=CT_NULL)

Member Function Documentation

◆ getBorder()

void GEOM_FADE25D::CAF_Component::getBorder ( std::vector< Segment2 > &  vBorderSegments) const
border segments of the present component in no particular order

◆ getCAFType()

CAFTYP GEOM_FADE25D::CAF_Component::getCAFType ( ) const
  • CT_CUT means that earth must be digged off to turn the first surface into the second one,
  • CT_FILL means that earth must be added.
  • CT_NULL is returned when the first surface corresponds to the second one.

◆ getLabel()

int GEOM_FADE25D::CAF_Component::getLabel ( ) const
the component label

Components are consecutively numbered.

◆ getTriangles()

void GEOM_FADE25D::CAF_Component::getTriangles ( std::vector< Triangle2 * > &  vTrianglesOut) const
the triangles of the present component. The z-coordinates of their corners correspond to the height differences between the two input surfaces.
[out]vTrianglesOutis used to return the triangles

◆ getVolume()

double GEOM_FADE25D::CAF_Component::getVolume ( ) const
the volume of the present component.
The volume is an absolute value. Use getCAFType() to determine if it is a CUT, FILL or ZERO volume.
The computations are unitless but you must make sure that the x, y, and z-coordinate are given in the same unit.

The documentation for this class was generated from the following file: