Home

bounded_arc Class Reference
[curves]

Defines a bounded_arc as a subtype of a bounded_curve. More...

#include <bnd_arc.hxx>

Inheritance diagram for bounded_arc:

Inheritance graph
[legend]
Collaboration diagram for bounded_arc:

Collaboration graph
[legend]

List of all members.

Public Member Functions

int acis_type () const
 Returns the type of underlying curve for this bounded_curve.
double adjust_parameter (double t) const
 Adjusts a parameter value so that it is within the principal range of a periodic curve.
virtual double approx_error () const
 Returns the distance error associated with approximate evaluations.
SPAbox bound () const
 Computes a bounding box around this bounded_curve.
 bounded_arc (const SPAposition &pt1, const SPAposition &pt2, const SPAunit_vector &normal, logical full)
 Constructs a circular bounded_arc, given two points on the arc's diagonal and its plane normal.
 bounded_arc (const SPAposition &center, const SPAposition &pt1, const SPAposition &pt2, const SPAunit_vector &normal)
 Constructs a circular bounded_arc, given its center, two points on the arc, and its plane normal.
 bounded_arc (const SPAposition &pt1, const SPAposition &pt2, const SPAposition &pt3, logical full)
 Constructs a circular bounded_arc, given three points on the arc and the logical indicating full or partial.
 bounded_arc (const SPAposition &center, const SPAunit_vector &normal, const SPAvector &majax, double t0, double t1, double ratio=1.0)
 Constructs a bounded_arc that is a full or partial ellipse, given its center, major axis, plane normal, start and end angles, and radius ratio.
 bounded_arc (const SPAposition &center, double radius, const SPAunit_vector &normal)
 Constructs a bounded_arc that is a full circle, given its center, radius, and plane normal.
 bounded_arc (EDGE *edge, const SPAtransf *transf)
 Constructs a bounded_arc from an EDGE and a transform.
 bounded_arc (const bounded_arc &b_arc)
 Constructs a bounded_arc from another one (copy constructor).
 bounded_arc ()
 Constructs a bounded_arc (default constructor).
virtual logical change_end_pt (const SPAposition &end_pos)
 Changes the end position of this bounded_arc.
virtual logical change_start_pt (const SPAposition &start_pos)
 Changes the start position of this bounded_arc.
virtual logical closed () const
 Indicates if this bounded_curve is closed.
virtual bounded_curvecopy (const SPAtransf *transf=NULL) const
 Creates a transformed copy of this bounded_arc.
virtual void debug (const char *lead, FILE *fp=debug_file_ptr) const
 Writes the debug output for this bounded_curve.
virtual void eval (double param, SPAposition *pos, SPAvector *first_deriv=NULL, SPAvector *second_deriv=NULL, logical eval_repeated=FALSE, logical approx_ok=FALSE) const
 Evaluates this bounded_curve at a given parameter value, returning the position and the first and second derivatives.
virtual SPAvector eval_curvature (double param, logical eval_repeated=FALSE, logical approx_ok=FALSE) const
 Finds the curvature at the given parameter value on this bounded_curve.
virtual SPAvector eval_deriv (double param, logical eval_repeated=FALSE, logical approx_ok=FALSE) const
 Finds the derivative (direction and magnitude) at the given parameter value on this bounded_curve.
virtual double eval_deriv_len (double param, logical eval_repeated=FALSE, logical approx_ok=FALSE) const
 Finds the magnitude of the derivative at the given parameter value on this bounded_curve.
SPAunit_vector eval_direction (double param, logical eval_repeated=FALSE, logical approx_ok=FALSE) const
 Finds the tangent direction at the given parameter value on this bounded_curve.
virtual SPAposition eval_position (double param, logical eval_repeated=FALSE, logical approx_ok=FALSE) const
 Finds the point on this bounded_curve corresponding to a given parameter value.
virtual double eval_t (const pick_ray &ray) const
 Finds the closest point on this bounded_curve to a given pick location and returns the curve parameter value.
virtual curve_extremum * find_extrema (const SPAunit_vector &dir) const
 Finds the extrema of this bounded_curve in a given direction.
curveget_acis_curve () const
 Returns the underlying curve for this bounded_curve.
SPAposition get_center () const
 Returns the center of this bounded_arc.
SPAunit_vector get_end_dir () const
 Returns the end direction of this bounded_curve.
double get_end_param () const
 Returns the end parameter of this bounded_curve.
SPAposition get_end_pt () const
 Returns the end position of this bounded_curve.
bounded_curveget_full_curve () const
 Returns a copy of this bounded_curve, unsubsetted.
SPAvector get_major_axis () const
 Returns the major axis of this bounded_arc.
virtual SPAunit_vector get_normal () const
 Returns the unit-vector normal to this bounded_arc.
double get_parameter_tolerance (double t, double tol) const
 Returns a tolerance to use when determining whether two parameter values evaluate to the same position.
double get_radius () const
 Returns the radius of this bounded_arc.
double get_radius_ratio () const
 Returns the radius ratio of this bounded_arc.
double get_range () const
 Returns the parameter range of this bounded_curve.
sense_type get_sense () const
 Returns the sense of this bounded_arc.
int get_side (const SPAunit_vector &normal, const SPAposition &pos)
 Determines which side of this bounded_curve a given point is on, relative to a plane defined by a unit-vector normal.
SPAunit_vector get_start_dir () const
 Returns the start direction of this bounded_curve.
double get_start_param () const
 Returns the start parameter of this bounded_curve.
SPAposition get_start_pt () const
 Returns the start position of this bounded_curve.
double get_subtend () const
 Returns the subtended angle of this bounded_arc.
virtual logical is_arc () const
 Determines if this bounded_arc is also a bounded_arc.
virtual logical is_in_parallel_plane (const SPAunit_vector &normal) const
 Returns TRUE if this bounded_curve lies in a plane that is perpendicular to the given unit-vector normal; otherwise, it returns FALSE.
virtual logical is_in_plane (const SPAposition &pos, const SPAunit_vector &normal) const
 Returns TRUE if this bounded_curve lies in a given plane; otherwise, it returns FALSE.
virtual logical is_line () const
 Checks for the bounded_line subclass.
virtual logical is_point () const
 Checks for the bounded_point subclass.
virtual double length (double t0, double t1) const
 Returns the algebraic distance along this bounded_curve between the given parameters.
virtual double length_param (double param, double length) const
 Returns the parameter value of the point on this bounded_curve at the given algebraic arc length from that defined by the given parameter.
bs3_curve make_bs3_curve () const
 Creates a bs3_curve from this bounded_curve.
virtual EDGEmake_edge () const
 Creates an EDGE from this bounded_curve.
virtual bounded_curvenegate ()
 Reverses the direction of this bounded_curve.
virtual bounded_curveoperator*= (const SPAtransf &transf)
 Transforms this bounded_curve.
virtual double param (const SPAposition &pos, const double *guess_param=NULL) const
 Finds the parameter value of the point on this bounded_curve, corresponding to the given point.
double param_from_01 (double t)
 Converts from parameters within the range from 0 to 1, to the double range.
virtual double param_period () const
 Returns the period of a periodic curve, or 0 if this bounded_curve is not periodic.
double param_to_01 (double t)
 Converts to parameters within the range from 0 to 1, from the double range.
virtual logical periodic () const
 Indicates if this bounded_curve is periodic.
virtual void point_perp (const SPAposition &point, SPAposition *foot, SPAunit_vector *normal, const double *param_guess=NULL, double *param_actual=NULL, logical f_weak=FALSE) const
 Finds the foot of the perpendicular from the given point to this bounded_curve, the tangent to the curve at that point, and the corresponding parameter value.
bounded_curveproject_to_plane (const plane &plane1, logical accurate=TRUE) const
 Returns a curve that is the projection of this bounded_curve onto a given plane.
void set_center (const SPAposition &center)
 Modifies the center position of this bounded_arc.
double set_end_param (double param)
 Sets the end parameter of this bounded_curve.
