Commit b664a7b1 by Dennis Gläser

Merge branch 'cleanup/constraints' into 'master'

```Cleanup/constraints

See merge request DennisGlaeser/frackit!36```
parents 1cf19ba4 84aa7eb2
 ... ... @@ -190,6 +190,29 @@ ctype computeDistanceToBoundary(const TopoDS_Shape& shape, extAlgo); } /*! * \brief Compute the distance of a shape * to the bounding wire of a quadrilateral. * \param shape The shape * \param quad The quadrilateral * \param deflection The epsilon used in the BrepExtrema command * \param extFlag The flag passed to the BrepExtrema command (MIN/MAX/MINMAX) * \param extAlgo The algorithm passed to the BrepExtrema command (TREE/GRAD) */ template ctype computeDistanceToBoundary(const TopoDS_Shape& shape, const Quadrilateral& quad, ctype deflection = Precision::confusion(), Extrema_ExtFlag extFlag = Extrema_ExtFlag_MINMAX, Extrema_ExtAlgo extAlgo = Extrema_ExtAlgo_Grad) { return computeDistance(shape, OCCUtilities::getShape(quad), deflection, extFlag, extAlgo); } /*! * \brief Compute the distance of a geometry * to the boundary of a TopoDS_Face. ... ...
 ... ... @@ -26,12 +26,9 @@ #include #include #include #include #include #include #include #include #include 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::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 bool isAdmissibleMagnitude(const TopoDS_Vertex& isVertex, ctype threshold) { return true; } /*! * \brief Evaluates if the magnitude of an edge is above a given threshold. */ template 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 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 bool isAdmissibleMagnitude(const TopoDS_Solid& isSolid, ctype threshold) { return computeMagnitude(isSolid) >= threshold; } /*! * \brief Overload for an std::variant */ ... ...