discontinuity_info
List of: Classes
Subjects: Construction Geometry, SAT Save and Restore
Contents: Kernel

Purpose: Stores discontinuity information for a curve or surface.

Derivation: discontinuity_info : ACIS_OBJECT : -

Filename: kern/kernel/kerngeom/curve/discinfo.hxx

Description: Used to store parameter values at which a curve has a discontinuity in some derivative, or at which a surface has a line of discontinuity in some derivative. This class stores discontinuity information for a curve or surface. Only C1, C2, and C3 discontinuities are stored since we are not interested in C4 discontinuities and above.

References: by KERN int_cur, intcurve, spl_sur, spline

Constructor: public: discontinuity_info::discontinuity_info ();


C++ allocation constructor requests memory for this object but does not populate it. The allocation constructor is used primarily by restore.






public: discontinuity_info::discontinuity_info (


const discontinuity_info& old // instance to






// copy


);


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




Destructor: public: discontinuity_info::~discontinuity_info ();


C++ destructor for discontinuity_info which deallocates memory.



Methods: public: void discontinuity_info::add_discontinuity (


double value, // value to add


int order // where


);


Adds a discontinuity value to the list. In periodic cases, it's up to the application to ensure that the values are in the same parameter period. but we check this here.






public: const double*


discontinuity_info::all_discontinuities (


int& n_discont, // number of




// discontinuities


int order // order of disc


);


Accesses the all discontinuities list, returning a read-only array.






public: void discontinuity_info::debug (


char const*, // title line


FILE* // file pointer


) const;;


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






public: const double*


discontinuity_info::discontinuities (


int& n_discont, // number of




// discontinuities


int order // order of disc.


) const;


This is an access function that returns a read-only array.






public: int discontinuity_info::discontinuous_at (


double t // where to test


) const;


States whether a particular parameter value is a discontinuity.






public: void discontinuity_info::merge (


discontinuity_info& old // instance to merge


);


Merges two discontinuity_info entities, keeping the supplied one unchanged. The entries from the second are added into the first one at a time. Not very efficient, but we don't expect these arrays to contain much data.






public: void discontinuity_info::negate ();


Negates the data for the discontinuity_info.






public: discontinuity_info&


discontinuity_info::operator= (


const discontinuity_info& old // list to use


);


Sets the pointer to the current discontinuity_info object to the input object pointer.






public: double discontinuity_info::period () const;


Periodicity. This class handles periodicity, although it does not know the "base range" of the parameters. When building up the list using add_discontinuity, the application must ensure that the parameters are in the correct range (e.g. the param_range of a curve). Once the list is built, this class will accept parameters out of the base range and interpret them as though they were in range.






public: void


discontinuity_info::remove_discontinuity (


double value // value to remove


);


Removes a discontinuity value from the list.






public: void discontinuity_info::reparam (


double a, // slope


double b // offset


);


Makes a linear change of parameter to all the discontinuity values (new value = a * old_value + b).






public: void discontinuity_info::reset ();


Deletes discontinuity information and reinitializes the data fields to zero.






public: void discontinuity_info::restore ();


This method is never called directly. It is called by a higher hierarchical function if an item in the SAT file is determined to be of this class type. An instance of this class will already have been created through the allocation constructor. This method then populates the class instance with the appropriate data from the SAT file.


read_int // number of C1 discontinuities

if (n_C1 > 0) // if any C1 discontinuities

foreach ( n_C1 ) // for each one


read_real // read the discontinuity

read_int // number of C2 discontinuities

if ( n_C2 > 0 ) // if any C2 discontinuities

foreach ( n_C2 ) // for each one


read_real // read the discontinuity

read_int // number of C3 discontinuities

if ( n_C3 > 0 ) // if any C3 discontinuities

foreach ( n_C3 ) // for each one

read_real // read the discontinuity

read_real


// total discontinuities






public: void discontinuity_info::save () const;


This method is never called directly. It is called by a higher hierarchical function if an item in the SAT file is determined to be of this class type while storing information to a save file.






public: void discontinuity_info::set_periodic (


double per // period


);


Establishes the periodicity.






public: void discontinuity_info::shift (


double incr // amount to shift


);


Shifts all of the discontinuity values by a constant amount.






public: discontinuity_info


discontinuity_info::split (


double param // parameter value


);


Split the discontinuity lists into two at a given parameter value. Like curve::split, the return value contains the initial values (before the split parameter), and the original discontinuity_info contains the others (after the split parameter). If the split parameter is itself a discontinuity, it is removed from the list.

Internal Use: full_size




Related Fncs: test_discontinuity
PDF/KERN/30CLD.PDF
HTM/DATA/KERN/KERN/30CLD/0004.HTM