double set_end_t (const SPAposition &pos, const double *approx=NULL)
 Sets the end points of this bounded_curve.
void set_major_axis (const SPAvector &maj_axis)
 Modifies the major axis of this bounded_arc.
void set_normal (const SPAunit_vector &normal)
 Modifies the plane normal to this bounded_arc.
void set_parameter_range (double start_param, double end_param)
 Sets the parameter range of this bounded_curve.
void set_radius (double rad)
 Modifies the radius of this bounded_arc.
void set_radius_ratio (double rad_ratio)
 Modifies the radius ratio of this bounded_arc.
double set_start_param (double param)
 Sets the start parameter of this bounded_curve.
double set_start_t (const SPAposition &pos, const double *approx=NULL)
 Sets the start points of this bounded_curve.
virtual bounded_curvesplit (double param, const SPAposition &pos)
 Splits this bounded_curve at a given parameter value.
logical test_point (const SPAposition &pos, const double *param_guess=NULL, double *param_actual=NULL) const
 Tests point-on-curve, optionally returning the exact parameter value if the point is on this bounded_curve.
virtual logical test_point_tol (const SPAposition &pos, double tol=0, const double *param_guess=NULL, double *param_actual=NULL) const
 Tests point-on-curve to a given precision, optionally returning the exact parameter value if the point is on this bounded_curve.
const char * type_name () const
 Returns the string "bounded_curve".

Protected Member Functions

void make_valid (logical signal_error=FALSE)
 Ensures that the data in this bounded_curve is valid.
logical set_acis_curve (curve *crv)
 Sets the ACIS curve for this bounded_curve.

Protected Attributes

curveacis_curve
 The pointer to an ACIS curve.
double end_param
 The end parameter of the ACIS curve.
double start_param
 The start parameter of the ACIS curve.


Detailed Description

Defines a bounded_arc as a subtype of a bounded_curve.


Role: This class adds no new data to the bounded_curve class from which it is derived, but it provides additional constructors and redefines some virtual functions.

See also:
bounded_curve, bounded_line

Constructor & Destructor Documentation

bounded_arc::bounded_arc (  ) 

Constructs a bounded_arc (default constructor).



Role: Requests memory for this object but does not populate it.

bounded_arc::bounded_arc ( const bounded_arc b_arc  ) 

Constructs a bounded_arc from another one (copy constructor).



Role: Requests memory for this object and populates it with the data from the object supplied as an argument.

Parameters:
b_arc bounded arc that is to be copied.

bounded_arc::bounded_arc ( EDGE edge,
const SPAtransf transf 
)

Constructs a bounded_arc from an EDGE and a transform.



Role: The edge must be an ellipse.

Parameters:
edge the EDGE used to construct the bounded arc.
transf transformation to be applied to the EDGE's CURVE.

bounded_arc::bounded_arc ( const SPAposition center,
double  radius,
const SPAunit_vector normal 
)

Constructs a bounded_arc that is a full circle, given its center, radius, and plane normal.



Parameters:
center center of the circle.
radius radius of the circle.
normal plane normal to the circle.

bounded_arc::bounded_arc ( const SPAposition center,
const SPAunit_vector normal,
const SPAvector majax,
double  t0,
double  t1,
double  ratio = 1.0 
)

Constructs a bounded_arc that is a full or partial ellipse, given its center, major axis, plane normal, start and end angles, and radius ratio.



Role: The angles are in radians. The radius is the length of the major-axis vector. The major-axis direction corresponds to the point at the 0-degree angle on the arc, whose position is given by center + majax.

Parameters:
center center.
normal plane normal to the ellipse.
majax major axis of the ellipse.
t0 angle from the major axis to the start-point of the arc.
t1 angle from the major axis to the end-point of the arc.
ratio ratio of the major-axis length to the minor-axis length.

bounded_arc::bounded_arc ( const SPAposition pt1,
const SPAposition pt2,
const SPAposition pt3,
logical  full 
)

Constructs a circular bounded_arc, given three points on the arc and the logical indicating full or partial.



Role: If full is TRUE, a full circle is constructed. If the positions are collinear, this method returns an error.

Parameters:
pt1 first point on the circle.
pt2 second point on the circle.
pt3 third point on the circle.
full flag to construct a full circle.

bounded_arc::bounded_arc ( const SPAposition center,
const SPAposition pt1,
const SPAposition pt2,
const SPAunit_vector normal 
)

Constructs a circular bounded_arc, given its center, two points on the arc, and its plane normal.



Role: If pt1 equals pt2, then a full circle is created. Use normal only if center, pt1, and pt2 do not determine a plane.

Parameters:
center center of the circle.
pt1 first point on the circle.
pt2 second point on the circle.
normal plane normal to the circle.

bounded_arc::bounded_arc ( const SPAposition pt1,
const SPAposition pt2,
const SPAunit_vector normal,
logical  full 
)

Constructs a circular bounded_arc, given two points on the arc's diagonal and its plane normal.



Role: If the positions are collinear, this method returns an error.

Parameters:
pt1 first point on the circle.
pt2 second point on the circle.
normal plane normal to the circle.
full flag to construct a full circle.


Member Function Documentation

int bounded_curve::acis_type (  )  const [inherited]

Returns the type of underlying curve for this bounded_curve.

double bounded_curve::adjust_parameter ( double  t  )  const [inherited]

Adjusts a parameter value so that it is within the principal range of a periodic curve.



Role: If this curve is not periodic, this method returns the input parameter. For a periodic curve, this method returns a parameter value between the start parameter and end parameter.

Parameters:
t parameter value to be adjusted.

virtual double bounded_curve::approx_error (  )  const [virtual, inherited]

Returns the distance error associated with approximate evaluations.



Role: Returns a distance value that represents the greatest discrepancy between positions calculated by calls to eval or eval_position with the approx_OK logical set by turns to TRUE and FALSE. Returns 0 as the default for curves that do not distinguish between these cases.

SPAbox bounded_curve::bound (  )  const [inherited]

Computes a bounding box around this bounded_curve.



Role: There is no guarantee that the bound is minimal.

virtual logical bounded_arc::change_end_pt ( const SPAposition end_pos  )  [virtual]

Changes the end position of this bounded_arc.



Parameters:
end_pos new end position.

Reimplemented from bounded_curve.

virtual logical bounded_arc::change_start_pt ( const SPAposition start_pos  )  [virtual]

Changes the start position of this bounded_arc.



Parameters:
start_pos new start position.

Reimplemented from bounded_curve.

virtual logical bounded_curve::closed (  )  const [virtual, inherited]

Indicates if this bounded_curve is closed.



Role: This method indicates whether the curve joins itself (smoothly or not) at the ends of its principal parameter range. If the periodic method returns TRUE, this method also returns TRUE.

virtual bounded_curve* bounded_arc::copy ( const SPAtransf transf = NULL  )  const [virtual]

Creates a transformed copy of this bounded_arc.



Parameters:
transf transformation to apply to the copy.

Reimplemented from bounded_curve.

virtual void bounded_curve::debug ( const char *  lead,
FILE *  fp = debug_file_ptr 
) const [virtual, inherited]

Writes the debug output for this bounded_curve.



Parameters:
lead leader string.
fp FILE pointer.

virtual void bounded_curve::eval ( double  param,
SPAposition pos,
SPAvector first_deriv = NULL,
SPAvector second_deriv = NULL,
logical  eval_repeated = FALSE,
logical  approx_ok = FALSE 
) const [virtual, inherited]

Evaluates this bounded_curve at a given parameter value, returning the position and the first and second derivatives.



Role: For this and the other five evaluation methods, there are two optional logical arguments. The first, if TRUE, is a guarantee from the calling code that the most recent call to any curve or surface member method was in fact to one of these six methods for the same curve as the current call. This allows an implementation to cache useful intermediate results to speed up repeated evaluations, but is an option that should be used with extreme care. The second logical argument may be set TRUE if an approximate return value is acceptable. Here, the approximation may be assumed to be sufficient for visual inspection of the curve.

