Back to index

salome-geom  6.5.0
Functions
GEOMImpl_Fillet1d.cxx File Reference
#include "GEOMImpl_Fillet1d.hxx"
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <ElCLib.hxx>
#include <ElSLib.hxx>
#include <gp_Circ.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2dAPI_ProjectPointOnCurve.hxx>
#include <Geom2dAPI_InterCurveCurve.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomProjLib.hxx>
#include <Geom_Circle.hxx>
#include <Precision.hxx>
#include <TColStd_ListIteratorOfListOfReal.hxx>

Go to the source code of this file.

Functions

static Standard_Boolean isRadiusIntersected (const Handle(Geom2d_Curve)&theCurve, const gp_Pnt2d theStart, const gp_Pnt2d theEnd, const Standard_Boolean theStartConnected)

Function Documentation

static Standard_Boolean isRadiusIntersected ( const Handle(Geom2d_Curve)&  theCurve,
const gp_Pnt2d  theStart,
const gp_Pnt2d  theEnd,
const Standard_Boolean  theStartConnected 
) [static]

Definition at line 105 of file GEOMImpl_Fillet1d.cxx.

{
  const Standard_Real aTol = Precision::Confusion();
  const Standard_Real anAngTol = Precision::Angular();
  Geom2dAPI_InterCurveCurve anInter(theCurve, new Geom2d_Line(theStart,
    gp_Dir2d(gp_Vec2d(theStart, theEnd))), aTol);
  Standard_Integer a;
  gp_Pnt2d aPoint;
  for(a = anInter.NbPoints(); a > 0; a--)
  {
    aPoint = anInter.Point(a);
    if ( aPoint.Distance(theStart) < aTol && !theStartConnected )
      return Standard_True;
    if (aPoint.Distance(theEnd) < aTol * 200)
      return Standard_True;
    if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), anAngTol))
      return Standard_True;
  }
  Handle(Geom2d_Curve) aCurve;
  for(a = anInter.NbSegments(); a > 0; a--)
  {
    anInter.Segment(a, aCurve);
    aPoint = aCurve->Value(aCurve->FirstParameter());
    if (aPoint.Distance(theStart) < aTol)
      if (!theStartConnected)
        return Standard_True;
    if (aPoint.Distance(theEnd) < aTol)
      return Standard_True;
    if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), anAngTol))
      return Standard_True;
    aPoint = aCurve->Value(aCurve->LastParameter());
    if (aPoint.Distance(theStart) < aTol)
      if (!theStartConnected)
        return Standard_True;
    if (aPoint.Distance(theEnd) < aTol)
      return Standard_True;
    if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), anAngTol))
      return Standard_True;
  }
  return Standard_False;
}

Here is the call graph for this function:

Here is the caller graph for this function: