Go::IntersectionPoint Class Reference
[Intersections]

Object describing a point located on the intersection of two geometrical objects. More...

#include <IntersectionPoint.h>

List of all members.

Public Member Functions

 IntersectionPoint (const ParamObjectInt *obj1, const ParamObjectInt *obj2, const boost::shared_ptr< GeoTol > epsge, const double *obj1_params, const double *obj2_params)
 Constructor.
 IntersectionPoint (const ParamObjectInt *obj1, const ParamObjectInt *obj2, const boost::shared_ptr< IntersectionPoint > ip, int missing_param)
 Constructor.
 ~IntersectionPoint ()
 Destructor.
 IntersectionPoint ()
 Default constructor.
void write (std::ostream &os) const
 Write IntersectionPoint to stream (NB: topological and parent information will be lost).
void read (std::istream &is)
 Read IntersectionPoint from stream (NB: no topological or parent information).
void writeParams (std::ostream &os) const
 Write the parameters of the intersection point to stream.
void writeInfo () const
 Write available info about an IntersectionPoint to standard output.
void replaceParameter (double *param)
 Replace the parameters defining this IntersectionPoint and recalculate internal information (the underlying geometric objects are kept).
Point getPoint () const
 Get average of the IntersectionPoint's position in space as evaluated in the two underlying objects.
Point getPoint1 () const
 Get the IntersectionPoint's position in space as evaluated in the first underlying object.
Point getPoint2 () const
 Get the IntersectionPoint's position in space as evaluated in the second underlying object.
void projectToParamPlanes (const Point &dir, Point &par_1_dir, Point &par_2_dir) const
 This function currently only works (and makes sense) for 3D geometrical objects (not functions).
bool hasUniqueTangentDirection () const
 Check if there is a unique tangent direction for the intersection at the position of this IntersectionPoint.
bool tangentIsOriented () const
 Returns true if this IntersectionPoint is sure about the orientation of its tangent.
double getDist () const
 Distance between the position of the IntersectionPoint as described in the first object and as described in the second object.
const std::vector< double > & getPar () const
 Get a vector containing the IntersectionPoint's parameter values.
double getPar (int idx) const
 Get a specified parameter value of the IntersectionPoint.
const double * getPar1 () const
 Get a pointer to the parameter values in the first object.
const double * getPar2 () const
 Get a pointer to the parameter values in the second object.
Point getPar1Point () const
 Get a Point representing the IntersectionPoint in the parameter domain of the first object.
Point getPar2Point () const
 Get a Point representing the IntersectionPoint in the parameter domain of the second object.
int numParams1 () const
 Get number of parameter values in object number 1.
int numParams2 () const
 Get number of parameter values in object number 2.
Point getTangent (bool second_branch=false) const
 Get the tangent of the intersection at the point.
Point getPar1Dir (bool second_branch=false) const
 Get the parameter direction along intersection in first object at this IntersectionPoint.
Point getPar2Dir (bool second_branch=false) const
 Get the parameter direction along intersection in second object at this IntersectionPoint.
const ParamObjectIntgetObj1 () const
 Get pointer to first object.
const ParamObjectIntgetObj2 () const
 Get pointer to second object.
double startParam (int pardir)
 Get the start value of the parameter interval for the specified parameter.
double endParam (int pardir)
 Get the end value of the parameter interval for the specified parameter.
bool pointIsSingular () const
 Return 'true' if the point was found to be singular, ie.
bool isNearSingular () const
 Return 'true' if the point was found to be near-singular, that is, the tangent calculated in this point is very small.
double parameterTolerance (int pardir)
 Return the tolerance for the parameter in the direction 'pardir'.
void fixTangentOrientation (bool flip)
 If the tangent is not oriented (because of singular intersection), it can be set manually with this command.
void isBoundaryPoint (bool &first, bool &second) const
 The first and second argument are set to 'true' or 'false' according to whether the point is lying on the boundary of respectively the first and second object.
void tangentPointingInwards (bool &first, bool &second, bool &first_along_boundary, bool &second_along_boundary) const
 The first and second argument are set to 'true' or 'false' according to whether the tangent direction in this point is clearly oriented toward the inside of the domain for respectively the ffirst and second surface.
bool isConnectedTo (boost::shared_ptr< IntersectionPoint > p) const
 Check if this point is topologically connected with another IntersectionPoint (i.e.
bool isConnectedTo (const IntersectionPoint *point) const
 Check if this point is topologically connected with another IntersectionPoint (i.e.
boost::shared_ptr< IntersectionLinkconnectTo (IntersectionPoint *const point, LinkType type, boost::shared_ptr< IntersectionLink > model_link=boost::shared_ptr< IntersectionLink >(), int added_parameter_dir=-1)
 This function topologically "connects" this point with another IntersectionPoint.
boost::shared_ptr< IntersectionLinkconnectTo (boost::shared_ptr< IntersectionPoint > point, LinkType type, boost::shared_ptr< IntersectionLink > model_link=boost::shared_ptr< IntersectionLink >(), int added_parameter_dir=-1)
 This function topologically "connects" this point with another IntersectionPoint.
void disconnectFrom (IntersectionPoint *point)
 Topologically disconnect 'this' IntersectionPoint from another IntersectionPoint (which means removing whatever IntersectionLink there might be between them).
int numBranches () const
 Returns how many 'tangential branches' emanates from this point (usually 1, but 2 for branch points, and 0 for isolated- or higher-order points).
IntPtClassification getClassification (const ParamSurface *surf1, const ParamSurface *surf2, int branch_num=0) const
 Classifies an IntersectionPoint according to the direction of the corresponding intersection curve with respect to the parameter domain of two surfaces.
IntPtClassification getClassification (const ParamSurface *par_func, double C, int branch_num=0) const
 Classifies an IntersectionPoint according to the direction of the corresponding intersection curve with respect to the parameter domain of a function.
SingularityType getSingularityType () const
 Get the SingularityType of this IntersectionPoint.
boost::shared_ptr< GeoTolgetTolerance ()
 Get the object containing the tolerances used by this IntersectionPoint.
boost::shared_ptr< const GeoTolgetTolerance () const
 Get the object containing the tolerances used by this IntersectionPoint.
boost::shared_ptr< IntersectionPointparentPoint ()
 Get a shared pointer to the parent point of this IntersectionPoint.
void setParentPoint (boost::shared_ptr< IntersectionPoint > p)
 Set a given IntersectionPoint to be the parent point of this IntersectionPoint.
bool hasParentPoint ()
void flipObjects ()
 Flip the two intersecting objects (useful sometimes for self-intersections, should be avoided otherwise).
double getInfluenceArea (int dir, bool forward, bool first_outside, double aeps=0.0) const
 Returns the parameter value corresponding to the influence area of the intersection point in a specified direction and orientation.
int inInfluenceArea (int pardir, double par, bool first_outside) const
 Returns 0 if the given parameter value par was not in the point's influence area for the point's parameter pardir.
void shareInfluenceAreaWith (boost::shared_ptr< IntersectionPoint > other_pt, int pardir)
 This function is mostly for optimizing reasons.
bool inInfluenceAreaBracket (int pardir, double parval)
 This function is not properly defined at the moment.
boost::shared_ptr< IntersectionLinkgetIntersectionLink (const IntersectionPoint *point)
 Return the intersection link connecting this point with point.
void getNeighbours (std::vector< IntersectionPoint * > &pnts) const
 Get a vector containing pointers ot all IntersectionPoints topologically connected with this IntersectionPoint.
void getNeighbourLinks (std::vector< boost::shared_ptr< IntersectionLink > > &links) const
 Get a vector containing all the IntersectionLinks that defines connections from this IntersectionPoint.
int numNeighbours () const
 Query the number of IntersectionPoints ('neighbours') that are connected to this IntersectionPoint via an IntersectionLink.
template<class bool_iterator>
void setDifferentiateFromLeft (bool_iterator it) const
 it should point to a p-array of bool, where p is the total number of parameters for this IntersectionPoint.
bool differentiatesFromLeft (int pardir) const
 Returns whether the internal state for parameter 'pardir' is set so that it differentiates from left.
int hasIsoLinks (int *const iso_par_dirs) const
 Returns the number of parameter directions for which this point is connected with links that are isoparametric.
int commonIsoLinks (int *const iso_par_dirs) const
 Returns the number of parameter directions for which all IntersectionLink s of this IntersectionPoint are isoparametric.
bool containsG2Discontinuity () const
 Check if there is a G2-discontinuity for one of the parameters at this IntersectionPoint.
bool isDegenerate () const
 Check if the point lies on a degenerate edge (or other degenerate part) of the surface.
bool isSamePoint (const IntersectionPoint *point) const
 Check if the given intersection point represents the same point as 'this' point within the tolerance.
bool checkIntersectionPoint (IntPtInfo &int_pt_info) const
 Check if the intersection point is OK, and get some info about the point.
bool isInDomain (double *frompar, double *topar) const
 Check if the point is in the domain specified by a parameter box.

Static Public Attributes

static const double tangent_tol
 Global tolerance for tangent length (considered singular if length is less than this value.


Detailed Description

Object describing a point located on the intersection of two geometrical objects.

Definition at line 61 of file IntersectionPoint.h.


Constructor & Destructor Documentation

Go::IntersectionPoint::IntersectionPoint ( const ParamObjectInt obj1,
const ParamObjectInt obj2,
const boost::shared_ptr< GeoTol epsge,
const double *  obj1_params,
const double *  obj2_params 
)

Constructor.

This constructor specifies an IntersectionPoint from all its defining components.

Parameters:
obj1 the first of the two intersecting objects on which the IntersectionPoint lies.
obj2 the second of the two intersecting objects on which the IntersectionPoint lies.
epsge an object defining various tolerances
obj_1_params parameters of the intersection point for the first object
obj_2_params parameters of the intersection point for the second object

Go::IntersectionPoint::IntersectionPoint ( const ParamObjectInt obj1,
const ParamObjectInt obj2,
const boost::shared_ptr< IntersectionPoint ip,
int  missing_param 
)

Constructor.

This constructor is for creating an IntersectionPoint that is a replica of an existing one, but where one of the objects has one parameter less (i.e. is 'picked' from one of the objects of the existing IntersectionPoint by fixing one of its parameters).

Parameters:
obj1 the first of the two intersecting objects on which the IntersectionPoint lies. It is either the same as the first object defining the point ip, or picked from it (one parameter less).
obj2 the second of the two intersecting objects on which the IntersectionPoint lies. It is either the same as the second object defining the point ip, or picked from it (one parameter less).
ip The already-existing IntersectionPoint that 'this' IntersectionPoint will represent.
missing_param indicates which parameter of the point ip is 'missing' for 'this' IntersectionPoint. (Parameters are numbered from 0 and up to the total number of parameters in 'obj1' and 'obj2').


Member Function Documentation

void Go::IntersectionPoint::write ( std::ostream &  os  )  const

Write IntersectionPoint to stream (NB: topological and parent information will be lost).

Parameters:
os output stream

void Go::IntersectionPoint::read ( std::istream &  is  ) 

Read IntersectionPoint from stream (NB: no topological or parent information).

Parameters:
is input stream

void Go::IntersectionPoint::writeParams ( std::ostream &  os  )  const

Write the parameters of the intersection point to stream.

Parameters:
os output stream

Referenced by Go::IntersectionLink::writeInfo().

void Go::IntersectionPoint::writeInfo (  )  const

Write available info about an IntersectionPoint to standard output.

Makes use of the struct IntPtInfo.

void Go::IntersectionPoint::replaceParameter ( double *  param  ) 

Replace the parameters defining this IntersectionPoint and recalculate internal information (the underlying geometric objects are kept).

Parameters:
param pointer to an array of double s, defining the new values for the point's parameters. The array should of course have length equal to the total number of parameters defining this IntersectionPoint.

Point Go::IntersectionPoint::getPoint (  )  const

Get average of the IntersectionPoint's position in space as evaluated in the two underlying objects.

Returns:
the position of the IntersectionPoint in space

Referenced by Go::IntersectionLink::crosses(), Go::determine_seed(), and Go::IntersectionLink::writeInfo().

Point Go::IntersectionPoint::getPoint1 (  )  const [inline]

Get the IntersectionPoint's position in space as evaluated in the first underlying object.

Returns:
the position of the IntersectionPoint in space

Definition at line 149 of file IntersectionPoint.h.

Referenced by Go::IntersectionLink::dumpToStream().

Point Go::IntersectionPoint::getPoint2 (  )  const [inline]

Get the IntersectionPoint's position in space as evaluated in the second underlying object.

Returns:
the position of the IntersectionPoint in space

Definition at line 155 of file IntersectionPoint.h.

Referenced by Go::IntersectionLink::dumpToStream().

void Go::IntersectionPoint::projectToParamPlanes ( const Point &  dir,
Point &  par_1_dir,
Point &  par_2_dir 
) const

This function currently only works (and makes sense) for 3D geometrical objects (not functions).

Given a vector 'dir', it projects this vector onto the two objects at the IntersectionPoint, and calculates this direction in the two parameter spaces. These normalized directions are returned in 'par_1_dir' and 'par_2_dir'.

Parameters:
dir the direction vector that the user wants to project on the objects
Return values:
par_1_dir the direction of the projected vector in the parameter space of the first object.
par_2_dir the direction of the projected vector in the parameter space of the second object.

bool Go::IntersectionPoint::hasUniqueTangentDirection (  )  const

Check if there is a unique tangent direction for the intersection at the position of this IntersectionPoint.

This is the case for ORDINARY_POINTs and TANGENTIAL_POINTs, and false in all other cases (see SingularityType). See also tangentIsOriented().

Returns:
'true' if the IntersectionPoint has a unique tangent direction (not necessarily uniquely oriented). 'false' otherwise.

bool Go::IntersectionPoint::tangentIsOriented (  )  const

Returns true if this IntersectionPoint is sure about the orientation of its tangent.

It is sure about the orientation if the intersection is transversal, or if the intersection is singular and the orientation has been set manually through the fixTangentOrientation() command. See also hasUniqueTangentDirection().

Returns:
'true' if the tangent orientation is clear (a prerequisite is of course that the tangent direction is clear). 'false' otherwise.

double Go::IntersectionPoint::getDist (  )  const [inline]

Distance between the position of the IntersectionPoint as described in the first object and as described in the second object.

Returns:
the distance between the two points describing the IntersectionPoint in each of the objects.

Definition at line 199 of file IntersectionPoint.h.

double Go::IntersectionPoint::getPar ( int  idx  )  const [inline]

Get a specified parameter value of the IntersectionPoint.

Parameters:
idx the number of ther parameter for which we seek the value
Returns:
the specified parameter value

Definition at line 211 of file IntersectionPoint.h.

const double* Go::IntersectionPoint::getPar1 (  )  const

Get a pointer to the parameter values in the first object.

Returns:
a pointer to the array where the parameter values for the first object are (consecutively) stored.

const double* Go::IntersectionPoint::getPar2 (  )  const

Get a pointer to the parameter values in the second object.

Returns:
a pointer to the array where the parameter values for the second object are (consecutively) stored.

Point Go::IntersectionPoint::getTangent ( bool  second_branch = false  )  const

Get the tangent of the intersection at the point.

If the point is a branch point (several intersection curves meet at this point), then the user has to specify the branch that she wants the tangent to.

Parameters:
second_branch usually set to 'false' (default). If the IntersectionPoint lies at a branchpoint, then the user can set this parameter to 'true' in order to get the tangent of the second of the two branches that supposedly meet in this point. However, setting this parameter to 'true' will cause an error if the IntersectionPoint is not a branch point.
Returns:
the tangent of intersection curve at this point.

Referenced by Go::IntersectionLink::writeInfo().

Point Go::IntersectionPoint::getPar1Dir ( bool  second_branch = false  )  const

Get the parameter direction along intersection in first object at this IntersectionPoint.

If this point is a branch point (several intersection curves meet at this point), then the user has to specify the branch that she wants the tangent to.

Parameters:
second_branch usually set to 'false' (default). If the IntersectionPoint lies at a branchpoint, then the user can set this parameter to 'true' in order to get the parameter direction for the second of the two branches that supposedly meet in this point. However, setting this parameter to 'true' will cause an error if the IntersectionPoint is not a branch point.
Returns:
the parameter direction along the intersection in the first object at this point.

Point Go::IntersectionPoint::getPar2Dir ( bool  second_branch = false  )  const

Get the parameter direction along intersection in second object at this IntersectionPoint.

If this point is a branch point (several intersection curves meet at this point), then the user has to specify the branch that she wants the tangent to.

Parameters:
second_branch usually set to 'false' (default). If the IntersectionPoint lies at a branchpoint, then the user can set this parameter to 'true' in order to get the parameter direction for the second of the two branches that supposedly meet in this point. However, setting this parameter to 'true' will cause an error if the IntersectionPoint is not a branch point.
Returns:
the parameter direction along the intersection in the second object at this point.

double Go::IntersectionPoint::startParam ( int  pardir  ) 

Get the start value of the parameter interval for the specified parameter.

Parameters:
pardir the parameter for which we seek the start value.
Returns:
the start value of the parameter interval for the parameter 'pardir'.

double Go::IntersectionPoint::endParam ( int  pardir  ) 

Get the end value of the parameter interval for the specified parameter.

Parameters:
pardir the parameter for which we seek the end value.
Returns:
the end value of the parameter interval for the parameter 'pardir'.

bool Go::IntersectionPoint::pointIsSingular (  )  const [inline]

Return 'true' if the point was found to be singular, ie.

not on a normal, transversal intersection (see SingularityType).

Definition at line 307 of file IntersectionPoint.h.

References getSingularityType(), and Go::ORDINARY_POINT.

double Go::IntersectionPoint::parameterTolerance ( int  pardir  ) 

Return the tolerance for the parameter in the direction 'pardir'.

This is equal to GeoTol::rel_par_res_ multiplied by the span of the parameter.

Parameters:
pardir the parameter for which we want to find the parameter tolerance
Returns:
the tolerance for the specified parameter.

void Go::IntersectionPoint::fixTangentOrientation ( bool  flip  ) 

If the tangent is not oriented (because of singular intersection), it can be set manually with this command.

If the argument is "true", the tangent's orientation will be flipped. In the opposite case, it will be kept as it is. Subsequent calls to the tangentIsOriented() function will now report that the tangent is oriented. Not to be called for an ORDINARY_POINT (which should have been handled already). See SingularityType for a definition of what ORDINARY_POINT means.

Parameters:
flip if 'true', then the tangent's orientation will be flipped, otherwise it will be kept as it is. In any case, the IntersectionPoint will now consider the orientation of its tangent to be 'fixed'.

void Go::IntersectionPoint::isBoundaryPoint ( bool &  first,
bool &  second 
) const

The first and second argument are set to 'true' or 'false' according to whether the point is lying on the boundary of respectively the first and second object.

Return values:
first 'true' if this IntersectionPoint is located on the boundary of the first object, 'false' otherwise.
second 'true' if this IntersectionPoint is located on the boundary of the second object, 'false' otherwise.

void Go::IntersectionPoint::tangentPointingInwards ( bool &  first,
bool &  second,
bool &  first_along_boundary,
bool &  second_along_boundary 
) const

The first and second argument are set to 'true' or 'false' according to whether the tangent direction in this point is clearly oriented toward the inside of the domain for respectively the ffirst and second surface.

It can only be pointing outwards if the point is lying on the boundary. If the point is on the boundary and its tangent is close to parallel with the boundary, 'first_along_boundary' and/or 'second_along_boundary' will be set to true, otherwise they are false. Of course, points whose tangents are directed along the boundary will return 'first' and/or 'second' false.

Return values:
first 'true' if the tangent direction of the intersection at this point is clearly oriented toward the inside of the domain of the first object. 'false' if not.
second 'true' if the tangent direction of the intersection at this point is clearly oriented toward the inside of the domain of the second object. 'false' if not.
first_along_boundary 'true' if the point is on the boundary of the first object, and with a tangent that is close to parallel with the boundary. 'false' otherwise.
second_along_boundary 'true' if the point is on the boundary of the second object, and with at tangent that is close to parallel with the boundary. 'false' otherwise.

bool Go::IntersectionPoint::isConnectedTo ( boost::shared_ptr< IntersectionPoint p  )  const [inline]

Check if this point is topologically connected with another IntersectionPoint (i.e.

that there is an IntersectionLink between them).

Parameters:
p a shared pointer to the point we are checking against.
Returns:
'true' if there is an IntersectionLink between 'this' point and p. 'false' otherwise.

Definition at line 381 of file IntersectionPoint.h.

bool Go::IntersectionPoint::isConnectedTo ( const IntersectionPoint point  )  const

Check if this point is topologically connected with another IntersectionPoint (i.e.

that there is an IntersectionLink between them).

Parameters:
point a pointer to the point we are checking against.
Returns:
'true' if there is an IntersectionLink between 'this' point and point. 'false' otherwise.

boost::shared_ptr<IntersectionLink> Go::IntersectionPoint::connectTo ( IntersectionPoint *const   point,
LinkType  type,
boost::shared_ptr< IntersectionLink model_link = boost::shared_ptr< IntersectionLink >(),
int  added_parameter_dir = -1 
)

This function topologically "connects" this point with another IntersectionPoint.

It generates a new IntersectionLink combining these points. This IntersectionLink can inherit the meta-information from model_link. This is typically useful when an IntersectionPoint is "inserted" between two already-connected points, and the two new links should contain the same information as the older, split-up link. Another example where information from model_link needs to be copied is when parents of two connected points needs to be connected. In that case, it is important that we know which parameter direction has been introduced when moving to the parent, so that we can "shift" the meta-information pertaining to individiual parameters accordingly. If no new parameter information has been introduced, added_parameter_dir should be left at its default value of -1.

Parameters:
point the IntersectionPoint we want to connect to this point
type the type of the link in terms of a LinkType
model_link if this parameter is specified, the information associated with model_link will be copied by the newly created IntersectionLink.
added_parameter_dir relevant parameter when model_link contains one parameter direction less than the new IntersectionLink does. In this case, added_parameter_dir will specify the index of the parameter that is lacking.
Returns:
shared pointer to the generated link

Referenced by connectTo().

boost::shared_ptr<IntersectionLink> Go::IntersectionPoint::connectTo ( boost::shared_ptr< IntersectionPoint point,
LinkType  type,
boost::shared_ptr< IntersectionLink model_link = boost::shared_ptr<IntersectionLink>(),
int  added_parameter_dir = -1 
) [inline]

This function topologically "connects" this point with another IntersectionPoint.

It generates a new IntersectionLink combining these points. This IntersectionLink can inherit the meta-information from model_link. This is typically useful when an IntersectionPoint is "inserted" between two already-connected points, and the two new links should contain the same information as the older, split-up link. Another example where information from model_link needs to be copied is when parents of two connected points needs to be connected. In that case, it is important that we know which parameter direction has been introduced when moving to the parent, so that we can "shift" the meta-information pertaining to individiual parameters accordingly. If no new parameter information has been introduced, added_parameter_dir should be left at its default value of -1.

Parameters:
point the IntersectionPoint we want to connect to this point
type the type of the link in terms of a LinkType
model_link if this parameter is specified, the information associated with model_link will be copied by the newly created IntersectionLink.
added_parameter_dir relevant parameter when model_link contains one parameter direction less than the new IntersectionLink does. In this case, added_parameter_dir will specify the index of the parameter that is lacking.
Returns:
shared pointer to the generated link

Definition at line 453 of file IntersectionPoint.h.

References connectTo().

void Go::IntersectionPoint::disconnectFrom ( IntersectionPoint point  ) 

Topologically disconnect 'this' IntersectionPoint from another IntersectionPoint (which means removing whatever IntersectionLink there might be between them).

Parameters:
point the IntersectionPoint we want to disconnect from 'this' IntersectionPoint.

int Go::IntersectionPoint::numBranches (  )  const

Returns how many 'tangential branches' emanates from this point (usually 1, but 2 for branch points, and 0 for isolated- or higher-order points).

See SingularityType for a classification of IntersectionPoint s.

IntPtClassification Go::IntersectionPoint::getClassification ( const ParamSurface *  surf1,
const ParamSurface *  surf2,
int  branch_num = 0 
) const

Classifies an IntersectionPoint according to the direction of the corresponding intersection curve with respect to the parameter domain of two surfaces.

branch_num indicates which tangential branch to use (usually there's just one (branch_num should be 0), but for branchpoints there are two (branch_num can be 0 or 1).

Parameters:
surf1 the first surface
surf2 the second surface
branch_num indicates which tangential branch to use
Returns:
the classification of this IntersectionPoint according to the domain of the given surfaces. See also IntPtClassification.

IntPtClassification Go::IntersectionPoint::getClassification ( const ParamSurface *  par_func,
double  C,
int  branch_num = 0 
) const

Classifies an IntersectionPoint according to the direction of the corresponding intersection curve with respect to the parameter domain of a function.

branch_num indicates which tangential branch to use (usually there's just one (branch_num should be 0), but for branchpoints there are two (branch_num can be 0 or 1).

Parameters:
par_func the function, expressed as a 1D ParamSurface
C the iso-value that defines the intersection on this function.
branch_num indicates which tangential branch to use
Returns:
the classification of this IntersectionPoint according to the domain of the given function. See also IntPtClassification.

boost::shared_ptr<IntersectionPoint> Go::IntersectionPoint::parentPoint (  )  [inline]

Get a shared pointer to the parent point of this IntersectionPoint.

If it has no parent, the shared pointer will be a null-pointer.

Definition at line 523 of file IntersectionPoint.h.

void Go::IntersectionPoint::setParentPoint ( boost::shared_ptr< IntersectionPoint p  )  [inline]

Set a given IntersectionPoint to be the parent point of this IntersectionPoint.

Parameters:
p the point that shall be the parent point of this IntersectionPoint.

Definition at line 530 of file IntersectionPoint.h.

double Go::IntersectionPoint::getInfluenceArea ( int  dir,
bool  forward,
bool  first_outside,
double  aeps = 0.0 
) const

Returns the parameter value corresponding to the influence area of the intersection point in a specified direction and orientation.

Since the bounds of the influence area are bracketed, we do not have the exact value of its limits. If 'first_outside' is 'true', we will return the first parameter value detected outside the influence area. Otherwise, we will return the last parameter detected inside the influence area.

Parameters:
dir the parameter direction for which we seek the influence area.
forward 'true' if we want to locate the upper end of the point's influence area, 'false' if we want to locate the lower end.
first_outside 'true' if we want the returned value to be the first parameter value outside the influence area that was found by the function. 'false' if we seek the last detected value inside the influence area.
Returns:
a value that (according to the function arguments) either represents the last found parameter value inside or first found parameter value outside the influence area of this IntersectionPoint along the specified parameter direction.

int Go::IntersectionPoint::inInfluenceArea ( int  pardir,
double  par,
bool  first_outside 
) const

Returns 0 if the given parameter value par was not in the point's influence area for the point's parameter pardir.

Returns 1 if it is inside the point's influence area, but not exactly on the point. Returns 2 if it is exactly on the point. Since the bounds of the influence area are bracketed, we do not have the exact value of its limits. If first_outside is 'true', we will check against the first parameter value detected outside the influence area. Otherwise, we will check against the last parameter detected inside the influence area.

Parameters:
pardir the concerned parameter directon
par the concerned parameter value
first_outside specify whether we want to check against the first detected value outside the influence area ('true'), or the last detected value inside it ('false').
Returns:
0, 1 or 2, according to the above description.

void Go::IntersectionPoint::shareInfluenceAreaWith ( boost::shared_ptr< IntersectionPoint other_pt,
int  pardir 
)

This function is mostly for optimizing reasons.

This point is supposed to lie inside the influence area of other_pt, and by this function, this influence interval is split up and shared between this point and the other point. By deducing this interval directly from other_pt, we avoid having to march it out again. The concerned parameter direction is pardir.

Parameters:
other_pt refers to the IntersectionPoint that we assume share influence area with this IntersectionPoint.
pardir the concerned parameter directon

bool Go::IntersectionPoint::inInfluenceAreaBracket ( int  pardir,
double  parval 
) [inline]

This function is not properly defined at the moment.

Parameters:
pardir the concerned parameter directon
parval the concerned parameter value

Definition at line 605 of file IntersectionPoint.h.

boost::shared_ptr<IntersectionLink> Go::IntersectionPoint::getIntersectionLink ( const IntersectionPoint point  ) 

Return the intersection link connecting this point with point.

If no such link exists, a null pointer will be returned.

Parameters:
point the point for which we seek the IntersectionLink to this point.
Returns:
the IntersectionLink in question.

void Go::IntersectionPoint::getNeighbours ( std::vector< IntersectionPoint * > &  pnts  )  const

Get a vector containing pointers ot all IntersectionPoints topologically connected with this IntersectionPoint.

IntersectionPoints are topologically connected if they share an IntersectionLink.

Return values:
pnts upon function return, this will be the vector sought for.

Referenced by Go::add_reachables_from().

void Go::IntersectionPoint::getNeighbourLinks ( std::vector< boost::shared_ptr< IntersectionLink > > &  links  )  const

Get a vector containing all the IntersectionLinks that defines connections from this IntersectionPoint.

Return values:
links upon function return, this will be the vector sought for.

template<class bool_iterator>
void Go::IntersectionPoint::setDifferentiateFromLeft ( bool_iterator  it  )  const [inline]

it should point to a p-array of bool, where p is the total number of parameters for this IntersectionPoint.

The value at it[i] determines whether second-order differentiation for the parameter i should be carried out from the left, rather than from the right (default). This sets an internal state variable that will not be changed until the next call of setDifferentiateFromLeft(). (The reason a template was used here is to be able to use iterators to vectors of bool, which are special in that they cannot be accessed in the usual pointer way).

Parameters:
it an iterator (pointer, etc.) to the aforementioned array of bool.

Definition at line 650 of file IntersectionPoint.h.

References numParams1(), and numParams2().

bool Go::IntersectionPoint::differentiatesFromLeft ( int  pardir  )  const [inline]

Returns whether the internal state for parameter 'pardir' is set so that it differentiates from left.

Parameters:
pardir the concerned parameter direction
Returns:
'true' if differentiation is set to be carried out 'from the left' for this parameter, 'false' otherwise.

Definition at line 666 of file IntersectionPoint.h.

References numParams1(), and numParams2().

int Go::IntersectionPoint::hasIsoLinks ( int *const  iso_par_dirs  )  const

Returns the number of parameter directions for which this point is connected with links that are isoparametric.

The indices of the isoparametric parameter directions are written to an array pointed to by 'iso_par_dirs' (allocated by the user).

Parameters:
iso_par_dirs pointer to the array where the indices will be written.
Returns:
the number of parameter directions for which this point is connected with links that are isoparametric.

int Go::IntersectionPoint::commonIsoLinks ( int *const  iso_par_dirs  )  const

Returns the number of parameter directions for which all IntersectionLink s of this IntersectionPoint are isoparametric.

The indices of these parameter directions are written to the array pointed to by 'iso_par_dirs' (allocated by the user).

Parameters:
iso_par_dirs pointer to the array where the indices will be written.
Returns:
the number of parameter directions for which all IntersectionLink s of this IntersectionPoint are isoparametric.

bool Go::IntersectionPoint::containsG2Discontinuity (  )  const [inline]

Check if there is a G2-discontinuity for one of the parameters at this IntersectionPoint.

Returns:
'true' if at least one G2-discontinuity was found, 'false' otherwise.

Definition at line 699 of file IntersectionPoint.h.

bool Go::IntersectionPoint::isDegenerate (  )  const

Check if the point lies on a degenerate edge (or other degenerate part) of the surface.

Returns:
'true' if degenerate, 'false' otherwise.

bool Go::IntersectionPoint::isSamePoint ( const IntersectionPoint point  )  const

Check if the given intersection point represents the same point as 'this' point within the tolerance.

Parameters:
point pointer to the intersection point we wish to test on
Return values:
'true' if the points are the same, 'false' otherwise

bool Go::IntersectionPoint::checkIntersectionPoint ( IntPtInfo int_pt_info  )  const

Check if the intersection point is OK, and get some info about the point.

Parameters:
int_pt_info struct of type IntPtInfo with info about the point. Indicates if the point is ok, the number of neighbours, the singularity type, and the location of the point is the parameter domains of the objects
Returns:
'true' if the intersection points is OK, 'false' otherwise

bool Go::IntersectionPoint::isInDomain ( double *  frompar,
double *  topar 
) const

Check if the point is in the domain specified by a parameter box.

Parameters:
frompar the array of parameters defining the lower corner of the box in question.
topar the array of parameters defining the upper corner of the box in question.
Return values:
\a true if inside domain, false otherwise.


The documentation for this class was generated from the following file:
Generated on Fri Nov 23 12:24:34 2007 for GoTools Intersections Library by  doxygen 1.5.1