Purpose:
|
Defines a parametric surface as an object in the model.
|
|
Derivation:
|
SPLINE : SURFACE : ENTITY : ACIS_OBJECT : -
|
|
SAT Identifier:
|
"spline"
|
|
Filename:
|
kern/kernel/kerndata/geom/spline.hxx
|
|
Description:
|
SPLINE is a model geometry class that contains a pointer to a (lowercase)
spline, the corresponding construction geometry class. In general, a model geometry class is derived from
ENTITY and is used to define a permanent model object. It provides model management functionality, in addition to the geometry definition.
|
|
|
SPLINE is one of several classes derived from
SURFACE to define a specific type of surface. The
spline class holds a pointer to a
spl_sur and a
logical denoting the sense of the stored surface. A
spl_sur also contains a use count and a detailed parametric surface description.
|
|
|
Along with the usual
SURFACE and
ENTITY class methods,
SPLINE has member methods to provide access to specific implementations of the geometry. For example, a spline can be transformed, resulting in another surface. All access to the surface data is through methods for the
spline class.
|
|
|
A use count allows multiple references to a
SPLINE. The construction of a new
SPLINE initializes the use count to 0. Methods are provided to increment and decrement the use count, and after the use count returns to 0, the entity is deleted.
|
|
References:
|
KERN
|
spline
|
|
Constructor:
|
public: SPLINE::SPLINE
();
|
|
|
C++ allocation constructor requests memory for this object but does not populate it. The allocation constructor is used primarily by restore. Applications should call this constructor only with the overloaded
new operator, because this reserves the memory on the heap, a requirement to support roll back and history management.
|
|
|
|
|
|
|
public: SPLINE::SPLINE
(
|
|
|
spline const&
|
// spline object
|
|
|
);
|
|
|
C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument. Applications should call this constructor only with the overloaded
new operator, because this reserves the memory on the heap, a requirement to support roll back and history management.
|
|
|
|
|
Destructor:
|
public: virtual void SPLINE::lose
();
|
|
|
Posts a delete bulletin to the bulletin board indicating the instance is no longer used in the active model. The
lose methods for attached attributes are also called.
|
|
|
|
|
|
|
protected: virtual SPLINE::~SPLINE
();
|
|
|
This
C++ destructor should never be called directly. Instead, applications should use the overloaded
lose method inherited from the
ENTITY class, because this supports history management. (For example,
x=new SPLINE(...) then later
x->lose.)
|
|
|
|
Methods:
|
protected: virtual logical
|
|
|
SPLINE::bulletin_no_change_vf (
|
|
|
ENTITY const* other,
|
|
// other entity
|
|
|
logical identical_comparator
|
// comparator
|
|
|
) const;
|
|
|
Virtual function for comparing subclass data - called by
bulletin_no_change. For the
identical_comparator argument to be
TRUE requires an exact match when comparing doubles and returns the result of
memcmp as a default (for non-overridden subclasses).
FALSE indicates tolerant compares and returns
FALSE as a default.
|
|
|
|
|
|
|
public: virtual void SPLINE::debug_ent
(
|
|
|
FILE*
|
// file pointer
|
|
|
) const;
|
|
|
Prints the type and address of this object, roll back pointer, attributes, and any unknown subtype information to the specified file. Refer to the
ENTITY class for more details.
|
|
|
|
|
|
|
public: surface const& SPLINE::equation
() const;
|
|
|
Returns the
surface equation if the
SPLINE for reading only.
|
|
|
|
|
|
|
public: surface& SPLINE::equation_for_update
();
|
|
|
Returns a pointer to
surface equation for update operations. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls
backup to put an entry on the bulletin board.
|
|
|
|
|
|
|
public: virtual int SPLINE::identity
(
|
|
|
int
|
|
// level
|
|
|
|
= 0
|
|
|
) const;
|
|
|
If
level is unspecified or 0, returns the type identifier
SPLINE_TYPE. If
level is specified, returns
SPLINE_TYPE for that level of derivation from
ENTITY. The level of this class is defined as
SPLINE_LEVEL.
|
|
|
|
|
|
|
public: virtual logical SPLNE::is_deepcopyable
(
|
|
|
) const;
|
|
|
Returns
TRUE if this can be deep copied.
|
|
|
|
|
|
|
public: SPAbox SPLINE::make_box
(
|
|
|
LOOP*,
|
// list of LOOPs
|
|
|
SPAtransf const* t
|
// for future use
|
|
|
|
= NULL,
|
|
|
logical tight_box
|
// for future use
|
|
|
|
= FALSE,
|
|
|
SPAbox* untransformed_box// for future use
|
|
|
|
= NULL
|
|
|
) const;
|
|
|
Creates a bounding
box for this
surface that is surrounded by a loop of
EDGEs. The
box contains the complete underlying
surface, and ignores the bounding
EDGEs. If the
surface is kept minimal, this is sufficient.
|
|
|
|
|
|
|
public: void SPLINE::operator*=
(
|
|
|
SPAtransf const&
|
// transform
|
|
|
);
|
|
|
Transforms the
SPLINE in place. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls
backup to put an entry on the bulletin board.
|
|
|
|
|
|
|
public: void SPLINE::restore_common
();
|
|
|
The
RESTORE_DEF macro expands to the
restore_common method, which is used in reading information from a SAT file. 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.
|
|
|
if (restore_version_number < SURFACE_VERSION)
|
|
// Old style - the reverse bit was read explicitly, and
|
|
// forgotten when reading a lower-case spline normally.
|
|
read_int
|
Reverse bit
|
|
spline::restore_data
|
Low-level spline surface geometry definition.
|
|
if (reverse bit)
|
|
|
spline::negate
|
|
Change definition of underlying spline.
|
|
|
|
|
|
|
public: void SPLINE::set_def
(
|
|
|
spline const&
|
// spline
|
|
|
);
|
|
|
Sets the definition spline to the given spline. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls
backup to put an entry on the bulletin board.
|
|
|
|
|
|
|
public: surface* SPLINE::trans_surface
(
|
|
|
SPAtransf const&
|
// transform
|
|
|
|
= * (SPAtransf* ) NULL_REF,
|
|
|
logical
|
// reversed
|
|
|
|
= FALSE
|
|
|
) const;
|
|
|
Returns a new
surface that is the spline of the
SPLINE. If the
SPAtransf is non-NULL, it is transformed. If
logical is
TRUE, it is reversed in
sense.
|
|
|
|
|
|
|
public: virtual const char*
|
|
|
SPLINE::type_name () const;
|
|
|
Returns the string "spline".
|
|
Internal Use:
|
full_size
|
|
|
|
|
Related Fncs:
|
is_SPLINE
|