MeshLink
Computational geometry access
|
Base class for geometry kernel interface. More...
#include <GeometryKernel.h>
Public Member Functions | |
virtual bool | read (const char *filename) |
Read the geometry data file. More... | |
virtual bool | projectPoint (const GeometryGroup *group, const MLVector3D point, ProjectionData &projectionData) |
Project a Cartesian point onto the Geometry group. More... | |
virtual bool | getProjectionXYZ (ProjectionData &projectionData, MLVector3D point) |
Return the projection hit Cartesian coordinates. More... | |
virtual bool | getProjectionUV (ProjectionData &projectionData, MLVector2D UV) |
Return the projection hit entity parametric coordinates. More... | |
virtual bool | getProjectionEntityName (ProjectionData &projectionData, std::string &name) |
Return the projection hit entity name. More... | |
virtual bool | getProjectionDistance (ProjectionData &projectionData, MLREAL &distance) |
Return the projection distance. More... | |
virtual bool | getProjectionTolerance (ProjectionData &projectionData, MLREAL &tolerance) |
Return the projection tolerance. More... | |
virtual bool | evalXYZ (MLVector2D UV, const std::string &entityName, MLVector3D xyz) |
Evaluate the Cartesian coordinates at the entity parametric coordinates. More... | |
virtual bool | evalRadiusOfCurvature (MLVector2D UV, const std::string &entityName, MLREAL *minRadiusOfCurvature, MLREAL *maxRadiusOfCurvature) |
Evaluate the radius of curvature at the entity parametric coordinates. More... | |
virtual bool | evalCurvatureOnCurve (MLVector2D UV, const std::string &entityName, MLVector3D XYZ, MLVector3D Tangent, MLVector3D PrincipalNormal, MLVector3D Binormal, MLREAL *Curvature, bool *Linear) |
Evaluate the curvature on a curve entity at the parametric coordinates. More... | |
virtual bool | evalDerivativesOnCurve (MLVector2D UV, const std::string &entityName, MLVector3D XYZ, MLVector3D dXYZdU, MLVector3D d2XYZdU2) |
Evaluate the parametric derivatives on a curve entity at the parametric coordinates. More... | |
virtual bool | evalCurvatureOnSurface (MLVector2D UV, const std::string &entityName, MLVector3D XYZ, MLVector3D dXYZdU, MLVector3D dXYZdV, MLVector3D d2XYZdU2, MLVector3D d2XYZdUdV, MLVector3D d2XYZdV2, MLVector3D surfaceNormal, MLVector3D principalV, MLREAL *minCurvature, MLREAL *maxCurvature, MLREAL *avg, MLREAL *gauss, MLORIENT *orientation) |
Evaluate the curvature on a surface entity at the parametric coordinates. More... | |
virtual bool | evalSurfaceTolerance (const std::string &entityName, MLREAL &minTolerance, MLREAL &maxTolerance) |
Evaluate the model assembly tolerance on a surface entity. More... | |
virtual MLTYPE | entityType (const char *name) |
Determine entity type. More... | |
virtual bool | entityExists (const char *name) |
Determine if an entity exists in the geometry kernel database. More... | |
virtual const char * | getName () const |
Return the name of the geometry kernel. More... | |
virtual void | setModelSize (MLREAL size) |
Set the model size of the geometry. More... | |
virtual MLREAL | getModelSize () const |
Return the geometry model size. More... | |
GeometryKernel () | |
Default constructor sets model size to 1000.0. More... | |
~GeometryKernel () | |
Destructor. More... | |
Private Member Functions | |
virtual ProjectionDataObj | getProjectionDataObject () |
Construct a point projection data object for use by the geometry kernel. More... | |
virtual void | deleteProjectionDataObject (ProjectionDataObj projectionData) |
Delete (and free) a kernel point projection data object. More... | |
Private Attributes | |
MLREAL | modelsize_ |
model size More... | |
Friends | |
class | ProjectionData |
Base class for geometry kernel interface.
Provides a neutral interface for interaction with geometry stored in wrapped geometry kernels. The geometry kernel is application-defined, and performs all geometric operations as provided by this interface.
Definition at line 91 of file GeometryKernel.h.
|
inline |
Default constructor sets model size to 1000.0.
Definition at line 302 of file GeometryKernel.h.
|
inline |
Destructor.
Definition at line 308 of file GeometryKernel.h.
|
privatevirtual |
Delete (and free) a kernel point projection data object.
Reimplemented in GeometryKernelGeode.
|
virtual |
Determine if an entity exists in the geometry kernel database.
[in] | name | the name of the entity |
|
virtual |
Determine entity type.
[in] | name | the name of the entity |
Reimplemented in GeometryKernelGeode.
|
virtual |
Evaluate the curvature on a curve entity at the parametric coordinates.
Defined by kernel implementation.
[in] | UV | the parametric coordinate (U) location to evaluate |
[in] | entityName | the name of the geometric entity to evaluate |
[out] | XYZ | the evaluated location in model space |
[out] | Tangent | the evaluated tangent vector |
[out] | PrincipalNormal | the evaluated principal normal vector |
[out] | Binormal | the binormal vector (Tangent X PrincipalNormal) |
[out] | Curvature | evaluated curvature in radians per unit length. This is ALWAYS non-negative and in the direction of the principal normal vector. Radius of curvature is computed as 1 / Curvature. |
[out] | Linear | true if curve is linear and has no unique normal vector |
Reimplemented in GeometryKernelGeode.
|
virtual |
Evaluate the curvature on a surface entity at the parametric coordinates.
Defined by kernel implementation.
[in] | UV | the parametric coordinate (UV) location to evaluate |
[in] | entityName | the name of the geometric entity to evaluate |
[out] | XYZ | the evaluated location in model space |
[out] | dXYZdU,dXYZdV | first partial derivatives |
[out] | d2XYZdU2,d2XYZdUdV,d2XYZdV2 | second partial derivatives |
[out] | surfaceNormal | normalized surface normal vector (unit vector) |
[out] | principalV | Unit vector tangent to surface where curvature = min; surfaceNormal cross principalV yields the direction where curvature = max; if the surface is locally planar (min and max are 0.0) or if the surface is locally spherical (min and max are equal), this will be an arbitrary vector tangent to the surface |
[out] | minCurvature,maxCurvature | minimum and maximum curvature, in radians per unit length; defined so that positive values indicate the surface bends in the direction of surfaceNormal, and negative values indicate the surface bends away from surfaceNormal |
[out] | avg | average curvature; average or mean curvature is defined as : avg = (min + max) / 2 |
[out] | gauss | Guassian curvature; Gaussian curvature is defined as : gauss = min * max |
[out] | orientation | orientation of the surface in the model |
Reimplemented in GeometryKernelGeode.
|
virtual |
Evaluate the parametric derivatives on a curve entity at the parametric coordinates.
Defined by kernel implementation.
[in] | UV | the parametric coordinate (U) location to evaluate |
[in] | entityName | the name of the geometric entity to evaluate |
[out] | XYZ | the evaluated location in model space |
[out] | dXYZdU | first derivative |
[out] | d2XYZdU2 | second derivative |
Reimplemented in GeometryKernelGeode.
|
virtual |
Evaluate the radius of curvature at the entity parametric coordinates.
Defined by kernel implementation.
For a curve entity, min and max are equal.
[in] | UV | the parametric coordinate location to evaluate |
[in] | entityName | the name of the geometric entity to evaluate |
[out] | minRadiusOfCurvature,maxRadiusOfCurvature | the minimum and maximum radius of curvature at the given coordinate |
Reimplemented in GeometryKernelGeode.
|
virtual |
Evaluate the model assembly tolerance on a surface entity.
Defined by kernel implementation, but in general: If the surface name given matches a model face, then the face's boundary edges and vertices will be querried for the assembly tolerance used to close the model.
[in] | entityName | the name of the geometric entity to evaluate |
[out] | minTolerance,maxTolerance | minimum and maximum model assembly tolerance used to make the model watertight at the shared boundary vertices and edges. |
Reimplemented in GeometryKernelGeode.
|
virtual |
Evaluate the Cartesian coordinates at the entity parametric coordinates.
Defined by kernel implementation.
[in] | UV | the parametric coordinate location to evaluate |
[in] | entityName | the name of the geometric entity to evaluate |
[out] | xyz | the evaluated location in model space |
|
virtual |
Return the geometry model size.
Reimplemented in GeometryKernelGeode.
|
virtual |
Return the name of the geometry kernel.
Reimplemented in GeometryKernelGeode.
|
privatevirtual |
Construct a point projection data object for use by the geometry kernel.
Reimplemented in GeometryKernelGeode.
|
virtual |
Return the projection distance.
[in] | projectionData | the projection data from which to extract |
[out] | distance | the distance between the original point and the projected point |
Reimplemented in GeometryKernelGeode.
|
virtual |
Return the projection hit entity name.
[in] | projectionData | the projection data from which to extract |
[out] | name | the geometric entity name |
Reimplemented in GeometryKernelGeode.
|
virtual |
Return the projection tolerance.
Defined by kernel implementation, the projection tolerance typically indicates local error tolerance within the geometry or solid topology.
[in] | projectionData | the projection data from which to extract |
[out] | tolerance | the maximum error tolerance of the projection result |
Reimplemented in GeometryKernelGeode.
|
virtual |
Return the projection hit entity parametric coordinates.
[in] | projectionData | the projection data from which to extract |
[out] | UV | the projection parametric coordinate result |
Reimplemented in GeometryKernelGeode.
|
virtual |
Return the projection hit Cartesian coordinates.
[in] | projectionData | the projection data from which to extract |
[out] | point | the projection coordinate result |
Reimplemented in GeometryKernelGeode.
|
virtual |
Project a Cartesian point onto the Geometry group.
Defined by kernel implementation.
Closest point projection of point onto the geometric entities in the GeometryGroup. Data is returned in the ProjectionData object.
group | the GeometryGroup to project upon | |
point | the point to project | |
[out] | projectionData | the projection result data |
Reimplemented in GeometryKernelGeode.
|
virtual |
Read the geometry data file.
Defined by kernel implementation.
filename | the name (path) of the geometry file |
Reimplemented in GeometryKernelGeode.
|
virtual |
Set the model size of the geometry.
Used to define tolerances within the geometry kernel
[in] | size | the model size to set |
Reimplemented in GeometryKernelGeode.
|
friend |
Definition at line 93 of file GeometryKernel.h.
|
private |
model size
Definition at line 314 of file GeometryKernel.h.