Back to index

salome-geom  6.5.0
Functions
GEOMImpl_PointDriver.cxx File Reference
#include <Standard_Stream.hxx>
#include <GEOMImpl_PointDriver.hxx>
#include <GEOMImpl_IPoint.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOM_Function.hxx>
#include <ShapeAnalysis.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Compound.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <IntTools.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <gp_Pnt.hxx>
#include <Precision.hxx>
#include <Standard_NullObject.hxx>

Go to the source code of this file.

Functions

static Standard_Boolean getExtremaSolution (const gp_Pnt &theInitPnt, const TopoDS_Shape &theRefShape, gp_Pnt &thePnt)
Standard_EXPORT
Handle_Standard_Type & 
GEOMImpl_PointDriver_Type_ ()
const Handle (GEOMImpl_PointDriver) Handle(GEOMImpl_PointDriver)

Function Documentation

Standard_EXPORT Handle_Standard_Type& GEOMImpl_PointDriver_Type_ ( )

Definition at line 316 of file GEOMImpl_PointDriver.cxx.

{

  static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
  if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
  static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
  if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
  static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
  if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);


  static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
  static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PointDriver",
                                                         sizeof(GEOMImpl_PointDriver),
                                                         1,
                                                         (Standard_Address)_Ancestors,
                                                         (Standard_Address)NULL);

  return _aType;
}

Here is the call graph for this function:

static Standard_Boolean getExtremaSolution ( const gp_Pnt &  theInitPnt,
const TopoDS_Shape &  theRefShape,
gp_Pnt &  thePnt 
) [static]

Definition at line 83 of file GEOMImpl_PointDriver.cxx.

{
  BRepBuilderAPI_MakeVertex mkVertex (theInitPnt);
  TopoDS_Vertex anInitV = TopoDS::Vertex(mkVertex.Shape());
  
  BRepExtrema_DistShapeShape anExt (anInitV, theRefShape);
  if ( !anExt.IsDone() || anExt.NbSolution() < 1 )
    return Standard_False;
  thePnt = anExt.PointOnShape2(1);
  Standard_Real aMinDist2 = theInitPnt.SquareDistance( thePnt );
  for ( Standard_Integer j = 2, jn = anExt.NbSolution(); j <= jn; j++ )
  {
    gp_Pnt aPnt = anExt.PointOnShape2(j);
    Standard_Real aDist2 = theInitPnt.SquareDistance( aPnt );
    if ( aDist2 > aMinDist2)
      continue;
    aMinDist2 = aDist2;
    thePnt = aPnt;
  }
  return Standard_True;
}

Here is the caller graph for this function:

Definition at line 342 of file GEOMImpl_PointDriver.cxx.

{
  Handle(GEOMImpl_PointDriver) _anOtherObject;

  if (!AnObject.IsNull()) {
     if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PointDriver))) {
       _anOtherObject = Handle(GEOMImpl_PointDriver)((Handle(GEOMImpl_PointDriver)&)AnObject);
     }
  }

  return _anOtherObject ;
}

Here is the call graph for this function: