Home

intcurve Class Reference
[curves]

A parametric curve class. More...

#include <intdef.hxx>

Inheritance diagram for intcurve:

Inheritance graph
[legend]
Collaboration diagram for intcurve:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual int accurate_derivs (SPAinterval const &inter=*(SPAinterval *) NULL_REF) const
 Evaluates accurate derivatives.
virtual const double * all_discontinuities (int &n_discont, int order)
 Returns, in a read-only array, the number and parameter values of discontinuities of the curve up to the given order (maximum three).
virtual double approx_error () const
 Returns the maximum error between the approximate evaluation of this curve and the true evaluation of it.
SPAbox bound (double start, double end, SPAtransf const &t=*(SPAtransf *) NULL_REF) const
 Returns a box enclosing the portion of the curve defined between the two given parameter values.
virtual SPAbox bound (SPAbox const &box, SPAtransf const &trans=*(SPAtransf *) NULL_REF) const
 Returns a box surrounding that portion of the curve within the given box.
virtual SPAbox bound (SPAinterval const &inter, SPAtransf const &trans=*(SPAtransf *) NULL_REF) const
 Returns a box enclosing the specified interval the curve.
virtual SPAbox bound (SPAposition const &pos1, SPAposition const &pos2, SPAtransf const &trans=*(SPAtransf *) NULL_REF) const
 Returns a box enclosing the portion of the curve between the two given points on the curve.
int bs1_hull_angles_ok () const
 Checks if it is known that there is a good bs1_curve hull.
int bs1_hull_self_intersects () const
 Checks if it is known that the bs1_curve self-intersects.
int bs1_knots_on_curve () const
 Checks if it is known that the knots of the bs1_curve lie on the curve.
int bs2_hull_angles_ok () const
 Checks if it is known that there is a good bs2_curve hull.
int bs2_hull_self_intersects () const
 Checks if the bs2_curve self-intersects.
int bs2_knots_on_curve () const
 Checks if it is known that the knots of the bs2_curve lie on the curve.
virtual void change_event ()
 Notifies the derived type that the curve has been changed so that it can update itself.
virtual check_status_listcheck (const check_fix &input=*(const check_fix *) NULL_REF, check_fix &result=*(check_fix *) NULL_REF, const check_status_list *list=(const check_status_list *) NULL_REF)
 Checks for any data errors in the curve, and corrects the errors if possible.
virtual logical closed () const
 Indicates if an intcurve is closed.
virtual void closest_point (SPAposition const &pos, SPAposition &foot, SPAparameter const &param_guess=*(SPAparameter *) NULL_REF, SPAparameter &param_actual=*(SPAparameter *) NULL_REF) const
 Finds the closest point on the curve (the foot) to the given point, and optionally its parameter value.
curvecopy_curve () const
 Makes a copy of this curve.
bs3_curve cur (double tol=-1.0, logical force=FALSE) const
 Returns the underlying bs3_curve.
logical cur_present () const
 Returns TRUE if the underlying int_cur contains a bs3_curve.
virtual void debug (char const *title, FILE *fp=debug_file_ptr) const
 Outputs a title line and the details of the intcurve for inspection to standard output or to the specified file.
virtual curvedeep_copy (pointer_map *pm=NULL) const
 Creates a copy of an intcurve that does not share any data with the original.
virtual const double * discontinuities (int &n_discont, int order) const
 Returns the number and parameter values of discontinuities of the curve in a read-only array of the given order (maximum three).
virtual int discontinuous_at (double t) const
 Determines whether a particular parameter value is a discontinuity.
virtual curve_boundcyl enclosing_cylinder (const SPAinterval &inter=*(SPAinterval *) NULL_REF) const
 Returns a cylinder that encloses the portion of the curve bounded by the interval.
virtual void eval (double value, SPAposition &pos, SPAvector &der1=*(SPAvector *) NULL_REF, SPAvector &der2=*(SPAvector *) NULL_REF, logical repeat=FALSE, logical approx=FALSE) const
 Evaluates the curve, giving the position and the first and second derivatives.
virtual SPAvector eval_curvature (double value, logical repeat=FALSE, logical approx=FALSE) const
 Finds the curvature at given parameter value.
virtual SPAvector eval_deriv (double value, logical repeat=FALSE, logical approx=FALSE) const
 Finds the parametric derivative, magnitude, and direction, at given parameter value.
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 curve.
virtual SPAunit_vector eval_direction (double value, logical tangency=FALSE, logical approx=FALSE) const
 Finds the tangent direction at the given parameter value on the curve.
virtual SPAposition eval_position (double value, logical repeat=FALSE, logical approx=FALSE) const
 Finds the position on a curve at the given parameter value.
virtual int evaluate (double param, SPAposition &pt, SPAvector **vec=NULL, int der=0, evaluate_curve_side location=evaluate_curve_unknown) const
 Evaluates the position and the first and second derivatives at given parameter value.
virtual int evaluate_iter (double param, curve_evaldata *data, SPAposition &pt, SPAvector **vec=NULL, int deriv=0, evaluate_curve_side location=evaluate_curve_unknown) const
 Evaluates the position and the first and second derivatives at given parameter value.
virtual curve_extremum * find_extrema (SPAunit_vector const &dir) const
 Finds the extrema of an intcurve in a given direction.
double fitol () const
 Returns the fit tolerance.
virtual const discontinuity_infoget_disc_info () const
 Returns read-only access to a discontinuity_info object, if there is one.
virtual int high_curvature (double k, SPAinterval *&spans) const
 Finds regions of high curvature of this curve.
int hull1_enclosure () const
 Checks if it is known that the bs1_curve hull encloses the curve.
int hull2_enclosure () const
 Check if it is known that the bs2_curve hull encloses the curve.
 intcurve (intcurve const &intcur)
 C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument.
 intcurve (int_cur *intcur, logical make_tight_approx=FALSE)
 C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.
 intcurve (curve_interp &cur, SPAbox const &box=*(const class SPAbox *) NULL_REF, logical make_tight_approx=FALSE)
 C++ interpolation constructor requests memory for this object and populates it with the data supplied as arguments.
 intcurve (bs3_curve cur, double tol, surface const &surf1, surface const &surf2, bs2_curve cur1=NULL, bs2_curve cur2=NULL, const SPAinterval &inter=*(const class SPAinterval *) NULL_REF, logical parametric_is_primary=FALSE, logical make_tight_approx=FALSE)
 C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.
 intcurve ()
 C++ allocation constructor requests memory for this object but does not populate it.
logical join (intcurve &second, int order=-1)
 Joins two pieces of intcurve together, adding a discontinuity of the given order at the join (if order is not supplied, or is nonpositive, then it is calculated).
lawlaw_form ()
 Returns the law form for an intcurve.
virtual double length (double param1, double param2, logical approx_ok=TRUE) const
 Returns the algebraic distance along the curve between the given parameters.
virtual double length_param (double datum, double arc, logical approx_ok=TRUE) const
 Returns the parameter value of the point on the curve at the given algebraic arc length from that defined by the datum parameter.
void limit (const SPAinterval &range)
 Subsets this curve in place, ensuring canonical results if the underlying curve is bounded or periodic.
virtual curvemake_copy () const
 Virtual function to copy a curve without knowing what its type is.
virtual curve_evaldata * make_evaldata () const
 Constructs a data object to retain evaluation information across calls to evaluate_iter.
void make_single_ref ()
 Ensures that the reference supplied points to a singly-used record.
virtual logical need_save_as_approx (int save_to_version, logical check_progenitors) const
 Queries whether the object needs to be saved to an old version as an approximation.
virtual curvenegate ()
 Negates an intcurve in place.
logical operator!= (const curve &cur) const
 Tests this curve for inequality to another curve.
virtual curveoperator*= (SPAtransf const &trans)
 Transforms this intcurve by the given SPAtransf, in place.
intcurve operator- () const
 Negates the curve.
intcurveoperator= (intcurve const &intcur)
 Assignment operator, which copies only the intcurve record and adjusts the use counts of the underlying information.
virtual logical operator== (curve const &intcur) const
 Tests two curves for equality.
virtual logical operator>> (curve const &intcur) const
 Determines whether a intcurve is entirely enclosed within another.
virtual double param (SPAposition const &pos, SPAparameter const &param=*(SPAparameter *) NULL_REF) const
 Returns the parameter value for a given point.
virtual double param_period () const
 Returns the period of a periodic curve.
virtual SPAinterval param_range (SPAbox const &box=*(SPAbox *) NULL_REF) const
 Returns the parameter range of the intcurve.
double partol1 () const
 Returns the parameter space tolerance of the first parameter space curve.
double partol2 () const
 Returns the parameter space tolerance of the second parameter space curve.
virtual pcurvepcur (int index, logical temporary=FALSE) const
 Returns the parameter space curves with respect to the surfaces defining this intcurve.
bs2_curve pcur1 (logical force=FALSE) const
 Returns a curve in parameter space of the surface returned by surf1, if the surface is parametric.
bs2_curve pcur2 (logical force=FALSE) const
 Returns a curve in parameter space of the surface returned by surf2, if the surface is parametric.
virtual logical pcur_present (int nparam) const
 Returns TRUE if the nth parameter-space curve is defined.
virtual logical periodic () const
 Indicates if the curve is periodic.
virtual SPAvector point_curvature (SPAposition const &pt, SPAparameter const &guess=*(SPAparameter *) NULL_REF) const
 Finds the curvature at a point on the intcurve.
virtual SPAunit_vector point_direction (SPAposition const &pt, SPAparameter const &guess=*(SPAparameter *) NULL_REF) const
 Finds the tangent direction of the intcurve at a point on the intcurve.
void point_perp (SPAposition const &pos, SPAposition &foot, SPAparameter const &guess=*(SPAparameter *) NULL_REF, SPAparameter &actual=*(SPAparameter *) NULL_REF, logical f_weak=FALSE) const
 Finds the foot of the perpendicular from the given point to the curve and its parameter value.
void point_perp (SPAposition const &pos, SPAposition &foot, SPAunit_vector &tangent, SPAparameter const &guess=*(SPAparameter *) NULL_REF, SPAparameter &actual=*(SPAparameter *) NULL_REF, logical f_weak=FALSE) const
 Finds the foot of the perpendicular from the given point to the curve and the tangent direction to the curve at that point and its parameter value.
virtual void point_perp (SPAposition const &pos, SPAposition &foot, SPAunit_vector &tangent, SPAvector &cur, SPAparameter const &guess=*(SPAparameter *) NULL_REF, SPAparameter &actual=*(SPAparameter *) NULL_REF, logical f_weak=FALSE) const
 Finds the foot of the perpendicular from the given point to the curve and the curve tangent direction and curvature at that point and its parameter value.
void reparam (double start, double end)
 Reparameterizes the curve to start and end at the given parameter values, which are in increasing order.
void replace_int_cur (int_cur &new_fit)
 Replaces the defining spline curve and should only be used with extreme caution.
void restore_data ()
 Restores the data from a save file.
logical reversed () const
 Returns TRUE if the intcurve is reversed with respect to the underlying int_cur.
SPAinterval safe_range () const
 Returns the safe range or an empty interval if there is no int_cur.
virtual void save () const
 Saves the curve type or id, then calls save_data.
void save_curve () const
 Saves a curve of unknown type, or NULL.
void save_data () const
 Saves the intcurve data to a save file.
void set_bs_hull_angles_ok (int pcu_no, int hull_angles_ok)
 Sets the property in the underlying int_cur, of the bs2_curve hull not turning too sharply.
void set_bs_hull_self_intersects (int pcu_no, int hull_self_ints)
 Sets the property in the underlying int_cur, of the bs2_curve hull self-intersecting (or not).
void set_bs_knots_on_curve (int pcu_no, int knots_on_cu)
 Sets the property in the underlying int_cur, of the bs2_curve of whether the knots lie on the intcurve.
void set_cur (bs3_curve cur, double tol=-1.0, logical delete_old_bs3=TRUE, logical allow_zero_fitol=FALSE)
 Replaces the underlying bs3_curve approximation.
void set_hull_enclosure (int pcu_no, int encl)
 Sets the curve enclosure in the underlying int_cur.
void set_periodic ()
 Marks an intcurve as periodic.
virtual curvesplit (double param, SPAposition const &pos=*(SPAposition *) NULL_REF)
 Divides an intcurve into two pieces at a parameter value.
curvesubset (SPAinterval const &inter) const
 Constructs a new curve, which is a copy of the portion of the given one within the specified parameter bounds.
logical subsetted () const
 Indicates whether this curve has a significant subset range.
surface const & surf1 (logical force=FALSE) const
 Returns the first surface supporting the curve.
surface const & surf2 (logical force=FALSE) const
 Returns the second surface supporting the curve.
curve_tancone tangent_cone (SPAinterval const &range, logical approx_OK, SPAtransf const &t=*(SPAtransf *) NULL_REF) const
 Returns a cone bounding the tangent direction of a curve.
