Home

curve_law_data Class Reference
[Laws]

Serves as a wrapper for an ACIS curve object. More...

#include <law.hxx>

Inheritance diagram for curve_law_data:

Inheritance graph
[legend]
Collaboration diagram for curve_law_data:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void add ()
 Increments the use count of this law_data.
double curvature (double para)
 Returns the curvature of the path at the given parameter.
curvecurve_data ()
 Returns a pointer to the reference curve stored as part of the curve_law_data.
 curve_law_data (const curve &in_acis_curve, double in_start=0, double in_end=0)
 Constructs a curve_law_data from an ACIS curve and optional starting and ending parameters.
double data_end ()
 Returns the ending parameter of the path.
double data_start ()
 Returns the starting parameter of the path.
virtual int date ()
 Returns the version of ACIS in which this law_data class first appeared.
virtual law_datadeep_copy (base_pointer_map *pm=NULL) const
 Creates a copy of an item that does not share any data with the original.
SPAvector eval (double para, int deriv, int side=0)
 This method evaluates the nth derivative of the given law at the specified parameter value.
lawlaw_form ()
 Returns a pointer to the law class used as part of the curve_law_data.
double length (double start, double end)
 Returns the distance between the two parameters.
double length_param (double base, double length)
 Returns the parameter value at the end point.
double point_perp (SPAposition in_point, double in_t)
 Finds the point on the curve nearest to the given point, given a guess as to its value.
double point_perp (SPAposition in_point)
 Finds the point on the curve nearest to the given point.
int ref_count ()
 Returns the use count of this law_data.
void remove ()
 Decrements the use count of this law_data, and deletes the law_data when the count drops to zero.
virtual law_datarestore ()
 Returns NULL.
virtual void save ()
 Saves the law_data with its encapsulated data.
law_dataset_domain (SPAinterval *new_domain)
 Sets the domain of this law_data to the given interval.
void set_levels (int in_point_level=4, int in_derivative_level=2)
 Establishes the number of parameter values to store in tvalue, which in turn establishes the positions for cached_f.
int singularities (double **where, int **type, double start, double end)
 Specifies where in this law_data there might be discontinuities.
virtual char * string (law_symbol_type type=DEFAULT, int &count=*(int *) NULL_REF, law_data_node *&ldn=*(law_data_node **) NULL_REF)
 Returns a string that represents this law_data.
const char * symbol (law_symbol_type type)
 Returns the string that represents this law_data's symbol.
 ~curve_law_data ()
 Applications are required to call this destructor for their law data types.

Protected Attributes

double end
 The ending parameter value of the path.
double start
 The starting parameter value of the path.


Detailed Description

Serves as a wrapper for an ACIS curve object.


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

See also:
curve, SPAposition, SPAvector

Constructor & Destructor Documentation

curve_law_data::~curve_law_data (  ) 

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

curve_law_data::curve_law_data ( const curve in_acis_curve,
double  in_start = 0,
double  in_end = 0 
)

Constructs a curve_law_data from an ACIS curve and optional starting and ending parameters.



Parameters:
in_acis_curve underlying ACIS curve.
in_start start parameter.
in_end end parameter.


Member Function Documentation

void law_data::add (  )  [inherited]

Increments the use count of this law_data.



Role: This method is called in all law_data constructors for the law_data being constructed, and on all of its sublaws.

double curve_law_data::curvature ( double  para  )  [virtual]

Returns the curvature of the path at the given parameter.



Parameters:
para parameter for test.

Implements path_law_data.

curve* curve_law_data::curve_data (  ) 

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

double path_law_data::data_end (  )  [inline, inherited]

Returns the ending parameter of the path.

double path_law_data::data_start (  )  [inline, inherited]

Returns the starting parameter of the path.

virtual int law_data::date (  )  [virtual, inherited]

Returns the version of ACIS in which this law_data class first appeared.



Role: If a law_data is part of a model that is to be saved at a previous ACIS release level, this is used to indicate whether the law can be saved or not.