Parameters:
param parameter value at which to perform the evaluation.
pos position on curve at the specified parameter.
first_deriv first derivative at the specified parameter.
second_deriv second derivative at the specified parameter.
eval_repeated flag to signal a repeated evaluation.
approx_ok flag to signal that approximate results are OK.

virtual SPAvector bounded_curve::eval_curvature ( double  param,
logical  eval_repeated = FALSE,
logical  approx_ok = FALSE 
) const [virtual, inherited]

Finds the curvature at the given parameter value on this bounded_curve.



Role: See the description of the eval method regarding the two logical arguments.

Parameters:
param parameter value at which to perform the evaluation.
eval_repeated flag to signal a repeated evaluation.
approx_ok flag to signal that approximate results are OK.

virtual SPAvector bounded_curve::eval_deriv ( double  param,
logical  eval_repeated = FALSE,
logical  approx_ok = FALSE 
) const [virtual, inherited]

Finds the derivative (direction and magnitude) at the given parameter value on this bounded_curve.



Role: See the description of the eval method regarding the two logical arguments.

Parameters:
param parameter value at which to perform the evaluation.
eval_repeated flag to signal a repeated evaluation.
approx_ok flag to signal that approximate results are OK.

virtual double bounded_curve::eval_deriv_len ( double  param,
logical  eval_repeated = FALSE,
logical  approx_ok = FALSE 
) const [virtual, inherited]

Finds the magnitude of the derivative at the given parameter value on this bounded_curve.



Role: See the description of the eval method regarding the two logical arguments.

Parameters:
param parameter value at which to perform the evaluation.
eval_repeated flag to signal a repeated evaluation.
approx_ok flag to signal that approximate results are OK.

SPAunit_vector bounded_curve::eval_direction ( double  param,
logical  eval_repeated = FALSE,
logical  approx_ok = FALSE 
) const [inherited]

Finds the tangent direction at the given parameter value on this bounded_curve.



Role: See the description of the eval method regarding the two logical arguments.

Parameters:
param parameter value at which to perform the evaluation.
eval_repeated flag to signal a repeated evaluation.
approx_ok flag to signal that approximate results are OK.

virtual SPAposition bounded_curve::eval_position ( double  param,
logical  eval_repeated = FALSE,
logical  approx_ok = FALSE 
) const [virtual, inherited]

Finds the point on this bounded_curve corresponding to a given parameter value.



Role: See the description of the eval method regarding the two logical arguments.

Parameters:
param parameter value at which to perform the evaluation.
eval_repeated flag to signal a repeated evaluation.
approx_ok flag to signal that approximate results are OK.

virtual double bounded_curve::eval_t ( const pick_ray ray  )  const [virtual, inherited]

Finds the closest point on this bounded_curve to a given pick location and returns the curve parameter value.



Parameters:
ray the pick location.

Reimplemented in bounded_line.

virtual curve_extremum* bounded_curve::find_extrema ( const SPAunit_vector dir  )  const [virtual, inherited]

Finds the extrema of this bounded_curve in a given direction.



Role: The curve_extremum class is defined in curdef.hxx.

Parameters:
dir unit vector specifying the direction.

curve* bounded_curve::get_acis_curve (  )  const [inline, inherited]

Returns the underlying curve for this bounded_curve.

SPAposition bounded_arc::get_center (  )  const

Returns the center of this bounded_arc.

SPAunit_vector bounded_curve::get_end_dir (  )  const [inline, inherited]

Returns the end direction of this bounded_curve.

double bounded_curve::get_end_param (  )  const [inline, inherited]

Returns the end parameter of this bounded_curve.

SPAposition bounded_curve::get_end_pt (  )  const [inline, inherited]

Returns the end position of this bounded_curve.

bounded_curve* bounded_curve::get_full_curve (  )  const [inherited]

Returns a copy of this bounded_curve, unsubsetted.



Role: If the curve is a subset of a curve as a result of setting the parameter range, this method returns the full curve.

SPAvector bounded_arc::get_major_axis (  )  const

