#include <CurveBoundedDomain.h>
Inheritance diagram for Go::CurveBoundedDomain:
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 > ¶ms_start_end_interval) const |
Given a curve in the 2D parameter plane, determine those parts of the curve that are contained inside 'this' CurveBoundedDomain. |
The domain is not necessarily connected.
Definition at line 54 of file CurveBoundedDomain.h.
Go::CurveBoundedDomain::CurveBoundedDomain | ( | vector< shared_ptr< CurveLoop > > | loops | ) |
Constructor generating a domain specified by one or more 2D CurveLoops.
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.
ccw_loop | the curve loop specifying the domain. The domain will represent the interior of this (supposedly counterclockwise loop). |
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.
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. |
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
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. |
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
point | the (u,v) parameter pair that we want to find the closest parameter pair to inside the CurveBoundedDomain. |
clo_pt | the resulting closest parameter point. |
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.
point | the (u,v) parameter pair that we want to find to closest parameter pair to on the CurveBoundedDomain border. |
clo_bd_pt | the closest point on the border. |
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.
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.
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 |
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.
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. |
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. |