logical test_point (const SPAposition &pos, const SPAparameter &param_guess=*(SPAparameter *) NULL_REF, SPAparameter &param_actual=*(SPAparameter *) NULL_REF) const
 Tests point-on-curve, optionally returning the exact parameter value if the point is on this curve.
virtual logical test_point_tol (SPAposition const &pt, double tol=0, SPAparameter const &guess=*(SPAparameter *) NULL_REF, SPAparameter &actual=*(SPAparameter *) NULL_REF) const
 Tests if a given point lies on the curve to a given precision.
virtual int type () const
 Returns the type of intcurve.
virtual char const * type_name () const
 Returns the string "intcurve".
virtual logical undef () const
 Indicates if the curve is defined or undefined.
logical undefined () const
 Indicates whether this curve is properly defined.
void unlimit ()
 Removes the parameter limits from this curve.
curveunsubset () const
 Constructs a copy of the unbounded curve underlying this one.
 ~intcurve ()
 C++ destructor, deleting an intcurve.

Protected Member Functions

virtual int finite_difference_derivatives (double param, SPAposition &pos, SPAvector **derivs, int nd, int nfound, double dt, evaluate_curve_side side) const
 Evaluate higher derivatives than are available accurately in evaluate by finite differencing.

Protected Attributes

SPAinterval subset_range
 Range to which this curve is subsetted.

Private Member Functions

void update_disc_info ()
 Update the discontinuity information if a change_event occurs.

Private Attributes

discontinuity_info disc_info
 Discontinuity information.
int_curfit
 Underlying definition of this curve.
logical rev
 This curve opposes the direction of the underlying int_cur.

Friends

intcurve operator* (intcurve const &, SPAtransf const &)
 Returns a copy of the transformed curve.
curverestore_curve ()
 Restores a curve.


Detailed Description

A parametric curve class.


Role: An intcurve is the general representation of any curve that is not defined by an explicit equation. It may represent a procedural curve that references other geometric entities (for instance, a procedural curve may be defined by the intersection of two surfaces or the projection of a curve onto a surface), or it may represent a NURBS curve.

The intcurve class represents a parametric, object-space curve that maps an interval of the real line (parameter-space) into a 3D real vector space (object-space). This mapping is continuous and one-to-one except possibly at the ends of the interval whose images may coincide. It is differentiable twice and the direction of the first derivative with respect to the parameter must be continuous. This direction is the positive sense of the curve.

If the two ends of the curve are different in object space, the curve is open. If they are the same, it is closed. If the curve joins itself smoothly, the curve is periodic, and its period is the length of the parameter-space interval that it is primarily defined. A periodic curve is defined for all parameter values by adding a multiple of the period to the parameter value so that the result is within the definition interval, and evaluating the curve at that resultant parameter. The point at the ends of the primary interval is known as the seam.

The intcurve contains a "reversed" bit together with a pointer to another structure, an int_cur or something derived from it, that contains the bulk of the information about the intcurve.

Providing this indirection serves two purposes. First, when an intcurve is duplicated, the copy simply points to the same int_cur, avoiding copying the bulk of the data. The system maintains a use count in each int_cur, that allows automatic duplication if a shared int_cur is to be modified, and deletes any int_cur no longer needed. Second, the int_cur contains virtual functions. These virtual functions perform all the operations defined for intcurves that depend on the method of definition of the true curve, so new intcurve types can be defined by declaring and implementing derived classes. The intcurve and everything using it require no changes to make use of the new definition.

The base class int_cur contains the following information for defining the curve:

Classes derived from int_cur can contain additional information and record the creation method of the true curve.

Note: Generally applications do not construct an intcurve using one of the intcurve constructors. Rather, they are usually constructed as the result of a higher level modeling operation using API functions.
See also:
discontinuity_info, int_cur, INTCURVE

Constructor & Destructor Documentation

intcurve::intcurve (  ) 

C++ allocation constructor requests memory for this object but does not populate it.

intcurve::intcurve ( bs3_curve  cur,
double  tol,
surface const &  surf1,
surface const &  surf2,
bs2_curve  cur1 = NULL,
bs2_curve  cur2 = NULL,
const SPAinterval inter = *(const class SPAinterval *) NULL_REF,
logical  parametric_is_primary = FALSE,
logical  make_tight_approx = FALSE 
)

C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.



Role: This constructor is often used to construct an "exact" B-spline curve from a bs3_curve, or an object-space curve that is based upon a object-space surface and a parameter-space curve. In the latter case, in which the parameter- space curve serves at the primary representation of curve, parametric_is_primary should be set to TRUE; for all other cases it is FALSE.

Parameters:
cur bs3_curve.
tol tolerance.
surf1 first surface.
surf2 second surface.
cur1 first bs2_curve.
cur2 second bs2_curve.
inter interval.
parametric_is_primary parameter-space representation is primary.

intcurve::intcurve ( curve_interp cur,
SPAbox const &  box = *(const class SPAbox *) NULL_REF,
logical  make_tight_approx = FALSE 
)

C++ interpolation constructor requests memory for this object and populates it with the data supplied as arguments.



Role: The curve_interp object contains all the data and methods needed to do the interpolation. In addition, a bounding box is supplied within which the fit tolerance must be met.

Parameters:
cur curve interpolation object.
box region of interest.

intcurve::intcurve ( int_cur intcur,
logical  make_tight_approx = FALSE 
)

C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.



Role: This creates an intcurve object when the underlying int_cur has been constructed. The int_cur is a derived type which does not need a curve fit or uses a non-standard one.

Parameters:
intcur defining int_cur.

intcurve::intcurve ( intcurve const &  intcur  ) 

C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument.



Parameters:
intcur given intcurve.

intcurve::~intcurve (  ) 

C++ destructor, deleting an intcurve.



Role: Deletes an intcurve by manipulating the use count of the underlying int_cur structure.


Member Function Documentation

virtual int intcurve::accurate_derivs ( SPAinterval const &  inter = *(SPAinterval *) NULL_REF  )  const [virtual]

Evaluates accurate derivatives.



Role: Returns the number of derivatives that evaluate finds accurately and directly, rather than by finite differencing, over the given portion of the curve. If there is no limit to the number of accurate derivatives, this method returns the value ALL_CURVE_DERIVATIVES.

Parameters:
inter region of interest. Defaults to the whole curve is not specified.

Reimplemented from curve.

virtual const double* intcurve::all_discontinuities ( int &  n_discont,
int  order 
) [virtual]

Returns, in a read-only array, the number and parameter values of discontinuities of the curve up to the given order (maximum three).



Parameters:
n_discont number of discontinuities.
order maximum order of discontinuity.

Reimplemented from curve.