Returns the major axis of this bounded_arc.

virtual SPAunit_vector bounded_arc::get_normal (  )  const [virtual]

Returns the unit-vector normal to this bounded_arc.

Reimplemented from bounded_curve.

double bounded_curve::get_parameter_tolerance ( double  t,
double  tol 
) const [inherited]

Returns a tolerance to use when determining whether two parameter values evaluate to the same position.



Parameters:
t parameter at which go get the tolerance.
tol tolerance to use on the points.

double bounded_arc::get_radius (  )  const

Returns the radius of this bounded_arc.

double bounded_arc::get_radius_ratio (  )  const

Returns the radius ratio of this bounded_arc.

double bounded_curve::get_range (  )  const [inline, inherited]

Returns the parameter range of this bounded_curve.

sense_type bounded_arc::get_sense (  )  const

Returns the sense of this bounded_arc.

int bounded_curve::get_side ( const SPAunit_vector normal,
const SPAposition pos 
) [inherited]

Determines which side of this bounded_curve a given point is on, relative to a plane defined by a unit-vector normal.



Role: This method returns +1 for right and -1 for left. It returns 0 if the side cannot be determined. (This may be because the point is on the curve, or because the curve tangent is parallel to the plane normal.)

Parameters:
vec unit vector normal describing the plane.
pos point to test.

SPAunit_vector bounded_curve::get_start_dir (  )  const [inline, inherited]

Returns the start direction of this bounded_curve.

double bounded_curve::get_start_param (  )  const [inline, inherited]

Returns the start parameter of this bounded_curve.

SPAposition bounded_curve::get_start_pt (  )  const [inline, inherited]

Returns the start position of this bounded_curve.

double bounded_arc::get_subtend (  )  const

Returns the subtended angle of this bounded_arc.

virtual logical bounded_arc::is_arc (  )  const [virtual]

Determines if this bounded_arc is also a bounded_arc.



Role: Returns TRUE if this is a bounded_arc; otherwise, it returns FALSE.

Reimplemented from bounded_curve.

virtual logical bounded_curve::is_in_parallel_plane ( const SPAunit_vector normal  )  const [virtual, inherited]

Returns TRUE if this bounded_curve lies in a plane that is perpendicular to the given unit-vector normal; otherwise, it returns FALSE.



Parameters:
normal the plane normal.

virtual logical bounded_curve::is_in_plane ( const SPAposition pos,
const SPAunit_vector normal 
) const [virtual, inherited]

Returns TRUE if this bounded_curve lies in a given plane; otherwise, it returns FALSE.



Parameters:
pos position on the plane.
normal normal to plane.

virtual logical bounded_curve::is_line (  )  const [virtual, inherited]

Checks for the bounded_line subclass.



Role: Returns TRUE if this bounded_curve is a bounded_line; otherwise, it returns FALSE.

Reimplemented in bounded_line.

virtual logical bounded_curve::is_point (  )  const [virtual, inherited]

Checks for the bounded_point subclass.



Role: Returns TRUE if this bounded_curve is a bounded_point; otherwise, it returns FALSE.

virtual double bounded_curve::length ( double  t0,
double  t1 
) const [virtual, inherited]

Returns the algebraic distance along this bounded_curve between the given parameters.



Role: The sign is positive if the parameter values are given in increasing order, and negative if they are in decreasing order. The result is undefined if either parameter value is outside the parameter range of the bounded curve. For a periodic curve, the parameters are not reduced to the principal range, so the portion of the curve evaluated may include several complete circuits. This method is always a monotonically increasing function of t1 if t0 is held constant, and a decreasing function of t0 if t1 is held constant.

Parameters:
t0 first parameter value.
t1 second parameter value.

virtual double bounded_curve::length_param ( double  param,
double  length 
) const [virtual, inherited]

Returns the parameter value of the point on this bounded_curve at the given algebraic arc length from that defined by the given parameter.



Role: This method is the inverse of the length method. The result is not defined for a bounded nonperiodic curve if the param argument is outside the parameter range, or if the length argument is outside the range bounded by the values for the ends of the parameter range.

