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

A 2D parameter domain represented by its boundaries. More...

#include <CurveBoundedDomain.h>

Inheritance diagram for Go::CurveBoundedDomain:

Go::Domain List of all members.

Public Member Functions

 CurveBoundedDomain ()
 Constructor generating an empty domain.
 CurveBoundedDomain (vector< shared_ptr< CurveLoop > > loops)
 Constructor generating a domain specified by one or more 2D CurveLoops.
 CurveBoundedDomain (shared_ptr< CurveLoop > ccw_loop)
 Constructor generating a (connected) domain specified by a CurveLoop.
virtual ~CurveBoundedDomain ()
 Virtual destructor, enables safe inheritance.
virtual bool isInDomain (const Array< double, 2 > &point, double tolerance) const
 Query whether a given parameter pair is inside the domain or not.
virtual bool isOnBoundary (const Array< double, 2 > &point, double tolerance) const
 check whether a given parameter pair is located on the domain boundary
virtual void closestInDomain (const Array< double, 2 > &point, Array< double, 2 > &clo_pt, double tolerance) const
 Find the parameter pair contained in the domain that is closest (using Euclidean distance in R^2) to a given parameter pair.
virtual void closestOnBoundary (const Array< double, 2 > &point, Array< double, 2 > &clo_bd_pt, double tolerance) const
 Find the parameter pair on the boundary of the domain that is closest (using Euclidean distance in R^2) to a given parameter pair.
RectDomain containingDomain () const
 Get a rectangular domain that is guaranteed to contain the CurveBoundedDomain.
void clipWithDomain (int pardir, double parval, double tolerance, shared_ptr< SplineSurface > srf, vector< shared_ptr< CurveOnSurface > > &trim_pieces) const
 On the 2D parameter plane, consider the (iso)curve defined by fixing one of the parameters at a certain value.
void findPcurveInsideSegments (const SplineCurve &curve, double tolerance, vector< double > &params_start_end_interval) const
 Given a curve in the 2D parameter plane, determine those parts of the curve that are contained inside 'this' CurveBoundedDomain.

Detailed Description

A 2D parameter domain represented by its boundaries.

The domain is not necessarily connected.

Definition at line 54 of file CurveBoundedDomain.h.


Constructor & Destructor Documentation

Go::CurveBoundedDomain::CurveBoundedDomain ( vector< shared_ptr< CurveLoop > >  loops  ) 

Constructor generating a domain specified by one or more 2D CurveLoops.

Parameters:
loops The loops defining the domain to be created. The domain is defined as the union of the interior of these loops. The CurveLoop s must contain either 2D ParamCurve objects XD CurveOnSurface objects.

Go::CurveBoundedDomain::CurveBoundedDomain ( shared_ptr< CurveLoop ccw_loop  ) 

Constructor generating a (connected) domain specified by a CurveLoop.

Parameters:
ccw_loop the curve loop specifying the domain. The domain will represent the interior of this (supposedly counterclockwise loop).


Member Function Documentation

virtual bool Go::CurveBoundedDomain::isInDomain ( const Array< double, 2 > &  point,
double  tolerance 
) const [virtual]

Query whether a given parameter pair is inside the domain or not.

Parameters:
point array containing the parameter pair
tolerance the tolerance to be used. In order to be considered 'inside', the point must be located inside one of the defining CurveLoop s, as well as being at a distance more than 'tolerance' from any point on that CurveLoop.
Returns:
'true' if the point is found to be inside the domain, 'false' otherwise.

Implements Go::Domain.

virtual bool Go::CurveBoundedDomain::isOnBoundary ( const Array< double, 2 > &  point,
double  tolerance 
) const [virtual]

check whether a given parameter pair is located on the domain boundary

Parameters:
point array containing the parameter pair
tolerance the tolerance used. (how 'far' from the boundary our parameter pair can be and still be considered 'on' the boundary.
Returns:
'true' if the parameter pair is considered to be on the boundary, 'false' otherwise.

Implements Go::Domain.

virtual void Go::CurveBoundedDomain::closestInDomain ( const Array< double, 2 > &  point,
Array< double, 2 > &  clo_pt,
double  tolerance 
) const [virtual]

Find the parameter pair contained in the domain that is closest (using Euclidean distance in R^2) to a given parameter pair.

If the given parameter pair is already in the domain, then the answer is obviously that parameter pair

Parameters:
point the (u,v) parameter pair that we want to find the closest parameter pair to inside the CurveBoundedDomain.
Return values:
clo_pt the resulting closest parameter point.
Parameters:
tolerance the tolerance used in defining whether the given point is already inside the domain.

Implements Go::Domain.

virtual void Go::CurveBoundedDomain::closestOnBoundary ( const Array< double, 2 > &  point,
Array< double, 2 > &  clo_bd_pt,
double  tolerance 
) const [virtual]

Find the parameter pair on the boundary of the domain that is closest (using Euclidean distance in R^2) to a given parameter pair.

If the point is already considered on the boundary, then the answer is obviously the same point.

Parameters:
point the (u,v) parameter pair that we want to find to closest parameter pair to on the CurveBoundedDomain border.
Return values:
clo_bd_pt the closest point on the border.
Parameters:
tolerance the tolerance used in defining whether the given point is

Implements Go::Domain.

RectDomain Go::CurveBoundedDomain::containingDomain (  )  const

Get a rectangular domain that is guaranteed to contain the CurveBoundedDomain.

Returns:
a RectDomain that contains this CurveBoundedDomain. If the loops defining the CurveBoundedDomain are specified by 2D parameter curves, the RectDomain will be the smallest rectangular domain containing all the control points of the boundary curves. In the opposite case, the loops are assumed to be CurveOnSurface s, and the returned RectDomain will be that of the underlying surface.

void Go::CurveBoundedDomain::clipWithDomain ( int  pardir,
double  parval,
double  tolerance,
shared_ptr< SplineSurface srf,
vector< shared_ptr< CurveOnSurface > > &  trim_pieces 
) const

On the 2D parameter plane, consider the (iso)curve defined by fixing one of the parameters at a certain value.

Now, pick those parts of this curve that are covered by 'this' CurveBoundedDomain. Then, lift these (parameter) curves into 3D space by means of a SplineSurface. This function will return the CurveOnSurface s defined by this procedure.

Parameters:
pardir this parameter specifies which of the two parameter directions that should be 'free' (the other will be fixed). 'pardir' should take the value of '1' or '2'. A value of '1' means that the first parameter direction will be free, while '2' means that the second parameter direction will be free.
parval the parameter value of the fixed parameter
tolerance the tolerance when determining which parts of the isoparameter curve are located inside 'this' CurveBoundedDomain.
srf The surface used to 'lift' the resulting isoparameter curve intervals
Return values:
trim_pieces vector containing the resulting CurveOnSurface s.

void Go::CurveBoundedDomain::findPcurveInsideSegments ( const SplineCurve curve,
double  tolerance,
vector< double > &  params_start_end_interval 
) const

Given a curve in the 2D parameter plane, determine those parts of the curve that are contained inside 'this' CurveBoundedDomain.

Parameters:
curve this is the 2D curve that we want to examine
tolerance this is the tolerance used when determining which parts of of 'curve' are inside 'this' CurveBoundedDomain.
Return values:
params_start_end_interval a vector containing the start- and end parameters of the curve segments that were found to be inside this domain. An even indexed entry marks the start parameter of a curve segment, while the following, odd indexed entry marks the end parameter of the same curve segment.


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