Back to index

salome-geom  6.5.0
GEOMImpl_Fillet1dDriver.cxx File Reference
#include <Standard_Stream.hxx>
#include <GEOMImpl_Fillet1dDriver.hxx>
#include <GEOMImpl_Fillet1d.hxx>
#include <GEOMImpl_IFillet1d.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMImpl_ILocalOperations.hxx>
#include <GEOMImpl_IShapesOperations.hxx>
#include <GEOM_Function.hxx>
#include <gp_Pln.hxx>
#include <gp_Dir.hxx>
#include <gp_XYZ.hxx>
#include <BRep_Tool.hxx>
#include <BRepTools.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <Precision.hxx>
#include <ShapeFix_Wire.hxx>
#include <StdFail_NotDone.hxx>
#include <Standard_ConstructionError.hxx>
#include <TopAbs.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Shape.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>

Go to the source code of this file.


static TopoDS_Vertex anotherVertex (const TopoDS_Edge &theE, const TopoDS_Vertex &theV)
static Standard_Boolean takePlane (const TopoDS_Edge &theE1, const TopoDS_Edge &theE2, const TopoDS_Vertex &theV, gp_Pln &thePlane)
static void addEdgeRelation (TopTools_DataMapOfShapeShape &theMap, const TopoDS_Edge &theInitE, const TopoDS_Edge &theResE)
Handle_Standard_Type & 
GEOMImpl_Fillet1dDriver_Type_ ()
const Handle (GEOMImpl_Fillet1dDriver) Handle(GEOMImpl_Fillet1dDriver)

Function Documentation

static void addEdgeRelation ( TopTools_DataMapOfShapeShape &  theMap,
const TopoDS_Edge &  theInitE,
const TopoDS_Edge &  theResE 
) [static]

Definition at line 134 of file GEOMImpl_Fillet1dDriver.cxx.

  if ( theMap.IsBound( theInitE ) )
    theMap.ChangeFind( theInitE ) = theResE;
    theMap.Bind( theInitE, theResE );

Here is the caller graph for this function:

static TopoDS_Vertex anotherVertex ( const TopoDS_Edge &  theE,
const TopoDS_Vertex &  theV 
) [static]

Definition at line 80 of file GEOMImpl_Fillet1dDriver.cxx.

  // here is an assumption that edge has different vertices
  TopoDS_Vertex aV;
  TopExp_Explorer anExp( theE, TopAbs_VERTEX );
  for ( ; anExp.More(); anExp.Next() )
    if ( BRepTools::Compare(theV,TopoDS::Vertex(anExp.Current())) /*theV.IsSame(anExp.Current())*/ )
    aV = TopoDS::Vertex( anExp.Current() );
  return aV;

Here is the caller graph for this function:

Definition at line 278 of file GEOMImpl_Fillet1dDriver.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_Fillet1dDriver",

  return _aType;

Here is the call graph for this function:

Definition at line 301 of file GEOMImpl_Fillet1dDriver.cxx.

  Handle(GEOMImpl_Fillet1dDriver) _anOtherObject;

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

  return _anOtherObject;

Here is the call graph for this function:

static Standard_Boolean takePlane ( const TopoDS_Edge &  theE1,
const TopoDS_Edge &  theE2,
const TopoDS_Vertex &  theV,
gp_Pln &  thePlane 
) [static]

Definition at line 100 of file GEOMImpl_Fillet1dDriver.cxx.

  TopoDS_Vertex aV12 = anotherVertex( theE1, theV );
  TopoDS_Vertex aV22 = anotherVertex( theE2, theV );
  // check can closed wire be created by two initial edges
  if ( aV12.IsNull()  || aV22.IsNull() || aV12.IsSame( aV22 ) )
    return false;

  // create plane by 3 points
  gp_XYZ aXYZ = BRep_Tool::Pnt( theV ).XYZ();
  gp_XYZ aXYZ1 = BRep_Tool::Pnt( aV12 ).XYZ();
  gp_XYZ aXYZ2 = BRep_Tool::Pnt( aV22 ).XYZ();
  try {
    gp_Dir aDir1( aXYZ - aXYZ1 );
    gp_Dir aDir2( aXYZ2 - aXYZ );
    Standard_Real anAngle = aDir1.Angle(aDir2);
    if ( fabs(anAngle) <= gp::Resolution() ||
         fabs(anAngle - M_PI) <= gp::Resolution() )
      return false;
    thePlane = gp_Pln( gp_Pnt(aXYZ), aDir1^ aDir2);
  catch (Standard_Failure) {
    return false;
  return true;

Here is the call graph for this function:

Here is the caller graph for this function: