CURVE
List of: Classes
Subjects: Model Geometry, SAT Save and Restore
Contents: Kernel

Purpose: Defines a generic curve as an object in the model.

Derivation: CURVE : ENTITY : ACIS_OBJECT : -

SAT Identifier: "curve"

Filename: kern/kernel/kerndata/geom/curve.hxx

Description: CURVE is a model geometry class that contains a pointer to a (lowercase) curve, 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.


The CURVE class provides the basic framework for the range of curve geometries implemented at any time in the modeler. Additional classes are derived from CURVE to define specific types of curves, such as COMPCURV, ELLIPSE, INTCURVE, and STRAIGHT.


Along with the usual ENTITY class methods, CURVE has member methods to provide access to specific implementations of the geometry. For example, a curve can be transformed by a given transform operator.


A use count allows multiple references to a CURVE. The construction of a new CURVE 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 ENTITY

by KERN EDGE, PCURVE, TCOEDGE, pattern_holder

Constructor: public: CURVE::CURVE ();


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.




Destructor: public: virtual void CURVE::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 CURVE::~CURVE ();


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 CURVE(...) then later x->lose.)



Methods: public: virtual void CURVE::add ();


Increments the CURVE's use count. 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 CURVE::add_owner (


ENTITY*, // owner


logical // increment use



= TRUE


);


Add this owner to the list.






protected: virtual logical


CURVE::bulletin_no_change_vf (


ENTITY const* other,
// other entity


logical identical_comparator // comparator


) const;


A virtual compare function for api_get_modified_faces.






public: virtual void CURVE::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: virtual logical CURVE::deletable () const;


Indicates whether this entity is normally destroyed by lose (TRUE), or whether it is shared between multiple owners using a use count, and so gets destroyed implicitly when every owner has been lost (FALSE). The default for CURVE is FALSE.






public: virtual curve const&


CURVE::equation () const;


Returns the curve equation for reading only, or NULL for a generic CURVE.






public: virtual curve& CURVE::equation_for_update ();


Returns a pointer to curve's 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: int CURVE::get_owners (


ENTITY_LIST& list // list


) const;


Returns the number of owners in the list.






public: virtual int CURVE::identity (


int
// level



= 0


) const;


If level is unspecified or 0, returns the type identifier CURVE_TYPE. If level is specified, returns CURVE_TYPE for that level of derivation from ENTITY. The level of this class is defined as CURVE_LEVEL.






public: virtual logical CURVE::is_deepcopyable (


) const;


Returns TRUE if this can be deep copied.






public: virtual logical CURVE::


is_use_counted () const;


Returns TRUE if the entity is use counted.






public: virtual SPAbox CURVE::make_box (


APOINT*, // first point on curve


APOINT*, // second point on curve


SPAtransf const*, // transform


double // tolerance



= 0.0


) const;


Determines a bounding SPAbox for the portion of the curve through two points. The curve definition must be such as to be able to determine uniquely the portion lying between any two points lying on it.






public: virtual void CURVE::operator*= (


SPAtransf const& // transform


);


Transforms a CURVE. 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 void CURVE::remove (


logical lose_if_zero // flag to start lose



= TRUE


);


Decrements the CURVE's use count. If the use count becomes 0, the CURVE is deleted. 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 CURVE::remove_owner (


ENTITY*, // owner


logical // decrement use



= TRUE,


logical // lose if zero



= TRUE


);


Remove this owner from the list.






public: void CURVE::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 < PATTERN_VERSION

read_ptr APATTERN index


if (apat_idx != (APATTERN*)(-1)))


restore_cache();

if ( !get_standard_save_flag() )


read_int


use count data






public: virtual void CURVE::set_use_count (


int val // new value


);


Sets the count for the number of instances of this CURVE class. This is used by the lose method. Refinements are not destructed until use_count goes to zero.






public: virtual curve* CURVE::trans_curve (


SPAtransf const&
// transform



= * (SPAtransf* ) NULL_REF,


logical
// reversed flag



= FALSE


) const;


Transforms a curve equation by the given transform. If the logical is TRUE if the curve is reversed.






public: virtual const char*


CURVE::type_name () const;


Returns the string "curve".






public: virtual int CURVE::use_count () const;


Returns the use count of the CURVE.

Internal Use: full_size




Related Fncs: is_CURVE
PDF/KERN/29CLC.PDF
HTM/DATA/KERN/KERN/29CLC/0005.HTM