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

CAF_Component 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_)
 Constructor.
 
 ~CAF_Component ()
 Destructor.
 
void getBorder (std::vector< Segment2 > &vBorderSegments) const
 Get the border segments of the component. More...
 
CAFTYP getCAFType () const
 Get Cut&Fill-Type. More...
 
int getLabel () const
 Get the label of the component. More...
 
void getTriangles (std::vector< Triangle2 * > &vTrianglesOut) const
 Get the triangles of the component. More...
 
double getVolume () const
 Get the volume of the component. More...
 

Protected Attributes

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

Detailed Description

A CAF_Component is a region of the surface where:

  • The first surface is below the second one (CAFTYP = CT_FILL),
  • The first surface is above the second one (CAFTYP = CT_CUT),
  • The first surface corresponds exactly to the second one (CAFTYP = CT_NULL).

The component can be either a cut, fill, or a null (no change) area depending on the relationship between the two surfaces.

Member Function Documentation

◆ getBorder()

void GEOM_FADE25D::CAF_Component::getBorder ( std::vector< Segment2 > &  vBorderSegments) const

This function returns the border segments of the component. The border is represented as a collection of segments in arbitrary order.

Parameters
[out]vBorderSegmentsA vector to store the border segments of the component.

◆ getCAFType()

CAFTYP GEOM_FADE25D::CAF_Component::getCAFType ( ) const
Returns
The CAFTYP (Cut&Fill type) of the component:
  • CT_CUT indicates that earth must be dug off to transform the first surface into the second one.
  • CT_FILL indicates that earth must be added to fill the difference between the two surfaces.
  • CT_NULL is returned when the first surface corresponds exactly to the second one (no difference).

◆ getLabel()

int GEOM_FADE25D::CAF_Component::getLabel ( ) const

Each component is assigned a unique label (an integer).

Returns
The label of the component.

◆ getTriangles()

void GEOM_FADE25D::CAF_Component::getTriangles ( std::vector< Triangle2 * > &  vTrianglesOut) const

This function returns the triangles that define the component.

Parameters
[out]vTrianglesOutA vector to store Triangle2 pointers that make up the component.
Note
The z-coordinates of the returned triangle corners represent the height differences between the two input surfaces.

◆ getVolume()

double GEOM_FADE25D::CAF_Component::getVolume ( ) const

This function computes the volume of the component. The volume is an absolute value. Its sign (cut or fill) can be determined using the getCAFType() function.

Returns
The absolute volume of the component.
Note
The volume is computed using unitless coordinates. Ensure that the x, y, and z-coordinates are consistent (in the same unit system) when using this method.

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