CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
OdGeSurface Class Reference

#include <GeSurface.h>

Inheritance diagram for OdGeSurface:
OdGeEntity3d OdGeCone OdGeCylinder OdGeEllipCone OdGeEllipCylinder OdGeExternalBoundedSurface OdGeExternalSurface OdGeNurbSurface OdGeOffsetSurface OdGePlanarEnt OdGeRevolvedSurface OdGeRuled OdGeSphere OdGeSpunSurf OdGeTorus

Public Member Functions

OdGePoint2d paramOf (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d paramOf (const OdGePoint3d &point, const OdGeUvBox *uvBox, const OdGeTol &tol=OdGeContext::gTol) const
 
 TD_USING (OdGeEntity3d::isOn)
 
bool isOn (const OdGePoint3d &point, OdGePoint2d &paramPoint, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint3d closestPointTo (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint3d closestPointTo (const OdGePoint3d &point, OdGePoint2d *param, const OdGeUvBox *uvBox, const OdGeTol &tol=OdGeContext::gTol) const
 
void getClosestPointTo (const OdGePoint3d &point, OdGePointOnSurface &pntOnSurface, const OdGeTol &tol=OdGeContext::gTol) const
 
double distanceTo (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isNormalReversed () const
 
bool isLeftHanded () const
 
OdGeSurfacereverseNormal ()
 
void getEnvelope (OdGeInterval &intrvlU, OdGeInterval &intrvlV) const
 
void getEnvelope (OdGeUvBox &uvbox) const
 
bool isClosedInU (const OdGeTol &tol=OdGeContext::gTol) const
 
bool isClosedInV (const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint3d evalPoint (const OdGePoint2d &param) const
 
OdGePoint3d evalPoint (const OdGePoint2d &param, int numDeriv, OdGeVector3dArray &derivatives) const
 
OdGePoint3d evalPoint (const OdGePoint2d &param, int numDeriv, OdGeVector3dArray &derivatives, OdGeVector3d &normal) const
 
OdGeSurfaceoperator= (const OdGeSurface &surf)
 
OdGeExtents3d getGeomExtents (const OdGeUvBox &range=OdGeUvBox(), const OdGeMatrix3d *coordSystem=NULL) const
 
bool project (const OdGePoint3d &p, OdGePoint3d &projP, const OdGeTol &tol=OdGeContext::gTol) const
 
bool setEnvelope (const OdGeInterval &realIntrvlU, const OdGeInterval &realIntrvlV)
 
OdGeCurve3dmakeIsoparamCurve (bool byU, double param) const
 
OdGeCurve3dmakeIsoparamCurve (bool byU, double param, const OdGeInterval &interval) const
 
bool getPoles (OdGeDoubleArray *uParams, OdGeDoubleArray *vParams, OdGePoint3dArray *uPoints, OdGePoint3dArray *vPoints, double tol=1e-13) const
 
- Public Member Functions inherited from OdGeEntity3d
 ODRX_HEAP_OPERATORS ()
 
 ~OdGeEntity3d ()
 
bool isKindOf (OdGe::EntityId entType) const
 
OdGe::EntityId type () const
 
OdGeEntity3dcopy () const
 
OdGeEntity3doperator= (const OdGeEntity3d &entity)
 
bool operator== (const OdGeEntity3d &entity) const
 
bool operator!= (const OdGeEntity3d &entity) const
 
bool isEqualTo (const OdGeEntity3d &object, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeEntity3dtransformBy (const OdGeMatrix3d &xfm)
 
OdGeEntity3dtranslateBy (const OdGeVector3d &translateVec)
 
OdGeEntity3drotateBy (double angle, const OdGeVector3d &vect, const OdGePoint3d &basePoint=OdGePoint3d::kOrigin)
 
OdGeEntity3dmirror (const OdGePlane &plane)
 
OdGeEntity3dscaleBy (double scaleFactor, const OdGePoint3d &basePoint=OdGePoint3d::kOrigin)
 
bool isOn (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 

Protected Member Functions

 OdGeSurface ()
 
 OdGeSurface (const OdGeSurface &surf)
 
- Protected Member Functions inherited from OdGeEntity3d
 OdGeEntity3d ()
 
 OdGeEntity3d (const OdGeEntity3d &)
 
void connectTo (OdGeEntity3dImpl *)
 

Detailed Description

This class is the base class for all OdGe parametric surfaces.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

Definition at line 50 of file GeSurface.h.

Constructor & Destructor Documentation

◆ OdGeSurface() [1/2]

OdGeSurface::OdGeSurface ( )
protected

◆ OdGeSurface() [2/2]

OdGeSurface::OdGeSurface ( const OdGeSurface surf)
protected

Member Function Documentation

◆ closestPointTo() [1/2]

OdGePoint3d OdGeSurface::closestPointTo ( const OdGePoint3d point,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns the point on this surface closest to the specified point.

Parameters
point[in] Input 3D point to which the closest point on this surface is calculated.
tol[in] Geometric tolerance.

◆ closestPointTo() [2/2]

OdGePoint3d OdGeSurface::closestPointTo ( const OdGePoint3d point,
OdGePoint2d param,
const OdGeUvBox uvBox,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns the point on this surface closest to the specified point.

Parameters
point[in] Any 3D point.
param[out] uv-coord of closest point.
uvBox[in] uv-box of closest point.
tol[in] Geometric tolerance.
Remarks
Native envelope is not considered in calculation process. The nearest point is searched on the surface limited by uvBox-envelope. In case of uvBox == NULL && param == NULL closestPointTo(point, tol) is called. If uvBox == NULL, the nearest point is searched for surface bounded by its envelope. If param == NULL, param is not calculated. Don't use for unbounded uvBox

◆ distanceTo()

double OdGeSurface::distanceTo ( const OdGePoint3d point,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns the distance to the point on this curve closest to the specified point.

Parameters
point[in] Any 3D point distance to which is measured.
tol[in] Geometric tolerance.
Remarks
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ evalPoint() [1/3]

OdGePoint3d OdGeSurface::evalPoint ( const OdGePoint2d param) const

Returns the point corresponding to the parameter pair, as well as the derivatives and the normal at that point.

Parameters
param[in] The parameter pair to be evaluated.
Remarks
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ evalPoint() [2/3]

OdGePoint3d OdGeSurface::evalPoint ( const OdGePoint2d param,
int  numDeriv,
OdGeVector3dArray derivatives 
) const

Returns the point corresponding to the parameter pair, as well as the derivatives and the normal at that point.

Parameters
param[in] The parameter pair to be evaluated.
numDeriv[in] Maximum order of derivatives to be computed.
derivatives[out] Receives an array of derivatives at the point corresponding to param.
Remarks
If numDeriv is 1, then derivatives are ordered: du, dv If numDeriv is 2, then derivatives are ordered: du, dudu, dv, dvdv, dudv numDeriv >= 3 is not supported
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ evalPoint() [3/3]

OdGePoint3d OdGeSurface::evalPoint ( const OdGePoint2d param,
int  numDeriv,
OdGeVector3dArray derivatives,
OdGeVector3d normal 
) const

Returns the point corresponding to the parameter pair, as well as the derivatives and the normal at that point.

Parameters
param[in] The parameter pair to be evaluated.
numDeriv[in] Maximum order of derivatives to be computed.
derivatives[out] Receives an array of derivatives at the point corresponding to param.
normal[out] Receives the normal at the point corresponding to param.
Remarks
If numDeriv is 1, then derivatives are ordered: du, dv If numDeriv is 2, then derivatives are ordered: du, dudu, dv, dvdv, dudv numDeriv >= 3 is not supported
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ getClosestPointTo()

void OdGeSurface::getClosestPointTo ( const OdGePoint3d point,
OdGePointOnSurface pntOnSurface,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns the point on this surface closest to the specified point.

Parameters
point[in] Input 3D point to which the closest point on this surface is calculated.
pntOnSurface[out] Receives the closest point on the surface.
tol[in] Geometric tolerance.
Remarks
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ getEnvelope() [1/2]

void OdGeSurface::getEnvelope ( OdGeInterval intrvlU,
OdGeInterval intrvlV 
) const

Returns the minimum rectangle in parameter space that contains the parameter domain of this surface.

Parameters
intrvlU[out] Receives the u interval.
intrvlV[out] Receives the v interval.
Remarks
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ getEnvelope() [2/2]

void OdGeSurface::getEnvelope ( OdGeUvBox uvbox) const

Returns the minimum rectangle in parameter space that contains the parameter domain of this surface.

Parameters
uvbox[out] Receives the uv-box
Remarks
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ getGeomExtents()

OdGeExtents3d OdGeSurface::getGeomExtents ( const OdGeUvBox range = OdGeUvBox(),
const OdGeMatrix3d coordSystem = NULL 
) const

Returns bounding box of the whole surface or a part of it. The box is axis-aligned in the specified local coordinate system. It is guaranteed to enclose the surface, but not guaranteed to be tight/minimal.

Parameters
range[in] The part of the surface to be bounded.
coordSystem[in] The local coordinate system in which box extents are computed.
Remarks
If range is unbounded (e.g. by default), then bounding box of the whole surface (which range can be obtained by getEnvelope method) is computed. Otherwise bounding box is computed only for the set of points with parameter in the specified range. If coordSystem is NULL (e.g. by default), then bounding box is aligned with global coordinate axes. Otherwise, the box will be axis-aligned in the local coordinate system specified by coordSystem matrix.

◆ getPoles()

bool OdGeSurface::getPoles ( OdGeDoubleArray uParams,
OdGeDoubleArray vParams,
OdGePoint3dArray uPoints,
OdGePoint3dArray vPoints,
double  tol = 1e-13 
) const

Finds all poles of surface. Surface envelope not considered. In case of NurbSurface extreme points of envelope are checked. Input arrays may be not empty. In this case new poles will be written to the ends of the arrays.

Parameters
uParams[out] (Optional) Pointer to an array that receives U-params for poles with U = const.
vParams[out] (Optional) Pointer to an array that receives V-params for poles with V = const.
uPoints[out] (Optional) Pointer to an array that receives 3D points for poles with U = const.
vPoints[out] (Optional) Pointer to an array that receives 3D points for poles with V = const.
tol[in] Geometric tolerance.
Returns
true if the surface has poles, false otherwise.

◆ isClosedInU()

bool OdGeSurface::isClosedInU ( const OdGeTol tol = OdGeContext::gTol) const

Returns true if and only if this surface is closed in the U direction.

Parameters
tol[in] Geometric tolerance.
Remarks
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ isClosedInV()

bool OdGeSurface::isClosedInV ( const OdGeTol tol = OdGeContext::gTol) const

Returns true if and only if this surface is closed in the V direction.

Parameters
tol[in] Geometric tolerance.
Remarks
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ isLeftHanded()

bool OdGeSurface::isLeftHanded ( ) const

Checks orientation of the surface.

Returns
true if "natural" and "nominal" normals are opposite (surface is "left-handed"), false - otherwise (surface is "right-handed").
Remarks
Let U and V be surface's partial derivatives by U and V respectively (at some point). Consider two normals: "natural" normal is computed as [U x V] (i.e. cross product of partial derivatives). "nominal" normal is the vector returned by evalPoint method.

◆ isNormalReversed()

bool OdGeSurface::isNormalReversed ( ) const

Checks normal direction.

Returns
true if and only if the normal of this surface has been reversed an odd number of times, false - otherwise.

◆ isOn()

bool OdGeSurface::isOn ( const OdGePoint3d point,
OdGePoint2d paramPoint,
const OdGeTol tol = OdGeContext::gTol 
) const

Determines if the passed point is on this surface and retrieves a 2D point that represents parametric values for the passed 3D point if it is on this surface.

Parameters
point[in] Point that is checked to be on this surface.
paramPoint[out] Receives the 2D pair of parameter values at the point if the input point lies on the surface.
tol[in] Geometric tolerance.

◆ makeIsoparamCurve() [1/2]

OdGeCurve3d * OdGeSurface::makeIsoparamCurve ( bool  byU,
double  param 
) const

Returns isoparametric curve for surface.

Parameters
byU[in] true means: U = const, V - varying.
param[in] Value of the const parameter.
Returns
Isoparametric curve as a pointer to OdGeCurve3d object.
Remarks
Caller is responsible to delete the returned curve. Surface envelope is used to define curve interval.

◆ makeIsoparamCurve() [2/2]

OdGeCurve3d * OdGeSurface::makeIsoparamCurve ( bool  byU,
double  param,
const OdGeInterval interval 
) const

Returns isoparametric curve for surface.

Parameters
byU[in] true means: U = const, V - varying.
param[in] Value of the const parameter.
interval[in] Interval of the desired curve (by varying parameter).
Returns
Isoparametric curve as a pointer to OdGeCurve3d object.
Remarks
Caller is responsible to delete the returned curve.

◆ operator=()

OdGeSurface & OdGeSurface::operator= ( const OdGeSurface surf)

Assignment operator for the OdGeSurface class.

Parameters
surf[in] Surface to assign.
Returns
A reference to this OdGeSurface object.

◆ paramOf() [1/2]

OdGePoint2d OdGeSurface::paramOf ( const OdGePoint3d point,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns the 2D pair of parameter values of a point on this surface.

Parameters
point[in] Point to be evaluated.
tol[in] Geometric tolerance.
Remarks
The returned parameters specify a point within tol of point. If point is not on this surface, the results are unpredictable. If you are not sure the point is on this surface, use isOn() instead of this function.

◆ paramOf() [2/2]

OdGePoint2d OdGeSurface::paramOf ( const OdGePoint3d point,
const OdGeUvBox uvBox,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns the 2D pair of parameter values of a point on this surface.

Parameters
point[in] Point to be evaluated.
uvBox[in] uv-box of closest point.
tol[in] Geometric tolerance.
Remarks
The returned parameters specify a point within tol of point. If point is not on this surface, the results are unpredictable. If you are not sure the point is on this surface, use isOn() instead of this function.
If the 2D projection of the point didn't lie in the u or v interval of uvBox-bounds, the closest bound of the interval is set as a corresponding u/v parameter of resulting point. In case of uvBox == NULL paramOf(point, box, tol) is called in which box is a native envelope of the surface.
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ project()

bool OdGeSurface::project ( const OdGePoint3d p,
OdGePoint3d projP,
const OdGeTol tol = OdGeContext::gTol 
) const

Projects a point onto this surface.

Parameters
p[in] Any 3D point.
projP[out] Receives the point on this surface.
tol[in] Geometric tolerance.
Returns
true if and only if there is a point on this surface, projP, where a normal to this surface passes through the point p.

◆ reverseNormal()

OdGeSurface & OdGeSurface::reverseNormal ( )

Reverses the normal of this surface.

Returns
Reference to this surface.

◆ setEnvelope()

bool OdGeSurface::setEnvelope ( const OdGeInterval realIntrvlU,
const OdGeInterval realIntrvlV 
)

Set the rectangle in parameter space that defines the parameter domain of this surface.

Returns
true if and only if the new parameter domain was successfully set for this surface.
Parameters
realIntrvlU[in] A reference to a new real u interval to be set.
realIntrvlV[in] A reference to a new real v interval to be set.

◆ TD_USING()

OdGeSurface::TD_USING ( OdGeEntity3d::isOn  )

The documentation for this class was generated from the following file: