#include <heldef.hxx>


Public Member Functions | |
| virtual int | accurate_derivs (SPAinterval const &cur=*(SPAinterval *) NULL_REF) const |
| Returns the number of derivatives that the evaluate function can find accurately. | |
| virtual const double * | all_discontinuities (int &n_discont, int order) |
Returns the number and parameter values of all discontinuities of this 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. | |
| const SPAunit_vector & | axis_dir () const |
Returns the axis direction of this helix. | |
| const SPAposition & | axis_root () const |
Returns the root of this helix. | |
| SPAbox | bound (double start, double end, const SPAtransf &transf=*(SPAtransf *) NULL_REF) const |
| Retained temporarily for historical reasons. | |
| virtual SPAbox | bound (SPAbox const ®ion, SPAtransf const &trans=*(SPAtransf *) NULL_REF) const |
| Returns a bounding box around the portion of the helix inside a given box. | |
| virtual SPAbox | bound (SPAinterval const &range, SPAtransf const &trans=*(SPAtransf *) NULL_REF) const |
| Finds box around a helix or portion thereof bounded by parameter values (in increasing order). | |
| virtual SPAbox | bound (SPAposition const &p1, SPAposition const &p2, SPAtransf const &trans=*(SPAtransf *) NULL_REF) const |
| Finds box around a helix or portion thereof bounded by points on the curve. | |
| virtual void | change_event () |
Notifies the derived type that this curve has been changed. | |
| check_status_list * | check (const check_fix &fix, check_fix &fixed, const check_status_list *check_list) |
| Check for any data errors in the helix, and correct the errors if possible. | |
| virtual logical | closed () const |
| Indicates whether a curve is closed, that is joins itself (smoothly or not) at the ends of its principal parameter range. | |
| virtual void | closest_point (const SPAposition &pos, SPAposition &foot, const SPAparameter ¶m_guess=*(SPAparameter *) NULL_REF, SPAparameter ¶m_actual=*(SPAparameter *) NULL_REF) const |
Finds the closest point on this curve (the foot) to the given point. | |
| curve * | copy_curve () const |
Makes a copy of this curve. | |
| virtual void | debug (char const *leader, FILE *fp=debug_file_ptr) const |
| Output details of the helix for inspection. | |
| virtual curve * | deep_copy (pointer_map *pm=NULL) const |
| Creates a copy of an item 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 this curve, of the given order (maximum three), in a read-only array. | |
| virtual int | discontinuous_at (double t) const |
Determines whether a particular parameter value represents a discontinuity of this curve. | |
| virtual curve_boundcyl | enclosing_cylinder (const SPAinterval &interval=*(SPAinterval *) NULL_REF) const |
| Returns a cylinder that encloses the portion of the curve bounded by the interval. | |
| virtual void | eval (double val, SPAposition &posi, SPAvector &first=*(SPAvector *) NULL_REF, SPAvector &second=*(SPAvector *) NULL_REF, logical repeat=FALSE, logical logi=FALSE) const |
| Evaluates a curve at a given parameter value, giving position, and first and second derivatives (all optionally). | |
| 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 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 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 curve. | |
| virtual 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 curve. | |
| virtual SPAposition | eval_position (double param, logical eval_repeated=FALSE, logical approx_ok=FALSE) const |
Finds the point on this curve corresponding to a given parameter value. | |
| virtual int | evaluate (double val, SPAposition &pt, SPAvector **ptr_arr=NULL, int num=0, evaluate_curve_side loc=evaluate_curve_unknown) const |
| Calculates derivatives, of any order up to the number requested, and stores them in vectors provided by the user. | |
| virtual int | evaluate_iter (double param, curve_evaldata *ini_data, SPAposition &pos, SPAvector **derivs=NULL, int num=0, evaluate_curve_side side=evaluate_curve_unknown) const |
| Calculates derivatives, of any order up to the number requested, in an iterative fashion. | |
| virtual curve_extremum * | find_extrema (SPAunit_vector const &dirc) const |
| Finds the extrema of a helix in a given direction. | |
| virtual const discontinuity_info & | get_disc_info () const |
Returns read-only access to a discontinuity_info object, if there is one. | |
| logical | handedness () const |
Returns the handedness of this helix. | |
| helix (helix const &name) | |
| C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument. | |
| helix (SPAposition const &axis_root, SPAunit_vector const &axis_dir, SPAvector const &start_disp, double pitch, logical handedness, SPAinterval const &helix_range, double par_scaling=1.0, double taper=0.0) | |
| C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments. | |
| helix () | |
| C++ allocation constructor requests memory for this object but does not populate it. | |
| virtual SPAinterval | helix_range () const |
| For back saves. | |
| int | high_curvature (double k, SPAinterval *&spans) const |
| Finds regions of high curvature of the curve. | |
| law * | law_form () |
| Returns a pointer to the law form that is part of the helix definition. | |
| virtual double | length (double first, double second, logical approx_ok=TRUE) const |
| Arc length. | |
| virtual double | length_param (double para, double len, logical approx_ok=TRUE) const |
| The inverse of the length function 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. | |
| SPAunit_vector | maj_dir () const |
Returns the major direction of this helix. | |
| virtual curve * | make_copy () const |
| Makes a copy of this helix on the heap, and return a pointer to it. | |
| virtual curve_evaldata * | make_evaldata () const |
Constructs a data object to retain evaluation information across calls to the evaluate_iter method. | |
| logical | need_save_as_approx (int save_to_version, logical) const |
| Queries whether the object needs to be saved to an old version as an approximation. | |
| virtual curve & | negate () |
| Negates this helix, i.e. | |
| logical | operator!= (const curve &cur) const |
Tests this curve for inequality to another curve. | |
| virtual curve & | operator*= (SPAtransf const &trans) |
Transforms this helix by the given SPAtransf, in place. | |
| helix | operator- () const |
| Returns a helix with the opposite sense from this one. | |
| virtual logical | operator== (curve const &name) const |
| Tests two curves for equality. | |
| double | par_scaling () const |
Returns the parameter scaling of this helix. | |
| virtual double | param (SPAposition const &name, SPAparameter const &cur=*(SPAparameter *) NULL_REF) const |
| Finds the parameter value at the given point on the helix. | |
| virtual double | param_period () const |
| Returns the period of the curve parameter. | |
| virtual SPAinterval | param_range (SPAbox const &box=*(SPAbox *) NULL_REF) const |
| Returns the parameter range of the helix. | |
| virtual pcurve * | pcur (int n, logical copy_curve=FALSE) const |
| Returns the nth parametric curve. | |
| virtual logical | pcur_present (int n) const |
Determines if the nth parameter-space curve is defined for this curve. | |
| virtual logical | periodic () const |
| Indicates whether a curve is periodic. | |
| double | pitch () const |
Returns the pitch of this helix. | |
| virtual SPAvector | point_curvature (SPAposition const &posi, SPAparameter const ¶=*(SPAparameter *) NULL_REF) const |
| Finds the curvature on a helix at the given point on the curve. | |
| virtual SPAunit_vector | point_direction (SPAposition const &posi, SPAparameter const ¶=*(SPAparameter *) NULL_REF) const |
| Finds the tangent to a helix at the given point on the curve. | |
| 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. | |
| void | point_perp (SPAposition const &pos, SPAposition &foot, SPAunit_vector &foot_dt, 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. | |
| virtual void | point_perp (SPAposition const &pt, SPAposition &ft, SPAunit_vector &vec, SPAvector &cur, SPAparameter const ¶m_guess=*(SPAparameter *) NULL_REF, SPAparameter &act_guess=*(SPAparameter *) NULL_REF, logical f_weak=FALSE) const |
| Finds the foot of the perpendicular from the given point to the curve. | |
| double | radius () const |
Returns the radius of this helix. | |
| void | reparam (double start, double end) |
| Reparameterizes the helix to start and end at the given values, which are in increasing order. | |
| void | restore_data () |
| Restores the data for a helix from a save file. | |
| virtual void | save () const |
Saves the id, then calls save_data. | |
| void | save_curve () const |
Saves a curve of unknown type, or NULL. | |
| void | save_data () const |
| Saves the data for a helix to a save file. | |
| virtual curve * | split (double param, const SPAposition &pos=*(SPAposition *) NULL_REF) |
Splits this curve at the given parameter value, if possible. | |
| const SPAvector & | start_disp () const |
Returns the start displacement of this helix. | |
| curve * | subset (const SPAinterval &range) const |
Constructs a subsetted copy of this curve. | |
| logical | subsetted () const |
Indicates whether this curve has a significant subset range. | |
| virtual curve_tancone | tangent_cone (SPAinterval const &range, logical approx=FALSE, SPAtransf const &trans=*(SPAtransf *) NULL_REF) const |
| Returns a cone bounding the tangent direction of the curve. | |
| double | taper () const |
Returns the taper of this helix. | |
| logical | test_point (const SPAposition &pos, const SPAparameter ¶m_guess=*(SPAparameter *) NULL_REF, SPAparameter ¶m_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 ¶m_guess=*(SPAparameter *) NULL_REF, SPAparameter &act_param=*(SPAparameter *) NULL_REF) const |
| Tests point-on-curve to given precision, returning its parameter value as well if requested. | |
| virtual int | type () const |
| Returns an identifier uniquely specifying the curve type. | |
| virtual char const * | type_name () const |
Returns a string "helix". | |
| virtual logical | undef () const |
| Indicates whether the helix is properly defined. | |
| logical | undefined () const |
Indicates whether this curve is properly defined. | |
| void | unlimit () |
Removes the parameter limits from this curve. | |
| curve * | unsubset () const |
| Constructs a copy of the unbounded curve underlying this one. | |
| ~helix () | |
C++ destructor, deleting a helix. | |
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 | |
| SPAunit_vector | _axis_dir |
| Axis direction. | |
| SPAposition | _axis_root |
| Axis root position of helix. | |
| logical | _handedness |
| Handedness of the helix. | |
| SPAinterval | _helix_range |
| Maximum range of the helix. | |
| double | _par_scaling |
| Parameter scaling of the helix. | |
| double | _pitch |
| Thread distance (pitch) of the helix. | |
| SPAvector | _start_disp |
| Vector defining the displacement from the axis root position to a start point on helix. | |
| double | _taper |
| Taper of the helix. | |
| SPAinterval | subset_range |
Range to which this curve is subsetted. | |
Friends | |
| helix | operator* (helix const &, SPAtransf const &) |
| Returns a helix transformed by the given transformation. | |
| curve * | restore_curve () |
| Restores a curve. | |
Role: The curve is defined by a point on the axis (its root point), axis direction, displacement vector from root point to a point on the curve (start_disp), pitch, taper, handedness, parameter scaling and parameter range. The general case is a tapered helix. For an untapered helix the taper is exactly 0.0.
The curve is parameterized by:
point = axis_root + axis_dir * pitch * t/(2*pi*t0) +
X_hat * r(t) * cos(t/t0) + sgn(handedness) * Y_hat * r(t) * sin(t/t0)
where X_hat is defined by projecting start_disp onto the plane perpendicular to the axis direction and then normalising:
start_disp_proj = start_disp - (start_disp % axis_dir) * axis_dir
X_hat = start_disp_proj / start_disp_proj.len()
r(t) = start_disp_proj.len() + taper * t / (2*pi*t0)
(X_hat, Y_hat, axis_dir) is a right handed coordinate system
sgn(handedness) = +1 if handedness == TRUE,
= -1 if handedness == FALSE.
t0 = parameter_scaling > 0
pitch > 0
| helix::helix | ( | ) |
C++ allocation constructor requests memory for this object but does not populate it.
| helix::helix | ( | SPAposition const & | axis_root, | |
| SPAunit_vector const & | axis_dir, | |||
| SPAvector const & | start_disp, | |||
| double | pitch, | |||
| logical | handedness, | |||
| SPAinterval const & | helix_range, | |||
| double | par_scaling = 1.0, |
|||
| double | taper = 0.0 | |||
| ) |
C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.
Role: Constructs a helix from its parameters.
| axis_root | axis root position. | |
| axis_dir | axis direction. | |
| start_disp | displacement to start point. | |
| pitch | pitch (distance between turns along axis direction). | |
| handedness | handedness (TRUE is right, FALSE is left). | |
| helix_range | maximum parameter range (must be bounded) | |
| par_scaling | parameter scaling (one turn corresponds to parameter distance of 2*pi*par_scaling ). | |
| taper | taper (radial distance between turns). |
| helix::~helix | ( | ) |
C++ destructor, deleting a helix.
| helix::helix | ( | helix const & | name | ) |
C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument.
| name | helix name. |
| virtual int helix::accurate_derivs | ( | SPAinterval const & | cur = *(SPAinterval *) NULL_REF |
) | const [virtual] |
| virtual const double* curve::all_discontinuities | ( | int & | n_discont, | |
| int | order | |||
| ) | [virtual, inherited] |
| virtual double curve::approx_error | ( | ) | const [virtual, inherited] |
| const SPAunit_vector& helix::axis_dir | ( | ) | const [inline] |
Returns the axis direction of this helix.
| const SPAposition& helix::axis_root | ( | ) | const [inline] |
Returns the root of this helix.
| virtual SPAbox helix::bound | ( | SPAinterval const & | range, | |
| SPAtransf const & | trans = *(SPAtransf *) NULL_REF | |||
| ) | const [virtual] |
| virtual SPAbox helix::bound | ( | SPAposition const & | p1, | |
| SPAposition const & | p2, | |||
| SPAtransf const & | trans = *(SPAtransf *) NULL_REF | |||
| ) | const [virtual] |
Finds box around a helix or portion thereof bounded by points on the curve.
Role: Increasing in parameter value. The points lie on the curve as supplied, not as transformed. The resulting box is not necessarily the minimal one.
| p1 | first position. | |
| p2 | second position. | |
| trans | transformation. |
Implements curve.
| virtual void curve::change_event | ( | ) | [virtual, inherited] |
| check_status_list* helix::check | ( | const check_fix & | fix, | |
| check_fix & | fixed, | |||
| const check_status_list * | check_list | |||
| ) | [virtual] |
Check for any data errors in the helix, and correct the errors if possible.
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. This version of the function fixes nothing. The only check which is done is the spiral check.
Reimplemented from curve.
| virtual logical helix::closed | ( | ) | const [virtual] |
| virtual void curve::closest_point | ( | const SPAposition & | pos, | |
| SPAposition & | foot, | |||
| const SPAparameter & | param_guess = *(SPAparameter*)NULL_REF, |
|||
| SPAparameter & | param_actual = *(SPAparameter*)NULL_REF | |||
| ) | const [inline, virtual, inherited] |
Finds the closest point on this curve (the foot) to the given point.
Role: Optionally finds its parameter value as well. If an input parameter is supplied (as the first SPAparameter argument), the foot found is only the local solution nearest to the supplied parameter's position. Any of the return value arguments may be a NULL reference, in which case it is simply ignored.
| virtual void helix::debug | ( | char const * | leader, | |
| FILE * | fp = debug_file_ptr | |||
| ) | const [virtual] |
| virtual curve* helix::deep_copy | ( | pointer_map * | pm = NULL |
) | const [virtual] |
Creates a copy of an item 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.
| pm | list of items within the entity that are already deep copied. |
Implements curve.
| virtual const double* curve::discontinuities | ( | int & | n_discont, | |
| int | order | |||
| ) | const [virtual, inherited] |
| virtual int curve::discontinuous_at | ( | double | t | ) | const [virtual, inherited] |
| virtual curve_boundcyl helix::enclosing_cylinder | ( | const SPAinterval & | interval = *(SPAinterval *) NULL_REF |
) | const [virtual] |
| virtual void helix::eval | ( | double | val, | |
| SPAposition & | posi, | |||
| SPAvector & | first = *(SPAvector *) NULL_REF, |
|||
| SPAvector & | second = *(SPAvector *) NULL_REF, |
|||
| logical | repeat = FALSE, |
|||
| logical | logi = FALSE | |||
| ) | const [virtual] |
Evaluates a curve at a given parameter value, giving position, and first and second derivatives (all optionally).
Role: The first logical argument, if TRUE, is a guarantee from the calling code that the most recent call to any curve or surface member function was in fact to this routine for the same curve as the current call. It allows an implementation to cache useful intermediate results to speed up repeated evaluations, but must be used with extreme care.
The second logical argument may be set TRUE if an approximate return value is acceptable. Here approximate is not very well-defined, but may be assumed to be sufficient for visual inspection of the curve.
| val | parameter value. | |
| posi | position. | |
| first | first derivative. | |
| second | second derivative. | |
| repeat | repeat. | |
| logi | logical. |
Reimplemented from curve.
| virtual SPAvector 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 curve.
Role: See the description of the eval method regarding the two logical arguments.
| 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 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 curve.
Role: See the description of the eval method regarding the two logical arguments.
| 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 intcurve.
| 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.
| 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 curve::eval_direction | ( | double | param, | |
| logical | eval_repeated = FALSE, |
|||
| logical | approx_ok = FALSE | |||
| ) | const [virtual, inherited] |
Finds the tangent direction at the given parameter value on this curve.
Role: See the description of the eval method regarding the two logical arguments.
| 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 intcurve.
| virtual SPAposition curve::eval_position | ( | double | param, | |
| logical | eval_repeated = FALSE, |
|||
| logical | approx_ok = FALSE | |||
| ) | const [virtual, inherited] |
Finds the point on this curve corresponding to a given parameter value.
Role: See the description of the eval method regarding the two logical arguments.
| 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 intcurve.
| virtual int helix::evaluate | ( | double | val, | |
| SPAposition & | pt, | |||
| SPAvector ** | ptr_arr = NULL, |
|||
| int | num = 0, |
|||
| evaluate_curve_side | loc = evaluate_curve_unknown | |||
| ) | const [virtual] |
Calculates derivatives, of any order up to the number requested, and stores them in vectors provided by the user.
Role: This function returns the number it was able to calculate; this is equal to the number requested in all but the most exceptional circumstances. A certain number are evaluated directly and (more or less) accurately; higher derivatives will be automatically calculated by finite differencing; the accuracy of these decreases with the order of the derivative, as the cost increases.
| val | parameter value. | |
| pt | point on curve at given parameter. | |
| ptr_arr | ptr array to derivative vectors. | |
| num | number of derivatives. | |
| loc | the evaluation location. |
Reimplemented from curve.
| virtual int curve::evaluate_iter | ( | double | param, | |
| curve_evaldata * | ini_data, | |||
| SPAposition & | pos, | |||
| SPAvector ** | derivs = NULL, |
|||
| int | num = 0, |
|||
| evaluate_curve_side | side = evaluate_curve_unknown | |||
| ) | const [virtual, inherited] |
Calculates derivatives, of any order up to the number requested, in an iterative fashion.
Role: The purpose of this method is the same as that of evaluate, but evaluate_iter is additionally supplied with a data object that contains results from a previous close evaluation, for use as initial values for any iteration involved. This object may furthermore be updated to reflect the results of this evaluation. The default implementation simply ignores this object and calls evaluate.
| param | the parameter at which the curve is to be evaluated. | |
| ini_data | data supplying initial values. | |
| pos | point on the curve at the given parameter. | |
| derivs | pointer arrays of derivatives. | |
| num | the number of derivatives required. | |
| side | the evaluation location - above, below, or "don't care". |
Reimplemented in intcurve.
| virtual curve_extremum* helix::find_extrema | ( | SPAunit_vector const & | dirc | ) | const [virtual] |
| 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.
| 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". |
| virtual const discontinuity_info& curve::get_disc_info | ( | ) | const [virtual, inherited] |
Returns read-only access to a discontinuity_info object, if there is one.
Role: The default version of this method returns NULL.
Reimplemented in intcurve.
| logical helix::handedness | ( | ) | const [inline] |
Returns the handedness of this helix.
| virtual SPAinterval helix::helix_range | ( | ) | const [inline, virtual] |
For back saves.
| int helix::high_curvature | ( | double | k, | |
| SPAinterval *& | spans | |||
| ) | const [virtual] |
| law* helix::law_form | ( | ) | [virtual] |
| virtual double helix::length | ( | double | first, | |
| double | second, | |||
| logical | approx_ok = TRUE | |||
| ) | const [virtual] |
Arc length.
Role: Returns the algebraic distance along the curve between the given parameters, the sign being 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 function is therefore 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.
| first | first parameter. | |
| second | second parameter. | |
| approx_ok | not used for helices. |
Implements curve.
| virtual double helix::length_param | ( | double | para, | |
| double | len, | |||
| logical | approx_ok = TRUE | |||
| ) | const [virtual] |
The inverse of the length function 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.
| para | datum parameter. | |
| len | arc length. | |
| approx_ok | not used for helices. |
Implements curve.
| void curve::limit | ( | const SPAinterval & | range | ) | [inherited] |
| SPAunit_vector helix::maj_dir | ( | ) | const |
Returns the major direction of this helix.
| virtual curve* helix::make_copy | ( | ) | const [virtual] |
| virtual curve_evaldata* curve::make_evaldata | ( | ) | const [virtual, inherited] |
Constructs a data object to retain evaluation information across calls to the evaluate_iter method.
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. The default returns NULL, indicating that no special information is required or usable.
Reimplemented in intcurve.
| logical helix::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.
| 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& helix::negate | ( | ) | [virtual] |
| logical curve::operator!= | ( | const curve & | cur | ) | const [inline, inherited] |
| virtual logical helix::operator== | ( | curve const & | name | ) | const [virtual] |
| double helix::par_scaling | ( | ) | const [inline] |
Returns the parameter scaling of this helix.
| virtual double helix::param | ( | SPAposition const & | name, | |
| SPAparameter const & | cur = *(SPAparameter *) NULL_REF | |||
| ) | const [virtual] |
| virtual double helix::param_period | ( | ) | const [virtual] |
| virtual SPAinterval helix::param_range | ( | SPAbox const & | box = *(SPAbox *) NULL_REF |
) | const [virtual] |
| virtual pcurve* curve::pcur | ( | int | n, | |
| logical | copy_curve = FALSE | |||
| ) | const [virtual, inherited] |
Returns the nth parametric curve.
Role: If this curve is defined with respect to n or more surfaces and the nth is parametric, this method returns the corresponding pcurve; otherwise, NULL is returned. If the argument is negative, this method returns the pcurve corresponding to the absolute value of the argument, but reversed in sense.
| n | integer denoting the parameter-space curve. | |
| copy_curve | flag indicating whether the pcurve returned is temporary - if so, the bs2_curve will not be copied, improving performance. |
Reimplemented in intcurve.
| virtual logical curve::pcur_present | ( | int | n | ) | const [virtual, inherited] |
| virtual logical helix::periodic | ( | ) | const [virtual] |
| double helix::pitch | ( | ) | const [inline] |
Returns the pitch of this helix.
| virtual SPAvector helix::point_curvature | ( | SPAposition const & | posi, | |
| SPAparameter const & | para = *(SPAparameter *) NULL_REF | |||
| ) | const [virtual] |
| virtual SPAunit_vector helix::point_direction | ( | SPAposition const & | posi, | |
| SPAparameter const & | para = *(SPAparameter *) NULL_REF | |||
| ) | const [virtual] |
Finds the tangent to a helix at the given point on the curve.
Role: If the point is not on the helix, a useful value is returned. In effect, the half-plane bounded by the axis of the helix that contains the given point is constructed. The tangent of the curve where it intersects this half plane is returned (all the points give the same result for a helix). If the point is on the axis, so a half plane cannot be constructed, a zero tangent vector is returned.
| posi | position. | |
| para | parameter. |
Implements curve.
| void helix::point_perp | ( | SPAposition const & | pos, | |
| SPAposition & | foot, | |||
| SPAparameter const & | guess = *(SPAparameter *)NULL_REF, |
|||
| SPAparameter & | actual = *(SPAparameter *)NULL_REF, |
|||
| logical | f_weak = FALSE | |||
| ) | const [inline] |
Finds the foot of the perpendicular from the given point to the curve.
Role: Finds the foot of the perpendicular from the given point to the curve, as well as the curve direction and parameter. If an approximate parameter is given, the perpendicular is the one nearest to that parameter value, otherwise it is nearest to the given point.
| pos | point. | |
| foot | foot. | |
| guess | param guess. | |
| actual | actual guess. | |
| f_weak | weak flag. |
Reimplemented from curve.
| void helix::point_perp | ( | SPAposition const & | pos, | |
| SPAposition & | foot, | |||
| SPAunit_vector & | foot_dt, | |||
| SPAparameter const & | guess = *(SPAparameter *)NULL_REF, |
|||
| SPAparameter & | actual = *(SPAparameter *)NULL_REF, |
|||
| logical | f_weak = FALSE | |||
| ) | const [inline] |
Finds the foot of the perpendicular from the given point to the curve.
Role: Finds the foot of the perpendicular from the given point to the curve, and tangent to the curve at that point, and its parameter value. If an input parameter value is supplied (as argument 5), the perpendicular found is the one nearest to the supplied parameter position, otherwise it is the one that 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.
| pos | point. | |
| foot | foot. | |
| foot_dt | direction. | |
| guess | param guess. | |
| actual | actual guess. | |
| f_weak | weak flag. |
Reimplemented from curve.
| virtual void helix::point_perp | ( | SPAposition const & | pt, | |
| SPAposition & | ft, | |||
| SPAunit_vector & | vec, | |||
| SPAvector & | cur, | |||
| SPAparameter const & | param_guess = *(SPAparameter *) NULL_REF, |
|||
| SPAparameter & | act_guess = *(SPAparameter *) NULL_REF, |
|||
| logical | f_weak = FALSE | |||
| ) | const [virtual] |
Finds the foot of the perpendicular from the given point to the curve.
Role: Finds the foot of the perpendicular from the given point to the curve, and tangent to the curve at that point, and its parameter value. If an input parameter value is supplied (as argument 5), the perpendicular found is the one nearest to the supplied parameter position, otherwise it is the one that 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.
| pt | point. | |
| ft | foot. | |
| vec | direction vector. | |
| cur | curvature. | |
| param_guess | param guess. | |
| act_guess | actual guess. | |
| f_weak | weak flag. |
Implements curve.
| double helix::radius | ( | ) | const |
Returns the radius of this helix.
| void helix::reparam | ( | double | start, | |
| double | end | |||
| ) |
Reparameterizes the helix to start and end at the given values, which are in increasing order.
| start | start point. | |
| end | end point. |
| void helix::restore_data | ( | ) |
Restores the data for a helix from a save file.
Role: Switching, for the derived class save, goes through the normal virtual function mechanism. Until restore is invoked there is not an object of the right class. Instead, we switch on a table defined by static instances of the restore_su_def class, to invoke a simple friend function that constructs an object of the right (derived) type.
Then it can call the appropriate member function to do the actual work. The save_data and restore_data function for each class is called in circumstances when the type of surface is known and there is one available to be filled in.
read_position read_unit_vector read_vector read_real read_logical read_real read_real read_interval curve::restore_data Reimplemented from curve.
| virtual void helix::save | ( | ) | const [virtual] |
| void curve::save_curve | ( | ) | const [inherited] |
Saves a curve of unknown type, or NULL.
Role: Simply checks for NULL, then calls save.
| void helix::save_data | ( | ) | const |
| virtual curve* curve::split | ( | double | param, | |
| const SPAposition & | pos = *(SPAposition *) NULL_REF | |||
| ) | [virtual, inherited] |
Splits this curve at the given parameter value, if possible.
Role: If the curve is splittable, constructs a new curve coincident with and with the same parameterization as the given curve and modifies the given curve to represent only the remainder of the curve. If the curve cannot be split, returns NULL. The default behavior is for the curve to be nonsplittable.
| param | parameter value at which to split. | |
| pos | position on the curve. |
Reimplemented in intcurve.
| curve* curve::subset | ( | const SPAinterval & | range | ) | const [inherited] |
| logical curve::subsetted | ( | ) | const [inherited] |
Indicates whether this curve has a significant subset range.
| virtual curve_tancone helix::tangent_cone | ( | SPAinterval const & | range, | |
| logical | approx = FALSE, |
|||
| SPAtransf const & | trans = *(SPAtransf *) NULL_REF | |||
| ) | const [virtual] |
Returns a cone bounding the tangent direction of the curve.
Role: The cone is deemed to have its apex at the origin, and have a given axis direction and (positive) half-angle. If the logical argument 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 may not cross from inside to outside. Flags in the returned object indicate whether the cone is in fact the best available, and if not whether this result is inside or outside the best cone.
| range | given range. | |
| approx | approximation ok. | |
| trans | transformation. |
Implements curve.
| double helix::taper | ( | ) | const [inline] |
Returns the taper of this helix.
| 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.
| pos | position of the point to test. | |
| param_guess | parameter guess. | |
| param_actual | actual parameter. |
| virtual logical helix::test_point_tol | ( | SPAposition const & | pt, | |
| double | tol = 0, |
|||
| SPAparameter const & | param_guess = *(SPAparameter *) NULL_REF, |
|||
| SPAparameter & | act_param = *(SPAparameter *) NULL_REF | |||
| ) | const [virtual] |
Tests point-on-curve to given precision, returning its parameter value as well if requested.
| pt | point. | |
| tol | tolerance. | |
| param_guess | param guess. | |
| act_param | actual param. |
Implements curve.
| virtual int helix::type | ( | ) | const [virtual] |
| virtual char const* helix::type_name | ( | ) | const [virtual] |
| virtual logical helix::undef | ( | ) | const [virtual] |
| logical curve::undefined | ( | ) | const [inline, inherited] |
| 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.
| 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.
SPAunit_vector helix::_axis_dir [protected] |
Axis direction.
SPAposition helix::_axis_root [protected] |
Axis root position of helix.
logical helix::_handedness [protected] |
Handedness of the helix.
SPAinterval helix::_helix_range [protected] |
Maximum range of the helix.
double helix::_par_scaling [protected] |
Parameter scaling of the helix.
double helix::_pitch [protected] |
Thread distance (pitch) of the helix.
SPAvector helix::_start_disp [protected] |
Vector defining the displacement from the axis root position to a start point on helix.
double helix::_taper [protected] |
Taper of the helix.
SPAinterval curve::subset_range [protected, inherited] |
Range to which this curve is subsetted.