Commit 6ca044fe authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[distancetobound] add overload for geometry & solid

parent bf2d4e3a
......@@ -37,6 +37,7 @@
#include <Extrema_ExtAlgo.hxx>
#include <Extrema_ExtFlag.hxx>
#include <BRepTools.hxx>
#include <BRepClass3d.hxx>
#include <frackit/precision/precision.hh>
#include <frackit/geometry/disk.hh>
......@@ -305,6 +306,32 @@ computeDistanceToBoundary(const Geo& geo,
extAlgo);
}
/*!
* \ingroup Distance
* \brief Compute the distance of a geometry
* to the boundary of a TopoDS_Solid.
* \param geo The geometry
* \param solid The TopoDS_Solid
* \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<class Geo>
typename Geo::ctype
computeDistanceToBoundary(const Geo& geo,
const TopoDS_Solid& solid,
typename Geo::ctype deflection
= Precision<typename Geo::ctype>::confusion(),
Extrema_ExtFlag extFlag = Extrema_ExtFlag_MINMAX,
Extrema_ExtAlgo extAlgo = Extrema_ExtAlgo_Grad)
{
return computeDistance(OCCUtilities::getShape(geo),
BRepClass3d::OuterShell(solid),
deflection,
extFlag,
extAlgo);
}
} // end namespace Frackit
#endif // FRACKIT_DISTANCE_TO_BOUNDARY_HH
Supports Markdown
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