Reimplemented in law_law_data.

virtual law_data* curve_law_data::deep_copy ( base_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.

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 reference count for each copy.

The pointer_map 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.

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

Implements law_data.

SPAvector curve_law_data::eval ( double  para,
int  deriv,
int  side = 0 
) [virtual]

This method evaluates the nth derivative of the given law at the specified parameter value.



Role: For convenience, all law classes inherit this method. It calls the main evaluate member function and does some checking using take_dim and return_dim.

Parameters:
para parameter position.
deriv number of derivatives.
side left (-1) or right (1) - default = 0.

Implements path_law_data.

law* curve_law_data::law_form (  )  [virtual]

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

Implements base_curve_law_data.

double curve_law_data::length ( double  start,
double  end 
) [virtual]

Returns the distance between the two parameters.



Parameters:
start start param.
end end param.

Implements base_curve_law_data.

double curve_law_data::length_param ( double  base,
double  length 
) [virtual]

Returns the parameter value at the end point.



Parameters:
base starting parameter.
length distance to end.

Implements base_curve_law_data.

double curve_law_data::point_perp ( SPAposition  in_point,
double  in_t 
) [virtual]

Finds the point on the curve nearest to the given point, given a guess as to its value.



Parameters:
in_point point.
in_t parameter.

Implements base_curve_law_data.

double curve_law_data::point_perp ( SPAposition  in_point  )  [virtual]

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



Parameters:
in_point point.

Implements base_curve_law_data.

int law_data::ref_count (  )  [inline, inherited]

Returns the use count of this law_data.

void law_data::remove (  )  [inherited]

Decrements the use count of this law_data, and deletes the law_data when the count drops to zero.



Role: This method is called by all law_data destructors for a law_data, and on all its sublaws. Users of a law_data should call remove instead of delete to delete it.

virtual law_data* law_data::restore (  )  [virtual, inherited]

Returns NULL.

virtual void curve_law_data::save (  )  [virtual]

Saves the law_data with its encapsulated data.

Implements law_data.

law_data* curve_law_data::set_domain ( SPAinterval new_domain  )  [virtual]

Sets the domain of this law_data to the given interval.



Parameters:
new_domain the new domain.

Reimplemented from law_data.

void curve_law_data::set_levels ( int  in_point_level = 4,
int  in_derivative_level = 2 
)

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



Parameters:
in_point_level number of positions.
in_derivative_level number of derivatives.

int curve_law_data::singularities ( double **  where,
int **  type,
double  start,
double  end 
) [virtual]

Specifies where in this law_data there might be discontinuities.



Role: The array where notes where the discontinuity occurs. The type indicates 0 if there is a discontinuity, 1 if the discontinuity in the 1st derivative, and any integer n if the discontinuity is in the nth derivative. The value -1 means that the type is not defined.

Parameters:
where where discontinuities exist.
type discontinuity types.
start start parameter.
end end parameter.

Reimplemented from path_law_data.

virtual char* law_data::string ( law_symbol_type  type = DEFAULT,
int &  count = *(int *) NULL_REF,
law_data_node *&  ldn = *(law_data_node **) NULL_REF 
) [virtual, inherited]

Returns a string that represents this law_data.



Role: The law function is composed of its symbol, associated parentheses, and the strings associated with its sublaws. It is provided as a user-friendly interface to laws. A derived class must override this function to be able to save a law_data.

Parameters:
type type of symbol - standard ACIS type.
count count.
ldn law data node.

Reimplemented in law_law_data.

const char* curve_law_data::symbol ( law_symbol_type  type  )  [virtual]

Returns the string that represents this law_data's symbol.



Role: This is a pure virtual method, forcing derived classes to define their own versions of this method. Hence, this method is called from the derived class and not from this abstract class.

Parameters:
type type of symbol - standard ACIS type.

Implements law_data.


Member Data Documentation

double path_law_data::end [protected, inherited]

The ending parameter value of the path.

double path_law_data::start [protected, inherited]

The starting parameter value of the path.