Back to index

salome-geom  6.5.0
Functions
GEOMImpl_I3DPrimOperations.cxx File Reference
#include <Standard_Stream.hxx>
#include <Basics_OCCTVersion.hxx>
#include <GEOMImpl_I3DPrimOperations.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 <GEOM_Function.hxx>
#include <GEOM_PythonDump.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMImpl_BoxDriver.hxx>
#include <GEOMImpl_FaceDriver.hxx>
#include <GEOMImpl_DiskDriver.hxx>
#include <GEOMImpl_CylinderDriver.hxx>
#include <GEOMImpl_ConeDriver.hxx>
#include <GEOMImpl_SphereDriver.hxx>
#include <GEOMImpl_TorusDriver.hxx>
#include <GEOMImpl_PrismDriver.hxx>
#include <GEOMImpl_PipeDriver.hxx>
#include <GEOMImpl_RevolutionDriver.hxx>
#include <GEOMImpl_ShapeDriver.hxx>
#include <GEOMImpl_FillingDriver.hxx>
#include <GEOMImpl_ThruSectionsDriver.hxx>
#include <GEOMImpl_IBox.hxx>
#include <GEOMImpl_IFace.hxx>
#include <GEOMImpl_IDisk.hxx>
#include <GEOMImpl_ICylinder.hxx>
#include <GEOMImpl_ICone.hxx>
#include <GEOMImpl_ISphere.hxx>
#include <GEOMImpl_ITorus.hxx>
#include <GEOMImpl_IPrism.hxx>
#include <GEOMImpl_IPipe.hxx>
#include <GEOMImpl_IRevolution.hxx>
#include <GEOMImpl_IFilling.hxx>
#include <GEOMImpl_IThruSections.hxx>
#include <GEOMImpl_IPipeDiffSect.hxx>
#include <GEOMImpl_IPipeShellSect.hxx>
#include <GEOMImpl_IPipeBiNormal.hxx>
#include <Precision.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx>

Go to the source code of this file.

Functions

 Handle (GEOM_Object) GEOMImpl_I3DPrimOperations
 MakeBoxDXDYDZ.

Function Documentation

MakeBoxDXDYDZ.

GetObject.

MakePipeBiNormalAlongVector.

MakePipeShellsWithoutPath.

MakePipeWithShellSections.

MakePipeWithDifferentSections.

MakeThruSections.

MakeFilling.

MakeRevolutionAxisAngle2Ways.

MakeRevolutionAxisAngle.

MakePipe.

MakeDraftPrism.

MakePrismDXDYDZ_2WAYS.

MakePrismDXDYDZ.

MakePrismTwoPnt2Ways.

MakePrismTwoPnt.

MakePrismVecH2Ways.

MakePrismVecH.

MakeTorusPntVecRR.

MakeTorusRR.

MakeSpherePntR.

MakeSphereR.

MakeConePntVecR1R2H.

MakeConeR1R2H.

MakeCylinderPntVecRH.

MakeCylinderRH.

MakeDiskR.

MakeDiskThreePnt.

MakeDiskPntVecR.

MakeFaceObjHW.

MakeFaceHW.

MakeBoxTwoPnt.

Definition at line 105 of file GEOMImpl_I3DPrimOperations.cxx.

{
  SetErrorCode(KO);

  //Add a new Box object
  Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);

  //Add a new Box function with DX_DY_DZ parameters
  Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_DX_DY_DZ);
  if (aFunction.IsNull()) return NULL;

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

  GEOMImpl_IBox aBI (aFunction);

  aBI.SetDX(theDX);
  aBI.SetDY(theDY);
  aBI.SetDZ(theDZ);

  //Compute the box value
  try {
#if OCC_VERSION_LARGE > 0x06010000
    OCC_CATCH_SIGNALS;
#endif
    if (!GetSolver()->ComputeFunction(aFunction)) {
      SetErrorCode("Box 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) << aBox << " = geompy.MakeBoxDXDYDZ("
    << theDX << ", " << theDY << ", " << theDZ << ")";

  SetErrorCode(OK);
  return aBox;
}

Here is the call graph for this function: