Purpose:
|
Represents the external boundary of a
LUMP, or the internal boundary of a void (unoccupied space) within a
LUMP.
|
|
Derivation:
|
SHELL : ENTITY : ACIS_OBJECT : -
|
|
SAT Identifier:
|
"shell"
|
|
Filename:
|
kern/kernel/kerndata/top/shell.hxx
|
|
Description:
|
The shell is a connected portion of a lump's boundary. It has no physical or topological connection with any other shell. It is not possible to traverse the topological structure of one shell and end up on another shell. If a lump has no voids, then exactly one shell gives its overall extent. Any other shells bound voids wholly within the lump. There is no distinction made in the data structure between peripheral and void shells. In this context a shell is closed and bounded.
|
|
|
It is technically possible for a shell to be open and bounded or unbounded. If bounded, the containing lump (and body) is considered
incomplete, or more accurately,
incompletely bounded. It interacts with other bodies only so far as the defined portions of their shells interact. There are configurations of that interaction that are disallowed. If the shell is unbounded, it can be semi-infinite (e.g., a plane bounded by a single infinite straight line) or infinite (e.g., two half-infinite planes joined at their boundaries). If the shell is semi-infinite, the body is incomplete, while an infinite shell is completely defined, though of infinite extent.
|
|
|
The concepts of
peripheral and
void shells, and of
connected and
disjoint bodies have no meaning when applied to incomplete lump or body.
|
|
|
A shell is constructed from a collection of "faces" and "wires." Large collections may be subdivided into a hierarchy of "subshells," each containing a proper subcollection. A shell subdivided into subshells may also contain faces and wires directly; in this case, these entities are not contained in any subshell.
|
|
References:
|
KERN
|
FACE, LUMP, SUBSHELL, WIRE
|
|
by KERN
|
FACE, LUMP, pattern_holder
|
|
Constructor:
|
public: SHELL::SHELL
();
|
|
|
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: SHELL::SHELL
(
|
|
|
FACE*,
|
// list of FACEs
|
|
|
SUBSHELL*,
|
// list of SUBSHELLs
|
|
|
SHELL*
|
// sister SHELL
|
|
|
);
|
|
|
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.
|
|
|
Creates a
SHELL, initializes all the class data, and records the creation in the bulletin board. The first two arguments are the starts of lists of
FACEs and
SUBSHELLs contained, and the last is a list of sister
SHELLs already in the current
LUMP. The calling routine must set
lump_ptr and if desired,
bound_ptr, using
set_lump and
set_bound.
|
|
|
|
|
Destructor:
|
public: virtual void SHELL::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 SHELL::~SHELL
();
|
|
|
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 SHELL(...) then later
x->lose.)
|
|
|
|
Methods:
|
public: SPAbox* SHELL::bound
() const;
|
|
|
Returns a pointer to a geometric bounding region (a box), within which the entire
SHELL lies (with respect to the internal coordinate system of the
BODY). The return may be
NULL if the bound was not calculated since the
SHELL was last changed.
|
|
|
|
|
|
|
protected: virtual logical
|
|
|
SHELL::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: logical SHELL::copy_pattern_down
(
|
|
|
ENTITY* target
|
|
// target
|
|
|
) const;
|
|
|
Copies the pattern through all children of the target entity.
|
|
|
|
|
|
|
public: virtual void SHELL::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: FACE* SHELL::face
() const;
|
|
|
Returns the first
FACE in a complete enumeration of all the
FACEs in the
SHELL, continued by repeated use of
FACE::next_face. The undefined order of
SUBSHELLs fluctuates with each change of the
SUBSHELL subdivision.
|
|
|
|
|
|
|
public: FACE* SHELL::face_list
() const;
|
|
|
Returns a pointer to the first
FACE of a list of
FACEs immediately contained in this
SHELL.
|
|
|
|
|
|
|
public: void SHELL::get_all_patterns
(
|
|
|
VOID_LIST& list
|
|
// list
|
|
|
);
|
|
|
Returns all patterns in the list.
|
|
|
|
|
|
|
public: virtual int SHELL::identity
(
|
|
|
int
|
|
// level
|
|
|
|
= 0
|
|
|
) const;
|
|
|
If
level is unspecified or 0, returns the type identifier
SHELL_TYPE. If
level is specified, returns
SHELL_TYPE for that level of derivation from
ENTITY. The level of this class is defined as
SHELL_LEVEL.
|
|
|
|
|
|
|
public: logical SHELL::is_closed
() const;
|
|
|
Determine if the shell is closed or not. This method considers only single-sided faces. It ignores all double-sided faces and wires.
|
|
|
|
|
|
|
public: virtual logical SHELL::is_deepcopyable
(
|
|
|
) const;
|
|
|
Returns
TRUE if this can be deep copied.
|
|
|
|
|
|
|
public: LUMP* SHELL::lump
() const;
|
|
|
Returns a pointer to the owning
LUMP (SHELLs in separate
LUMPs are entirely separate).
|
|
|
|
|
|
|
public: SHELL* SHELL::next
(
|
|
|
PAT_NEXT_TYPE next_type
|
// shell type
|
|
|
|
= PAT_CAN_CREATE
|
// for patterns
|
|
) const;
|
|
|
Returns a pointer to the next
SHELL in the list of
SHELLs contained in a
BODY.
|
|
|
The
next_type argument controls how the
next method treats patterns, and can take any one of three values:
|
|
|
PAT_CAN_CREATE: if the next shell is to be generated from a pattern, create it if it doesn't yet exist and return its pointer.
|
|
PAT_NO_CREATE: if the next shell is to be generated from a pattern, but hasn't yet been created, bypass it and return the pointer of the next already-created shell (if any).
|
|
PAT_IGNORE: behave as though there is no pattern on the shell.
|
|
|
|
|
|
|
public: ENTITY* SHELL::owner
() const;
|
|
|
Returns a pointer to the owning
LUMP.
|
|
|
|
|
|
|
public: logical SHELL::patternable
() const;
|
|
|
Returns
TRUE.
|
|
|
|
|
|
|
public: logical SHELL::remove_from_pattern
();
|
|
|
Removes the pattern element associated with this entity from the pattern. Returns
FALSE if this entity is not part of a pattern element, otherwise
TRUE.
|
|
|
Note
|
The affected entities are not destroyed, but are merely made independent of the pattern. The pattern itself is correspondingly modified to "drop out" the newly disassociated element.
|
|
|
|
|
|
|
public: logical SHELL::remove_from_pattern_list
();
|
|
|
Removes this entity from the list of entities maintained by its pattern, if any. Returns
FALSE if no pattern is found, otherwise
TRUE.
|
|
|
|
|
|
|
public: logical SHELL::remove_pattern
();
|
|
|
Removes the pattern on this and all associated entities. Returns
FALSE if no pattern is found, otherwise
TRUE.
|
|
|
|
|
|
|
public: void SHELL::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.
|
|
|
In versions before 1.6, the next tag will be for a body, but put it in the lump pointer for now anyway, and fix it up later (in fix_pointers).
|
|
|
if (restore_version_number >= PATTERN_VERSION
|
|
read_ptr
|
Pointer to record in save file for APATTERN on loop
|
|
|
if (apat_idx != (APATTERN*)(-1)))
|
|
|
restore_cache();
|
|
read_ptr
|
Pointer to record in save file for next
SHELL in lump
|
|
read_ptr
|
Pointer to record in save file for first
SUBSHELL in shell
|
|
read_ptr
|
Pointer to record in save file for first
FACE in shell
|
|
if (restore_version_number >= WIREBOOL_VERSION)
|
|
read_ptr
|
Pointer to record in save file for first
WIRE in shell
|
|
else
|
Pointer for first
WIRE in shell is set to
NULL
|
|
|
read_ptr
|
|
|
|
Pointer to record in save file for body owning the
LUMP containing shell
|
|
|
|
|
|
|
public: void SHELL::set_bound
(
|
|
|
SPAbox*
|
// new bounding box
|
|
|
);
|
|
|
Sets the
SHELL's bounding
SPAbox pointer to the given
SPAbox. Before performing a change, it checks if the data structure is posted on the bulletin board. If not, the method calls
backup to put an entry on the bulletin board.
|
|
|
|
|
|
|
public: void SHELL::set_face
(
|
|
|
FACE*
|
// new FACE
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
SHELL's
FACE pointer to the given
FACE. Before performing a change, it checks if the data structure is posted on the bulletin board. If not, the method calls
backup to put an entry on the bulletin board.
|
|
|
|
|
|
|
public: void SHELL::set_lump
(
|
|
|
LUMP*
|
// new owning LUMP
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
SHELL's
LUMP pointer to the given owning
LUMP. Before performing a change, it checks if the data structure is posted on the bulletin board. If not, the method calls
backup to put an entry on the bulletin board.
|
|
|
|
|
|
|
public: void SHELL::set_next
(
|
|
|
SHELL*
|
// new sister SHELL
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
SHELL's
nextSHELL pointer to the given sister
SHELL. Before performing a change, it checks if the data structure is posted on the bulletin board. If not, the method calls
backup to put an entry on the bulletin board.
|
|
|
|
|
|
|
public: void SHELL::set_pattern
(
|
|
|
pattern* in_pat
|
|
//
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Set the current pattern.
|
|
|
|
|
|
|
public: void SHELL::set_subshell
(
|
|
|
SUBSHELL*
|
// new SUBSHELL
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
SHELL's
SUBSHELL pointer to the given
SUBSHELL. Before performing a change, it checks if the data structure is posted on the bulletin board. If not, the method calls
backup to put an entry on the bulletin board.
|
|
|
|
|
|
|
public: void SHELL::set_wire
(
|
|
|
WIRE*
|
// wire
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
SHELL's
WIRE pointer to the given
WIRE. Before performing a change, it checks if the data structure is posted on the bulletin board. If not, the method calls
backup to put an entry on the bulletin board.
|
|
|
|
|
|
|
public: SUBSHELL* SHELL::subshell
() const;
|
|
|
Returns a pointer to the first
SUBSHELL in a list of
SUBSHELLs immediately contained within this
SHELL.
|
|
|
|
|
|
|
public: virtual const char*
|
|
|
SHELL::type_name () const;
|
|
|
Returns the string "shell".
|
|
|
|
|
|
|
public: WIRE* SHELL::wire
() const;
|
|
|
Returns the first
WIRE in a complete enumeration of all the
WIREs in the
SHELL, continued by repeated use of
WIRE::next. The undefined order of
SUBSHELLs fluctuates with each change of the
SUBSHELL subdivision.
|
|
|
|
|
|
|
public: WIRE* SHELL::wire_list
() const;
|
|
|
Returns a pointer to the first
WIRE of a list of
WIREs immediately contained in this
SHELL.
|
|
Internal Use:
|
first_face, save, save_common
|
|
|
|
|
Related Fncs:
|
is_SHELL
|