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

Purpose: Defines an ellipse as an object in the model.

Derivation: ELLIPSE : CURVE : ENTITY : ACIS_OBJECT : -

SAT Identifier: "ellipse"

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

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


ELLIPSE is one of several classes derived from CURVE to define a specific type of curve. The ellipse class defines an ellipse by its center, a unit normal vector, a major-axis vector, and a double specifying the eccentricity ratio of the ellipse.


Along with the usual CURVE and ENTITY class methods, ELLIPSE has member methods to provide access to specific implementations of the geometry. For example, methods are available to set and retrieve the axes, center, and other information about an ellipse.


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

Constructor: public: ELLIPSE::ELLIPSE ();


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: ELLIPSE::ELLIPSE (


ellipse const& // existing ellipse


);


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.






public: ELLIPSE::ELLIPSE (


SPAposition const&, // center


SPAunit_vector const&, // unit normal


SPAvector const&, // major axis


double // radius ratio



= 1.0


);


C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments. 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 ELLIPSE::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 ELLIPSE::~ELLIPSE ();


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



Methods: protected: virtual logical


ELLIPSE::bulletin_no_change_vf (


ENTITY const* other,
// other entity


logical identical_comparator // comparator


) const;


A virtual compare function for api_get_modified_faces.






public: SPAposition const& ELLIPSE::centre () const;


Returns the center of an ELLIPSE as a SPAposition.






public: virtual void ELLIPSE::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: curve const& ELLIPSE::equation () const;


Return the curve equation of an ELLIPSE for reading only.






public: curve& ELLIPSE::equation_for_update ();


Returns address of curve equation for update operations, backing it up first.






public: virtual int ELLIPSE::identity (


int
// level



= 0


) const;


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






public: virtual logical ELLIPSE::is_deepcopyable (


) const;


Returns TRUE if this can be deep copied.






public: SPAvector const& ELLIPSE::major_axis () const;


Returns the major-axis of an ELLIPSE.






public: SPAbox ELLIPSE::make_box (


APOINT*, // first point


APOINT*, // second point


SPAtransf const*, // transform


double // tolerance



= 0.0


) const;


Makes a box enclosing a portion of the ELLIPSE between two points lying in the plane of the ELLIPSE, with sides parallel to the principal axes, and then transforms it.






public: SPAunit_vector const& ELLIPSE::normal () const;


Returns the normal to the plane of an ELLIPSE.






public: void ELLIPSE::operator*= (


SPAtransf const& // transform


);


Transforms an ELLIPSE. 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: double ELLIPSE::radius_ratio () const;


Returns the radius ratio of an ELLIPSE.






public: void ELLIPSE::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.


ellipse::restore_data
Low-level geometry definition of the ellipse.






public: void ELLIPSE::set_centre (


SPAposition const& // center


);


Sets the ELLIPSE's center point to the given position. 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 ELLIPSE::set_major_axis (


SPAvector const& // major axis


);


Sets the ELLIPSE's major axis to the given vector. 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 ELLIPSE::set_normal (


SPAunit_vector const& // normal


);


Sets the ELLIPSE's planar normal to the given SPAunit_vector. 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 ELLIPSE::set_radius_ratio (


double // radius ratio


);


Sets the ELLIPSE's radius ratio to the given value. 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: curve* ELLIPSE::trans_curve (


SPAtransf const&
// transform



= * (SPAtransf* ) NULL_REF,


logical
// reverse



= FALSE


) const;


Transforms the curve equation of an ELLIPSE. If the logical is TRUE, the curve is reversed.






public: virtual const char*


ELLIPSE::type_name () const;


Returns the string "ellipse".

Internal Use: save, save_common, full_size




Related Fncs: is_ELLIPSE
PDF/KERN/31CLE.PDF
HTM/DATA/KERN/KERN/31CLE/0003.HTM