curve_law_data
List of: Classes
Subjects: Geometric Analysis, Laws, SAT Save and Restore
Contents: Kernel

Purpose: Creates a wrapper to an ACIScurve class.

Derivation: curve_law_data : base_curve_law_data : path_law_data : law_data : ACIS_OBJECT : -

SAT Identifier: "EDGE#"

Filename: kern/kernel/kernutil/law/law.hxx

Description: This is a law data class that holds a pointer to a curve.

References: KERN curve

by KERN law_int_cur

BASE SPAposition, SPAvector

Data: protected curve *acis_curve;

This holds a pointer to the underlying ACIS curve.


protected double *tvalue;

This holds the parameter values.


protected int *which_cached;

This holds the time tags.


protected int derivative_level;

This holds how many derivatives are cached.


protected int point_level;

This holds the size of the tvalue array.


protected SPAposition *cached_f;

This holds the positions of the curve used in evaluation.


protected SPAvector *cached_ddf;

This holds vectors representing the second derivative of the curve at the positions given in cached_f.


protected SPAvector *cached_df;

This holds vectors representing the first derivative of the curve at the positions given in cached_f.

Constructor: public: curve_law_data::curve_law_data (


curve const& in_acis_curve, // underlying ACIS





// curve


double in_start
// start parameter



= 0,


double in_end
// end parameter



= 0


);


C++ constructor, creating a curve_law_data which is a wrapper for the ACIScurve. Because the ACIScurve does not store the starting and ending parameter positions, these must be provided.




Destructor: public: curve_law_data::~curve_law_data ();


Applications are required to call this destructor for their law data types.



Methods: public: double curve_law_data::curvature (


double para // parameter to evaluate


);


Returns the curvature of the curve at the given parameter position.






public: curve* curve_law_data::curve_data ();


Returns a pointer to the reference curved stored as part of the curve_law_data.






public: virtual law_data* curve_law_data::deep_copy (


base_pointer_map* pm // list of items within



= NULL // the entity that are




// already deep copied


) const;


Creates a copy of an item that does not share any data with the original. Allocates new storage for all member data and any pointers. Returns a pointer to the copied item.






public: SPAvector curve_law_data::eval (


double para, // parameter to evaluate


int deriv, // which derivative




// to take


int side // left or right -



= 0 // sided evaluation


);


Returns the position or one of its derivatives of the underlying curve at the give parameter position. The position is returned as a vector.






public: law*curve_law_data::law_form ();


Returns a pointer to the law class used as part of the curve_law_data.






public: double curve_law_data::length (


double start, // start parameter


double end // end parameter


);


Arc length. Returns the algebraic distance along the curve between the given parameters. The sign is positive if the parameter values are given in increasing order and negative if they are in decreasing order.






public: double curve_law_data::length_param (


double base, // datum parameter


double length // arc length


);


Returns the parameter value of the point on the curve at the given algebraic arc length from that defined by the datum parameter. This method is the inverse of the length method. 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.






public: double curve_law_data::point_perp (


SPAposition in_point // point


);


Finds the point on the curve nearest to the given point.






public: double curve_law_data::point_perp (


SPAposition in_point, // point


double in_t // parameter


);


Finds the point on the curve nearest to the given point.






public: virtual void curve_law_data::save ();


Saves the curve law data and the curve.






public: law_data* curve_law_data::set_domain (


SPAinterval* new_domain // new input domain


);


Establishes the domain of the law. Permits the law to be altered for the its input array size.






public: void curve_law_data::set_levels (


int in_point_level // number of positions



= 4,


int in_derivative_level // number of derivatives



= 2


);


This establishes the number of parameter values to store in tvalue, which in turn establishes the positions for cached_f.






public: int curve_law_data::singularities (


double** where, // total discontinuities


int** type, // type of discontinuity


double start, // start


double end // end


);


Returns the number, type (first, second, or third order) and parameter values of the discontinuities on the underlying curve, if any.






public: char const* curve_law_data::symbol (


law_symbol_type type // type of law symbol


);


Returns the string that represents this law class's symbol. The symbol is used for parsing the law and for saving and restoring law-based geometry. For a law to be saved and restored, it must have or inherit this method.


The default law symbol for this class is EDGE.




Related Fncs: restore_law, restore_law_data, save_law
PDF/KERN/29CLC.PDF
HTM/DATA/KERN/KERN/29CLC/0011.HTM