virtual double intcurve::approx_error (  )  const [virtual]

Returns the maximum error between the approximate evaluation of this curve and the true evaluation of it.



Role: Returns a distance value, which represents the greatest discrepancy between positions calculated by calls to eval or eval_position with the approximate results obtained by setting the approx argument to TRUE or FALSE.

Reimplemented from curve.

SPAbox intcurve::bound ( double  start,
double  end,
SPAtransf const &  t = *(SPAtransf *)NULL_REF 
) const [inline]

Returns a box enclosing the portion of the curve defined between the two given parameter values.



Parameters:
start first parameter value.
end second parameter value.
t optional transformation.

Reimplemented from curve.

virtual SPAbox intcurve::bound ( SPAbox const &  box,
SPAtransf const &  trans = *(SPAtransf *) NULL_REF 
) const [virtual]

Returns a box surrounding that portion of the curve within the given box.



Parameters:
box region of interest.
trans optional transformation.

Implements curve.

virtual SPAbox intcurve::bound ( SPAinterval const &  inter,
SPAtransf const &  trans = *(SPAtransf *) NULL_REF 
) const [virtual]

Returns a box enclosing the specified interval the curve.



Parameters:
inter specified interval.
trans optional transformation.

Implements curve.

virtual SPAbox intcurve::bound ( SPAposition const &  pos1,
SPAposition const &  pos2,
SPAtransf const &  trans = *(SPAtransf *) NULL_REF 
) const [virtual]

Returns a box enclosing the portion of the curve between the two given points on the curve.



Parameters:
pos1 first position.
pos2 second position.
trans optional transformation.

Implements curve.

int intcurve::bs1_hull_angles_ok (  )  const

Checks if it is known that there is a good bs1_curve hull.



Role : Returns 1 if the bs1_curve hull turning angles are known to be acceptable, 0 if they are not acceptable, and -1 if unknown.

int intcurve::bs1_hull_self_intersects (  )  const

Checks if it is known that the bs1_curve self-intersects.



Role : Returns 1 if the bs1_curve hull is known to self-intersect, 0 if it does not, and -1 if unknown.

int intcurve::bs1_knots_on_curve (  )  const

Checks if it is known that the knots of the bs1_curve lie on the curve.



Role : Returns 1 if the bs1_curve knots are known to lie on the curve, 0 if they do not, and -1 if unknown.

int intcurve::bs2_hull_angles_ok (  )  const

Checks if it is known that there is a good bs2_curve hull.



Role : Returns 1 if the bs2_curve hull turning angles are known to be acceptable, 0 if they are not acceptable, and -1 if unknown.

int intcurve::bs2_hull_self_intersects (  )  const

Checks if the bs2_curve self-intersects.



Role : Returns 1 if the bs2_curve hull is known to self-intersect, 0 if it does not, and -1 if unknown.

int intcurve::bs2_knots_on_curve (  )  const

Checks if it is known that the knots of the bs2_curve lie on the curve.



Role : Returns 1 if the bs2_curve knots are known to lie on the curve, 0 if they do not, and -1 if unknown.

virtual void intcurve::change_event (  )  [virtual]

Notifies the derived type that the curve has been changed so that it can update itself.

Reimplemented from curve.

virtual check_status_list* intcurve::check ( const check_fix &  input = *(const check_fix *) NULL_REF,
check_fix &  result = *(check_fix *) NULL_REF,
const check_status_list list = (const check_status_list *) NULL_REF 
) [virtual]

Checks for any data errors in the curve, and corrects the errors if possible.



Role: The various arguments provide control over which checks are made, which fixes can be applied and which fixes were actually applied. The function returns a list of errors that remain in the curve on exit.

The default for the set of flags which say which fixes are allowable is none (nothing is fixed). If the list of checks to be made is null, then every possible check will be made. Otherwise, the function will only check for things in the list. The return value for the function will then be a subset of this list.

Parameters:
input flags for allowed fixes.
result fixes applied.
list checks to be made, default is none.

Reimplemented from curve.

virtual logical intcurve::closed (  )  const [virtual]

Indicates if an intcurve is closed.



Role: A closed curve joins itself (smoothly or not) at the ends of its principal parameter range. This method always returns TRUE if periodic returns TRUE.

Implements curve.

virtual void intcurve::closest_point ( SPAposition const &  pos,
SPAposition foot,
SPAparameter const &  param_guess = *(SPAparameter *) NULL_REF,
SPAparameter param_actual = *(SPAparameter *) NULL_REF 
) const [virtual]

Finds the closest point on the curve (the foot) to the given point, and optionally its parameter value.



Role: If an input parameter value is supplied (as the first parameter argument), the foot found is only a local solution nearest to the supplied parameter position. Any of the return value arguments may be a NULL reference, in which case it is simply ignored.

Parameters:
pos given position.
foot foot position.
param_guess input guess value of param.
param_actual actual value of param.

Reimplemented from curve.

curve* curve::copy_curve (  )  const [inline, inherited]

Makes a copy of this curve.

bs3_curve intcurve::cur ( double  tol = -1.0,
logical  force = FALSE 
) const

Returns the underlying bs3_curve.



Role: It returns NULL if there is no int_cur. The default value of -1.0 for the fit tolerance instructs the make_approx function to use whatever value it thinks is appropriate.

Parameters:
tol fit tolerance.
force if TRUE, method will return a bs3_curve even if it self-intersects

logical intcurve::cur_present (  )  const

Returns TRUE if the underlying int_cur contains a bs3_curve.



Role: Returns TRUE if the defining int_cur has a non-NULL bs3_curve, FALSE otherwise.

virtual void intcurve::debug ( char const *  title,
FILE *  fp = debug_file_ptr 
) const [virtual]

Outputs a title line and the details of the intcurve for inspection to standard output or to the specified file.



Parameters:
title title line.
fp file pointer.

Implements curve.

virtual curve* intcurve::deep_copy ( pointer_map pm = NULL  )  const [virtual]

Creates a copy of an intcurve that does not share any data with the original.



Role: Allocates new storage for all member data and any pointers. Returns a pointer to the copied item.

Parameters:
pm list of items within the entity that are already deep copied.

Implements curve.

virtual const double* intcurve::discontinuities ( int &  n_discont,
int  order 
) const [virtual]

Returns the number and parameter values of discontinuities of the curve in a read-only array of the given order (maximum three).



Parameters:
n_discont number of discontinuities.
order order of the discontinuities.

Reimplemented from curve.

virtual int intcurve::discontinuous_at ( double  t  )  const [virtual]

Determines whether a particular parameter value is a discontinuity.



