Commit 2e3b7f14 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[constraints][magnitude] remove obsolete overloads for BRep classes

The general overload works for classes from the TopoDS package now as we
can use the helper functions to extract dimensions of geometries.
parent 1cf19ba4
......@@ -26,12 +26,9 @@
#include <variant>
#include <vector>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Solid.hxx>
#include <frackit/magnitude/magnitude.hh>
#include <frackit/intersection/emptyintersection.hh>
#include <frackit/common/extractdimension.hh>
namespace Frackit {
namespace ConstraintImpl {
......@@ -43,41 +40,13 @@ namespace ConstraintImpl {
bool isAdmissibleMagnitude(const Geo& isGeometry, ctype threshold)
{
// zero dimensional (point) intersections fulfill any magnitude constraint
if (Geo::myDimension() == 0) return true;
if (getDimension(isGeometry) == 0) return true;
// empty intersections fulfill any magnitude constraint
if (IsEmptyIntersection<Geo>::value) return true;
// any other intersection geometry
return computeMagnitude(isGeometry) >= threshold;
}
/*!
* \brief Evaluates if the magnitude of a vertex shape is above a given threshold.
*/
template<class ctype>
bool isAdmissibleMagnitude(const TopoDS_Vertex& isVertex, ctype threshold)
{ return true; }
/*!
* \brief Evaluates if the magnitude of an edge is above a given threshold.
*/
template<class ctype>
bool isAdmissibleMagnitude(const TopoDS_Edge& isEdge, ctype threshold)
{ return computeMagnitude(isEdge) >= threshold; }
/*!
* \brief Evaluates if the magnitude of a face is above a given threshold.
*/
template<class ctype>
bool isAdmissibleMagnitude(const TopoDS_Face& isFace, ctype threshold)
{ return computeMagnitude(isFace) >= threshold; }
/*!
* \brief Evaluates if the magnitude of a solid is above a given threshold.
*/
template<class ctype>
bool isAdmissibleMagnitude(const TopoDS_Solid& isSolid, ctype threshold)
{ return computeMagnitude(isSolid) >= threshold; }
/*!
* \brief Overload for an std::variant
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment