Purpose:
|
Creates a wrapper to a
ACISWIRE class.
|
|
Derivation:
|
wire_law_data : base_wire_law_data : path_law_data : law_data : ACIS_OBJECT : -
|
|
SAT Identifier:
|
"WIRE#"
|
|
Filename:
|
kern/kernel/kernutil/law/law.hxx
|
|
Description:
|
This is a law data class that holds a pointer to a wire.
|
|
References:
|
KERN
|
curve
|
|
BASE
|
SPAinterval, SPAposition, SPAvector
|
|
Data:
|
protected curve **acis_curves;
|
|
This holds a pointer to the underlying
ACIS curves.
|
|
|
protected double *scales;
|
|
This hold a pointer to an array of scale values for each of the underlying curve parameterization.
|
|
|
protected double *starts;
|
|
This holds a pointer to an array of parameter values that represent the starting positions of the underlying curves.
|
|
|
protected int size;
|
|
This is the number of underlying curves.
|
|
|
protected SPAinterval *param_ranges;
|
|
This is a pointer to an array that contains the beginning and ending parameter values.
|
|
|
protected double *tvalue;
|
|
This holds an array of parameter values on wire.
|
|
|
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 tvalue.
|
|
|
protected logical is_simple;
|
|
This holds a flag for if the law has been simplified.
|
|
|
protected SPAposition *cached_f;
|
|
This holds the positions.
|
|
|
protected SPAvector *cached_df;
|
|
This holds the first derivatives at the given cached positions.
|
|
|
protected SPAvector *cached_ddf;
|
|
This holds the second derivatives at the given cached positions.
|
|
Constructor:
|
public: wire_law_data::wire_law_data
(
|
|
|
BODY* in_wire_body
|
// body
|
|
|
);
|
|
|
C++ constructor, creating a
wire_law_data which is a wrapper for the
ACISBODY.
|
|
|
|
|
|
|
public: wire_law_data::wire_law_data
(
|
|
|
COEDGE* in_wire_coedge,
|
// coedge
|
|
|
SPAtransf const& in_trans
|
// transform
|
|
|
= *(SPAtransf* )NULL_REF
|
|
|
);
|
|
|
C++ constructor, creating a
wire_law_data which is a wrapper for the
ACISCOEDGE.
|
|
|
|
|
|
|
public: wire_law_data::wire_law_data
(
|
|
|
EDGE* in_wire_edge,
|
// edge
|
|
|
SPAtransf const& in_trans
|
// transform
|
|
|
= *(SPAtransf* )NULL_REF
|
|
|
);
|
|
|
C++ constructor, creating a
wire_law_data which is a wrapper for the
ACISEDGE.
|
|
|
|
|
|
|
public: wire_law_data::wire_law_data
(
|
|
|
curve** in_acis_curves,
|
|
// underlying curves
|
|
|
double* in_starts,
|
|
// start parameter
|
|
|
double* in_scales,
|
|
// scale for curve
|
|
|
|
|
|
// parameters
|
|
|
SPAinterval* in_param_ranges,
|
// parameter range
|
|
|
int in_size
|
|
// number of
|
|
|
|
|
|
// parameters
|
|
|
);
|
|
|
Constructor for the wrapper of an array of underlying
ACIScurve's. It has all of their defining data.
|
|
|
|
|
|
|
public: wire_law_data::wire_law_data
(
|
|
|
WIRE* in_wire_body
|
// wire
|
|
|
);
|
|
|
C++ constructor, creating a
wire_law_data which is a wrapper for the
ACISWIRE.
|
|
|
|
|
Destructor:
|
public: wire_law_data::~wire_law_data
();
|
|
|
Applications are required to call this destructor for their law data types.
|
|
|
|
Methods:
|
public: double wire_law_data::curvature
(
|
|
|
double para
|
// parameter to evaluate
|
|
|
);
|
|
|
Returns the curvature of the curve at the given parameter position.
|
|
|
|
|
|
|
public: virtual law_data* wire_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 wire_law_data::eval
(
|
|
|
double para,
|
// parameter to evaluate
|
|
|
int deriv,
|
// number of derivatives
|
|
|
int side
|
// which side
|
|
|
|
= 0
|
//
|
|
|
);
|
|
|
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** wire_law_data::map_laws
(
|
|
|
law* in_law,
|
// pointer to sublaw
|
|
|
int* out_size,
|
// size of array
|
|
|
int type
|
// type of mapping
|
|
|
|
=0
|
|
|
);
|
|
|
Takes in a law and returns an array of laws and size of the array. The incoming law is split into an array of laws. Each array element corresponds to an underlying curve in the wire and has had its domain appropriately remapped. This is used by sweeping and wire-offsetting to apply a single law to all of the curves of a wire.
|
|
|
type = 0:
param_rail is
FALSE.
|
|
type = 1: used for mapping draft laws.
|
|
type = 2:
param_rail param_rail is
TRUE.
|
|
|
|
|
|
|
public: void wire_law_data::map_to_edge
(
|
|
|
double in_param,
|
// edge in list
|
|
|
int& which_edge,
|
// edge
|
|
|
double& edge_param
|
// edge parameter
|
|
|
);
|
|
|
Given a parameter, this method returns the edge in
wire_law_data that contains the parameter, and the parameter on that edge.
|
|
|
|
|
|
|
public: double wire_law_data::max_curvature
();
|
|
|
Returns the maximum curvature for the wire.
|
|
|
|
|
|
|
public: virtual void wire_law_data::save
();
|
|
|
Saves the number of curves, and for each curve saved it calls the curve's save method and saves the starts, scales, and parameter ranges.
|
|
|
|
|
|
|
public: void wire_law_data::set_levels
(
|
|
|
int in_point_level
|
// number of levels
|
|
|
|
= 4,
|
|
|
int in_derivative_level
|
// number of derivs
|
|
|
|
= 2
|
|
|
);
|
|
|
Sets the number of levels for the points stored and the derivatives stored.
|
|
|
|
|
|
|
public: logical wire_law_data::simple
();
|
|
|
Returns whether or not it is simple.
|
|
|
|
|
|
|
public: int wire_law_data::singularities
(
|
|
|
double** where,
|
// where discontinuities
|
|
|
|
|
// may exist
|
|
|
int** type,
|
// type of discontinuity
|
|
|
double start,
|
// start value
|
|
|
double end
|
// end value
|
|
|
);
|
|
|
This specifies where in the given law there might be discontinuities. The array
where notes where the discontinuity occurred. 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
n-th derivative. -1 means that it is not defined.
|
|
|
|
|
|
|
public: char const* wire_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
WIRE.
|
|
|
|
|
Related Fncs:
|
restore_law, restore_law_data, save_law
|