Go::CompositeSurface Class Reference
['geometry' - a spline library]

Inheritance diagram for Go::CompositeSurface:

Go::ParamSurface Go::GeomObject Go::Streamable List of all members.

Public Member Functions

 CompositeSurface ()
 CompositeSurface (const std::vector< SplineSurface > &domain_maps, const SplineSurface &surf)
virtual void read (std::istream &is)
 read object from stream
virtual void write (std::ostream &os) const
 write object to stream
virtual BoundingBox boundingBox () const
 Return the object's bounding box.
virtual int dimension () const
 Return the dimension of the space in which the object lies (usually 2 or 3).
virtual ClassType instanceType () const
 Return the class type identifier of a given, derived instance of GeomObject.
virtual ~CompositeSurface ()
 Virtual destructor, enables safe inheritance.
virtual CompositeSurfaceclone () const
 make a clone of this surface and return a pointer to it (user is responsible for clearing up memory afterwards).
virtual const RectDomainparameterDomain () const
 Return the parameter domain of the surface.
virtual RectDomain containingDomain () const
 Get a rectangular parameter domain that is guaranteed to contain the surface's parameterDomain().
void setParameterDomain (double u1, double u2, double v1, double v2)
 set the parameter domain to a given rectangle
virtual CurveLoop outerBoundaryLoop (double degenerate_epsilon=DEFAULT_SPACE_EPSILON) const
 Returns the anticlockwise, outer boundary loop of the surface.
virtual std::vector< CurveLoopallBoundaryLoops (double degenerate_epsilon=DEFAULT_SPACE_EPSILON) const
 Returns the anticlockwise outer boundary loop of the surface, together with clockwise loops of any interior boundaries, such that the surface always is 'to the left of' the loops.
virtual DirectionCone normalCone () const
 Creates a DirectionCone covering all normals to this surface.
virtual DirectionCone tangentCone (bool pardir_is_u) const
 Creates a DirectionCone covering all tangents to this surface along a given parameter direction.
virtual CompositeBox compositeBox () const
 Creates a composite box enclosing the surface.
virtual void point (Point &pt, double upar, double vpar) const
 Evaluates the surface's position for a given parameter pair.
virtual void point (std::vector< Point > &pts, double upar, double vpar, int derivs, bool u_from_right=true, bool v_from_right=true, double resolution=1.0e-12) const
 Evaluates the surface's position and a certain number of derivatives for a given parameter pair.
virtual void normal (Point &n, double upar, double vpar) const
 entries will be the surface tangents along the first and second parameter direction.
virtual std::vector< boost::shared_ptr<
ParamCurve > > 
constParamCurves (double parameter, bool pardir_is_u) const
 Get the curve(s) obtained by intersecting the surface with one of its constant parameter curves.
virtual std::vector< boost::shared_ptr<
ParamSurface > > 
subSurfaces (double from_upar, double from_vpar, double to_upar, double to_vpar, double fuzzy=DEFAULT_PARAMETER_EPSILON) const
 Get the surface(s) obtained by cropping the parameter domain of this surface between given values for the first and second parameter.
virtual double nextSegmentVal (int dir, double par, bool forward, double tol) const
 Determine the parameter value of the start of the 'next segment' from a parameter value, along a given parameter direction.
virtual void closestPoint (const Point &pt, double &clo_u, double &clo_v, Point &clo_pt, double &clo_dist, double epsilon, const RectDomain *domain_of_interest=NULL, double *seed=0) const
 Iterates to the closest point to pt on the surface.
virtual void closestBoundaryPoint (const Point &pt, double &clo_u, double &clo_v, Point &clo_pt, double &clo_dist, double epsilon, const RectDomain *rd=NULL, double *seed=0) const
 Iterates to the closest point to pt on the boundary of the surface.
virtual void getBoundaryInfo (Point &pt1, Point &pt2, double epsilon, SplineCurve *&cv, SplineCurve *&crosscv, double knot_tol=1e-05) const
 Get the boundary curve segment between two points on the boundary, as well as the cross-tangent curve.
virtual void turnOrientation ()
 Turns the direction of the normal of the surface.
virtual void reverseParameterDirection (bool direction_is_u)
 Reverses the direction of the basis in input direction.
virtual void swapParameterDirection ()
 Swaps the two parameter directions.
virtual bool isDegenerate (bool &b, bool &r, bool &t, bool &l, double tolerance) const
 Query whether any of the four boundary curves are degenerate (zero length) within a certain tolerance.

Static Public Member Functions

static ClassType classType ()
 Return the class type identifier of a given class derived from GeomObject.

Detailed Description

