 Geom Software - C++ Programming and Geometry Libraries

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_)

CAFTYP getCAFType () const
Get Cut&Fill-Type. More...

double getVolume () const
Get the volume. More...

int getLabel () const
Get label. More...

void getTriangles (std::vector< Triangle2 *> &vTrianglesOut) const
Get Triangles. More...

void getBorder (std::vector< Segment2 > &vBorderSegments) const
Get border. More...

Protected Member Functions

void init (std::map< Point2 *, std::pair< double, double > > &mVtx2BeforeAfter)

void showGeomview (const std::string &name, std::vector< Point2 > *pvBeforeT, std::vector< Point2 > *pvAfterT, std::vector< Point2 > *pvWallT) const

void setVolume (std::vector< Point2 > *pvBeforeT, std::vector< Point2 > *pvAfterT, std::vector< Point2 > *pvWallT)

Protected Attributes

std::vector< Triangle2 * > * pVT

CAFTYP caftype

double volume

int label

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)

◆ getBorder()

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

◆ getCAFType()

Returns
CT_CUT, CT_FILL or CT_NULL
• 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()

Returns
the component label

Components are consecutively numbered.

◆ getTriangles()

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