Parameters:
param datum parameter value.
length arc length.

bs3_curve bounded_curve::make_bs3_curve (  )  const [inherited]

Creates a bs3_curve from this bounded_curve.

virtual EDGE* bounded_curve::make_edge (  )  const [virtual, inherited]

Creates an EDGE from this bounded_curve.

Reimplemented in bounded_line.

void bounded_curve::make_valid ( logical  signal_error = FALSE  )  [protected, inherited]

Ensures that the data in this bounded_curve is valid.



Role: This method helps to avoid checking for a valid curve pointer in acis_curve or the zero parameter range. If logical argument is TRUE, then this method causes an error to generate.

Parameters:
signal_error flag to signal error or not.

virtual bounded_curve& bounded_curve::negate (  )  [virtual, inherited]

Reverses the direction of this bounded_curve.

virtual bounded_curve& bounded_curve::operator*= ( const SPAtransf transf  )  [virtual, inherited]

Transforms this bounded_curve.



Parameters:
transf the transformation to apply.

virtual double bounded_curve::param ( const SPAposition pos,
const double *  guess_param = NULL 
) const [virtual, inherited]

Finds the parameter value of the point on this bounded_curve, corresponding to the given point.



Role: The results of this method are only guaranteed to be valid for points on the curve, though particular curve types may give useful curve-dependent results for other points.

Parameters:
pos point on the curve.
guess_param approximate parameter value.

double bounded_curve::param_from_01 ( double  t  )  [inline, inherited]

Converts from parameters within the range from 0 to 1, to the double range.



Parameters:
t parameter to convert.

virtual double bounded_curve::param_period (  )  const [virtual, inherited]

Returns the period of a periodic curve, or 0 if this bounded_curve is not periodic.

double bounded_curve::param_to_01 ( double  t  )  [inherited]

Converts to parameters within the range from 0 to 1, from the double range.



Parameters:
t parameter to convert.

virtual logical bounded_curve::periodic (  )  const [virtual, inherited]

Indicates if this bounded_curve is periodic.



Role: If so, the curve joins itself smoothly at the ends of its principal parameter range, so that EDGEs may span the seam.

virtual void bounded_curve::point_perp ( const SPAposition point,
SPAposition foot,
SPAunit_vector normal,
const double *  param_guess = NULL,
double *  param_actual = NULL,
logical  f_weak = FALSE 
) const [virtual, inherited]

Finds the foot of the perpendicular from the given point to this bounded_curve, the tangent to the curve at that point, and the corresponding parameter value.



Role: If an input parameter value is supplied (as the param_guess argument), the perpendicular found is the one nearest to the corresponding position; otherwise, it is the one at which the curve is nearest to the given point. Any of the return value arguments may be a NULL reference, in which case it is ignored.

Parameters:
point the input position.
foot the position on the curve.
normal the returned normal.
param_guess parameter guess.
param_actual the actual parameter.
f_weak weak flag.

bounded_curve* bounded_curve::project_to_plane ( const plane plane1,
logical  accurate = TRUE 
) const [inherited]

Returns a curve that is the projection of this bounded_curve onto a given plane.



Role: This method returns a new curve which is the projection of this curve onto a given plane. The default behavior is to create a curve that is an accurate projection of the bounded_curve to within SPAresabs.

If called with the argument accurate set to FALSE, a less accurate projection curve is returned. The benefit of using this is that the projection can be constructed much more quickly, though applications should use this only for, e.g., getting a visual representation of the curve, as it is not guaranteed that these "quick and dirty" projection curves will be coincident with the true projection to within SPAresabs.

Note that regardless of the flag setting, it is possible for the returned curve not to be a legal ACIS curve e.g. it may self-intersect or have discontinuities.

Parameters:
plane1 plane on which to project.
accurate flag indicating whether to do an accurate (default) or a quick inaccurate projection.

logical bounded_curve::set_acis_curve ( curve crv  )  [protected, inherited]

Sets the ACIS curve for this bounded_curve.