Definition at line 48 of file CompositeSurface.h.


Member Function Documentation

virtual void Go::CompositeSurface::read ( std::istream &  is  )  [inline, virtual]

read object from stream

Parameters:
is stream from which object is read

Implements Go::Streamable.

Definition at line 65 of file CompositeSurface.h.

References Go::SplineSurface::read().

virtual void Go::CompositeSurface::write ( std::ostream &  os  )  const [inline, virtual]

write object to stream

Parameters:
os stream to which object is written

Implements Go::Streamable.

Definition at line 77 of file CompositeSurface.h.

References Go::SplineSurface::write().

virtual CompositeSurface* Go::CompositeSurface::clone (  )  const [inline, virtual]

make a clone of this surface and return a pointer to it (user is responsible for clearing up memory afterwards).

Returns:
pointer to cloned object

Implements Go::ParamSurface.

Definition at line 111 of file CompositeSurface.h.

References CompositeSurface().

virtual const RectDomain& Go::CompositeSurface::parameterDomain (  )  const [inline, virtual]

Return the parameter domain of the surface.

This may be a simple rectangular domain (RectDomain) or any other subclass of Domain (such as GoCurveBoundedDomain, found in the sisl_dependent module).

Returns:
a Domain object describing the parametric domain of the surface

Implements Go::ParamSurface.

Definition at line 118 of file CompositeSurface.h.

virtual RectDomain Go::CompositeSurface::containingDomain (  )  const [inline, virtual]

Get a rectangular parameter domain that is guaranteed to contain the surface's parameterDomain().

It may be the same. There is no guarantee that this is the smallest domain containing the actual domain.

Returns:
a RectDomain that is guaranteed to include the surface's total parameter domain.

Implements Go::ParamSurface.

Definition at line 126 of file CompositeSurface.h.

void Go::CompositeSurface::setParameterDomain ( double  u1,
double  u2,
double  v1,
double  v2 
) [inline]

set the parameter domain to a given rectangle

Parameters:
u1 new min. value of first parameter span
u2 new max. value of first parameter span
v1 new min. value of second parameter span
v2 new max. value of second parameter span

Definition at line 134 of file CompositeSurface.h.

virtual CurveLoop Go::CompositeSurface::outerBoundaryLoop ( double  degenerate_epsilon = DEFAULT_SPACE_EPSILON  )  const [inline, virtual]

Returns the anticlockwise, outer boundary loop of the surface.

Parameters:
degenerate_epsilon edges whose length is smaller than this value are ignored.
Returns:
a CurveLoop describing the anticlockwise, outer boundary loop of the surface.

Implements Go::ParamSurface.

Definition at line 143 of file CompositeSurface.h.

References Go::SplineSurface::outerBoundaryLoop().

virtual std::vector<CurveLoop> Go::CompositeSurface::allBoundaryLoops ( double  degenerate_epsilon = DEFAULT_SPACE_EPSILON  )  const [inline, virtual]

Returns the anticlockwise outer boundary loop of the surface, together with clockwise loops of any interior boundaries, such that the surface always is 'to the left of' the loops.

Parameters:
degenerate_epsilon edges whose length is smaller than this value are ignored.
Returns:
a vector containing CurveLoops. The first of these describe the outer boundary of the surface (clockwise), whereas the others describe boundaries of interior holes (clockwise).

Implements Go::ParamSurface.

Definition at line 155 of file CompositeSurface.h.

References Go::SplineSurface::allBoundaryLoops().

virtual DirectionCone Go::CompositeSurface::normalCone (  )  const [inline, virtual]

Creates a DirectionCone covering all normals to this surface.

Returns:
a DirectionCone (not necessarily the smallest) containing all normals to this surface.

Implements Go::ParamSurface.

Definition at line 162 of file CompositeSurface.h.

References Go::SplineSurface::normalCone().

virtual DirectionCone Go::CompositeSurface::tangentCone ( bool  pardir_is_u  )  const [inline, virtual]

Creates a DirectionCone covering all tangents to this surface along a given parameter direction.

Parameters:
pardir_is_u if 'true', then the DirectionCone will be defined on basis of the surface's tangents along the first parameter direction. Otherwise the second parameter direction will be used.
Returns:
a DirectionCone (not necessarily the smallest) containing all tangents to this surface along the specified parameter direction.

Implements Go::ParamSurface.

Definition at line 172 of file CompositeSurface.h.

References Go::SplineSurface::tangentCone().

virtual CompositeBox Go::CompositeSurface::compositeBox (  )  const [inline, virtual]

Creates a composite box enclosing the surface.

