intcurve definitions are derived.
More...
#include <intdef.hxx>


Public Member Functions | |
| void | add_ref () |
| Uses count manipulation. | |
| virtual void | calculate_disc_info () |
Calculates the discontinuity information for the int_cur if none had been stored in disc_info. | |
| void | clear_trans () |
| Clears any references to this object using transformation lists, before incompatible changes. | |
| logical | closed () const |
| Indicates whether a curve is closed. | |
| virtual int_cur * | deep_copy (pointer_map *pm=NULL) const =0 |
Creates a copy of the int_cur that does not share any data with the original. | |
| virtual int | evaluate_surfs (double param, SPAposition &pt, SPAvector *der, int &nd_cu, int &nd_sf, evaluate_curve_side location=evaluate_curve_unknown, SPAposition &pt1=*(SPAposition *) NULL_REF, SPAvector *der1=NULL, SPAposition &pt2=*(SPAposition *) NULL_REF, SPAvector *der2=NULL, SPApar_pos ¶m1=*(SPApar_pos *) NULL_REF, SPApar_vec *derparam1=NULL, SPApar_pos ¶m2=*(SPApar_pos *) NULL_REF, SPApar_vec *derparam2=NULL, SPApar_pos const &guess1=*(SPApar_pos *) NULL_REF, SPApar_pos const &guess2=*(SPApar_pos *) NULL_REF) const |
| An evaluator that takes surface arguments in addition to curve arguments. | |
| subtrans_object * | get_next () const |
| Returns the next object in the list. | |
| virtual law * | law_form () |
Returns the law form of an int_cur. | |
| subtrans_object * | make_trans (SPAtransf const &trans) |
Transforms the subtrans_object on an external level. | |
| logical | mult_ref () const |
Returns TRUE if there is more than one reference - else, it returns FALSE. | |
| logical | operator!= (subtype_object const &rhs) const |
TRUE if two subtype objects are not the same. | |
| virtual int_cur & | operator= (int_cur const &intcur) |
| Assignment operator. | |
| double | param_period () const |
| Finds the parametric period of the interpolated curve, returning exactly 0.0 if the curve is not periodic. | |
| SPAinterval | param_range (SPAbox const &box=*(SPAbox *) NULL_REF) const |
| Finds the parameter range of the interpolated curve. | |
| virtual logical | pcur_present (int index) const |
Returns TRUE if the nth parameter-space curve is defined. | |
| logical | periodic () const |
| Indicates whether the curve is periodic. | |
| int | ref_count () |
| Returns the use count. | |
| void | remove_ref () |
| Removes a reference. | |
| virtual void | save () const |
| Saves a subtype object with identifier and brackets, and enters it in the current tag table. | |
| void | set_next (subtrans_object *obj) |
| Sets the next object in the list. | |
| virtual int | type () const =0 |
Returns the type of subtype_object. | |
| virtual logical | unknown_type () const |
Returns TRUE if this object type is unknown to the system - else, it returns FALSE. | |
Protected Member Functions | |
| virtual int | accurate_derivs (SPAinterval const &roi=*(SPAinterval *) NULL_REF) const |
Return the number of derivatives which evaluate can find "accurately" (and fairly directly), rather than by finite differencing, over the given portion of the curve. | |
| virtual void | append (int_cur &back) |
| Concatenate the contents of two curves into one. | |
| virtual SPAbox | bound (SPAinterval const &range=*(SPAinterval *) NULL_REF) const |
| Find an object-space bounding box, for the subset of the curve within the given parameter bounds. | |
| int | bs1_hull_angles_ok () const |
Return if the bs1_curve hull angles are acceptable in size. | |
| int | bs1_hull_self_intersects () const |
Return if the bs1_curve hull self-intersects. | |
| int | bs1_knots_on_curve () const |
Returns if the bs1_curve knots are known to lie on the curve. | |
| int | bs2_hull_angles_ok () const |
Return if the bs2_curve hull angles are acceptable in size. | |
| int | bs2_hull_self_intersects () const |
Return if the bs2_curve hull self-intersects. | |
| int | bs2_knots_on_curve () const |
Returns if the bs2_curve knots are known to lie on the curve. | |
| closed_forms | calculate_closure () |
| Calculate the closure of the curve from geometric tests. | |
| virtual check_status_list * | check (const check_fix &input=*(const check_fix *) NULL_REF, check_fix &result=*(check_fix *) NULL_REF, const check_status_list *csl=(const check_status_list *) NULL_REF) |
| Check for any data errors in the curve, and correct the errors if possible. | |
| virtual void | closest_point (SPAposition const &pos, SPAposition &foot, SPAparameter const ¶m_guess=*(SPAparameter *) NULL_REF, SPAparameter ¶m_actual=*(SPAparameter *) NULL_REF) const |
| Find the closest point on the curve, the foot, to the given point, and optionally its parameter value. | |
| void | closest_point_with_cache (SPAposition const &pos, SPAposition &foot, SPAparameter const &guess=*(SPAparameter *) NULL_REF, SPAparameter &actual=*(SPAparameter *) NULL_REF) const |
| This non-virtual method looks in the cache for a given position and parameter guess if any. | |
| virtual subtrans_object * | copy () const =0 |
| Duplication. | |
| bs3_curve | cur () const |
| Returns the underlying B-spline curve, which is generally an approximation to the true curve. | |
| virtual void | debug (char const *title, logical brief, FILE *fp) const =0 |
| Outputs a title line and the details of the int_cur to the specified file. | |
| void | debug_data (char const *title, logical brief, FILE *fp) const |
| Debug utility function. | |
| void | delete_summary_data () |
| Deletes the summary_data. | |
| void | delete_tight_summary_data () |
| Deletes the tight_summary_data. | |
| void | disc_from_surfs () |
| This function sets discontinuity information in the curve corresponding to discontinuities in the underlying surface(s). | |
| virtual curve_boundcyl | enclosing_cylinder (const SPAinterval &interv=*(SPAinterval *) NULL_REF) const |
Return a cylinder which encloses the portion of the curve bounded by the SPAinterval. | |
| save_approx_level | enquire_save_approx_level () const |
Ask the int_cur the default level at which the approximating surface should be be stored. | |
| virtual void | eval (double par, SPAposition &pos, SPAvector &fd=*(SPAvector *) NULL_REF, SPAvector &ffd=*(SPAvector *) NULL_REF, logical approx_ok=FALSE) const |
| Find the position, first and second derivatives on curve at given parameter value. | |
| virtual SPAvector | eval_curvature (double par, logical approx_ok=FALSE) const |
| Find the curvature at the given parameter value on the curve. | |
| virtual SPAvector | eval_deriv (double par, logical approx_ok=FALSE) const |
| Find parametric derivative, magnitude and direction, at the given parameter value. | |
| virtual SPAunit_vector | eval_direction (double par, logical approx_ok=FALSE) const |
| Find the tangent direction at the given parameter value on the curve. | |
| virtual SPAposition | eval_position (double par, logical approx_ok=FALSE) const |
| Find the position on curve at given parameter value. | |
| void | eval_with_cache (double par, SPAposition &pos, SPAvector &fd=*(SPAvector *) NULL_REF, SPAvector &ffd=*(SPAvector *) NULL_REF, logical approx_ok=FALSE) const |
| Find the position, first and second derivatives on the curve at the given parameter value. | |
| virtual int | evaluate (double par, SPAposition &pos, SPAvector **der=NULL, int nd=0, evaluate_curve_side eval_at=evaluate_curve_unknown) const |
The evaluate function calculates derivatives, of any order up to the number requested, and stores them in vectors provided by the user. | |
| virtual int | evaluate_iter (double par, curve_evaldata *evdata, SPAposition &pos, SPAvector **der=NULL, int nd=0, evaluate_curve_side eval_at=evaluate_curve_unknown) const |
The evaluate_iter function is just like evaluate, but is supplied with a data object which contains results from a previous nearby evaluation, for use as initial values for any iteration involved. | |
| int | evaluate_iter_with_cache (double par, curve_evaldata *evdata, SPAposition &pos, SPAvector **der=NULL, int nd=0, evaluate_curve_side eval_at=evaluate_curve_unknown, logical ok=FALSE) const |
This non-virtual function looks in the cache for position and nd derivatives at the given parameter value. | |
| int | evaluate_with_cache (double par, SPAposition &pos, SPAvector **der=NULL, int nd=0, evaluate_curve_side eval_at=evaluate_curve_unknown, logical ok=FALSE) const |
This non-virtual function looks in the cache for position and nd derivatives at the given parameter value. | |
| virtual curve_extremum * | find_extrema (SPAunit_vector const &dir) const |
| Find the extrema of a parametric curve in a given direction, ignoring its ends unless it is closed. | |
| double | fitol () const |
| Returns the B-spline curve fit tolerance. | |
| int | hull1_enclosure () const |
Return if the bs1_curve hull is known to enclose the curve. | |
| int | hull2_enclosure () const |
Return if the bs2_curve hull is known to enclose the curve. | |
| int_cur (const int_cur &intc) | |
| Copy constructor. | |
| int_cur (const SPAinterval &curv_int, closed_forms cform, surface const &surf1, surface const &surf2, bs2_curve pcurve1, bs2_curve pcurve2, const SPAinterval &safe_range=*(const class SPAinterval *) NULL_REF, const discontinuity_info &disc_info=*(discontinuity_info *) NULL_REF) | |
| A version of the constructor which takes the range and closure instead of an approximating curve. | |
| int_cur (bs3_curve bs3, double bs3tol, surface const &surf1, surface const &surf2, bs2_curve pcurve1, bs2_curve pcurve2, const SPAinterval &safe_range=*(const class SPAinterval *) NULL_REF, const discontinuity_info &disc_info=*(discontinuity_info *) NULL_REF) | |
| C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments. | |
| int_cur () | |
| C++ Default constructor. | |
| virtual double | length (double first_p, double second_p, logical approx_ok=TRUE) const |
| Computes the arc-length of the specified portion of the curve. | |
| virtual double | length_param (double datum_p, double al, 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. | |
| SPAparameter | limit_param (SPAparameter const ¶m) const |
| Shift the given parameter value to be within the principle period of a periodic curve. | |
| virtual void | make_approx (double fit, const intcurve &ic=*(intcurve *) NULL_REF, logical force=FALSE) const |
| Generate an approximating curve. | |
| virtual curve_evaldata * | make_evaldata () const |
Construct a data object to retain evaluation information across calls to evaluate_iter. | |
| logical | make_tight_bs3_curve (double tol) |
| Method for making tight bs3_curve fit. | |
| virtual void | operator*= (SPAtransf const &trans) |
| Transform the curve. | |
| virtual logical | operator== (subtype_object const &rhs) const |
| Test for equality. | |
| virtual logical | operator>> (subtype_object const &rhs) const |
Determine whether a int_cur is entirely enclosed within another. | |
| virtual double | param (SPAposition const &pos, SPAparameter const ¶m=*(SPAparameter *) NULL_REF) const |
| Determine the parameter value for the given point on the curve. | |
| double | param_with_cache (SPAposition const &pos, SPAparameter const ¶m=*(SPAparameter *) NULL_REF) |
| This non-virtual function looks in the cache for a given position. | |
| double | partol1 () const |
Return the parameter-space tolerance of pcur1. | |
| double | partol2 () const |
Return the parameter-space tolerance of pcur2. | |
| virtual pcurve * | pcur (int index, logical temporary=FALSE) const |
| Return parametric curves with respect to the surfaces defining this intcurve. | |
| virtual bs2_curve | pcur1 (logical force=FALSE) const |
Return curve in parameter-space of surface returned by surf1, if the surface is parametric. | |
| virtual bs2_curve | pcur2 (logical force=FALSE) const |
Return curve in parameter-space of surface returned by surf2, if the surface is parametric. | |
| virtual SPAvector | point_curvature (SPAposition const &pt, SPAparameter const &guess=*(SPAparameter *) NULL_REF) const |
| Calculate the curvature at the given point on the curve. | |
| virtual SPAunit_vector | point_direction (SPAposition const &pos, SPAparameter const &guess=*(SPAparameter *) NULL_REF) const |
| Calculate the tangent direction at given point on the curve. | |
| virtual void | point_perp (SPAposition const &pos, SPAposition &foot, SPAunit_vector &tangent, SPAvector &curvature, SPAparameter const &guess=*(SPAparameter *) NULL_REF, SPAparameter &actual=*(SPAparameter *) NULL_REF, logical f_weak=FALSE) const |
| Find the foot of the perpendicular from the given point to the curve, and tangent to and curvature of the curve at that point, and its parameter value. | |
| void | point_perp_with_cache (SPAposition const &pos, SPAposition &foot, SPAunit_vector &tangent, SPAvector &curvature, SPAparameter const &guess=*(SPAparameter *) NULL_REF, SPAparameter &actual=*(SPAparameter *) NULL_REF, logical f_weak=FALSE) const |
| This non-virtual method looks in the cache for a given position and parameter guess, if any. | |
| void | recreate_tight_approx () const |
| Recalculate the tight approximation after restoring data from a .sat file. | |
| void | remove_tight_approx () |
| Remove the tight bs3_curve approximation. | |
| virtual void | reparam (double start, double end) |
| Perform a linear transformation on the parametrization, so that it starts and ends at the given values (which must be in increasing order). | |
| void | restore_common_data () |
Restores the data saved by save_common_data. | |
| void | save_as_approx () const |
| Saves the incurve as a bs3_curve approximation. | |
| void | save_common_data (save_approx_level) const |
| Save data common to all int_curs. | |
| virtual void | save_data () const |
| Save the int_cur to the save file. | |
| void | set_bs_hull_angles_ok (int pcu_no, int hull_angles_ok) |
Set bs2_curve hull ok property. | |
| void | set_bs_hull_self_intersects (int pcu_no, int hull_self_ints) |
Set bs2_curve self-intersection property. | |
| void | set_bs_knots_on_curve (int pcu_no, int knots_on_cu) |
Set bs2_curve knots lie on curve Role : Function to set the property of whether the bs2_curve knots all lie on the int_cur. | |
| void | set_cur (bs3_curve bs3, double tol=-1.0, logical delete_old_bs3=TRUE, logical allow_zero_fitol=FALSE) |
Replace the underlying bs3_curve approximation. | |
| void | set_hull_enclosure (int pcu_no, int encl) |
| Set hull enclose type. | |
| void | set_partol1 (double partol) |
Set the parameter-space tolerance of pcur1. | |
| void | set_partol2 (double partol) |
Set the parameter-space tolerance of pcur2. | |
| virtual void | set_safe_range () |
| Set the safe range. | |
| virtual void | shift (double incr) |
| Parameter shift: adjust the spline curves to have a parameter range increased by the argument value (which may be negative). | |
| virtual void | split (double param, SPAposition const &exact, int_cur *piece[2])=0 |
| Divide a curve into two pieces at a given parameter value, possibly adjusting the B-spline approximations to an exact value at the split point. | |
| logical | split_int_cur (double param, SPAposition const &exact, int_cur *second_cur, int_cur *piece[2]) |
The same specification as for split, except that a newly- created, but empty, int_cur (normally in fact a derived object) is supplied to be the second part of the split, if necessary. | |
| virtual int_cur * | subset (SPAinterval const &new_range) const |
Construct a new curve which is a copy of the part of the given one within the given parameter bounds, unless this means the whole curve, in which case return NULL. | |
| int | summary_degree () const |
| Returns the degree of summary_data. | |
| const double * | summary_knots () const |
| Returns the knots in summary data. | |
| int | summary_nknots () const |
| Returns the number of knots in summary data. | |
| virtual surface const * | surf1 (logical force=FALSE) const |
| Return the first surface. | |
| virtual surface const * | surf2 (logical force=FALSE) const |
| Return the second surface. | |
| virtual curve_tancone | tangent_cone (SPAinterval const &subset_range, logical approx_ok) const |
| Return a cone bounding the tangent direction of the curve. | |
| virtual logical | test_point_tol (SPAposition const &point, double tol=0, SPAparameter const ¶m_guess=*(SPAparameter *) NULL_REF, SPAparameter ¶m_actual=*(SPAparameter *) NULL_REF) const |
| Test point-on-curve to the given precision. | |
| virtual char const * | type_name () const =0 |
| Returns the string "intcurve". | |
| void | update_data (bs3_curve) |
| Update the range and closure information from a bs3_curve. | |
| virtual | ~int_cur () |
| C++ Destructor. | |
Protected Attributes | |
| int | bs1_properties |
| bs1_curve properties Role : Defines the following properties of the bs1_curves: | |
| int | bs2_properties |
| bs2_curve properties Role : Defines the following properties of the bs2_curves: | |
| logical | calling_make_approx |
| Approximation is being made. | |
| closed_forms | closure |
| Closure type. | |
| bs3_curve | cur_data |
| Object-space approximation to the true curve. | |
| discontinuity_info | disc_info |
| Discontinuity information. | |
| double | fitol_data |
| Precision to which the B-spline approximates to the true object-space curve. | |
| double | partol1_data |
| Pcurve1 precision. | |
| double | partol2_data |
| Pcurve2 precision. | |
| bs2_curve | pcur1_data |
| Parameter-space curve with respect to the first defining surface. | |
| bs2_curve | pcur2_data |
| Parameter-space curve with respect to the second defining surface. | |
| SPAinterval | range |
The full range of the int_cur, as returned by param_range. | |
| SPAinterval | safe_range |
| Curve safe range. | |
| summary_bs3_curve * | summary_data |
| bs3_curve data in summary form. | |
| surface * | surf1_data |
| First defining surface. | |
| surface * | surf2_data |
| Second defining surface. | |
| bs3_curve | tight_bs3_curve |
| bs3_curve for tight fit | |
| double | tight_bs3_tolerance |
| Tight bs3_curve tolerance. | |
| summary_bs3_curve * | tight_summary_data |
| Tight approx data in summary form. | |
Private Member Functions | |
| logical | mult () |
Returns TRUE if there is more than one reference to this object; otherwise, it returns FALSE. | |
| void | operator++ () |
| Increase the use count. | |
| void | operator-- () |
| Decrease the use count. | |
Friends | |
| subtype_object * | restore_int_int_cur () |
The restore function for int_int_cur is special, as it has to handle old-style save files, where that form was used for exact_int_curs and surf_int_curs as well. | |
intcurve definitions are derived.
Role: In ACIS an interpolated curve is represented by the class intcurve, which contains a pointer to an internal description called int_cur. To support various types of curve construction, ACIS uses classes derived from int_cur. Also, curve classes can be derived from the classes derived from int_cur to construct more specialized curve types.
This class contains the mathematical definition for an intcurve. It uses use counts to limit copying, and it allows derivation to construct various types of procedural curves, as well as one type that represents a NURBS curve. The base class int_cur contains the following information:
int_cur is used. NULL). NULL). Each parameter space curve (if defined) reside in the parameter space of the surface with the same index. int_cur can contain additional information that records the creation method of the true curve. bs3_curve, there is no need to implement the functionality because the methods written for the base class are sufficient. int_cur methods are very rarely called by applications. They are generally called by intcurve methods. | int_cur::int_cur | ( | ) | [protected] |
C++ Default constructor.
Role : Construct a generally null int_cur. This is to allow flexibility for constructors for derived classes to set the common data members in whatever way is most convenient.
| int_cur::int_cur | ( | bs3_curve | bs3, | |
| double | bs3tol, | |||
| surface const & | surf1, | |||
| surface const & | surf2, | |||
| bs2_curve | pcurve1, | |||
| bs2_curve | pcurve2, | |||
| const SPAinterval & | safe_range = *(const class SPAinterval *) NULL_REF, |
|||
| const discontinuity_info & | disc_info = *(discontinuity_info *) NULL_REF | |||
| ) | [protected] |
C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.
| int_cur::int_cur | ( | const SPAinterval & | curv_int, | |
| closed_forms | cform, | |||
| surface const & | surf1, | |||
| surface const & | surf2, | |||
| bs2_curve | pcurve1, | |||
| bs2_curve | pcurve2, | |||
| const SPAinterval & | safe_range = *(const class SPAinterval *) NULL_REF, |
|||
| const discontinuity_info & | disc_info = *(discontinuity_info *) NULL_REF | |||
| ) | [protected] |
A version of the constructor which takes the range and closure instead of an approximating curve.
Role : Available for derived class constructors.
| int_cur::int_cur | ( | const int_cur & | intc | ) | [protected] |
Copy constructor.
Derived classes should also define copy constructors, and use this one, to ensure that int_cur data is initialized.
| intc | Curve to be copied. |
| virtual int_cur::~int_cur | ( | ) | [protected, virtual] |
| virtual int int_cur::accurate_derivs | ( | SPAinterval const & | roi = *(SPAinterval *) NULL_REF |
) | const [protected, virtual] |
Return the number of derivatives which evaluate can find "accurately" (and fairly directly), rather than by finite differencing, over the given portion of the curve.
If there is no limit to the number of accurate derivatives, returns the value ALL_CURVE_DERIVATIVES, which is large enough to be more than anyone could reasonably want.
Reimplemented in exact_int_cur, off_int_cur, and par_int_cur.
| void subtype_object::add_ref | ( | ) | [inherited] |
Uses count manipulation.
| virtual void int_cur::append | ( | int_cur & | back | ) | [protected, virtual] |
Concatenate the contents of two curves into one.
The curves are guaranteed to be the same base or derived type, and to have contiguous parameter ranges ("this" is the beginning part of the combined curve, the argument gives the end part). The default concatenates the approximating B-splines, assuming that any other information is the same for both curves and the result.
Reimplemented in off_int_cur.
| virtual SPAbox int_cur::bound | ( | SPAinterval const & | range = *(SPAinterval *) NULL_REF |
) | const [protected, virtual] |
| int int_cur::bs1_hull_angles_ok | ( | ) | const [protected] |
Return if the bs1_curve hull angles are acceptable in size.
Returns -1 if unknown, 0 if FALSE, or 1 if TRUE.
| int int_cur::bs1_hull_self_intersects | ( | ) | const [protected] |
Return if the bs1_curve hull self-intersects.
Returns -1 if unknown, 0 if FALSE, or 1 if TRUE.
| int int_cur::bs1_knots_on_curve | ( | ) | const [protected] |
Returns if the bs1_curve knots are known to lie on the curve.
Returns -1 if unknown, 0 if FALSE, or 1 if TRUE.
| int int_cur::bs2_hull_angles_ok | ( | ) | const [protected] |
Return if the bs2_curve hull angles are acceptable in size.
Returns -1 if unknown, 0 if FALSE, or 1 if TRUE.
| int int_cur::bs2_hull_self_intersects | ( | ) | const [protected] |
Return if the bs2_curve hull self-intersects.
Returns -1 if unknown, 0 if FALSE, or 1 if TRUE.
| int int_cur::bs2_knots_on_curve | ( | ) | const [protected] |
Returns if the bs2_curve knots are known to lie on the curve.
Returns -1 if unknown, 0 if FALSE, or 1 if TRUE.
| closed_forms int_cur::calculate_closure | ( | ) | [protected] |
Calculate the closure of the curve from geometric tests.
| virtual void int_cur::calculate_disc_info | ( | ) | [virtual] |
Calculates the discontinuity information for the int_cur if none had been stored in disc_info.
Role: This function is intended to support restore of old versions of int_cur.
Reimplemented in off_int_cur, and par_int_cur.
| virtual check_status_list* int_cur::check | ( | const check_fix & | input = *(const check_fix *) NULL_REF, |
|
| check_fix & | result = *(check_fix *) NULL_REF, |
|||
| const check_status_list * | csl = (const check_status_list *) NULL_REF | |||
| ) | [protected, virtual] |
Check for any data errors in the curve, 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 upon exit.
| input | Supplies a set of flags which say which fixes are allowable (the default is to fix nothing). | |
| result | Returns a set of flags which say which fixes were applied. | |
| csl | List of checks that are to be made. If the list 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. |
Reimplemented in exact_int_cur, and par_int_cur.
| void subtrans_object::clear_trans | ( | ) | [inherited] |
Clears any references to this object using transformation lists, before incompatible changes.
| logical int_cur::closed | ( | ) | const [inline] |
Indicates whether a curve is closed.
Role: Indicates whether a curve is closed, i.e., joins itself (smoothly or not) at the ends of its principal parameter range. This method always returns TRUE if periodic returns TRUE. The default version uses the corresponding function for the approximating B-spline.
| virtual void int_cur::closest_point | ( | SPAposition const & | pos, | |
| SPAposition & | foot, | |||
| SPAparameter const & | param_guess = *(SPAparameter *)NULL_REF, |
|||
| SPAparameter & | param_actual = *(SPAparameter *)NULL_REF | |||
| ) | const [inline, protected, virtual] |
Find the closest point on the curve, the foot, to the given point, and optionally its parameter value.
If an input parameter value is supplied (as the first SPAparameter argument), the foot found is only a local solution nearest to the supplied SPAparameter's position. Any of the return value arguments may be a NULL reference, in which case it is simply ignored.
Reimplemented in exact_int_cur.
| void int_cur::closest_point_with_cache | ( | SPAposition const & | pos, | |
| SPAposition & | foot, | |||
| SPAparameter const & | guess = *(SPAparameter *) NULL_REF, |
|||
| SPAparameter & | actual = *(SPAparameter *) NULL_REF | |||
| ) | const [protected] |
This non-virtual method looks in the cache for a given position and parameter guess if any.
If found it returns the foot and parameter value. Otherwise it uses closest_point to find the results, places them in the cache, and returns them.
Closest_point_with_cache, rather than closest_point, should be called by classes derived from int_cur, so as to get the benefit of caching.
| virtual subtrans_object* int_cur::copy | ( | ) | const [protected, pure virtual] |
Duplication.
Can't be done by constructor, as we want it to be virtual, and pure to force each derived type to have its own.
Implements subtrans_object.
Implemented in exact_int_cur, off_int_cur, and par_int_cur.
| bs3_curve int_cur::cur | ( | ) | const [inline, protected] |
| virtual void int_cur::debug | ( | char const * | title, | |
| logical | brief, | |||
| FILE * | fp | |||
| ) | const [protected, pure virtual] |
Outputs a title line and the details of the int_cur to the specified file.
Implements subtype_object.
Implemented in exact_int_cur, off_int_cur, and par_int_cur.
| void int_cur::debug_data | ( | char const * | title, | |
| logical | brief, | |||
| FILE * | fp | |||
| ) | const [protected] |
Debug utility function.
Debug mechanism. As with the save and restore mechanism we split the operation into two parts: the virtual function debug prints a class- specific identifying line, then calls the ordinary function debug_data to put out the details. It is done this way so that a derived class' debug_data can call its parent's version first, to output the common data. Indeed, if the derived class has no additional data it need not define its own version of debug_data and use its parent's instead. A string argument provides the introduction to each displayed line after the first, and a logical sets "brief" output (normally removing detailed subsidiary curve and surface definitions).
Reimplemented in exact_int_cur, off_int_cur, and par_int_cur.
| virtual int_cur* int_cur::deep_copy | ( | pointer_map * | pm = NULL |
) | const [pure virtual] |
Creates a copy of the int_cur 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.
In a deep copy all the information about the copied item is self-contained in a new memory block. By comparison a shallow copy stores only the first instance of the item in memory, and increments the use count for each copy.
The pointer_map pm keeps a list of all pointers in the original object that have already been deep copied. For example, a deep copy of a complex model results in self-contained data, but identical sub-parts within the model are allowed to share a single set of data.
| pm | list of items within the entity that are already deep copied. |
Implemented in exact_int_cur, off_int_cur, and par_int_cur.
| void int_cur::delete_summary_data | ( | ) | [inline, protected] |
Deletes the summary_data.
| void int_cur::delete_tight_summary_data | ( | ) | [inline, protected] |
Deletes the tight_summary_data.
| void int_cur::disc_from_surfs | ( | ) | [protected] |
This function sets discontinuity information in the curve corresponding to discontinuities in the underlying surface(s).
An evaluator that takes surface arguments in addition to curve arguments. As well as returning curve positions and derivatives, it returns the derivatives of the surface wrt t (these will often but not always be equal to the curve derivs) and also the derivatives of the surface parameters wrt t. The array of vectors to return the curve derivatives must be of length at least nd_cu, and the various arrays of vectors to return the surface data can either be NULL, indicating that this particular derivative is not required, or be of length at least nd_sf.
Unlike the other evaluators, this function OVERWRITES the integer arguments specifying the numners of derivatives required, with the number actually obtained. The function itself returns information about the surface data that was calculated:
0 => no surface data (e.g. exact_int_cur)
1 => data for first surface only
2 => data for second surface only
3 => data for both surfaces
| virtual curve_boundcyl int_cur::enclosing_cylinder | ( | const SPAinterval & | interv = *(SPAinterval *) NULL_REF |
) | const [protected, virtual] |
Return a cylinder which encloses the portion of the curve bounded by the SPAinterval.
| interv | region of interest. |
| save_approx_level int_cur::enquire_save_approx_level | ( | ) | const [protected] |
| virtual void int_cur::eval | ( | double | par, | |
| SPAposition & | pos, | |||
| SPAvector & | fd = *(SPAvector *) NULL_REF, |
|||
| SPAvector & | ffd = *(SPAvector *) NULL_REF, |
|||
| logical | approx_ok = FALSE | |||
| ) | const [protected, virtual] |
Find the position, first and second derivatives on curve at given parameter value.
Reimplemented in exact_int_cur, and par_int_cur.
| virtual SPAvector int_cur::eval_curvature | ( | double | par, | |
| logical | approx_ok = FALSE | |||
| ) | const [protected, virtual] |
Find the curvature at the given parameter value on the curve.
The default uses eval.
| virtual SPAvector int_cur::eval_deriv | ( | double | par, | |
| logical | approx_ok = FALSE | |||
| ) | const [protected, virtual] |
Find parametric derivative, magnitude and direction, at the given parameter value.
The default uses eval.
| virtual SPAunit_vector int_cur::eval_direction | ( | double | par, | |
| logical | approx_ok = FALSE | |||
| ) | const [protected, virtual] |
Find the tangent direction at the given parameter value on the curve.
Default uses eval_deriv.
| virtual SPAposition int_cur::eval_position | ( | double | par, | |
| logical | approx_ok = FALSE | |||
| ) | const [protected, virtual] |
Find the position on curve at given parameter value.
The default uses eval.
| void int_cur::eval_with_cache | ( | double | par, | |
| SPAposition & | pos, | |||
| SPAvector & | fd = *(SPAvector *) NULL_REF, |
|||
| SPAvector & | ffd = *(SPAvector *) NULL_REF, |
|||
| logical | approx_ok = FALSE | |||
| ) | const [protected] |
Find the position, first and second derivatives on the curve at the given parameter value.
Role: This non-virtual function looks in the cache for position and first and second derivatives at the given parameter value. If found it returns them, otherwise it computes them, puts them in the cache, and returns them.
Eval_with_cache, rather than eval, should be called by classes derived from int_cur, so as to get the benefit of caching.
| par | Given parameter value. | |
| pos | Found position. | |
| fd | First derivative | |
| ffd | Second derivative. | |
| approx_ok | Approximation is ok to be used. |
| virtual int int_cur::evaluate | ( | double | par, | |
| SPAposition & | pos, | |||
| SPAvector ** | der = NULL, |
|||
| int | nd = 0, |
|||
| evaluate_curve_side | eval_at = evaluate_curve_unknown | |||
| ) | const [protected, virtual] |
The evaluate function calculates derivatives, of any order up to the number requested, and stores them in vectors provided by the user.
It returns the number it was able to calculate. This will be equal to the number requested in all but the most exceptional circumstances. A certain number will be 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. Derived classes of int_cur must implement this function.
| par | Given parameter value. | |
| pos | Point on curve at given parameter value. | |
| der | Array of pointers to vectors, of size nd. Any of the pointers may be NULL, in which case the corresponding derivative will not be returned. | |
| nd | Number of derivatives required. | |
| eval_at | Evaluation location (above, bellow or unknown) |
Reimplemented in exact_int_cur, off_int_cur, and par_int_cur.
| virtual int int_cur::evaluate_iter | ( | double | par, | |
| curve_evaldata * | evdata, | |||
| SPAposition & | pos, | |||
| SPAvector ** | der = NULL, |
|||
| int | nd = 0, |
|||
| evaluate_curve_side | eval_at = evaluate_curve_unknown | |||
| ) | const [protected, virtual] |
The evaluate_iter function is just like evaluate, but is supplied with a data object which contains results from a previous nearby evaluation, for use as initial values for any iteration involved.
| par | Given parameter value. | |
| evdata | Data supplying initial values, and set to reflect the results of this evaluation. | |
| pos | Point on curve at given parameter. | |
| der | Array of pointers to vectors, of size nd. Any of the pointers may be null, in which case the corresponding derivative will not be returned. | |
| nd | Number of derivatives required. | |
| eval_at | Evaluation location (above, bellow or unknown) |
Reimplemented in off_int_cur, and par_int_cur.
| int int_cur::evaluate_iter_with_cache | ( | double | par, | |
| curve_evaldata * | evdata, | |||
| SPAposition & | pos, | |||
| SPAvector ** | der = NULL, |
|||
| int | nd = 0, |
|||
| evaluate_curve_side | eval_at = evaluate_curve_unknown, |
|||
| logical | ok = FALSE | |||
| ) | const [protected] |
This non-virtual function looks in the cache for position and nd derivatives at the given parameter value.
If found it returns them, otherwise it computes them, puts them in the cache, and returns them.
Evaluate_with_cache, rather than evaluate, should be called by classes derived from int_cur, so as to get the benefit of caching.
| par | Given parameter value. | |
| evdata | Data supplying initial values, and set to reflect the results of this evaluation. | |
| pos | Point on curve at given parameter. | |
| der | Array of pointers to vectors, of size nd. Any of the pointers may be NULL | |
| nd | | |
| eval_at | | |
| ok | |
| virtual int int_cur::evaluate_surfs | ( | double | param, | |
| SPAposition & | pt, | |||
| SPAvector * | der, | |||
| int & | nd_cu, | |||
| int & | nd_sf, | |||
| evaluate_curve_side | location = evaluate_curve_unknown, |
|||
| SPAposition & | pt1 = *(SPAposition *) NULL_REF, |
|||
| SPAvector * | der1 = NULL, |
|||
| SPAposition & | pt2 = *(SPAposition *) NULL_REF, |
|||
| SPAvector * | der2 = NULL, |
|||
| SPApar_pos & | param1 = *(SPApar_pos *) NULL_REF, |
|||
| SPApar_vec * | derparam1 = NULL, |
|||
| SPApar_pos & | param2 = *(SPApar_pos *) NULL_REF, |
|||
| SPApar_vec * | derparam2 = NULL, |
|||
| SPApar_pos const & | guess1 = *(SPApar_pos *) NULL_REF, |
|||
| SPApar_pos const & | guess2 = *(SPApar_pos *) NULL_REF | |||
| ) | const [virtual] |
An evaluator that takes surface arguments in addition to curve arguments.
Role: As well as returning curve position and derivatives, it returns the derivatives of the surface wrt t (these will often but not always be equal to the curve derivs) and also the derivatives of the surface parameters with respect to t. The array of vectors to return the curve derivatives must be of length at least nd_cu, and the various arrays of vectors to return the surface data can either be NULL, indicating that this particular derivative is not required, or be of length at least nd_sf.
The caller must supply an array of length nd_cu or NULL to indicate that derivatives are not required for vector.
Unlike the other evaluators, this function OVERWRITES the integer arguments specifying the numbers of derivatives required, with the number actually obtained. The function itself returns information about the surface data that was calculated:
0 => no surface data (e.g. exact_int_cur)
1 => data for first surface only
2 => data for second surface only
3 => data for both surfaces
This is the default implementation of the function, and is inefficient. It should be implemented for each int_cur type.
| param | Given parameter value. | |
| pt | Point on curve at given parameter value. | |
| der | Derivatives. | |
| nd_cu | Number of curve derivs required or calculated. | |
| nd_sf | Number of surface derivs required or calculated. | |
| location | eval location. | |
| pt1 | Point on support surface 1. | |
| der1 | Derivs of first support surface. | |
| pt2 | Point on support surface 2. | |
| der2 | Derivs of second support surface. | |
| param1 | Params on surface 1. | |
| derparam1 | Derivs of params on surface 1. | |
| param2 | Params on surface 2. | |
| derparam2 | Derivs of params on surface 2. | |
| guess1 | optional guess value for 1st par_pos. | |
| guess2 | optional guess value for 2nd par_pos. |
Reimplemented in off_int_cur, and par_int_cur.
| int int_cur::evaluate_with_cache | ( | double | par, | |
| SPAposition & | pos, | |||
| SPAvector ** | der = NULL, |
|||
| int | nd = 0, |
|||
| evaluate_curve_side | eval_at = evaluate_curve_unknown, |
|||
| logical | ok = FALSE | |||
| ) | const [protected] |
This non-virtual function looks in the cache for position and nd derivatives at the given parameter value.
If found it returns them, otherwise it computes them, puts them in the cache, and returns them.
Evaluate_with_cache, rather than evaluate, should be called by classes derived from int_cur, so as to get the benefit of caching.
| par | Given parameter value. | |
| pos | Point on curve at given parameter value. | |
| der | Array of pointers to vectors, of size nd. Any of the pointers may be NULL, in which case the corresponding derivative will not be returned. | |
| nd | Number of derivatives required. | |
| eval_at | Evaluation location (above, below, or unknown) | |
| ok | Approximation is good and should be used. |
| virtual curve_extremum* int_cur::find_extrema | ( | SPAunit_vector const & | dir | ) | const [protected, virtual] |
Find the extrema of a parametric curve in a given direction, ignoring its ends unless it is closed.
The default version uses the corresponding function for the approximating B-spline.
| double int_cur::fitol | ( | ) | const [inline, protected] |
Returns the B-spline curve fit tolerance.
| subtrans_object* subtrans_object::get_next | ( | ) | const [inline, inherited] |
Returns the next object in the list.
| int int_cur::hull1_enclosure | ( | ) | const [protected] |
Return if the bs1_curve hull is known to enclose the curve.
Returns -1 if unknown, 0 if FALSE, or 1 if TRUE.
| int int_cur::hull2_enclosure | ( | ) | const [protected] |
Return if the bs2_curve hull is known to enclose the curve.
Returns -1 if unknown, 0 if FALSE, or 1 if TRUE.
| virtual double int_cur::length | ( | double | first_p, | |
| double | second_p, | |||
| logical | approx_ok = TRUE | |||
| ) | const [protected, virtual] |
Computes the arc-length of the specified portion of the curve.
Returns the algebraic distance along the curve between the given parameter values, 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. The default version uses the corresponding function for the approximating B-spline.
| first_p | First parameter value. | |
| second_p | Second parameter value. | |
| approx_ok | If approx_ok is TRUE, the B-spline approximation is used in the length calculation. |
| virtual double int_cur::length_param | ( | double | datum_p, | |
| double | al, | |||
| logical | approx_ok = TRUE | |||
| ) | const [protected, virtual] |
Returns the parameter value of the point on the curve at the given algebraic arc length from that defined by the datum parameter.
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 the approximating B-spline.
| datum_p | Datum parameter value. | |
| al | Arc length. | |
| approx_ok | If approx_ok is TRUE, the B-spline approximation is used in the length calculation. |
| SPAparameter int_cur::limit_param | ( | SPAparameter const & | param | ) | const [protected] |
Shift the given parameter value to be within the principle period of a periodic curve.
Used to ensure the pcurves are evaluated within their defined ranges.
| param | Given parameter value. |
| virtual void int_cur::make_approx | ( | double | fit, | |
| const intcurve & | ic = *(intcurve *) NULL_REF, |
|||
| logical | force = FALSE | |||
| ) | const [protected, virtual] |
Generate an approximating curve.
Role : Make or remake the approximating curve. The intcurve argument ic may be NULL but if it is supplied the function may be a little faster. The function stores the approximating curve and the actual fit error that was achieved in the int_cur, overriding the declared const-ness of the method to do this.
| fit | Desired fit tolerance. | |
| ic | Helper intcurve. | |
| force | if TRUE, will make an approx even if it is self-intersecting. |
Reimplemented in par_int_cur.
| virtual curve_evaldata* int_cur::make_evaldata | ( | ) | const [protected, virtual] |
Construct a data object to retain evaluation information across calls to evaluate_iter.
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 in off_int_cur, and par_int_cur.
| logical int_cur::make_tight_bs3_curve | ( | double | tol | ) | [protected] |
Method for making tight bs3_curve fit.
| subtrans_object* subtrans_object::make_trans | ( | SPAtransf const & | trans | ) | [inherited] |
Transforms the subtrans_object on an external level.
Role: This method searches the transform list to find a match. It returns the corresponding transformed object if it is found; otherwise, it constructs a new transformed object, enters it into the transformation list for future reference, and returns the new object. If this object is only singly-referenced and has no transformed counterpart, then it transforms directly without copying, and "this" returns.
| trans | transformation. |
| logical int_cur::mult | ( | ) | [inline, private] |
Returns TRUE if there is more than one reference to this object; otherwise, it returns FALSE.
| logical subtype_object::mult_ref | ( | ) | const [inline, inherited] |
Returns TRUE if there is more than one reference - else, it returns FALSE.
| logical subtype_object::operator!= | ( | subtype_object const & | rhs | ) | const [inline, inherited] |
TRUE if two subtype objects are not the same.
Role: Use this method for sharing on restoration of old save files.
| rhs | subtype-object. |
| virtual void int_cur::operator*= | ( | SPAtransf const & | trans | ) | [protected, virtual] |
Transform the curve.
The default transforms the B-spline approximations and the surfaces, and scales the fit tolerance.
Implements subtrans_object.
Reimplemented in off_int_cur.
| void int_cur::operator++ | ( | ) | [inline, private] |
Increase the use count.
| void int_cur::operator-- | ( | ) | [inline, private] |
Decrease the use count.
Assignment operator.
Copies all the underlying information.
| intcur | given int_cur. |
Reimplemented in off_int_cur.
| virtual logical int_cur::operator== | ( | subtype_object const & | rhs | ) | const [protected, virtual] |
Test for equality.
This is sufficient for many derived classes, and can be used by most others to check the basic representation. It does not guarantee that all effectively equal surfaces are determined to be equal, but does guarantee that different surfaces are correctly identified as such. The default version checks the B-splines and surfaces, and checks that the derived types are the same. This may be sufficient for simple derived types - others may find it useful to call this as part of the operation.
Reimplemented from subtype_object.
Reimplemented in off_int_cur, and par_int_cur.
| virtual logical int_cur::operator>> | ( | subtype_object const & | rhs | ) | const [protected, virtual] |
Determine whether a int_cur is entirely enclosed within another.
(used in merging)
Reimplemented from subtype_object.
| virtual double int_cur::param | ( | SPAposition const & | pos, | |
| SPAparameter const & | param = *(SPAparameter *) NULL_REF | |||
| ) | const [protected, virtual] |
Determine the parameter value for the given point on the curve.
The base class version finds the foot of the perpendicular to the approximating B-spline, and returns the parameter value of that. This will be correct for many derived types, but not necessarily all.
Reimplemented in par_int_cur.
| double int_cur::param_period | ( | ) | const [inline] |
| SPAinterval int_cur::param_range | ( | SPAbox const & | box = *(SPAbox*)NULL_REF |
) | const [inline] |
Finds the parameter range of the interpolated curve.
Role: The default version uses the corresponding function for the approximating B-spline.
| box | region of interest. |
| double int_cur::param_with_cache | ( | SPAposition const & | pos, | |
| SPAparameter const & | param = *(SPAparameter *) NULL_REF | |||
| ) | [protected] |
This non-virtual function looks in the cache for a given position.
If found it returns the parameter value, otherwise it finds the parameter value using param, places it in the cache, and returns it.
Param_with_cache, rather than param, should be called by classes derived from int_cur, so as to get the benefit of caching.
| double int_cur::partol1 | ( | ) | const [inline, protected] |
Return the parameter-space tolerance of pcur1.
| double int_cur::partol2 | ( | ) | const [inline, protected] |
Return the parameter-space tolerance of pcur2.
| virtual pcurve* int_cur::pcur | ( | int | index, | |
| logical | temporary = FALSE | |||
| ) | const [protected, virtual] |
Return parametric curves with respect to the surfaces defining this intcurve.
The argument may be 1 or 2, representing the two surfaces in order. The default uses pcur1 or pcur2, surf1 or surf2, and fitol, and so will be suitable for most derived classes. The second argument is flag indicating whether or not the pcurve returned is temporary; if so, the bs2_curve will not be copied, improving performance.
Reimplemented in par_int_cur.
| virtual bs2_curve int_cur::pcur1 | ( | logical | force = FALSE |
) | const [protected, virtual] |
Return curve in parameter-space of surface returned by surf1, if the surface is parametric.
Return NULL if the surface (as returned by the methods above) is NULL or not parametric.
Reimplemented in off_int_cur.
| virtual bs2_curve int_cur::pcur2 | ( | logical | force = FALSE |
) | const [protected, virtual] |
Return curve in parameter-space of surface returned by surf2, if the surface is parametric.
Return NULL if the surface (as returned by the methods above) is NULL or not parametric.
Reimplemented in off_int_cur.
| virtual logical int_cur::pcur_present | ( | int | index | ) | 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. The default tests the result of pcur1 or pcur2 as appropriate, and so it suffices for most derived classes. The index argument may be 1 or 2 indicating either the first or second parameter-space curve.
| index | parameter-space curve index. |
| logical int_cur::periodic | ( | ) | const [inline] |
| virtual SPAvector int_cur::point_curvature | ( | SPAposition const & | pt, | |
| SPAparameter const & | guess = *(SPAparameter *) NULL_REF | |||
| ) | const [protected, virtual] |
Calculate the curvature at the given point on the curve.
The base class version uses param and eval, and so is always valid, but many derived types will have a better way.
Reimplemented in off_int_cur.
| virtual SPAunit_vector int_cur::point_direction | ( | SPAposition const & | pos, | |
| SPAparameter const & | guess = *(SPAparameter *) NULL_REF | |||
| ) | const [protected, virtual] |
Calculate the tangent direction at given point on the curve.
The base class version uses param and eval, and so is always valid, but many derived types will have a better way.
Reimplemented in off_int_cur.
| virtual void int_cur::point_perp | ( | SPAposition const & | pos, | |
| SPAposition & | foot, | |||
| SPAunit_vector & | tangent, | |||
| SPAvector & | curvature, | |||
| SPAparameter const & | guess = *(SPAparameter *) NULL_REF, |
|||
| SPAparameter & | actual = *(SPAparameter *) NULL_REF, |
|||
| logical | f_weak = FALSE | |||
| ) | const [protected, virtual] |
Find the foot of the perpendicular from the given point to the curve, and tangent to and curvature of 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's position, otherwise it is the one at which the curve is nearest to the given position. Any of the return value arguments may be a NULL reference, in which case it is simply ignored. The default version uses the approximating B-spline to get a first approximation (if the given guess is missing or needs improvement), and then iterates to the exact value using eval. It will therefore be suitable for most derived classes.
| void int_cur::point_perp_with_cache | ( | SPAposition const & | pos, | |
| SPAposition & | foot, | |||
| SPAunit_vector & | tangent, | |||
| SPAvector & | curvature, | |||
| SPAparameter const & | guess = *(SPAparameter *) NULL_REF, |
|||
| SPAparameter & | actual = *(SPAparameter *) NULL_REF, |
|||
| logical | f_weak = FALSE | |||
| ) | const [protected] |
This non-virtual method looks in the cache for a given position and parameter guess, if any.
If found it returns the foot, direction, curvature and parameter value. Otherwise it uses point_perp to find the results, places them in the cache, and returns them.
Point_perp_with_cache, rather than point_perp, should be called by classes derived from int_cur, so as to get the benefit of caching.
| void int_cur::recreate_tight_approx | ( | ) | const [protected] |
Recalculate the tight approximation after restoring data from a .sat file.
| int subtype_object::ref_count | ( | ) | [inline, inherited] |
Returns the use count.
| void subtype_object::remove_ref | ( | ) | [inherited] |
Removes a reference.
| void int_cur::remove_tight_approx | ( | ) | [protected] |
Remove the tight bs3_curve approximation.
| virtual void int_cur::reparam | ( | double | start, | |
| double | end | |||
| ) | [protected, virtual] |
Perform a linear transformation on the parametrization, so that it starts and ends at the given values (which must be in increasing order).
The default just reparametrizes the approximating B-splines.
Reimplemented in exact_int_cur, and off_int_cur.
| void int_cur::restore_common_data | ( | ) | [protected] |
Restores the data saved by save_common_data.
Note that restore_data is not virtual (so no base class version is necessary).
| virtual void subtype_object::save | ( | ) | const [virtual, inherited] |
Saves a subtype object with identifier and brackets, and enters it in the current tag table.
Role: If it is already there, just puts out a reference.
Reimplemented in blend_spl_sur, rb_blend_spl_sur, skin_spl_sur, sub_spl_sur, and sweep_spl_sur.
| void int_cur::save_as_approx | ( | ) | const [protected] |
Saves the incurve as a bs3_curve approximation.
| void int_cur::save_common_data | ( | save_approx_level | ) | const [protected] |
Save data common to all int_curs.
| virtual void int_cur::save_data | ( | ) | const [protected, virtual] |
Save the int_cur to the save file.
Implements subtype_object.
Reimplemented in exact_int_cur, off_int_cur, and par_int_cur.
| void int_cur::set_bs_hull_angles_ok | ( | int | pcu_no, | |
| int | hull_angles_ok | |||
| ) | [protected] |
Set bs2_curve hull ok property.
Role : Function to set the property of whether the bs2_curve hull does not turn too sharply. The first argument should be 1 or 2, to indicate the bs2_curve which the property 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.
| void int_cur::set_bs_hull_self_intersects | ( | int | pcu_no, | |
| int | hull_self_ints | |||
| ) | [protected] |
Set bs2_curve self-intersection property.
Role : Function to set the property of whether the bs2_curve hull self-intersects. The first argument should be 1 or 2, to indicate the bs2_curve which the property 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.
| void int_cur::set_bs_knots_on_curve | ( | int | pcu_no, | |
| int | knots_on_cu | |||
| ) | [protected] |
Set bs2_curve knots lie on curve
Role : Function to set the property of whether the bs2_curve knots all lie on the int_cur.
The first argument should be 1 or 2, to indicate the bs2_curve which the property 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.
| void int_cur::set_cur | ( | bs3_curve | bs3, | |
| double | tol = -1.0, |
|||
| logical | delete_old_bs3 = TRUE, |
|||
| logical | allow_zero_fitol = FALSE | |||
| ) | [protected] |
Replace the underlying bs3_curve approximation.
If the supplied tolerance is negative, then fitol will be left unchanged.
| bs3 | New bs3_curve approximation. | |
| tol | Tolerance. If negative, fitol will be left unchanged. | |
| delete_old_bs3 | Whether to delete the old bs3_curve or not. | |
| allow_zero_fitol | Whether to allow setting the fitol to zero. |
| void int_cur::set_hull_enclosure | ( | int | pcu_no, | |
| int | encl | |||
| ) | [protected] |
Set hull enclose type.
Role : Function to set the curve enclosure. 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.
| void subtrans_object::set_next | ( | subtrans_object * | obj | ) | [inherited] |
Sets the next object in the list.
| obj | object. |
| void int_cur::set_partol1 | ( | double | partol | ) | [inline, protected] |
Set the parameter-space tolerance of pcur1.
| void int_cur::set_partol2 | ( | double | partol | ) | [inline, protected] |
Set the parameter-space tolerance of pcur2.
| virtual void int_cur::set_safe_range | ( | ) | [protected, virtual] |
Set the safe range.
Role : Sets the safe_range. The base class uses it when it is uncertain how to process the base range. The default version just sets it to a NULL SPAinterval. Note that other implementations of this function are not available to the base class constructor, and cannot be used safely when the curve is input from a data stream, so the derived classes are responsible for setting the safe_range.
Reimplemented in off_int_cur.
| virtual void int_cur::shift | ( | double | incr | ) | [protected, virtual] |
Parameter shift: adjust the spline curves to have a parameter range increased by the argument value (which may be negative).
This is only used by intcurve::split to move portions of a periodic curve by integral multiples of the period. The default just shifts the parametrization of the approximating B-splines.
Reimplemented in off_int_cur.
| virtual void int_cur::split | ( | double | param, | |
| SPAposition const & | exact, | |||
| int_cur * | piece[2] | |||
| ) | [protected, pure virtual] |
Divide a curve into two pieces at a given parameter value, possibly adjusting the B-spline approximations to an exact value at the split point.
If the parameter value is at the beginning, sets the first piece to NULL, and places the original curve in the second slot; if the parameter value is at the end, places the original curve in the first slot, and sets the second to NULL. This is a pure virtual function to force derived classes to have their own (though many will be able to use split_int_cur below to do a lot of the hard work).
Implemented in exact_int_cur, off_int_cur, and par_int_cur.
| logical int_cur::split_int_cur | ( | double | param, | |
| SPAposition const & | exact, | |||
| int_cur * | second_cur, | |||
| int_cur * | piece[2] | |||
| ) | [protected] |
The same specification as for split, except that a newly- created, but empty, int_cur (normally in fact a derived object) is supplied to be the second part of the split, if necessary.
The method returns TRUE if the second int_cur was used, FALSE if not. This method assumes that the pcurve on any surface is the locus of the foot of the perpendicular from the curve to the surface. It is not called by any intcurve member function, but is available for use by a derived class split method to split the spline curves.
| virtual int_cur* int_cur::subset | ( | SPAinterval const & | new_range | ) | const [protected, virtual] |
| int int_cur::summary_degree | ( | ) | const [inline, protected] |
Returns the degree of summary_data.
| const double* int_cur::summary_knots | ( | ) | const [inline, protected] |
Returns the knots in summary data.
| int int_cur::summary_nknots | ( | ) | const [inline, protected] |
Returns the number of knots in summary data.
| virtual surface const* int_cur::surf1 | ( | logical | force = FALSE |
) | const [protected, virtual] |
Return the first surface.
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.
| force | Return the surface regardless. |
Reimplemented in off_int_cur.
| virtual surface const* int_cur::surf2 | ( | logical | force = FALSE |
) | const [protected, virtual] |
Return the second surface.
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.
| force | Return the surface regardless. |
Reimplemented in off_int_cur.
| virtual curve_tancone int_cur::tangent_cone | ( | SPAinterval const & | subset_range, | |
| logical | approx_ok | |||
| ) | const [protected, virtual] |
Return a cone bounding the tangent direction of the curve.
The cone is deemed to have its apex at the origin, and has 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. The default finds the cone for the B-spline approximation to the curve, so will be suitable for most derived classes.
| virtual logical int_cur::test_point_tol | ( | SPAposition const & | point, | |
| double | tol = 0, |
|||
| SPAparameter const & | param_guess = *(SPAparameter *) NULL_REF, |
|||
| SPAparameter & | param_actual = *(SPAparameter *) NULL_REF | |||
| ) | const [protected, virtual] |
Test point-on-curve to the 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. Thus, it is suitable for most derived classes.
| virtual int subtype_object::type | ( | ) | const [pure virtual, inherited] |
Returns the type of subtype_object.
Implemented in exact_int_cur, off_int_cur, off_spl_sur, par_int_cur, rb_blend_spl_sur, rot_spl_sur, skin_spl_sur, sub_spl_sur, sum_spl_sur, sweep_spl_sur, and VBL_SURF.
| virtual char const* int_cur::type_name | ( | ) | const [protected, pure virtual] |
Returns the string "intcurve".
Implements subtype_object.
Implemented in exact_int_cur, off_int_cur, and par_int_cur.
| virtual logical subtype_object::unknown_type | ( | ) | const [virtual, inherited] |
Returns TRUE if this object type is unknown to the system - else, it returns FALSE.
Role: This method returns FALSE as the default, so except for the system unknown subtype, the method should be omitted from derived class definitions.
| void int_cur::update_data | ( | bs3_curve | ) | [protected] |
Update the range and closure information from a bs3_curve.
| subtype_object* restore_int_int_cur | ( | ) | [friend] |
The restore function for int_int_cur is special, as it has to handle old-style save files, where that form was used for exact_int_curs and surf_int_curs as well.
As a result, it has to get at the surface and pcurve pointers.
int int_cur::bs1_properties [protected] |
bs1_curve properties
Role : Defines the following properties of the bs1_curves:
a. Whether or not all of theHas a value consisting of four digits.bs2_curveknots lie on theint_cur. b. Whether all of thebs2_curvehull turning angles are not too sharp. c. Whether thebs2_curvehull is known to self-intersect or not. d. Whether thebs2_curvehull fully encloses theint_cur.
0 if Knots on curve property is unknown 1 if Knots on curve property isThe second digit has the following values :FALSE2 if Knots on curve property isTRUE
0 if Turning angles ok property is unknown 1 if Turning angles ok property isThe third digit has the following values :FALSE2 if Turning angles ok property isTRUE
0 if Hull self-intersection property is unknown 1 if Hull self-intersection property isThe fourth digit has the following values :FALSE2 if Hull self-intersection property isTRUE
FALSE 2 if Hull enclosure property is TRUE
int int_cur::bs2_properties [protected] |
bs2_curve properties
Role : Defines the following properties of the bs2_curves:
a. Whether or not all of theHas a value consisting of four digits.bs2_curveknots lie on theint_cur. b. Whether all of thebs2_curvehull turning angles are not too sharp. c. Whether thebs2_curvehull is known to self-intersect or not. d. Whether thebs2_curvehull fully encloses theint_cur.
0 if Knots on curve property is unknown 1 if Knots on curve property isThe second digit has the following values :FALSE2 if Knots on curve property isTRUE
0 if Turning angles ok property is unknown 1 if Turning angles ok property isThe third digit has the following values :FALSE2 if Turning angles ok property isTRUE
0 if Hull self-intersection property is unknown 1 if Hull self-intersection property isThe fourth digit has the following values :FALSE2 if Hull self-intersection property isTRUE
FALSE 2 if Hull enclosure property is TRUE
logical int_cur::calling_make_approx [protected] |
Approximation is being made.
Role : Prevent recursive calls to make_approx.
closed_forms int_cur::closure [protected] |
bs3_curve int_cur::cur_data [protected] |
Object-space approximation to the true curve.
discontinuity_info int_cur::disc_info [protected] |
double int_cur::fitol_data [protected] |
Precision to which the B-spline approximates to the true object-space curve.
double int_cur::partol1_data [protected] |
Pcurve1 precision.
Role : Precision in parameter-space to which the parameter-space curves to the true object-space curve.
double int_cur::partol2_data [protected] |
Pcurve2 precision.
Role : Precision in parameter-space to which the parameter-space curves to the true object-space curve.
bs2_curve int_cur::pcur1_data [protected] |
bs2_curve int_cur::pcur2_data [protected] |
SPAinterval int_cur::range [protected] |
SPAinterval int_cur::safe_range [protected] |
Curve safe range.
Role : A sub-range of the curve which avoids any terminators at the ends of the curve, and consequently is safe for relaxation. Outside this range, but inside the full curve range, the approximating curve is taken to define the curve. Typically (i.e. if no terminators or surface singularities are present), the safe_range is the infinite SPAinterval; if a terminator is present the safe_range will stop just short of it.
Note that the base class administrates the safe_range (for example, it updates it following reparametrization) but it is the responsibility of the derived class to set it initially.
summary_bs3_curve* int_cur::summary_data [protected] |
bs3_curve data in summary form.
Role : This field may be set on restore, if the full curve is not available. It may be used to make the actual bs3_curve.
surface* int_cur::surf1_data [protected] |
surface* int_cur::surf2_data [protected] |
bs3_curve int_cur::tight_bs3_curve [protected] |
bs3_curve for tight fit
double int_cur::tight_bs3_tolerance [protected] |
Tight bs3_curve tolerance.
summary_bs3_curve* int_cur::tight_summary_data [protected] |
Tight approx data in summary form.
Role : This field may be set on restore, if the full curve is not available. It may be used to make the actual bs3_curve.