Parameters:
crv the new ACIS curve.

void bounded_arc::set_center ( const SPAposition center  ) 

Modifies the center position of this bounded_arc.



Parameters:
center the new arc center position.

double bounded_curve::set_end_param ( double  param  )  [inherited]

Sets the end parameter of this bounded_curve.



Parameters:
param the new end parameter.

double bounded_curve::set_end_t ( const SPAposition pos,
const double *  approx = NULL 
) [inherited]

Sets the end points of this bounded_curve.



Role: This method assumes that the given position lies on the curve, and it modifies the curve so it ends at that position. If the position is not on the curve, the closest position on the curve is used.

For curves, this method takes an object of class SPAparameter as input for an approximation. For consistency, these methods all use doubles for curve parameters.

Parameters:
pos position at which the curve is to end.
approx approximate parameter position.

void bounded_arc::set_major_axis ( const SPAvector maj_axis  ) 

Modifies the major axis of this bounded_arc.



Parameters:
maj_axis the new arc major axis.

void bounded_arc::set_normal ( const SPAunit_vector normal  ) 

Modifies the plane normal to this bounded_arc.



Parameters:
normal the new arc normal.

void bounded_curve::set_parameter_range ( double  start_param,
double  end_param 
) [inherited]

Sets the parameter range of this bounded_curve.



Parameters:
start_param the new start parameter.
end_param the new end parameter.

void bounded_arc::set_radius ( double  rad  ) 

Modifies the radius of this bounded_arc.



Parameters:
rad the new arc radius.

void bounded_arc::set_radius_ratio ( double  rad_ratio  ) 

Modifies the radius ratio of this bounded_arc.



Parameters:
rad_ratio the new arc radius ratio.

double bounded_curve::set_start_param ( double  param  )  [inherited]

Sets the start parameter of this bounded_curve.



Parameters:
param the new start parameter.

double bounded_curve::set_start_t ( const SPAposition pos,
const double *  approx = NULL 
) [inherited]

Sets the start points of this bounded_curve.



Role: This method assumes that the given position lies on the curve, and it modifies the curve so it starts at that position. If the position is not on the curve, the closest position on the curve is used.

For curves, this method takes an object of class SPAparameter as input for an approximation. For consistency, these methods all use doubles for curve parameters.

Parameters:
pos position at which the curve is to start.
approx approximate parameter position.

virtual bounded_curve* bounded_curve::split ( double  param,
const SPAposition pos 
) [virtual, inherited]

Splits this bounded_curve at a given parameter value.



Role: If the curve is splittable (not closed - in practice, one defined or approximated by one or more splines), this method returns a new curve for the low-parameter part, and the original one as the high-parameter part. For a nonsplittable curve, it leaves the original one alone and returns NULL. The default is to make the curve nonsplittable.

Parameters:
param parameter value at which to split.
pos position through which the curve should pass.

logical bounded_curve::test_point ( const SPAposition pos,
const double *  param_guess = NULL,
double *  param_actual = NULL 
) const [inherited]

Tests point-on-curve, optionally returning the exact parameter value if the point is on this bounded_curve.



Role: This method tests to standard system precision.

Parameters:
pos position of the point to test.
param_guess parameter guess.
param_actual actual parameter.

virtual logical bounded_curve::test_point_tol ( const SPAposition pos,
double  tol = 0,
const double *  param_guess = NULL,
double *  param_actual = NULL 
) const [virtual, inherited]

Tests point-on-curve to a given precision, optionally returning the exact parameter value if the point is on this bounded_curve.



Parameters:
pos position of the point to test.
tol tolerance within which to test.
param_guess parameter guess.
param_actual actual parameter.

const char* bounded_curve::type_name (  )  const [inherited]

Returns the string "bounded_curve".


Member Data Documentation

curve* bounded_curve::acis_curve [protected, inherited]

The pointer to an ACIS curve.

double bounded_curve::end_param [protected, inherited]

The end parameter of the ACIS curve.

double bounded_curve::start_param [protected, inherited]

The start parameter of the ACIS curve.