12 #ifndef GEOM_KERNEL_GEODE 13 #define GEOM_KERNEL_GEODE 18 #include <geom/Curve.h> 29 class ProjectionBSPTree;
33 #include <geom/EntityError.h> 34 #include <geom/Database.h> 35 #include <nmb/NativeTopologyReader.h> 36 #include <geom/Plane.h> 37 #include <nmb/CurvedFace.h> 38 #include <nmb/CurvedModel.h> 48 class GeodeErrorHandler :
public GE::ErrorHandler {
50 virtual void HandleDebug(
const GE::EntityError &e) {}
51 virtual void HandleDebug(
const GE::CharString &errorMessage) {}
52 virtual void HandleInfo(
const GE::EntityError &e) {}
53 virtual void HandleInfo(
const GE::CharString &errorMessage) {}
54 virtual void HandleWarning(
const GE::EntityError &e) {}
55 virtual void HandleWarning(
const GE::CharString &errorMessage) {}
56 virtual void HandleError(
const GE::EntityError &e) {}
57 virtual void HandleError(
const GE::CharString &errorMessage) {}
78 bool read(
const char *filename);
103 MLREAL *minRadiusOfCurvature,
MLREAL *maxRadiusOfCurvature );
107 const std::string &entityName,
120 const std::string &entityName,
126 const std::string &entityName,
134 const std::string &entityName,
186 GE::Entity*
getEntity(
const std::string &name)
const;
202 std::map<const GeometryGroup *, GE::ProjectionBSPTree *>
BSPTreeMap_;
bool getProjectionTolerance(ProjectionData &projectionData, MLREAL &tolerance)
Return the projection tolerance.
std::map< const GeometryGroup *, GE::ProjectionBSPTree * > BSPTreeMap_
GE::ProjectionBSPTree * getBSPTree(const GeometryGroup *group)
MeshLinkObject ProjectionDataObj
Opaque pointer to a ProjectionData object.
Base class for geometry kernel interface.
MLREAL getModelSize() const
Return the geometry model size.
bool projectPoint(const GeometryGroup *group, const MLVector3D point, ProjectionData &projectionData)
Project a Cartesian point onto the Geometry group.
const char * getName() const
Return the name of the geometry kernel.
ProjectionDataObj getProjectionDataObject()
Construct a point projection data object for use by the geometry kernel.
int MLORIENT
Geometry orientation with respect to container entity.
MLTYPE entityType(const char *name)
Determine entity type.
MLREAL MLVector3D[3]
3D vector of MLREAL
bool evalXYZ(MLVector3D UV, const std::string &entityName, MLVector3D xyz)
void buildEntityMap()
Construct map of entity names to Geode entities.
bool getProjectionUV(ProjectionData &projectionData, MLVector2D UV)
Return the projection hit entity parametric coordinates.
std::map< std::string, GE::Entity * > usable_entity_map_
GeodeErrorHandler errorHandler_
bool evalSurfaceTolerance(const std::string &entityName, MLREAL &minTolerance, MLREAL &maxTolerance)
Evaluate the model assembly tolerance on a surface entity.
void setModelSize(MLREAL size)
Set the model size of the geometry.
bool read(const char *filename)
Read the geometry data file.
Provide computational geometry access using the Geode kernel.
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.
Opaque container for geometry kernel point projection specific data.
bool entityExists(const char *name) const
Determine if entity matching name exists.
MLREAL MLVector2D[2]
2D vector of MLREAL
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.
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.
bool evalRadiusOfCurvature(MLVector2D UV, const std::string &entityName, MLREAL *minRadiusOfCurvature, MLREAL *maxRadiusOfCurvature)
Evaluate the radius of curvature at the entity parametric coordinates.
bool getProjectionDistance(ProjectionData &projectionData, MLREAL &distance)
Return the projection distance.
GE::EntityList< GE::Entity > usable_entities_
void deleteProjectionDataObject(ProjectionDataObj projectionData)
Delete (and free) a point projection data object.
int MLTYPE
Basic geometry type.
bool getProjectionXYZ(ProjectionData &projectionData, MLVector3D point)
Return the projection hit Cartesian coordinates.
GE::Entity * getEntity(const std::string &name) const
bool getProjectionEntityName(ProjectionData &projectionData, std::string &name)
Return the projection hit entity name.
Storage for geometry association by entity reference.