CFx SDK Documentation  2022 SP0
Classes | Macros | Functions
GeGbl.h File Reference
#include "Ge/GeTol.h"
#include "Ge/Ge.h"
#include "OdArrayPreDef.h"
#include "Ge/GeSurfacePtrArray.h"
#include "Ge/GePoint3dArray.h"
#include "TD_PackPush.h"
#include "TD_PackPop.h"

Go to the source code of this file.

Classes

struct  OdGeContext
 
class  OdError_GeNotImplemted
 

Macros

#define OD_GEGBL_H   /*!DOM*/
 
#define GE_NOT_IMPL(pGeEnt)
 

Functions

GE_TOOLKIT_EXPORT OdGeError geValidSolid (const OdGePoint3dArray &points, bool &isValid, const OdGeTol &tol=OdGeContext::gTol)
 
GE_TOOLKIT_EXPORT OdGeError geSolidSignedVolume (const OdGePoint3dArray &points, double &volume, const OdGePoint3d *basePoint)
 
GE_TOOLKIT_EXPORT OdGeError geCalculateNormal (const OdGePoint3dArray &points, OdGeVector3d *pNormal, const OdGeTol &tol=OdGeContext::gTol)
 
GE_TOOLKIT_EXPORT OdGeError geCalculateNormal (const OdGePoint3d *points, OdUInt32 numPoints, OdGeVector3d *pNormal, const OdGeTol &tol=OdGeContext::gTol)
 
GE_TOOLKIT_EXPORT OdGeError geCalculatePlane (const OdGePoint3dArray &points, OdGePlane &plane, const OdGeTol &tol=OdGeContext::gTol)
 
GE_TOOLKIT_EXPORT OdGeError geCalculatePlane (const OdGePoint3d *points, OdUInt32 numPoints, OdGePlane &plane, const OdGeTol &tol=OdGeContext::gTol)
 
GE_TOOLKIT_EXPORT OdGeError geCalculatePlane (const OdGeCurve3d *const *curves, OdUInt32 numCurves, OdGePlane &plane, const OdGeTol &tol=OdGeContext::gTol)
 
GE_TOOLKIT_EXPORT bool geNurb3dTo2d (const OdGeNurbCurve3d &nurb3d, OdGePlane &plane, OdGeNurbCurve2d &nurb2d, const OdGeTol &tol=OdGeContext::gTol)
 
GE_TOOLKIT_EXPORT bool geSurfaceProp (const OdGeSurface &pS, OdGe::NurbSurfaceProperties &propU, OdGe::NurbSurfaceProperties &propV, const OdGeTol &tol)
 
GE_TOOLKIT_EXPORT OdString geToString (const OdGe::EntityId val)
 Convert the specified value to an OdGe::EntityId string. More...
 
void GE_ERROR (OdResult res)
 

Macro Definition Documentation

◆ GE_NOT_IMPL

#define GE_NOT_IMPL (   pGeEnt)
Value:
{ \
try \
{ \
(*OdGeContext::gErrorFunc)(eNotImplemented); \
} \
catch (OdError &err) \
{ \
if (err.code() == eNotImplemented) \
{ \
OdString sFunc(TD_FUNC); \
OdString sMessage; \
sMessage.format(OD_T("%s method %s for Ge type %s"), \
OD_T("%s"), \
sFunc.c_str(), \
geToString(pGeEnt->type()).c_str()); \
throw OdError_GeNotImplemted(sMessage); \
} \
throw; \
} \
}
#define eNotImplemented
GE_TOOLKIT_EXPORT OdString geToString(const OdGe::EntityId val)
Convert the specified value to an OdGe::EntityId string.
#define OD_T(x)
#define TD_FUNC
const OdChar * c_str() const
Definition: OdString.h:200

Definition at line 281 of file GeGbl.h.

◆ OD_GEGBL_H

#define OD_GEGBL_H   /*!DOM*/

Definition at line 26 of file GeGbl.h.

Function Documentation

◆ GE_ERROR()

void GE_ERROR ( OdResult  res)
inline

Definition at line 265 of file GeGbl.h.

◆ geCalculateNormal() [1/2]

GE_TOOLKIT_EXPORT OdGeError geCalculateNormal ( const OdGePoint3d points,
OdUInt32  numPoints,
OdGeVector3d pNormal,
const OdGeTol tol = OdGeContext::gTol 
)

◆ geCalculateNormal() [2/2]

