Back to index

salome-geom  6.5.0
Functions
GEOMImpl_IBasicOperations.cxx File Reference
#include <Standard_Stream.hxx>
#include <GEOMImpl_IBasicOperations.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 <GEOM_Function.hxx>
#include <GEOM_PythonDump.hxx>
#include <GEOMImpl_PointDriver.hxx>
#include <GEOMImpl_VectorDriver.hxx>
#include <GEOMImpl_LineDriver.hxx>
#include <GEOMImpl_PlaneDriver.hxx>
#include <GEOMImpl_MarkerDriver.hxx>
#include <GEOMImpl_IPoint.hxx>
#include <GEOMImpl_IVector.hxx>
#include <GEOMImpl_ILine.hxx>
#include <GEOMImpl_IPlane.hxx>
#include <GEOMImpl_IMarker.hxx>
#include <GEOMImpl_Types.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx>

Go to the source code of this file.

Functions

 Handle (GEOM_Object) GEOMImpl_IBasicOperations
 MakePointXYZ.

Function Documentation

MakePointXYZ.

GetObject.

MakeTangentPlaneOnFace.

MakeMarkerPntTwoVec.

MakeMarkerFromShape.

MakeMarker.

MakePlaneLCS.

MakePlane2Vec.

MakePlaneFace.

MakePlanePntVec.

MakePlaneThreePnt.

MakeLineTwoFaces.

MakeLineTwoPnt.

MakeLine.

MakeVectorTwoPnt.

MakeVectorDXDYDZ.

MakeTangentOnCurve.

MakePointOnLinesIntersection.

MakePointOnSurfaceByCoord.

MakePointOnSurface.

MakePointOnCurveByLength.

MakePointOnCurveByCoord.

MakePointOnCurve.

makePointOnGeom

MakePointWithReference.

Definition at line 85 of file GEOMImpl_IBasicOperations.cxx.

{
  SetErrorCode(KO);

  //Add a new Point object
  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);

  //Add a new Point function with XYZ parameters
  Handle(GEOM_Function) aFunction =
    aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_XYZ);
  if (aFunction.IsNull()) return NULL;

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

  GEOMImpl_IPoint aPI(aFunction);

  aPI.SetX(theX);
  aPI.SetY(theY);
  aPI.SetZ(theZ);

  //Compute the point value
  try {
#if OCC_VERSION_LARGE > 0x06010000
    OCC_CATCH_SIGNALS;
#endif
    if (!GetSolver()->ComputeFunction(aFunction)) {
      SetErrorCode("Point 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) << aPoint << " = geompy.MakeVertex("
    << theX << ", " << theY << ", " << theZ << ")";

  SetErrorCode(OK);
  return aPoint;
}

Here is the call graph for this function: