Purpose:
|
Represents a collection of edges that are owned by a body but are not attached to faces and do not enclose any volume.
|
|
Derivation:
|
WIRE : ENTITY : ACIS_OBJECT : -
|
|
SAT Identifier:
|
"wire"
|
|
Filename:
|
kern/kernel/kerndata/top/wire.hxx
|
|
Description:
|
A wire represents a connected collection of unembedded edges. It is owned by a body or a shell, the latter necessarily if the wire is attached to corners of faces in the shell, or if it is internal to a lump (which will own the shell). Isolated wires used to be owned by bodies, and may remain so, though they might logically go into a shell owned by a lump owned by the body.
|
|
|
Usually each edge has one coedge. Coedges are linked in circular lists around each vertex using next and previous pointers according to which end of the coedge lies at the vertex. When Booleans are used to slice (imprint) one body with another, a wire is returned that has two coedges per edge; the coedges have attributes giving details of the intersections of the body boundaries at each edge.
|
|
References:
|
KERN
|
COEDGE, ENTITY, SUBSHELL
|
|
by KERN
|
BODY, SHELL, SUBSHELL, pattern_holder
|
|
Constructor:
|
public: WIRE::WIRE
();
|
|
|
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: WIRE::WIRE
(
|
|
|
COEDGE*,
|
// first COEDGE
|
|
|
WIRE*
|
// next WIRE on BODY
|
|
|
);
|
|
|
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 and initializes a
WIRE, setting
COEDGE back pointers. The arguments define the first
COEDGE in this
WIRE and the next
WIRE in a list of
WIREs on the
BODY, respectively.
|
|
|
|
|
Destructor:
|
public: virtual void WIRE::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 WIRE::~WIRE
();
|
|
|
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 WIRE(...) then later
x->lose.)
|
|
|
|
Methods:
|
public: BODY* WIRE::body
() const;
|
|
|
Returns a back pointer to containing
BODY. Returns
NULL if the
WIRE's owner is not a
BODY. Each
WIRE may belong to only one
BODY.
|
|
|
|
|
|
|
public: SPAbox* WIRE::bound
() const;
|
|
|
Return a pointer to a geometric bounding region (a
SPAbox), within which the entire
WIRE lies (with respect to the internal coordinate system of the
BODY). The pointer can be
NULL if no such bound was calculated since the
WIRE was last changed.
|
|
|
|
|
|
|
protected: virtual logical
|
|
|
WIRE::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: COEDGE* WIRE::coedge
() const;
|
|
|
Returns a pointer to a
COEDGE in the
WIRE. No significance is placed upon the choice of this
COEDGE, which may change during modeling operations.
|
|
|
|
|
|
|
public: WIRECONTBIT WIRE::cont
() const;
|
|
|
Returns the containment information.
ALL_OUTSIDE indicates the
WIRE represents material in space.
ALL_INSIDE indicates the
WIRE represents an infinitesimally small hole through material.
|
|
|
|
|
|
|
public: logical WIRE::copy_pattern_down
(
|
|
|
ENTITY* target
|
|
// target
|
|
|
) const;
|
|
|
Copies the pattern through all children of the target entity.
|
|
|
|
|
|
|
public: virtual void WIRE::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: void WIRE::get_all_patterns
(
|
|
|
VOID_LIST& list
|
|
// pattern list
|
|
|
);
|
|
|
Returns all patterns in the list.
|
|
|
|
|
|
|
public: virtual int WIRE::identity
(
|
|
|
int
|
|
// level
|
|
|
|
= 0
|
|
|
) const;
|
|
|
If
level is unspecified or 0, returns the type identifier
WIRE_TYPE. If
level is specified, returns
WIRE_TYPE for that level of derivation from
ENTITY. The level of this class is defined as
WIRE_LEVEL.
|
|
|
|
|
|
|
public: virtual logical WIRE::is_deepcopyable
(
|
|
|
) const;
|
|
|
Returns
TRUE if this can be deep copied.
|
|
|
|
|
|
|
public: WIRE* WIRE::next
(
|
|
|
PAT_NEXT_TYPE next_type
|
// wire type
|
|
|
|
= PAT_CAN_CREATE
|
// for patterns
|
|
) const;
|
|
|
Returns a pointer to the next
WIRE in a complete enumeration of all the
WIREs in a
BODY or
SHELL. The order is not defined and may change when
SUBSHELLs are recomputed.
|
|
|
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 wire 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 wire is to be generated from a pattern, but hasn't yet been created, bypass it and return the pointer of the next already-created wire (if any).
|
|
PAT_IGNORE: behave as though there is no pattern on the wire.
|
|
|
|
|
|
|
public: WIRE* WIRE::next_in_list
(
|
|
|
PAT_NEXT_TYPE next_type
|
// wire type
|
|
|
|
= PAT_CAN_CREATE
|
// for patterns
|
|
) const;
|
|
|
Return a pointer to the next
WIRE contained directly by a
BODY,
SHELL, or
SUBSHELL.
|
|
|
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 wire 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 wire is to be generated from a pattern, but hasn't yet been created, bypass it and return the pointer of the next already-created wire (if any).
|
|
PAT_IGNORE: behave as though there is no pattern on the wire.
|
|
|
|
|
|
|
public: ENTITY* WIRE::owner
() const;
|
|
|
Returns a pointer to the owning
ENTITY.
|
|
|
|
|
|
|
public: void WIRE::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();
|
|
read_ptr
|
Pointer to record in save file for next
WIRE in body, shell or subshell
|
|
read_ptr
|
Pointer to record in save file for first
COEDGE in wire
|
|
read_ptr
|
Pointer to record in save file for (ENTITY) body or shell containing wire
|
|
if (restore_version_number >= WIREBOOL_VERSION)
|
|
read_ptr
|
Pointer to record in save file for
SUBSHELL containing wire
|
|
read_logical
|
("out" "in")
Containment of wire
|
|
else
|
|
|
|
|
|
Pointer to
SUBSHELL set to
NULL and containment of wire set to
ALL_OUTSIDE.
|
|
|
|
|
|
|
public: void WIRE::set_body
(
|
|
|
BODY*
|
// owning BODY
|
|
|
);
|
|
|
Sets the
WIRE's owning
BODY to be the given
BODY. 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 WIRE::set_bound
(
|
|
|
SPAbox*
|
// bounding box
|
|
|
);
|
|
|
Sets the
WIRE's bounding box to be the given
SPAbox. 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 WIRE::set_coedge
(
|
|
|
COEDGE*
|
// first COEDGE
|
|
|
);
|
|
|
Sets the first
COEDGE in the
WIRE's list of
COEDGES to be the given
COEDGE. 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 WIRE::set_cont
(
|
|
|
WIRECONTBIT
|
// containment
|
|
|
);
|
|
|
Set the containment for the
WIRE.
|
|
|
|
|
|
|
public: void WIRE::set_next
(
|
|
|
WIRE*,
|
// next WIRE
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the next
WIRE in the
BODY's list of
WIREs to the given
WIRE. 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 WIRE::set_owner
(
|
|
|
ENTITY*
|
// entity
|
|
|
);
|
|
|
Set the
WIRE's owner to be the specified
BODY or
SHELL.
|
|
|
|
|
|
|
public: void WIRE::set_pattern
(
|
|
|
pattern* in_pat
|
|
//
|
|
|
);
|
|
|
|
|
|
|
public: void WIRE::set_shell
(
|
|
|
SHELL*
|
// shell
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
WIRE's owning
SHELL to be the given
SHELL.
|
|
|
|
|
|
|
public: void WIRE::set_subshell
(
|
|
|
SUBSHELL*
|
// subshell
|
|
|
);
|
|
|
Sets the
SUBSHELL directly containing the
WIRE to be the given
SUBSHELL
|
|
|
|
|
|
|
public: SHELL* WIRE::shell
() const;
|
|
|
Return a pointer to the owning
SHELL. Returns
NULL if the owning
ENTITY is not a
SHELL.
|
|
|
|
|
|
|
public: SUBSHELL* WIRE::subshell
() const;
|
|
|
Return a pointer to the
SUBSHELL directly containing this
WIRE. Returns
NULL if the
WIRE is directly contained by its
ENTITY,
BODY, or
SHELL.
|
|
|
|
|
|
|
public: virtual const char* WIRE::type_name
() const;
|
|
|
Returns the string "wire".
|
|
|
|
|
Related Fncs:
|
is_WIRE
|