Overview

The RoseSurface class is the root of a series of support classes that represent different mathematical surfaces and provides a consistent interface to evaluate and solve the surface. A surface can be thought of as a function of U and V parameters that returns a value in XYZ-space. This is an abstract base class, and instances are created from IFC and STEP geometry by the respective mesher libraries

Constants

These bit flags are used internally to identify the bounding state of the UV parameters and also by the resolveEdgeCrossing() function.
#define ROSE_U_MIN 0x01
#define ROSE_U_MAX 0x02
#define ROSE_V_MIN 0x04
#define ROSE_V_MAX 0x08

#define ROSE_U_COMMON 0x10
#define ROSE_V_COMMON 0x20

#define ROSE_EDGE_MASK (U_MIN|U_MAX|V_MIN|V_MAX)
#define ROSE_EDGE_CROSS ROSE_EDGE_MASK

#define ROSE_U_SPLIT (ROSE_U_MIN|ROSE_U_MAX)
#define ROSE_V_SPLIT (ROSE_V_MIN|ROSE_V_MAX)

eval()

virtual int eval(
        double xyz[3], 
        const double uv[2]
	);

int eval(
        double xyz[3], 
        double u, 
        double v
	);

The eval() function evaluates the surface at a given u,v parameter. The parameters may be specified as either an array, or individually. This value is placed into the xyz array.

This function returns 1 (true) on success. If there was an error, it returns 0.

evalNormal()

virtual int evalNormal(
        double n[3], 
        const double uv[2]
	);

int evalNormal(
        double n[3], 
        double u,
        double v
	);

The evalNormal() function function evaluates the direction of the surface normal at a given U,V parameter. The parameters may be specified as either an array, or individually. This value is placed into the n array. The function returns 1 if it was able to evaulaute the normat at the given point, 0 otherwise.

getMaxU()

virtual double getMaxU();

The getMaxU() function function returns the maximal U parameter the function can accept, or ROSE_NULL_REAL the U parameter in unbounded on the high end.

getMaxV()

virtual double getMaxV();

The getMaxV() function function returns the maximal V parameter the function can accept, or ROSE_NULL_REAL the V parameter in unbounded on the high end.

getMinU()

virtual double getMinU();

The getMinU() function returns the mininal U parameter the function can accept, or ROSE_NULL_REAL the U parameter in unbounded on the low end.

getMinV()

virtual double getMinV();

The getMinV() function function returns the mininal V parameter the function can accept, or ROSE_NULL_REAL the V parameter in unbounded on the low end.

getSingularityUV()

virtual void getSingularityUV(
        double uv[2], 
        unsigned edge
	);

The getSingularityUV() function get the UV values for a singularity on the surface. In most cases, this is implied by the edge, however for cones, we have an unbounded V value, but still have a singularity at a particular location.

hasMaxU()

virtual int hasMaxU();

The hasMaxU() function function returns true if the U parameter is bounded at the high end.

hasMaxV()

virtual int hasMaxV();

The hasMaxV() function function returns true if the V parameter is bounded at the high end.

hasMinU()

virtual int hasMinU();

The hasMinU() function returns true if the U parameter is bounded at the low end.

hasMinV()

virtual int hasMinV()

The hasMinV() function function returns true if the V parameter is bounded at the low end.

isPeriodicU()

virtual int isPeriodicU();

The isPeriodicU() function returns 1 of the surface is periodic in the U direction.

isPeriodicV()

virtual int isPeriodicV();

The isPeriodicV() function returns 1 of the surface is periodic in the V direction.

isSingularity()

virtual int isSingularity(
        unsigned edge, 
        double tol=0;

The isSingularity() function determine if the given edge of UV space is a singularity. A singularity on a surface is a point the is determined by a single of the one of the U,V parameters.

newSolver()

virtual RoseSurfaceSolver * newSolver(
        double tol
	);

The newSolver() function create a new solver with the given tolerance. The solver will return an UV parameter given an XYZ value on the surface.

resolveEdgeCrossing()

virtual unsigned resolveEdgeCrossing(
        const double uv1[2], 
        const double uv2[2],
        double tol
	);

The resolveEdgeCrossing() function determine which edges are crossed when traveling from one point to. This function returns a bit flag of ROSE_U_MIN/MAX, ROSE_V_MIN/MAX indicating the edges that were crossed.