The composite box consists of an inner and an edge box. The inner box is supposed to be made from the interior of the surface, while the edge box is made from the boundary curves. The default implementation simply makes both boxes identical to the regular bounding box.

Returns:
the CompositeBox of the surface, as specified above

Reimplemented from Go::ParamSurface.

Definition at line 182 of file CompositeSurface.h.

References Go::SplineSurface::compositeBox().

virtual void Go::CompositeSurface::point ( Point pt,
double  upar,
double  vpar 
) const [inline, virtual]

Evaluates the surface's position for a given parameter pair.

Parameters:
pt the result of the evaluation is written here
upar the first parameter
vpar the second parameter

Implements Go::ParamSurface.

Definition at line 189 of file CompositeSurface.h.

References Go::SplineSurface::point().

Referenced by normal().

virtual void Go::CompositeSurface::point ( std::vector< Point > &  pts,
double  upar,
double  vpar,
int  derivs,
bool  u_from_right = true,
bool  v_from_right = true,
double  resolution = 1.0e-12 
) const [inline, virtual]

Evaluates the surface's position and a certain number of derivatives for a given parameter pair.

Parameters:
pts the vector containing the evaluated values. Its size must be set by the user prior to calling this function, and should be equal to (derivs+1) * (derivs+2) / 2. Upon completion of the function, its first entry is the surface's position at the given parameter pair. Then, if 'derivs' > 0, the two next entries will be the surface tangents along the first and second parameter direction. The next three entries are the second- and cross derivatives, in the order (du2, dudv, dv2), and similar for even higher derivatives.
upar the first parameter
vpar the second parameter
derivs number of requested derivatives
u_from_right specify whether derivatives along the first parameter are to be calculated from the right ('true', default) or from the left ('false')
v_from_right specify whether derivatives along the second parameter are to be calculated from the right ('true', default) or from the left ('false')
resolution tolerance used when determining whether parameters are located at special values of the parameter domain (in particualar; knot values in case of spline objects.

Implements Go::ParamSurface.

Definition at line 226 of file CompositeSurface.h.

virtual void Go::CompositeSurface::normal ( Point n,
double  upar,
double  vpar 
) const [inline, virtual]

entries will be the surface tangents along the first and second parameter direction.

The next three entries are the second- and cross derivatives, in the order (du2, dudv, dv2), and similar for even higher derivatives. Evaluates the surface normal for a given parameter pair

Parameters:
n the computed normal will be written to this variable
upar the first parameter
vpar the second parameter

Implements Go::ParamSurface.

Definition at line 249 of file CompositeSurface.h.

References Go::SplineSurface::normal(), and point().

virtual std::vector<boost::shared_ptr<ParamCurve> > Go::CompositeSurface::constParamCurves ( double  parameter,
bool  pardir_is_u 
) const [inline, virtual]

Get the curve(s) obtained by intersecting the surface with one of its constant parameter curves.

For surfaces without holes, this will be the parameter curve itself; for surfaces with interior holes this may be a collection of several, disjoint curves.

Parameters:
parameter parameter value for the constant parameter (either u or v)
pardir_is_u specify whether the moving parameter (as opposed to the constant parameter) is the first ('true') or the second ('false') one.
Returns:
a vector containing shared pointers to the obtained, newly constructed constant-parameter curves.

Implements Go::ParamSurface.

Definition at line 274 of file CompositeSurface.h.

virtual std::vector<boost::shared_ptr<ParamSurface> > Go::CompositeSurface::subSurfaces ( double  from_upar,
double  from_vpar,
double  to_upar,
double  to_vpar,
double  fuzzy = DEFAULT_PARAMETER_EPSILON 
) const [inline, virtual]

Get the surface(s) obtained by cropping the parameter domain of this surface between given values for the first and second parameter.

In general, for surfaces with no interior holes, the result will be one surface; however, for surfaces with interior holes, the result might be several disjoint surfaces.

Parameters:
from_upar lower value for the first parameter in the subdomain
from_vpar lower value for the second parameter in the subdomain
to_upar upper value for the first parameter in the subdomain
to_vpar upper value for the second parameter in the subdomain
fuzzy tolerance used when determining intersection with interior boundaries
Returns:
a vector contained shared pointers to the obtained, newly constructed sub-surfaces.

Implements Go::ParamSurface.

Definition at line 291 of file CompositeSurface.h.

virtual double Go::CompositeSurface::nextSegmentVal ( int  dir,
double  par,
bool  forward,
double  tol 
) const [inline, virtual]

Determine the parameter value of the start of the 'next segment' from a parameter value, along a given parameter direction.

A 'segment' is here defined as a parameter interval in which there will be no discontinuities in derivatives or other artifacts. For spline objects, a segment will typically be the interval between two consecutive, non-coincident knots.

Parameters:
dir the parameter direction in which we search for the next segment (0 or 1)
par the parameter value starting from which we search for the start value of the next segment
forward define whether we shall move forward ('true') or backwards when searching along this parameter
tol tolerance used for determining whether the 'par' is already located on the next segment value
Returns:
the value of the start value of the next segment (or the end of the previous segment, if we are moving backwards...)

Implements Go::ParamSurface.

Definition at line 314 of file CompositeSurface.h.

virtual void Go::CompositeSurface::closestPoint ( const Point pt,
double &  clo_u,
double &  clo_v,
Point clo_pt,
double &  clo_dist,
double  epsilon,
const RectDomain domain_of_interest = NULL,
double *  seed = 0 
) const [inline, virtual]

Iterates to the closest point to pt on the surface.

Parameters:
pt the point to find the closest point to
clo_u u parameter of the closest point
clo_v v parameter of the closest point
clo_pt the geometric position of the closest point
clo_dist the distance between pt and clo_pt
epsilon parameter tolerance (will in any case not be higher than sqrt(machine_precision) x magnitude of solution
domain_of_interest pointer to parameter domain in which to search for closest point. If a NULL pointer is used, the entire surface is searched.
seed pointer to parameter values where iteration starts.

Implements Go::ParamSurface.

Definition at line 329 of file CompositeSurface.h.

virtual void Go::CompositeSurface::closestBoundaryPoint ( const Point pt,
double &  clo_u,
double &  clo_v,
Point clo_pt,
double &  clo_dist,
double  epsilon,
const RectDomain rd = NULL,
double *  seed = 0 
) const [inline, virtual]

Iterates to the closest point to pt on the boundary of the surface.

See also:
closestPoint()

Implements Go::ParamSurface.

Definition at line 342 of file CompositeSurface.h.

virtual void Go::CompositeSurface::getBoundaryInfo ( Point pt1,
Point pt2,
double  epsilon,
SplineCurve *&  cv,
SplineCurve *&  crosscv,
double  knot_tol = 1e-05 
) const [inline, virtual]

Get the boundary curve segment between two points on the boundary, as well as the cross-tangent curve.

If the given points are not positioned on the same boundary (within a certain tolerance), no curves will be created.

Parameters:
pt1 the first point on the boundary, given by the user
pt2 the second point on the boundary, given by the user
epsilon the tolerance used when determining whether the given points are lying on a boundary, and if they do, whether they both lie on the same boundary.
cv upon return, this will point to a newly created curve representing the boundary curve between 'pt1' and 'pt2'. The user assumes ownership of this object and is responsible for its deletion. No curve is created if the given points are not found to lie on the same boundary.
crosscv upon return, this will point to a newly created curve representing the cross-boundary curve between 'pt1' and 'pt2' The user assumes ownership of this object and is responsible for its deletion. The direction is outwards from the surface. No curve is created if the given points are not found to lie on the same boundary.
knot_tol tolerance used when working with the knot-vector, to specify how close a parameter value must be to a knot in order to be considered 'on' the knot.

Implements Go::ParamSurface.

Definition at line 373 of file CompositeSurface.h.

virtual void Go::CompositeSurface::reverseParameterDirection ( bool  direction_is_u  )  [inline, virtual]

Reverses the direction of the basis in input direction.

Parameters:
direction_is_u if 'true', the first parameter direction will be reversed, otherwise, the second parameter direction will be reversed

Implements Go::ParamSurface.

Definition at line 385 of file CompositeSurface.h.

virtual bool Go::CompositeSurface::isDegenerate ( bool &  b,
bool &  r,
bool &  t,
bool &  l,
double  tolerance 
) const [inline, virtual]

Query whether any of the four boundary curves are degenerate (zero length) within a certain tolerance.

In the below, we refer to 'u' as the first parameter and 'v' as the second.

Parameters:
b 'true' upon return of function if the boundary (v = v_min) is degenerate
r 'true' upon return of function if the boundary (v = v_max) is degenerate
t 'true' upon return of function if the boundary (u = u_min) is degenerate
l 'true' upon return of function if the boundary (u = u_max) is degenerate
tolerance boundaries are considered degenerate if their length is shorter than this value, given by the user
Returns:
'true' if at least one boundary curve was found to be degenerate, 'false' otherwise.

Implements Go::ParamSurface.

Definition at line 406 of file CompositeSurface.h.


The documentation for this class was generated from the following file:
Generated on Mon Jun 11 14:48:18 2007 for GoTools Core Library by  doxygen 1.5.1