Role: If there is a discontinuity at the given parameter value, returns the order of the discontinuity. Otherwise, returns 0.

Parameters:
t given parameter value.

Reimplemented from curve.

virtual curve_boundcyl intcurve::enclosing_cylinder ( const SPAinterval inter = *(SPAinterval *) NULL_REF  )  const [virtual]

Returns a cylinder that encloses the portion of the curve bounded by the interval.



Parameters:
inter region of interest.

Implements curve.

virtual void intcurve::eval ( double  value,
SPAposition pos,
SPAvector der1 = *(SPAvector *) NULL_REF,
SPAvector der2 = *(SPAvector *) NULL_REF,
logical  repeat = FALSE,
logical  approx = FALSE 
) const [virtual]

Evaluates the curve, giving the position and the first and second derivatives.



Parameters:
value given parameter value.
pos position.
der1 first derivative.
der2 second derivative.
repeat perform a repeat evaluation on a curve whose underlying geometry data has not changed?
approx approx results OK?

Reimplemented from curve.

virtual SPAvector intcurve::eval_curvature ( double  value,
logical  repeat = FALSE,
logical  approx = FALSE 
) const [virtual]

Finds the curvature at given parameter value.



Parameters:
value given parameter value.
repeat perform a repeat evaluation on a curve whose underlying geometry data has not changed?
approx approx results OK?

Reimplemented from curve.

virtual SPAvector intcurve::eval_deriv ( double  value,
logical  repeat = FALSE,
logical  approx = FALSE 
) const [virtual]

Finds the parametric derivative, magnitude, and direction, at given parameter value.



Parameters:
value given parameter value.
repeat perform a repeat evaluation on a curve whose underlying geometry data has not changed?
approx approx results OK?

Reimplemented from curve.

virtual double 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 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.

Reimplemented in straight.

virtual SPAunit_vector intcurve::eval_direction ( double  value,
logical  tangency = FALSE,
logical  approx = FALSE 
) const [virtual]

Finds the tangent direction at the given parameter value on the curve.



Parameters:
value given parameter value.
tangency determine tangency.
approx approx results OK?

Reimplemented from curve.

virtual SPAposition intcurve::eval_position ( double  value,
logical  repeat = FALSE,
logical  approx = FALSE 
) const [virtual]

Finds the position on a curve at the given parameter value.



Parameters:
value given parameter value.
repeat perform a repeat evaluation on a curve whose underlying geometry data has not changed?
approx approx results OK?

Reimplemented from curve.

virtual int intcurve::evaluate ( double  param,
SPAposition pt,
SPAvector **  vec = NULL,
int  der = 0,
evaluate_curve_side  location = evaluate_curve_unknown 
) const [virtual]

Evaluates the position and the first and second derivatives at given parameter value.



Parameters:
param given parameter value.
pt point.
vec array of pointers to vectors.
der number of derivatives required.
location the evaluation location - above, below or don't care.

Reimplemented from curve.

virtual int intcurve::evaluate_iter ( double  param,
curve_evaldata *  data,
SPAposition pt,
SPAvector **  vec = NULL,
int  deriv = 0,
evaluate_curve_side  location = evaluate_curve_unknown 
) const [virtual]

Evaluates the position and the first and second derivatives at given parameter value.



Role: The evaluate_iter function is just like evaluate, but is supplied with a data object which contains results from a previous close evaluation, for use as initial values for any iteration involved.

Parameters:
param given parameter value.
data Data supplying initial values, and set to reflect the results of this evaluation.
pt Point on curve at given parameter.
vec array of pointers to vectors.
deriv number of derivatives required.
location the evaluation location - above, below or don't care.

Reimplemented from curve.

virtual curve_extremum* intcurve::find_extrema ( SPAunit_vector const &  dir  )  const [virtual]

Finds the extrema of an intcurve in a given direction.



Role: This method ignores its ends unless it is closed. The default version uses the corresponding function for the approximating B-spline.

Parameters:
dir given direction.

Implements curve.

virtual int curve::finite_difference_derivatives ( double  param,
SPAposition pos,
SPAvector **  derivs,
int  nd,
int  nfound,
double  dt,
evaluate_curve_side  side 
) const [protected, virtual, inherited]

Evaluate higher derivatives than are available accurately in evaluate by finite differencing.



Role: Any of the derivs pointers may be NULL, in which case the corresponding derivative will not be returned.

Parameters:
param the parameter at which the curve is to be evaluated.
pos point on the curve at the given parameter.
derivs pointer arrays of derivatives.
nd the number of derivatives required.
nfound the number of derivatives already evaluated, and directly evaluable in the neighborhood of the param.
dt the finite differencing step to use.
side the evaluation location - above, below, or "don't care".

double intcurve::fitol (  )  const

Returns the fit tolerance.



Role: It returns 0 if there is no precise int_cur.

virtual const discontinuity_info& intcurve::get_disc_info (  )  const [virtual]

Returns read-only access to a discontinuity_info object, if there is one.



Role: The default version of the function returns NULL.

Reimplemented from curve.

virtual int curve::high_curvature ( double  k,
SPAinterval *&  spans 
) const [virtual, inherited]

Finds regions of high curvature of this curve.



Role: This method creates an array of intervals in the spans argument, to signify ranges over which the curvature exceeds the given value, k. It returns the number of intervals in the array. The array of intervals is created on the heap and it is the responsibility of the caller to provide for the destruction of this array.

Parameters:
k given curvature value.
spans the array of intervals.

Reimplemented in ellipse, helix, and straight.

int intcurve::hull1_enclosure (  )  const

Checks if it is known that the bs1_curve hull encloses the curve.



Role : Returns 1 if the bs1_curve hull is known to enclose the curve, 0 if it does not, and -1 if unknown.

int intcurve::hull2_enclosure (  )  const

Check if it is known that the bs2_curve hull encloses the curve.



Role : Returns 1 if the bs2_curve hull is known to enclose the curve, 0 if it does not, and -1 if unknown.

logical intcurve::join ( intcurve second,
int  order = -1 
)

Joins two pieces of intcurve together, adding a discontinuity of the given order at the join (if order is not supplied, or is nonpositive, then it is calculated).



