Purpose:
|
Relates
EDGEs with adjacent
EDGEs and owning
ENTITYs.
|
|
Derivation:
|
COEDGE : ENTITY : ACIS_OBJECT : -
|
|
SAT Identifier:
|
"coedge"
|
|
Filename:
|
kern/kernel/kerndata/top/coedge.hxx
|
|
Description:
|
The coedge is closely related to an edge. A coedge stores its relationships with adjacent edges and with superior owning entities. (In some contexts, the coedge may be viewed as the use of an edge by a face or wire.) The data structures formed by these relationships (stored as pointers) and their interpretation depends upon the nature of the owning entity.
|
|
|
The typical case is when the coedge's associated edge is part of a well-formed, manifold, solid body shell and when that edge is adjacent to exactly two faces. This results in two coedges, each associated with a loop in one of the faces. (In principle the two faces could be the same, and even the loops could be the same.) All the coedges in each loop are linked into a doubly-linked circular list using the next and previous pointers. The two coedges for each edge are linked through their partner pointers.
|
|
|
Several deviations are possible from the typical case.
|
|
|
-
|
A loop may not necessarily be closed for either a partially defined or infinite face boundary. In this case, the next and previous lists are not circular, but terminate with
NULL pointers.
|
|
-
|
A shell may not be closed and have "free" edges at its boundary. For such edges, there is only one coedge with a
NULL partner pointer.
|
|
-
|
Nonmanifold shells, where more than two faces meet in an edge, links the partner pointers for the coedges (still one for each face) in a circular list.
|
|
-
|
Coedges on faces whose underlying geometry is a parametric surface must maintain a pointer to a pcurve, which represents the curve underlying the edge in the parametric space of the surface. Coedges on analytic surfaces are not required to have pcurves.
|
|
-
|
Wires as owning entities are handled differently. An object may be a directed or undirected graph made up of one or more disjoint wires, each of which is a collection of connected edges. In this case, each edge has exactly one coedge. The 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. The next or previous pointer of a coedge on an open edge may be set to itself, indicating that there is no next or previous coedge on this branch of the wire.
|
|
-
|
A shell may be of mixed dimensionality, containing both faces and unembedded edges. The unembedded edges are connected together in wires and belong to the shell. Where they meet faces of the shell, the vertices have multiple edge pointers, one for each face group, and one for each wire attached.
|
|
|
The
sg_get_coedges_of_wire and
sg_q_coedges_around_vertex may be useful for generating lists of coedges on other topological entities. The
kernel/kerndata/geometry/geometry.hxx file contains several other geometric inquiry functions. When adding a pcurve to a coedge,
sg_add_pcurve_to_coedge may be helpful.
|
|
References:
|
KERN
|
EDGE, ENTITY, PCURVE
|
|
by KERN
|
EDGE, LOOP, WIRE, pattern_holder
|
|
Data:
|
protected COEDGE *next_ptr;
|
|
Pointer to provide a doubly-linked list of coedges in a loop,or circular lists at each end in a general unembedded graph.
|
|
|
protected COEDGE *partner_ptr;
|
|
Pointer to partner coedge, or
NULL if this coedge is unembedded or attached to a free edge.
|
|
|
protected COEDGE *previous_ptr;
|
|
Pointer to provide a doubly-linked list of coedges in a loop,or circular lists at each end in a general unembedded graph.
|
|
|
protected EDGE *edge_ptr;
|
|
Pointer to the single edge on which this coedge and all its partners lie.
|
|
|
protected ENTITY *owner_ptr;
|
|
Pointer to the owning loop or wire. There is always a loop if the coedge is embedded in a face, or a wire if it is part of an unembedded graph. If the coedge is an unembedded one in a mixed-dimensionality shell, then this pointer is
NULL.
|
|
|
protected PCURVE *geometry_ptr;
|
|
Pointer to the description of the edge geometry referred to the parametric space of the face in which it is embedded. This will be
NULL if the edge is not embedded, or if the face is not parametrically described. It may be
NULL even if the face is parametric.
|
|
|
protected REVBIT sense_data;
|
|
Relationship between the direction of the coedge and that of the underlying edge. When embedded in a face, the coedges must run clockwise about the (outward) face normal, that is at any point on the coedge, if the face normal is "upwards" and the coedge tangent is "forwards", then the face lies to the "left".
|
|
Constructor:
|
public: COEDGE::COEDGE
();
|
|
|
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: COEDGE::COEDGE
(
|
|
|
EDGE*,
|
// EDGE
|
|
|
REVBIT,
|
// sense
|
|
|
COEDGE*,
|
// previous COEDGE
|
|
|
COEDGE*
|
// next COEDGE
|
|
|
);
|
|
|
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.
|
|
|
The arguments initialize the
EDGE (and indirectly the partner
EDGE), the
sense_data, the previous
COEDGE, and the next
COEDGE.
COEDGE back-pointers are also set in the two argument
COEDGEs, but are only valid if all the
COEDGEs are part of a conventional simple
LOOP.
|
|
|
|
|
Destructor:
|
public: virtual void COEDGE::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 COEDGE::~COEDGE
();
|
|
|
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 COEDGE(...) then later
x->lose.)
|
|
|
|
Methods:
|
protected: virtual logical
|
|
|
COEDGE::bulletin_no_change_vf (
|
|
|
ENTITY const* other,
|
|
// other entity
|
|
|
logical identical_comparator
|
// comparator
|
|
|
) const;
|
|
|
Virtual compare function for
api_get_modified_faces.
|
|
|
|
|
|
|
public: logical COEDGE::copy_pattern_down
(
|
|
|
ENTITY* target
|
|
// target
|
|
|
) const;
|
|
|
Returns whether or not patterns are copied down.
|
|
|
|
|
|
|
public: virtual void COEDGE::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: EDGE* COEDGE::edge
() const;
|
|
|
Returns the pointer to the single
EDGE on which this
COEDGE and all its partners lie.
|
|
|
|
|
|
|
public: VERTEX* COEDGE::end
() const;
|
|
|
Returns the end
VERTEX pointer from the associated
EDGE, if any, taking into account the
sense of the
COEDGE.
|
|
|
|
|
|
|
public: VERTEX* COEDGE::end
(
|
|
|
REVBIT
|
// sense
|
|
|
);
|
|
|
Returns the end
VERTEX pointer from the associated
EDGE, if any, taking into account the
sense of the
COEDGE.
|
|
|
|
|
|
|
public: logical COEDGE::ends_at_singularity
() const;
|
|
|
Determines if the coedge ends at a surface singularity.
|
|
|
|
|
|
|
public: virtual SPAparameter COEDGE::end_param
() const;
|
|
|
Finds the end parameter of the
COEDGE.
|
|
|
|
|
|
|
public: virtual SPAposition COEDGE::end_pos
() const;
|
|
|
Finds the end position of the
COEDGE.
|
|
|
|
|
|
|
public: PCURVE* COEDGE::geometry
() const;
|
|
|
Returns the pointer to the description of the
EDGE geometry referred to the parametric space of the
FACE in which it is embedded. The pointer is
NULL if the
EDGE is not embedded, or if the
FACE is not parametric.
|
|
|
|
|
|
|
public: void COEDGE::get_all_patterns
(
|
|
|
VOID_LIST& list
|
|
// list
|
|
|
);
|
|
|
Returns all patterns in the list.
|
|
|
|
|
|
|
public: virtual int COEDGE::identity
(
|
|
|
int
|
|
// level
|
|
|
|
= 0
|
|
|
) const;
|
|
|
If
level is unspecified or 0, returns the type identifier
COEDGE_TYPE. If
level is specified, returns
COEDGE_TYPE for that level of derivation from
ENTITY. The level of this class is defined as
COEDGE_LEVEL.
|
|
|
|
|
|
|
public: virtual logical
|
|
|
COEDGE::is_deepcopyable () const;
|
|
|
Returns
TRUE if this can be deep copied.
|
|
|
|
|
|
|
public: logical COEDGE::is_pattern_child
() const;
|
|
|
Returns
TRUE if this is a pattern child. An entity is a "pattern child" when it is not responsible for creating new entities when the pattern is applied. Instead, some owning entity takes care of this.
|
|
|
|
|
|
|
public: LOOP* COEDGE::loop
() const;
|
|
|
Returns the owner of the
COEDGE if it is a
LOOP; otherwise, it returns
NULL.
|
|
|
|
|
|
|
public: TCOEDGE* COEDGE::make_tolerant
();
|
|
|
Make a tolerant
TCOEDGE out of this
COEDGE.
|
|
|
|
|
|
|
public: COEDGE* COEDGE::next
() const;
|
|
|
Returns the next
COEDGE in a doubly-linked list of
COEDGEs.
|
|
|
|
|
|
|
public: COEDGE* COEDGE::next
(
|
|
|
REVBIT rev
|
// sense
|
|
|
) const;
|
|
|
Returns the
next pointer if the
sense_data is
FORWARD; otherwise returns the
previous pointer.
|
|
|
|
|
|
|
public: ENTITY* COEDGE::owner
() const;
|
|
|
Returns the pointer to the
LOOP or
WIRE that owns the
COEDGE. There is always a
LOOP if the
COEDGE is embedded in a
FACE, or a
WIRE if it is part of an unembedded graph. If the
COEDGE is an unembedded one in a mixed-dimensionality
SHELL, the function may return the
SHELL.
|
|
|
|
|
|
|
public: virtual SPAinterval
|
|
|
COEDGE::param_range () const;
|
|
|
Finds the parameter range of the
COEDGE as an interval.
|
|
|
|
|
|
|
public: COEDGE* COEDGE::partner
() const;
|
|
|
Returns the pointer to the
partnerCOEDGE. The return will be
NULL if the
COEDGE is unembedded or attached to a free
EDGE.
|
|
|
|
|
|
|
public: COEDGE* COEDGE::previous
() const;
|
|
|
Returns the previous
COEDGE in a doubly-linked list of
COEDGEs.
|
|
|
|
|
|
|
public: COEDGE* COEDGE::previous
(
|
|
|
REVBIT rev
|
// sense
|
|
|
) const;
|
|
|
Returns the
previous pointer if the
sense_data is
FORWARD; otherwise returns the
next pointer.
|
|
|
|
|
|
|
public: logical COEDGE::remove_from_pattern_list
();
|
|
|
Returns
TRUE if this is removed from the pattern list.
|
|
|
|
|
|
|
public: void COEDGE::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
COEDGE in loop or wire
|
|
read_ptr
|
Pointer to record in save file for previous
COEDGE in loop or wire
|
|
read_ptr
|
Pointer to record in save file for partner
COEDGE on edge
|
|
read_ptr
|
Pointer to record in save file for
EDGE on which coedge lies
|
|
if (restore_version_number < COEDGE_SENSE_VERSION)
|
|
read_int
|
Direction of coedge with respect to the edge enumeration
|
|
else
|
|
read_logical
|
either "forward" or "reversed"
|
|
read_ptr
|
Pointer to record in save file for
LOOP or wire to which coedge belongs
|
|
read_ptr
|
|
|
|
|
Pointer to record in save file for parameter space curve
PCURVE or geometry
|
|
|
|
|
|
|
public: REVBIT COEDGE::sense
() const;
|
|
|
Returns the relationship between the direction of the
COEDGE and that of the underlying
EDGE. At any point on the
COEDGE, if the
FACE normal is upwards and the
COEDGE tangent is forward, then the
FACE lies to the left. This implies that the outer
LOOPs are counterclockwise and the inner
LOOPs are clockwise with respect to the
FACE normal.
|
|
|
|
|
|
|
public: REVBIT COEDGE::sense
(
|
|
|
REVBIT rev
|
// sense
|
|
|
) const;
|
|
|
Return the
sense of the
COEDGE compounded with the sense argument. Useful when traversing
COEDGEs in reverse direction.
|
|
|
|
|
|
|
public: void COEDGE::set_edge
(
|
|
|
EDGE*,
|
// underlying EDGE
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
COEDGE to use the given underlying
EDGE. 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 COEDGE::set_geometry
(
|
|
|
PCURVE*,
|
// PCURVE
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
COEDGE's parameter-space geometry to be the given
PCURVE. 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.
|
|
|
|
|
|
|
protected: virtual void COEDGE::set_geometry_ptr
(
|
|
|
PCURVE*
|
// PCURVE
|
|
|
);
|
|
|
Sets the
COEDGE's parameter-space geometry to be the given
PCURVE. 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 COEDGE::set_loop
(
|
|
|
LOOP*,
|
// LOOP
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the owning
ENTITY to be a
LOOP. 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 COEDGE::set_next
(
|
|
|
COEDGE*,
|
// next COEDGE
|
|
|
REVBIT
|
// sense
|
|
|
|
= FALSE,
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
COEDGE's
nextCOEDGE pointer. 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 COEDGE::set_next_no_rev
(
|
|
|
COEDGE*,
|
|
// coedge
|
|
|
logical reset_pattern
|
|
// reset or not
|
|
|
|
= TRUE
|
|
);
|
|
|
Sets the
COEDGE's
next_no_revCOEDGE pointer. 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 COEDGE::set_owner
(
|
|
|
ENTITY*,
|
// entity
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
COEDGE's owner. 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 COEDGE::set_partner
(
|
|
|
COEDGE*,
|
// partner COEDGE
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
COEDGE's partner 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 COEDGE::set_pattern
(
|
|
|
pattern* in_pat
|
|
// pattern
|
|
|
);
|
|
|
Set the current pattern.
|
|
|
|
|
|
|
public: void COEDGE::set_previous
(
|
|
|
COEDGE*,
|
// previous COEDGE
|
|
|
REVBIT
|
// sense
|
|
|
|
= FALSE,
|
//
|
|
|
logical reset_pattern
|
//
|
|
|
= TRUE
|
//
|
|
|
);
|
|
|
Sets
COEDGE's
previousCOEDGE pointer, taking the
sense into account. 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 COEDGE::set_previous_no_rev
(
|
|
|
COEDGE*,
|
|
// coedge
|
|
|
logical reset_pattern
|
|
// reset or not
|
|
|
|
= TRUE
|
|
);
|
|
|
Sets
COEDGE's
previous_no_revCOEDGE pointer. 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 COEDGE::set_sense
(
|
|
|
REVBIT,
|
// sense
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the
sense of the
COEDGE with respect to the underlying
EDGE. 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 COEDGE::set_shell
(
|
|
|
SHELL*,
|
// owning SHELL
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the owning entity to be a
SHELL. 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 COEDGE::set_wire
(
|
|
|
WIRE*,
|
// owning WIRE
|
|
|
logical reset_pattern
|
// reset or not
|
|
|
|
= TRUE
|
|
|
);
|
|
|
Sets the owning entity to be a
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: SHELL* COEDGE::shell
() const;
|
|
|
Returns the owner of the
COEDGE if it is a
SHELL; otherwise, it returns
NULL.
|
|
|
|
|
|
|
public: VERTEX* COEDGE::start
() const;
|
|
|
Returns the start
VERTEX pointer from the associated
EDGE, if any, taking into account the sense of the
COEDGE.
|
|
|
|
|
|
|
public: VERTEX* COEDGE::start
(
|
|
|
REVBIT
|
// sense
|
|
|
);
|
|
|
Returns the start
VERTEX pointer from the associated
EDGE, if any, taking into account the sense of the
COEDGE.
|
|
|
|
|
|
|
public: logical
|
|
|
COEDGE::starts_at_singularity () const;
|
|
|
Determines if the coedge starts at a surface singularity.
|
|
|
|
|
|
|
public: virtual SPAparameter
|
|
|
COEDGE::start_param () const;
|
|
|
Finds the start parameter of the
COEDGE.
|
|
|
|
|
|
|
public: virtual SPAposition COEDGE::start_pos
() const;
|
|
|
Finds the start position of the
COEDGE.
|
|
|
|
|
|
|
public: virtual const char*
|
|
|
COEDGE::type_name () const;
|
|
|
Returns the string "coedge".
|
|
|
|
|
|
|
public: WIRE* COEDGE::wire
() const;
|
|
|
Returns the owner of the
COEDGE if it is a
WIRE; otherwise, it returns
NULL.
|
|
|
|
|
Related Fncs:
|
is_COEDGE
|