Back to index

salome-geom  6.5.0
Functions
GEOMImpl_ILocalOperations.cxx File Reference
#include <Standard_Stream.hxx>
#include <GEOMImpl_ILocalOperations.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMImpl_FilletDriver.hxx>
#include <GEOMImpl_Fillet1dDriver.hxx>
#include <GEOMImpl_Fillet2dDriver.hxx>
#include <GEOMImpl_ChamferDriver.hxx>
#include <GEOMImpl_IFillet.hxx>
#include <GEOMImpl_IFillet1d.hxx>
#include <GEOMImpl_IFillet2d.hxx>
#include <GEOMImpl_IChamfer.hxx>
#include <GEOMImpl_IArchimede.hxx>
#include <GEOMImpl_ArchimedeDriver.hxx>
#include <GEOMImpl_Gen.hxx>
#include <GEOMImpl_IShapesOperations.hxx>
#include <GEOM_Function.hxx>
#include <GEOM_PythonDump.hxx>
#include <Basics_OCCTVersion.hxx>
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
#include <TFunction_DriverTable.hxx>
#include <TFunction_Driver.hxx>
#include <TFunction_Logbook.hxx>
#include <TDF_Tool.hxx>
#include <TopExp.hxx>
#include <TopoDS_TShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx>

Go to the source code of this file.

Functions

 Handle (GEOM_Object) GEOMImpl_ILocalOperations
 MakeFilletAll.

Function Documentation

MakeFilletAll.

GetObject.

Archimede.

MakeChamferEdgesAD.

MakeChamferEdges.

MakeChamferFacesAD.

MakeChamferFaces.

MakeChamferEdgeAD.

MakeChamferEdge.

MakeChamferAll.

MakeFillet1D.

MakeFillet2D.

MakeFilletFaces R1 R2.

MakeFilletFaces.

MakeFilletEdges R1 R2.

MakeFilletEdges.

Definition at line 93 of file GEOMImpl_ILocalOperations.cxx.

{
  SetErrorCode(KO);

  //Add a new Fillet object
  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);

  //Add a new Fillet function
  Handle(GEOM_Function) aFunction =
    aFillet->AddFunction(GEOMImpl_FilletDriver::GetID(), FILLET_SHAPE_ALL);
  if (aFunction.IsNull()) return NULL;

  //Check if the function is set correctly
  if (aFunction->GetDriverGUID() != GEOMImpl_FilletDriver::GetID()) return NULL;

  GEOMImpl_IFillet aCI (aFunction);

  Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
  if (aRefShape.IsNull()) return NULL;

  aCI.SetShape(aRefShape);
  aCI.SetR(theR);

  //Compute the Fillet value
  try {
#if OCC_VERSION_LARGE > 0x06010000
    OCC_CATCH_SIGNALS;
#endif
    if (!GetSolver()->ComputeFunction(aFunction)) {
      SetErrorCode("Fillet driver failed");
      return NULL;
    }
  }
  catch (Standard_Failure) {
    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
    SetErrorCode(aFail->GetMessageString());
    return NULL;
  }

  //Make a Python command
  GEOM::TPythonDump(aFunction) << aFillet << " = geompy.MakeFilletAll("
                               << theShape << ", " << theR << ")";

  SetErrorCode(OK);
  return aFillet;
}

Here is the call graph for this function: