MeshCore::MeshFixCaps Class Reference

The MeshFixCaps class tries to fix degenerations by swapping the common edge of a cap and its neighbour. More...

#include <Degeneration.h>

Public Member Functions

bool Fixup ()
 This function attempts to change the mesh kernel to be valid according to the checked criterion: True is returned if the errors could be fixed, false otherwise. More...
 
 MeshFixCaps (MeshKernel &rclM, float fMaxAng=2.61f, float fFactor=0.25f)
 Construction. More...
 
 ~MeshFixCaps ()
 Destruction. More...
 
- Public Member Functions inherited from MeshCore::MeshValidation
virtual bool Fixup ()=0
 This function attempts to change the mesh kernel to be valid according to the checked criterion: True is returned if the errors could be fixed, false otherwise. More...
 
 MeshValidation (MeshKernel &rclB)
 
virtual ~MeshValidation ()
 

Detailed Description

The MeshFixCaps class tries to fix degenerations by swapping the common edge of a cap and its neighbour.

Caps are triangles with one angle close to 180 degree. The definitions of caps and needles are not mutually exclusive but here we only consider triangles that are caps but no needles. https://graphics.uni-bielefeld.de/publications/vmv01.pdf

See also
MeshFixDegeneratedFacets
MeshRemoveNeedles
Author
Werner Mayer

Constructor & Destructor Documentation

◆ MeshFixCaps()

MeshCore::MeshFixCaps::MeshFixCaps ( MeshKernel rclM,
float  fMaxAng = 2.61f,
float  fFactor = 0.25f 
)

Construction.

The

  • fFactor must be in the range of 0.0 and 0.5.

◆ ~MeshFixCaps()

MeshCore::MeshFixCaps::~MeshFixCaps ( )

Destruction.

Member Function Documentation

◆ Fixup()

bool MeshFixCaps::Fixup ( )
virtual

This function attempts to change the mesh kernel to be valid according to the checked criterion: True is returned if the errors could be fixed, false otherwise.

Implements MeshCore::MeshValidation.

References Base::Distance(), Base::Vector3< _Precision >::Dot(), MeshCore::FACET_INDEX_MAX, Base::Vector3< _Precision >::Normalize(), Base::Vector3< _Precision >::Perpendicular(), MeshCore::MeshTopoAlgorithm::SwapEdge(), and draftutils.todo::todo.

Referenced by Mesh::MeshObject::validateCaps().


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