Role: The curves must be suitable for joining. The following conditions must be satisfied:

  1. The start of the second curve must match the end of `this'.
  2. The underlying int_curs must have the same type.
  3. The first curve must be unlimited above, and the second curve unlimited below.


If any of these conditions are violated, the function returns FALSE and the curves are unchanged.

The other ends may also match, in which case they will also be joined and the final curve will be periodic. Join will be C1.

If the second curve is NULL, then the curve is made periodic if it was closed, providing the join ic C1.

Parameters:
second intcurve.
order discontinuity order.

law* intcurve::law_form (  )  [virtual]

Returns the law form for an intcurve.

Reimplemented from curve.

virtual double intcurve::length ( double  param1,
double  param2,
logical  approx_ok = TRUE 
) const [virtual]

Returns the algebraic distance along the curve between the given parameters.



Role: The value 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 a bounded curve. For a periodic curve, the parameters are not reduced to the principal range, and so the portion of the curve evaluated may include several complete circuits. This method is always a monotonically increasing function of its second argument if the first is held constant, and a decreasing function of its first argument if the second is held constant.

Parameters:
param1 first parameter.
param2 second parameter.
approx_ok If approx_ok is TRUE, the B-spline approximation is used in the length calculation.

Implements curve.

virtual double intcurve::length_param ( double  datum,
double  arc,
logical  approx_ok = TRUE 
) const [virtual]

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



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

Parameters:
datum datum parameter.
arc arc length.
approx_ok If approx_ok is TRUE, the B-spline approximation is used in the length calculation.

Implements curve.

void curve::limit ( const SPAinterval range  )  [inherited]

Subsets this curve in place, ensuring canonical results if the underlying curve is bounded or periodic.



Parameters:
range subset range.

virtual curve* intcurve::make_copy (  )  const [virtual]

Virtual function to copy a curve without knowing what its type is.

Implements curve.

virtual curve_evaldata* intcurve::make_evaldata (  )  const [virtual]

Constructs a data object to retain evaluation information across calls to evaluate_iter.



Role: This is to allow subsidiary calls within an iterative evaluator to start iteration much closer to the required result than is possible just using the curve information itself.

Reimplemented from curve.

void intcurve::make_single_ref (  ) 

Ensures that the reference supplied points to a singly-used record.



Role: Takes no action if it is already single, otherwise copies everything.

virtual logical intcurve::need_save_as_approx ( int  save_to_version,
logical  check_progenitors 
) const [virtual]

Queries whether the object needs to be saved to an old version as an approximation.



Role: Called by SAT save APIs with check_progenitors == TRUE to determine if an object needs to be tolerantly simplified before being saved to an old version. The check_progenitors flag indicates that the object should call need_save_as_approx on any curve or surface construction geometry upon which it depends, and return TRUE if any of the progenitors do. Customers with their own derived curve or surface types should override this routine to return TRUE whenever they want their geometry to be imported (as a B-spline approximation) into other applications or when saving to a version of their application before the derived geometry type in question existed.

Parameters:
save_to_version ACIS version to which the object will be saved
check_progenitors if TRUE, query construction geometry and base class as well

Reimplemented from curve.

virtual curve& intcurve::negate (  )  [virtual]

Negates an intcurve in place.



Role: This is a curve virtual function, which is why it returns a curve& instead of an intcurve&.

Implements curve.

logical curve::operator!= ( const curve cur  )  const [inline, inherited]

Tests this curve for inequality to another curve.



Parameters:
cur curve to compare for inequality.

virtual curve& intcurve::operator*= ( SPAtransf const &  trans  )  [virtual]

Transforms this intcurve by the given SPAtransf, in place.



Role: This is complicated by the effort to maintain sharing when several intcurves sharing the same int_cur are transformed successively with the same transformation. A list of transformed versions of each int_cur is maintained, and this method searches for a match before making a new one.

Parameters:
trans transformation.

Implements curve.

intcurve intcurve::operator- (  )  const

Negates the curve.

intcurve& intcurve::operator= ( intcurve const &  intcur  ) 

Assignment operator, which copies only the intcurve record and adjusts the use counts of the underlying information.



Parameters:
intcur intcurve.

virtual logical intcurve::operator== ( curve const &  intcur  )  const [virtual]

Tests two curves for equality.



Role: This method does not guarantee to say "equal" for effectively-equal curves, but it is guaranteed to say "not equal" if they are indeed not equal. Use the result for optimization, but not where it really matters. The default always says "not equal."

Parameters:
intcur intcurve.

Reimplemented from curve.

virtual logical intcurve::operator>> ( curve const &  intcur  )  const [virtual]

Determines whether a intcurve is entirely enclosed within another.

Reimplemented from curve.

virtual double intcurve::param ( SPAposition const &  pos,
SPAparameter const &  param = *(SPAparameter *) NULL_REF 
) const [virtual]

Returns the parameter value for a given point.



Parameters:
pos given position.
param guess parameter value.

Implements curve.

virtual double intcurve::param_period (  )  const [virtual]

Returns the period of a periodic curve.



Role: It returns 0 if the curve is not periodic.

Implements curve.

virtual SPAinterval intcurve::param_range ( SPAbox const &  box = *(SPAbox *) NULL_REF  )  const [virtual]

Returns the parameter range of the intcurve.



Parameters:
box region of interest.

Implements curve.

double intcurve::partol1 (  )  const

Returns the parameter space tolerance of the first parameter space curve.

double intcurve::partol2 (  )  const

Returns the parameter space tolerance of the second parameter space curve.

virtual pcurve* intcurve::pcur ( int  index,
logical  temporary = FALSE 
) const [virtual]

Returns the parameter space curves with respect to the surfaces defining this intcurve.



Role: index may be 1 or 2, representing the two surfaces in order, or -1 or -2 meaning the negation of those pcurves.

This method constructs a new pcurve on the heap and it is the responsibility of the caller to provide for the destruction of this pcurve.

Parameters:
index surface index.
temporary flag indicating if the pcurve returned is temporary.

Reimplemented from curve.

bs2_curve intcurve::pcur1 ( logical  force = FALSE  )  const

Returns a curve in parameter space of the surface returned by surf1, if the surface is parametric.



Role: Returns NULL if the surface (as returned by surf1) is NULL or not parametric.

Parameters:
force force surface return.

bs2_curve intcurve::pcur2 ( logical  force = FALSE  )  const

Returns a curve in parameter space of the surface returned by surf2, if the surface is parametric.



Role: Returns NULL if the surface (as returned by surf2) is NULL or not parametric.

Parameters:
force force surface return.

virtual logical intcurve::pcur_present ( int  nparam  )  const [virtual]

Returns TRUE if the nth parameter-space curve is defined.



Role: Returns TRUE if the nth parameter-space curve is defined (i.e., pcur returns a non-NULL pcurve pointer); otherwise, it returns FALSE.

Parameters:
nparam nth parameter-space curve.

Reimplemented from curve.

virtual logical intcurve::periodic (  )  const [virtual]

Indicates if the curve is periodic.



Role: A periodic curve joins itself smoothly with matching derivatives at the ends of its principal parameter range so that edges may span the seam.

Implements curve.

virtual SPAvector intcurve::point_curvature ( SPAposition const &  pt,
SPAparameter const &  guess = *(SPAparameter *) NULL_REF 
) const [virtual]

Finds the curvature at a point on the intcurve.



Parameters:
pt given point.
guess param guess.

Implements curve.

virtual SPAunit_vector intcurve::point_direction ( SPAposition const &  pt,
SPAparameter const &  guess = *(SPAparameter *) NULL_REF 
) const [virtual]

Finds the tangent direction of the intcurve at a point on the intcurve.



Parameters:
pt given point.
guess param guess.

Implements curve.

void intcurve::point_perp ( SPAposition const &  pos,
SPAposition foot,
SPAparameter const &  guess = *(SPAparameter *) NULL_REF,
SPAparameter actual = *(SPAparameter *) NULL_REF,
logical  f_weak = FALSE 
) const

Finds the foot of the perpendicular from the given point to the curve and its parameter value.



Role: If an input parameter value is supplied as the guess value, the perpendicular found is the one nearest to the supplied parameter 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 simply ignored.

Parameters:
pos given position.
foot returned foot.
guess guess parameter value.
actual returned actual parameter value.
f_weak weak flag.

Reimplemented from curve.

void intcurve::point_perp ( SPAposition const &  pos,
SPAposition foot,
SPAunit_vector tangent,
SPAparameter const &  guess = *(SPAparameter *) NULL_REF,
SPAparameter actual = *(SPAparameter *) NULL_REF,
logical  f_weak = FALSE 
) const

Finds the foot of the perpendicular from the given point to the curve and the tangent direction to the curve at that point and its parameter value.



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

Parameters:
pos given position.
foot returned foot.
tangent the returned tangent.
guess guess parameter value.
actual returned actual parameter value.
f_weak weak flag.

Reimplemented from curve.

virtual void intcurve::point_perp ( SPAposition const &  pos,
SPAposition foot,
SPAunit_vector tangent,
SPAvector cur,
SPAparameter const &  guess = *(SPAparameter *) NULL_REF,
SPAparameter actual = *(SPAparameter *) NULL_REF,
logical  f_weak = FALSE 
) const [virtual]

Finds the foot of the perpendicular from the given point to the curve and the curve tangent direction and curvature at that point and its parameter value.



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

Parameters:
pos given position.
foot returned foot.
tangent returned tangent.
cur returned curvature.
guess guess parameter value.
actual returned actual parameter value.
f_weak weak flag.

Implements curve.

void intcurve::reparam ( double  start,
double  end 
)

Reparameterizes the curve to start and end at the given parameter values, which are in increasing order.



Parameters:
start start parameter value.
end end parameter value.

void intcurve::replace_int_cur ( int_cur new_fit  ) 

Replaces the defining spline curve and should only be used with extreme caution.

void intcurve::restore_data (  ) 

Restores the data from a save file.



Role: The restore operation switches on a table defined by static instances of the restore_cu_def class. This invokes a simple friend function which constructs an object of the right derived type. Then it calls the appropriate base class member function to do the actual work. The restore_data function for each class can be called in circumstances when it is known what type of surface is to be expected and a surface of that type is on hand to be filled in.

 read_logical			Curve direction either "forward" or "reversed".
 if (restore_version_number < INTCURVE_VERSION)
 	// Restore as a surface-surface intersection object. The
 	// restore function for int_int_cur handles the possibility
 	// that it is in fact an exact_int_cur or a surf_int_cur.
 	subtype_object * dispatch_restore_subtype

 //Called with "cur" and "surfintcur". Restore just the data associated with
 //                                    that type of curve. In earlier versions,
 //                                    there was only one type of int_cur,
 //                                    which covered what is now "exact",
 //                                    "surf", and "int". There was no ID.
 else
 	// Switch to the right restore routine, using the standard
 	// system mechanism. Note that the argument is to enable
 	// the reader to distinguish old-style types where "exact"
 	// was both an int_cur and a spl_sur. They are now "exactcur"
 	// and "exactsur".
 	subtype_object * dispatch_restore_subtype
 //                                    Called with "cur"
 //                                    Restore the underlying curve. Generic curve data.
 

Reimplemented from curve.

logical intcurve::reversed (  )  const [inline]

Returns TRUE if the intcurve is reversed with respect to the underlying int_cur.

SPAinterval intcurve::safe_range (  )  const

Returns the safe range or an empty interval if there is no int_cur.

virtual void intcurve::save (  )  const [virtual]

Saves the curve type or id, then calls save_data.

Implements curve.

void curve::save_curve (  )  const [inherited]

Saves a curve of unknown type, or NULL.



Role: Simply checks for NULL, then calls save.

void intcurve::save_data (  )  const

Saves the intcurve data to a save file.

Reimplemented from curve.

void intcurve::set_bs_hull_angles_ok ( int  pcu_no,
int  hull_angles_ok 
)

Sets the property in the underlying int_cur, of the bs2_curve hull not turning too sharply.



Role: The first argument should be 1 or 2 to indicate the bs2_curve which the enclosure is being set for, and the second integer argument should be -1, 0 or 1, to indicate that the property is unknown, FALSE or TRUE.

Parameters:
pcu_no enclosure.
hull_angles_ok unknown, false or true.

void intcurve::set_bs_hull_self_intersects ( int  pcu_no,
int  hull_self_ints 
)

Sets the property in the underlying int_cur, of the bs2_curve hull self-intersecting (or not).



Role: The first argument should be 1 or 2, to indicate the bs2_curve which the enclosure is being set for, and the second integer argument should be -1, 0 or 1, to indicate that the property is unknown, FALSE or TRUE.

Parameters:
pcu_no enclosure.
hull_self_ints unknown, false or true.

void intcurve::set_bs_knots_on_curve ( int  pcu_no,
int  knots_on_cu 
)

Sets the property in the underlying int_cur, of the bs2_curve of whether the knots lie on the intcurve.



Role: The first argument should be 1 or 2, to indicate the bs2_curve which the enclosure is being set for, and the second integer argument should be -1, 0 or 1, to indicate that the property is unknown, FALSE or TRUE.

Parameters:
pcu_no enclosure.
knots_on_cu unknown, false or true.

void intcurve::set_cur ( bs3_curve  cur,
double  tol = -1.0,
logical  delete_old_bs3 = TRUE,
logical  allow_zero_fitol = FALSE 
)

Replaces the underlying bs3_curve approximation.



Role: Replaces the internal approximation with the one provided. If the supplied tolerance is negative, then it will be left unchanged.

Parameters:
cur given bs3_curve.
tol tolerance.
delete_old_bs3 Whether to delete the old bs3_curve or not.
allow_zero_fitol Whether to allow setting the fitol to zero.

void intcurve::set_hull_enclosure ( int  pcu_no,
int  encl 
)

Sets the curve enclosure in the underlying int_cur.



Role: The first argument should be 1 or 2, to indicate the bs2_curve which the enclosure is being set for, and the second integer argument should be -1, 0 or 1, to give the value for the hull enclosure.

Parameters:
pcu_no enclosure.
encl value.

void intcurve::set_periodic (  ) 

Marks an intcurve as periodic.



Role: This is used after splitting a periodic intcurve to restore the periodic status that the split changed to closed.

virtual curve* intcurve::split ( double  param,
SPAposition const &  pos = *(SPAposition *) NULL_REF 
) [virtual]

Divides an intcurve into two pieces at a parameter value.



Role: This method creates a new intcurve on the heap, but either one of the intcurves may have a NULL actual curve. After calling split, clients must call the undef method on the input curve and on the returned curve; if undef returns TRUE, the corresponding piece is undefined and must be deleted. The supplied curve is modified to be the latter section and the initial section is returned as a value.

Parameters:
param param value.
pos exact position.

Reimplemented from curve.

curve* intcurve::subset ( SPAinterval const &  inter  )  const

Constructs a new curve, which is a copy of the portion of the given one within the specified parameter bounds.



This method constructs a new intcurve on the heap and it is the responsibility of the caller to provide for the destruction of this intcurve.

Parameters:
inter specified interval.

Reimplemented from curve.

logical curve::subsetted (  )  const [inherited]

Indicates whether this curve has a significant subset range.

surface const& intcurve::surf1 ( logical  force = FALSE  )  const

Returns the first surface supporting the curve.



Role: By default, surfaces are only returned if the true curve lies on the surface. Surfaces defining the curve but distant from it are not returned. To force the surface to be returned regardless, the logical flag should be set to TRUE.

Parameters:
force force surface to be returned.

surface const& intcurve::surf2 ( logical  force = FALSE  )  const

Returns the second surface supporting the curve.



Role: By default, surfaces are only returned if the true curve lies on the surface. Surfaces defining the curve but distant from it are not returned. To force the surface to be returned regardless, the logical flag should be set to TRUE.

Parameters:
force force surface to be returned.

curve_tancone intcurve::tangent_cone ( SPAinterval const &  range,
logical  approx_OK,
SPAtransf const &  t = *(SPAtransf *) NULL_REF 
) const [virtual]

Returns a cone bounding the tangent direction of a curve.



Role: The cone has its apex at the origin and a given axis direction and (positive) half-angle. If approx_OK is TRUE, then a quick approximation may be found. The approximate result may lie wholly within or wholly outside the guaranteed bound (obtained with a FALSE argument), but it may not cross from inside to outside. Flags in the returned object indicate whether the cone is in fact the best available, and if this result is inside or outside the best cone.

Parameters:
range interval.
appox_OK approx results OK?
t transformation.

Implements curve.

logical curve::test_point ( const SPAposition pos,
const SPAparameter param_guess = *(SPAparameter*)NULL_REF,
SPAparameter param_actual = *(SPAparameter*)NULL_REF 
) const [inline, inherited]

Tests point-on-curve, optionally returning the exact parameter value if the point is on this 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 intcurve::test_point_tol ( SPAposition const &  pt,
double  tol = 0,
SPAparameter const &  guess = *(SPAparameter *) NULL_REF,
SPAparameter actual = *(SPAparameter *) NULL_REF 
) const [virtual]

Tests if a given point lies on the curve to a given precision.



Role: The default version uses the corresponding function for the approximating B-spline, to a tolerance expanded using the fit tolerance, and then tests the perpendicular to the true curve. It is suitable for most derived classes.

Parameters:
pt given point.
tol given tolerance.
guess parameter guess.
actual actual parameter.

Implements curve.

virtual int intcurve::type (  )  const [virtual]

Returns the type of intcurve.

Implements curve.

virtual char const* intcurve::type_name (  )  const [virtual]

Returns the string "intcurve".

Implements curve.

virtual logical intcurve::undef (  )  const [virtual]

Indicates if the curve is defined or undefined.

Reimplemented from curve.

logical curve::undefined (  )  const [inline, inherited]

Indicates whether this curve is properly defined.



Role: A NULL or generic curve is always undefined - other curves depend on their contents.

void curve::unlimit (  )  [inherited]

Removes the parameter limits from this curve.

curve* curve::unsubset (  )  const [inherited]

Constructs a copy of the unbounded curve underlying this one.

void intcurve::update_disc_info (  )  [private]

Update the discontinuity information if a change_event occurs.


Friends And Related Function Documentation

intcurve operator* ( intcurve const &  ,
SPAtransf const &   
) [friend]

Returns a copy of the transformed curve.



Parameters:
intcur given intcurve.
trans given transformation.

curve* restore_curve (  )  [friend, inherited]

Restores a curve.



Role: Although this internal function is intended strictly for ACIS usage, a minimal amount of information about this function is provided for the sole purpose of being able to understand and trace restoration from a SAT file. This function should never be called directly, because it makes assumptions about the availability of a SAT file, the location of the input pointer into the SAT file, and the validity of SAT data it expects to read in. It also may start a lengthy process of nested function or class method calls, which have many of the same assumptions.

The restore function does the actual work of restoring the curve. It calls the base class, then reads the selector, if the save file is new enough. This reads the curve type and then switches in the run-time table to the correct restore routine.

    if (restore_version_number < CURVE_VERSION)
       read_int            Integer for the type of curve.
       dispatch_restore_cu Supply the number for the type of curve.
    else
       read_id             Reads in the string associated with the curve identification.
       dispatch_restore_cu Supply the curve identification for the type of curve.


Member Data Documentation

Discontinuity information.



Role : If the supporting surfaces of the curve has discontinuities, or if the curve has a default (tangent) extension, then it will have discontinuities. These are stored here. Note that this is a copy of the data stored in the corresponding int_cur, but with values outside the subset range removed. It is necessary to keep a separate copy to provide a read-only array to the data because the curve may be periodic, and the subset may span the periodic joins, resulting in discontinuities which may be outside the periodic range.

See also:
discontinuity_info

int_cur* intcurve::fit [private]

Underlying definition of this curve.

logical intcurve::rev [private]

This curve opposes the direction of the underlying int_cur.

SPAinterval curve::subset_range [protected, inherited]

Range to which this curve is subsetted.