GE_TOOLKIT_EXPORT OdGeError geCalculateNormal ( const OdGePoint3dArray points,
OdGeVector3d pNormal,
const OdGeTol tol = OdGeContext::gTol 
)

Returns the normal to the plane defined by the specified points.

Parameters
points[in] Array of 3D points.
numPoints[in] Number of points.
pNormal[out] Receives the normal to the calculated plane.
tol[in] Geometric tolerance.
Remarks
Possible return values are as follows:

@untitled table kOk kNonCoplanarGeometry kDegenerateGeometry kSingularPoint

Corresponding C++ library: TD_Ge

◆ geCalculatePlane() [1/3]

GE_TOOLKIT_EXPORT OdGeError geCalculatePlane ( const OdGeCurve3d *const *  curves,
OdUInt32  numCurves,
OdGePlane plane,
const OdGeTol tol = OdGeContext::gTol 
)

◆ geCalculatePlane() [2/3]

GE_TOOLKIT_EXPORT OdGeError geCalculatePlane ( const OdGePoint3d points,
OdUInt32  numPoints,
OdGePlane plane,
const OdGeTol tol = OdGeContext::gTol 
)

◆ geCalculatePlane() [3/3]

GE_TOOLKIT_EXPORT OdGeError geCalculatePlane ( const OdGePoint3dArray points,
OdGePlane plane,
const OdGeTol tol = OdGeContext::gTol 
)

Returns the plane defined by the specified points.

Parameters
points[in] Array of 3D points.
curves[in] Array of 3D curves.
numPoints[in] Number of points.
numCurves[in] Number of curves.
plane[out] Receives the calculated plane.
tol[in] Geometric tolerance.
Remarks
Supported curves are OdGeCircArc3d, OdGeEllipArc3d, OdGeNurbCurve3d, and OdGeLineSeg3d.

Possible return values are as follows:

@untitled table kOk kNonCoplanarGeometry kDegenerateGeometry kSingularPoint

Corresponding C++ library: TD_Ge

◆ geNurb3dTo2d()

GE_TOOLKIT_EXPORT bool geNurb3dTo2d ( const OdGeNurbCurve3d nurb3d,
OdGePlane plane,
OdGeNurbCurve2d nurb2d,
const OdGeTol tol = OdGeContext::gTol 
)

Converts a 3D NURBS curve to a 2D NURBS curve by projecting it onto the specified plane.

Parameters
nurb3d[in] Any 3D NURBS curve.
plane[in] Projection plane.
nurb2d[out] Receives the 2D NURBS curve.
tol[in] Geometric tolerance.

Corresponding C++ library: TD_Ge

◆ geSolidSignedVolume()

GE_TOOLKIT_EXPORT OdGeError geSolidSignedVolume ( const OdGePoint3dArray points,
double &  volume,
const OdGePoint3d basePoint 
)

Calculates signed volume of a triangulated solid.

Parameters
points[in] Array of 3D points (in order of the triangles they form).
volume[out] Receives the volume value.
basePoint[in] Point to replace (0,0,0) for calculation purposes.
Remarks
Array of points should be divided by 3 without remainder. Negative sign of volume means that triangles in the solid are ordered clockwise.

Corresponding C++ library: TD_Ge

◆ geSurfaceProp()

GE_TOOLKIT_EXPORT bool geSurfaceProp ( const OdGeSurface pS,
OdGe::NurbSurfaceProperties propU,
OdGe::NurbSurfaceProperties propV,
const OdGeTol tol 
)

Calculates a properties for a specified surface.

Parameters
pS[in] Any surface.
propU,propV[out] Receives the properties.
tol[in] Geometric tolerance.

Corresponding C++ library: TD_Ge

Remarks
Rational state valid only for NURB surfaces.

◆ geToString()

GE_TOOLKIT_EXPORT OdString geToString ( const OdGe::EntityId  val)

Convert the specified value to an OdGe::EntityId string.

◆ geValidSolid()

GE_TOOLKIT_EXPORT OdGeError geValidSolid ( const OdGePoint3dArray points,
bool &  isValid,
const OdGeTol tol = OdGeContext::gTol 
)

Checks topology of a triangulated solid.

Parameters
points[in] Array of 3D points (in order of the triangles they form).
isValid[out] Receives the validation result.
tol[in] Geometric tolerance.
Remarks
Array of points should be divided by 3 without remainder.

Corresponding C++ library: TD_Ge