Home

EDGE Class Reference
[Topology]

Represents a physical edge. More...

#include <edge.hxx>

Inheritance diagram for EDGE:

Inheritance graph
[legend]
Collaboration diagram for EDGE:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void add ()
 If this ENTITY is use counted, adds one to the count.
virtual logical apply_transform (SPAtransf const &, ENTITY_LIST &, logical=FALSE, logical=TRUE)
 Transforms this ENTITY.
ATTRIBattrib () const
 Returns this ENTITY's attribute pointer, or NULL if there is no attached attribute.
ENTITYbackup ()
 Creates a duplicate record and a change bulletin, if needed, as a backup for roll back.
SPAboxbound () const
 Returns a geometric bounding region (box) for this EDGE.
int bulletin_count () const
 Returns the number of bulletins referring to this ENTITY.
virtual logical call_method (METHOD_ID const &, METHOD_ARGS const &)
 Executes the implementation function for a routine virtual method.
logical closed () const
 Returns TRUE if this EDGE is closed.
COEDGEcoedge (FACE *face) const
 Returns a pointer to one of the COEDGEs lying on this EDGE, associated with the given FACE.
COEDGEcoedge () const
 Returns a pointer to one of the COEDGEs lying on this EDGE.
char const * convexity_string () const
 Returns a string representing the convexity of this EDGE.
virtual ENTITYcopy_data (ENTITY_LIST &, pointer_map *pm=NULL, logical dpcpy_skip=FALSE, SCAN_TYPE reason=SCAN_COPY) const
 Allocates a new ENTITY and calls copy_common to fill it in.
virtual void copy_scan (ENTITY_LIST &, SCAN_TYPE reason=SCAN_COPY, logical dpcpy_skip=FALSE) const
 Adds dependent ENTITYs of this ENTITY to the list of ENTITYs to be copied.
virtual void debug_ent (FILE *) const
 Prints the type and address of this ENTITY, roll back pointer, attributes, and any unknown subtype information.
virtual logical deletable () const
 Indicates whether or not this ENTITY is normally destroyed by lose.
 EDGE (VERTEX *start, VERTEX *end, CURVE *geometry, REVBIT sense, EDGE_cvty cvty=EDGE_cvty_unknown, SPAinterval const &domain=*(const class SPAinterval *) NULL_REF)
 Constructs an EDGE from a start VERTEX, an end VERTEX, and a CURVE.
 EDGE ()
 Constructs an EDGE (default constructor).
VERTEXend () const
 Returns a pointer to the end VERTEX of this EDGE.
virtual SPAvector end_deriv () const
 Returns the derivative at the end parameter of this EDGE.
SPAparameter end_param () const
 Returns the parameter defining the end of this EDGE.
SPAparameter end_param ()
 Returns the parameter defining the end of this EDGE.
virtual SPAposition end_pos () const
 Returns the end position of this EDGE.
virtual void fix_pointers (ENTITY *[], SCAN_TYPE reason=SCAN_COPY)
 Converts pointers from copy indices into real pointers.
virtual void full_size (SizeAccumulator &est, logical countSelf=TRUE) const
 Increments the SizeAccumulator by the size, in bytes, of everything owned by this ENTITY and, optionally, of the ENTITY itself.
CURVEgeometry () const
 Returns a pointer to the underlying CURVE geometry.
EDGE_cvty get_convexity () const
 Returns the convexity of this EDGE.
SPAinterval get_param_range () const
 Returns the parameter range of this EDGE.
virtual double get_tolerance ()
 Returns the tolerance of the tolerant TEDGE made from this EDGE.
virtual double get_tolerance () const
 Returns the tolerance of the tolerant TEDGE made from this EDGE.
HISTORY_STREAMhistory () const
 Returns a pointer to the history stream for this ENTITY.
virtual int identity (int=0) const
 Returns a type identifier for this ENTITY.
virtual logical is_deepcopyable () const
 Returns TRUE if this ENTITY can be deep copied.
virtual logical is_use_counted () const
 Indicates if this ENTITY is use-counted or not.
double length (logical approx_ok=TRUE) const
 Returns the length of the underlying geometry CURVE.
virtual int lookup (logical) const
 Looks up this ENTITY in the appropriate debug list.
virtual void lose ()
 Posts a delete bulletin to the bulletin board indicating the instance is no longer used in the active model.
TEDGEmake_tolerant (double tol, logical approx_ok)
 Makes a tolerant TEDGE from this EDGE.
virtual SPAvector mid_point_deriv (logical approx=TRUE) const
 Returns the derivative at the midpoint of this EDGE.
virtual SPAposition mid_pos (logical approx=TRUE) const
 Returns the midpoint of this EDGE.
logical needs_rollback () const
 Checks whether or not the record is already backed up.
ENTITYowner () const
 Returns a pointer to the owning entity.
SPAinterval param_range () const
 Returns the parameter defining the end of this EDGE.
SPAinterval param_range ()
 Returns the parameter range of this EDGE.
logical periodic () const
 Returns TRUE if this EDGE is periodic.
virtual void remove (logical lose_if_zero=TRUE)
 Decrements the use count of this ENTITY.
void restore_common ()
 Restores data for a record from disc to memory.
void restore_end (char *id_str)
 Terminates a restore record.
void roll_notify (BULLETIN_TYPE, ENTITY *)
 Fields notifications of rollback operations.
BULLETIN *& rollback () const
 Returns the pointer to the bulletin board entry for this ENTITY.
virtual void save (ENTITY_LIST &) const
 Performs a save operation.
REVBIT sense () const
 Returns the sense of this EDGE.
void set_attrib (ATTRIB *attr)
 Changes the attribute pointer of this ENTITY to point to the given attribute.
void set_bound (SPAbox *in_box)
 Sets the bounding region (box) of this EDGE to the specified box.
void set_coedge (COEDGE *coedge, logical reset_pattern=TRUE)
 Sets the start of a list of COEDGEs corresponding to this EDGE.
void set_convexity (EDGE_cvty cvty, logical reset_pattern=TRUE)
 Sets the convexity of this EDGE to the given value.
void set_end (VERTEX *vertex, logical reset_pattern=TRUE)
 Sets the EDGE's end VERTEX.
virtual void set_geometry (CURVE *crv, logical reset_pattern, logical reset_tol_geom)
 Sets this EDGE's geometry to the given CURVE.
logical set_param_range (SPAinterval const &range)
 Checks the parameter range of this EDGE.
virtual void set_sense (REVBIT sense, logical reset_pattern=TRUE)
 Sets the sense of this EDGE with respect to the underlying CURVE.
void set_start (VERTEX *vertex, logical reset_pattern=TRUE)
 Sets the EDGE's start VERTEX.
virtual void set_use_count (int use)
 Sets the reference use count of this ENTITY.
virtual unsigned size () const
 Returns the size, in bytes, of this ENTITY.
VERTEXstart () const
 Returns a pointer to the start VERTEX of this EDGE.
virtual SPAvector start_deriv () const
 Returns the derivative at the start parameter of this EDGE.
SPAparameter start_param () const
 Returns the parameter defining the start of this EDGE.
SPAparameter start_param ()
 Returns the parameter defining the start of this EDGE.
virtual SPAposition start_pos () const
 Returns the start position of this EDGE.
EDGE_cvty string_convexity (char *string) const
 Assigns a convexity to this EDGE, for example, "concave", "tangent", and "unknown".
tag_id_type tag (logical assign_new=TRUE) const
 Data reading routine.
virtual const char * type_name () const
 Returns a name for this ENTITY's type.
virtual int use_count () const
 Returns the use count of this ENTITY.
logical vertex_bounded () const
 Returns TRUE if this EDGE is bounded by VERTEXes.

Static Public Member Functions

static MethodFunction add_method (METHOD_ID const &, MethodFunction)
 Registers an implementation function for a run-time virtual method.

Protected Member Functions

virtual logical bulletin_no_change_vf (ENTITY const *other, logical identical_comparator) const
 Compares subclass data.
void check_destroy () const
 Checks that entity deletion is legitimate.
void copy_common (ENTITY_LIST &list, const ENTITY *from, pointer_map *pm=NULL, logical dpcpy_skip=FALSE, SCAN_TYPE reason=SCAN_COPY)
 Fills in this ENTITY with data from the copied ENTITY, converting pointers into indices in the supplied ENTITY_LIST.
void fix_common (ENTITY *[], SCAN_TYPE reason=SCAN_COPY)
 Converts pointers from copy indices into real pointers.
void fixup_copy (ENTITY *rollback) const
 Fixes any pointers in the ENTITY after copying for backup.
logical holds_pattern () const
 Returns TRUE if this entity can have a pattern_holder.
logical is_unknown_entity (void) const
 Returns TRUE if this is an unknown entity.
void save_begin (logical terminator=FALSE) const
 Starts a save record.
void save_common (ENTITY_LIST &) const
 Handles the save operation.
void save_end (ENTITY_LIST &list) const
 Terminates a save record.
virtual void set_end_ptr (VERTEX *vertex, logical reset_pattern=TRUE)
 Assigns a pointer to the end VERTEX of this EDGE.
virtual void set_geometry_ptr (CURVE *crv)
 Sets the pointer to the underlying CURVE geometry for this EDGE.
virtual void set_start_ptr (VERTEX *, logical reset_pattern=TRUE)
 Assigns a pointer to the start VERTEX of this EDGE.

Protected Attributes

COEDGEcoedge_ptr
 Pointer to one of the COEDGEs lying on this EDGE.
EDGE_cvty cvty
 The convexity of this EDGE.
VERTEXend_ptr
 Pointer to the end VERTEX of this EDGE.
CURVEgeometry_ptr
 Pointer to the CURVE describing the geometry of this EDGE.
SPAinterval param_bound
 The parametric bounding interval for this EDGE.
REVBIT sense_data
 The sense of the CURVE describing this EDGE.
VERTEXstart_ptr
 Pointer to the start VERTEX of this EDGE.


Detailed Description

Represents a physical edge.


Role: An edge represents a physical edge as recognized by the user. It consists of a bounded portion of a space curve, the bounds being given as object-space vertices. (Any parametric bounds required for a parametric curve may be recorded with the EDGE. These bounds are calculated from the vertex information and may be NULL if they have not been regenerated since the edge was last modified or retrieved.)

The vertex pointer at either or both ends can be NULL, in which case the EDGE is taken to be unbounded in that direction. If the underlying curve is infinite, so is the unbounded edge. If the curve is closed, the vertex pointers must both be present or both NULL. In the latter case, the edge is the whole curve.

As a special case, the geometry pointer can be NULL while both vertex pointers reference the same VERTEX. This means that the edge is an isolated point, such as the apex of a cone. Isolated points often represent nonmanifold vertices and therefore require special care when encountered. Edges with NULL geometry pointers should not be connected to edges with geometry. Some algorithms, such as Boolean operations, may use them during the course of the algorithm.

The query.hxx file contains topological traversal functions that are useful for generating lists of edges on other topological entities. Similarly, sg_get_edges_of_wire or sg_q_edges_around_vertex may be of interest. Several geometric inquiry functions are located in geometry.hxx. When splitting an edge, sg_split_edge_at_vertex may be helpful, and get_edge_box may be useful to retrieve or recalculate an the bounding box of an edge.


Constructor & Destructor Documentation

EDGE::EDGE (  ) 

Constructs an EDGE (default constructor).



Role: 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.

EDGE::EDGE ( VERTEX start,
VERTEX end,
CURVE geometry,
REVBIT  sense,
EDGE_cvty  cvty = EDGE_cvty_unknown,
SPAinterval const &  domain = *(const class SPAinterval *) NULL_REF 
)

Constructs an EDGE from a start VERTEX, an end VERTEX, and a CURVE.



Role: Requests memory for this object and populates it with the data supplied as the 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.

The arguments initialize the start VERTEX, the end VERTEX, the CURVE, and the sense of the EDGE relative to the underlying CURVE geometry. If necessary, the EDGE pointers in the two VERTEXes are set to the EDGE, and the use count in the CURVE geometry is incremented.

Parameters:
start start VERTEX for the constructed EDGE.
end end VERTEX for the constructed EDGE.
geometry geometry of the constructed EDGE.
sense sense of the constructed EDGE relative to its underlying CURVE.
cvty convexity of the constructed EDGE (optional).
domain parametric domain of the constructed EDGE (optional).


Member Function Documentation

virtual void ENTITY::add (  )  [virtual, inherited]

If this ENTITY is use counted, adds one to the count.



Role: If this ENTITY is not use counted, signals an error.

Every held pointer to a use counted ENTITY should be declared by calling add. There should a corresponding call to remove when the user is done with the pointer. For normal ENTITYs, simply call lose when the ENTITY is no longer part of the active model. For use counted ENTITYs, the implementations of add and remove come from macros in usecount.hxx. Use counted ENTITYs implemented without the macros should implement these virtual methods manually.

Reimplemented in CURVE, EE_LIST, SPAGROUP, PCURVE, PHLV5_OCC, APOINT, REFINEMENT, RH_MATERIAL, RH_TEXTURE_SPACE, SURFACE, and VERTEX_TEMPLATE.

static MethodFunction EDGE::add_method ( METHOD_ID const &  method_id,
MethodFunction  method_func 
) [static]

Registers an implementation function for a run-time virtual method.



Role: (Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

Parameters:
method_id method id.
method_func method function.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

virtual logical EDGE::apply_transform ( SPAtransf const &  t,
ENTITY_LIST list,
logical  negate = FALSE,
logical  reset_pattern = TRUE 
) [virtual]

Transforms this ENTITY.



Role: The ENTITY_LIST is used to prevent sub-entities from being transformed more than once. This method is not included with the standard ENTITY methods in order to allow nontransformable ENTITYs to use the default implementation. (Supplied by the TRANSFORM_FUNCTION and TRANSFORM_DEF macros.)

Parameters:
t the transform to apply.
list list of entities to which the transform has already been applied.
negate negation flag.
reset_pattern internal use only.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

ATTRIB* ENTITY::attrib (  )  const [inline, inherited]

Returns this ENTITY's attribute pointer, or NULL if there is no attached attribute.

ENTITY* ENTITY::backup (  )  [inherited]

Creates a duplicate record and a change bulletin, if needed, as a backup for roll back.



Role: The duplication is done via the virtual function make_copy, to let each derived type do its own backup. Before performing a change, each routine checks whether the data structure is posted on the bulletin board. If not, the posting is done automatically. Called by all system change functions.

SPAbox* EDGE::bound (  )  const [inline]

Returns a geometric bounding region (box) for this EDGE.



Role: Returns a box that includes the entire EDGE (with respect to the internal coordinate system of the BODY). The return may be NULL if the bound was not calculated since the EDGE was last modified.

int ENTITY::bulletin_count (  )  const [inline, inherited]

Returns the number of bulletins referring to this ENTITY.

virtual logical EDGE::bulletin_no_change_vf ( ENTITY const *  other,
logical  identical_comparator 
) const [protected, virtual]

Compares subclass data.



Role: This virtual method is called by bulletin_no_change. When the identical_comparator argument is TRUE, it requires an exact match when comparing doubles, and returns the result of memcmp as a default (for non-overridden subclasses). A FALSE argument indicates tolerant compares, in which case FALSE is returned by default.

Parameters:
other other ENTITY in the bulletin.
identical_comparator identity compare flag.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

virtual logical EDGE::call_method ( METHOD_ID const &  method_id,
METHOD_ARGS const &  method_args 
) [virtual]

Executes the implementation function for a routine virtual method.



Role: (Supplied by the ENTITY_FUNCTIONs and UTILITY_DEF macros).

Parameters:
method_id method id.
method_args method args.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

void ENTITY::check_destroy (  )  const [inline, protected, inherited]

Checks that entity deletion is legitimate.



Role: This method complains if there is an attempt to delete an entity other than through the private member function destroy, which is carefully controlled.

logical EDGE::closed (  )  const

Returns TRUE if this EDGE is closed.

COEDGE* EDGE::coedge ( FACE face  )  const

Returns a pointer to one of the COEDGEs lying on this EDGE, associated with the given FACE.



Parameters:
face the FACE upon which the returned COEDGE is to lie.

COEDGE* EDGE::coedge (  )  const [inline]

Returns a pointer to one of the COEDGEs lying on this EDGE.



Role: No significance is attached to the choice of COEDGE, which can change during a modeling operation.

char const* EDGE::convexity_string (  )  const

Returns a string representing the convexity of this EDGE.



Role: Returns a string representing the convexity of this EDGE, for example, "concave", "tangent", and "unknown".

void ENTITY::copy_common ( ENTITY_LIST list,
const ENTITY from,
pointer_map pm = NULL,
logical  dpcpy_skip = FALSE,
SCAN_TYPE  reason = SCAN_COPY 
) [protected, inherited]

Fills in this ENTITY with data from the copied ENTITY, converting pointers into indices in the supplied ENTITY_LIST.



Role: Supports the copy operation. (Supplied by the ENTITY_FUNCTIONS and COPY_DEF macros.) Whenever the operation encounters a pointer to a dependent ENTITY, it find the index of the latter in the supplied ENTITY_LIST and sets the corresponding pointer in the copy to that index.

Parameters:
list list of ENTITYs being copied.
from original ENTITY being copied.
pm pointer map.
dpcpy_skip Used only by the base ENTITY and base ATTRIB class. No other derived entity or attribute should need to utilize this value. This logical indicates how non- deepcopyable attributes are handled during a deep copy. If TRUE, the copy will continue even if it encounters attributes marked as not deep-copyable. By default (FALSE), if any attributes that are found to be not deep-copyable, a sys_error will be thrown. (This flag only effects how attributes are handled; any non-deepcopyable non-attribute entities encountered will cause a sys_error to be thrown regardless of this flag's setting.)
reason type of scan.

virtual ENTITY* EDGE::copy_data ( ENTITY_LIST list,
pointer_map pm = NULL,
logical  dpcpy_skip = FALSE,
SCAN_TYPE  reason = SCAN_COPY 
) const [virtual]

Allocates a new ENTITY and calls copy_common to fill it in.



Role: Supports the copy operation. (Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

Parameters:
list ENTITYs to copy.
pm pointer map.
dpcpy_skip Used only by the base ENTITY and base ATTRIB class. No other derived entity or attribute should need to utilize this value. This logical indicates how non- deepcopyable attributes are handled during a deep copy. If TRUE, the copy will continue even if it encounters attributes marked as not deep-copyable. By default (FALSE), if any attributes that are found to be not deep-copyable, a sys_error will be thrown. (This flag only effects how attributes are handled; any non-deepcopyable non-attribute entities encountered will cause a sys_error to be thrown regardless of this flag's setting.)
reason scan type.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

virtual void EDGE::copy_scan ( ENTITY_LIST list,
SCAN_TYPE  reason = SCAN_COPY,
logical  dpcpy_skip = FALSE 
) const [virtual]

Adds dependent ENTITYs of this ENTITY to the list of ENTITYs to be copied.



Role: Supports the copy operation. (Supplied by the ENTITY_FUNCTIONS and SCAN_DEF macros.) The default type of scan (reason) is SCAN_COPY.

Parameters:
list ENTITYs to copy.
reason type of copy.
dpcpy_skip Used only by the base ENTITY and base ATTRIB class. No other derived entity or attribute should need to utilize this value. This logical indicates how non- deepcopyable attributes are handled during a deep copy. If TRUE, the copy will continue even if it encounters attributes marked as not deep-copyable. By default (FALSE), if any attributes that are found to be not deep-copyable, a sys_error will be thrown. (This flag only effects how attributes are handled; any non-deepcopyable non-attribute entities encountered will cause a sys_error to be thrown regardless of this flag's setting.)

Reimplemented from ENTITY.

Reimplemented in TEDGE.

virtual void EDGE::debug_ent ( FILE *  file_pointer  )  const [virtual]

Prints the type and address of this ENTITY, roll back pointer, attributes, and any unknown subtype information.



Role: This method is called by DEBUG_LIST::debug for an entirely unknown ENTITY type, or at the start of any derived class's debug_ent method. Each derived class's debug_ent method uses the debug function described in the Spatial Product Documentation to print information added at that level. (Supplied by the ENTITY_FUNCTIONS and DEBUG_DEF macros.)

Parameters:
file_pointer file pointer.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

virtual logical ENTITY::deletable (  )  const [virtual, inherited]

Indicates whether or not this ENTITY is normally destroyed by lose.



Role: Returns FALSE if the ENTITY is shared among multiple owners by means of a use count, and so gets destroyed implicitly when every owner has been lost. Most ENTITYs are destroyed explicitly using lose, so the default returns TRUE.

Reimplemented in ANNOTATION, ATTRIB_TAG, ATTRIB, CELL, CFACE, CSHELL, CURVE, EE_LIST, SPAGROUP, ID_ATTRIB, PCURVE, PHLV5_OCC, APOINT, REFINEMENT, RH_MATERIAL, RH_TEXTURE_SPACE, SUPERCELL, SURFACE, TRANSFORM, and VERTEX_TEMPLATE.

VERTEX* EDGE::end (  )  const [inline]

Returns a pointer to the end VERTEX of this EDGE.



Role: The pointer can be NULL.

virtual SPAvector EDGE::end_deriv (  )  const [virtual]

Returns the derivative at the end parameter of this EDGE.



Role: This function does not take into account an optional transformation on the owning body. That is the responsibility of the calling function.

SPAparameter EDGE::end_param (  )  const

Returns the parameter defining the end of this EDGE.



Role: This const version of this function is less efficient than the non-const version because it cannot store the computed parameter range in the EDGE for future use, but is required for constant EDGEs.

SPAparameter EDGE::end_param (  ) 

Returns the parameter defining the end of this EDGE.



Role: This is the preferred routine when there is a need for both start and end parameters. It saves the evaluated range and cannot be declared const.

virtual SPAposition EDGE::end_pos (  )  const [virtual]

Returns the end position of this EDGE.



Role: This function does not take into account an optional transformation on the owning body. That is the responsibility of the calling function.

void EDGE::fix_common ( ENTITY array[],
SCAN_TYPE  reason = SCAN_COPY 
) [protected]

Converts pointers from copy indices into real pointers.



Role: Called by fix_pointers. For ENTITY, converts the attribute pointer, and any pointers in the unknown_entity_text record. (Supplied by the ENTITY_FUNCTIONS and FIX_POINTER_DEF macros.)

Parameters:
array ENTITY pointers to fix.
reason type of scan.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

virtual void EDGE::fix_pointers ( ENTITY entity_array[],
SCAN_TYPE  reason = SCAN_COPY 
) [virtual]

Converts pointers from copy indices into real pointers.



Role: The fix_pointers method for each entity in the restore array is called, with the given array as an argument. This calls fix_common, which calls its parent's fix_common, and then corrects any pointers in the derived class. In practice there is never anything special for fix_pointers to do, but it is retained for consistency and compatibility. (Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

Parameters:
entity_array ENTITY pointers to fix.
reason type of scan.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

void ENTITY::fixup_copy ( ENTITY rollback  )  const [protected, inherited]

Fixes any pointers in the ENTITY after copying for backup.



Role: For ENTITY, this method has nothing to do, but because it is called by all data types, it is required to terminate the copy chain. (Supplied by the ENTITY_FUNCTIONS and SIMPLE_COPY_CONE macros.)

Parameters:
rollback the ENTITY to copy for backup.

Reimplemented in GA_WORKSPACE.

virtual void ENTITY::full_size ( SizeAccumulator &  est,
logical  countSelf = TRUE 
) const [virtual, inherited]

Increments the SizeAccumulator by the size, in bytes, of everything owned by this ENTITY and, optionally, of the ENTITY itself.



Role: If countSelf is TRUE, increments the SizeAccumulator by the size, in bytes, of the ENTITY and everything owned by the ENTITY. If countSelf is FALSE, increments the SizeAccumulator by the size, in bytes, of everything owned by the ENTITY, but not including the size of the ENTITY itself.

For example, if an ENTITY contained a character string and full_size were called with countSelf == FALSE, the SizeAccumulator would be incremented by the size, in bytes, of the character string.

Reimplemented in ATTRIB_CELL_INT_PRECEDENCE, ATTRIB_GEN_NAME, ATTRIB_GEN_STRING, ATTRIB_GEN_WSTRING, ATTRIB_BLEND, ATTRIB_FFBLEND, CELL, SPACOLLECTION, CONE, CSHELL, CURVE, EE_LIST, ELLIPSE, GA_WORKSPACE, SPAGROUP, HELIX, INTCURVE, LAW, PCURVE, PLANE, APOINT, SPHERE, SPLINE, STRAIGHT, SUPERCELL, SURFACE, TEXT_ENT, TORUS, UNDEFC, and ATTRIB_VAR_BLEND.

CURVE* EDGE::geometry (  )  const [inline]

Returns a pointer to the underlying CURVE geometry.

EDGE_cvty EDGE::get_convexity (  )  const

Returns the convexity of this EDGE.

SPAinterval EDGE::get_param_range (  )  const [inline]

Returns the parameter range of this EDGE.



Role: This routine simply returns the parameter range of the EDGE, whether it has been computed or not. This is a const method and does not change the edge.

virtual double EDGE::get_tolerance (  )  [virtual]

Returns the tolerance of the tolerant TEDGE made from this EDGE.



Role: This routine is for backwards compatibility. It saves the evaluated range and cannot be declared const.

Reimplemented in TEDGE.

virtual double EDGE::get_tolerance (  )  const [virtual]

Returns the tolerance of the tolerant TEDGE made from this EDGE.



Role: This const version of this function is less efficient than the non-const version because it cannot store the computed parameter range in the EDGE for future use, but is required for constant EDGEs.

Reimplemented in TEDGE.

HISTORY_STREAM* ENTITY::history (  )  const [inline, inherited]

Returns a pointer to the history stream for this ENTITY.

logical EDGE::holds_pattern (  )  const [inline, protected, virtual]

Returns TRUE if this entity can have a pattern_holder.

For internal use only.

Reimplemented from ENTITY.

virtual int EDGE::identity ( int  level = 0  )  const [virtual]

Returns a type identifier for this ENTITY.



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

A positive level specifies the level of derivation down from the ENTITY class to examine. ENTITY itself has level 0. If level is unspecified or 0, the type of the most specific class of object is returned. If level is 1, the type of the class one level down from ENTITY is returned. If level is 2, the type of the parent class 2 levels down from ENTITY is returned, and so on. If level is greater than the level of the instance, -1 ("unknown") is returned.

A negative level similarly specifies the level of derivation up from the most specific class of object returned.

(Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

Parameters:
level the derivation level at which the object is to be identified.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

virtual logical EDGE::is_deepcopyable (  )  const [virtual]

Returns TRUE if this ENTITY can be deep copied.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

logical ENTITY::is_unknown_entity ( void   )  const [protected, inherited]

Returns TRUE if this is an unknown entity.

An unknown entity is one that is restored from SAT/SAB but is not native to the running app.

virtual logical ENTITY::is_use_counted (  )  const [virtual, inherited]

Indicates if this ENTITY is use-counted or not.



Role: The default implementation returns FALSE.

Reimplemented in CURVE, PCURVE, PHLV5_OCC, APOINT, REFINEMENT, RH_MATERIAL, RH_TEXTURE_SPACE, SURFACE, and VERTEX_TEMPLATE.

double EDGE::length ( logical  approx_ok = TRUE  )  const

Returns the length of the underlying geometry CURVE.

If approx_ok is true, and the edge curve has a B-spline approximation, then this approximation is used in the length calculation.

virtual int EDGE::lookup ( logical  insert  )  const [virtual]

Looks up this ENTITY in the appropriate debug list.



Role: This method is not included among the standard ENTITY methods because often subclasses may wish to be included in their parent's debug list. This is done simply by not including a lookup method in the subclass.

When the logical argument is TRUE, the ENTITY is inserted into the debug list if it does not already exist in the list. If it is FALSE and the ENTITY does not exist in the list, a -1 is returned. (Supplied by the LOOK_FUNCTION and LOOKUP_DEF macros.)

Parameters:
insert flag to insert into debug list.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

virtual void EDGE::lose (  )  [virtual]

Posts a delete bulletin to the bulletin board indicating the instance is no longer used in the active model.



Role: The lose methods for attached attributes are also called.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

TEDGE* EDGE::make_tolerant ( double  tol,
logical  approx_ok 
)

Makes a tolerant TEDGE from this EDGE.

virtual SPAvector EDGE::mid_point_deriv ( logical  approx = TRUE  )  const [virtual]

Returns the derivative at the midpoint of this EDGE.



Role: The midpoint of an edge can be calculated either by evaluating at the edge mid-parameter value, or by finding the arc-length midpoint of the edge. Setting approx to FALSE returns the exact geometrical midpoint of the edge using arc-length. Setting approx to TRUE returns the midpoint by evaluating at the mid-parameter value. Depending on the parameterization of the underlying curve, the mid-parameter value may not correspond to the geometrical midpoint of the edge. Default value is TRUE.

This function does not take into account an optional transformation on the owning body. That is the responsibility of the calling function.

Parameters:
approx flag to use approximate (parametric) midpoint.

virtual SPAposition EDGE::mid_pos ( logical  approx = TRUE  )  const [virtual]

Returns the midpoint of this EDGE.



Role: The midpoint of an edge can be calculated either by evaluating at the edge mid-parameter value, or by finding the arc-length midpoint of the edge. Setting approx to FALSE returns the exact geometrical midpoint of the edge using arc-length. Setting approx to TRUE returns the midpoint by evaluating at the mid-parameter value. Depending on the parameterization of the underlying curve, the mid-parameter value may not correspond to the geometrical midpoint of the edge. Default value is TRUE.

This function does not take into account an optional transformation on the owning body. That is the responsibility of the calling function.

Parameters:
approx flag to use approximate (parametric) midpoint.

logical ENTITY::needs_rollback (  )  const [inline, inherited]

Checks whether or not the record is already backed up.

ENTITY* EDGE::owner (  )  const [virtual]

Returns a pointer to the owning entity.

Reimplemented from ENTITY.

SPAinterval EDGE::param_range (  )  const

Returns the parameter defining the end of this EDGE.



Role: This const version of this function is less efficient than the non-const version because it cannot store the computed parameter range in the EDGE for future use, but is required for constant EDGEs.

SPAinterval EDGE::param_range (  ) 

Returns the parameter range of this EDGE.



Role: This routine is for backwards compatibility. It saves the evaluated range and cannot be declared const.

logical EDGE::periodic (  )  const

Returns TRUE if this EDGE is periodic.

virtual void ENTITY::remove ( logical  lose_if_zero = TRUE  )  [virtual, inherited]

Decrements the use count of this ENTITY.



Role: If the use count reaches 0, the ENTITY's lose method is called if the argument lose_if_zero is set to TRUE. (If the entity is not use counted, an error is signaled.)

Every held pointer to a use counted ENTITY should be declared by calling add. There should a corresponding call to remove when the user is done with the pointer. For normal ENTITYs, simply call lose when the ENTITY is no longer part of the active model. For use counted ENTITYs, the implementations of add and remove come from macros in usecount.hxx. Use counted ENTITYs implemented without the macros should implement these virtual methods manually.

Parameters:
lose_if_zero flag to lose the ENTITY when the use count drops to 0.

Reimplemented in CURVE, SPAGROUP, PCURVE, PHLV5_OCC, APOINT, REFINEMENT, RH_MATERIAL, RH_TEXTURE_SPACE, SURFACE, and VERTEX_TEMPLATE.

void EDGE::restore_common (  ) 

Restores data for a record from disc to memory.



Role: Writes pointers as indices (fix_pointers turns them back into pointers) and returns a pointer to the ENTITY made. Generally, "common" functions that do the main work are protected, as they are called only from the main entry functions or by themselves up the derivation tree.

This method is public, however, because the main restore function is not a member function, and making it a friend would make it unable to be declared static, i.e., local to the defining module. (Supplied by the ENTITY_FUNCTIONS and RESTORE_DEF macros.)

    read_ptr  Pointer to record in save file for first attribute owned by entity.
    if (restore_version_number >= ENTITY_TAGS_VERSION)
       read_int      new tag 

Reimplemented from ENTITY.

Reimplemented in TEDGE.

void ENTITY::restore_end ( char *  id_str  )  [inherited]

Terminates a restore record.



Role: Reads any trailing text and fills in the unknown text pointer. Used only by the save/restore system.

Parameters:
id_str the id string.

void EDGE::roll_notify ( BULLETIN_TYPE  bulletin_type,
ENTITY ent 
) [virtual]

Fields notifications of rollback operations.



Role: The first argument specifies the type of bulletin being rolled back (create, delete or change). In the case of a change notification, the second argument contains the information to be restored into this object. The base implementation, which is used for almost every derived class, does nothing at all.

Parameters:
bulletin_type type of bulletin being rolled back.
ent information to be restored into this argument.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

BULLETIN*& ENTITY::rollback (  )  const [inline, inherited]

Returns the pointer to the bulletin board entry for this ENTITY.

virtual void EDGE::save ( ENTITY_LIST entity_list  )  const [virtual]

Performs a save operation.



Role: Calls save_begin, the particular class's save_common, and then save_end. (Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

This save method is just like any other save, except that it calls save_begin with an optional argument to suppress writing of a trailing dash, because save_common does not write out an identifier, or call any parent class's save_common.

Parameters:
entity_list ENTITYs to save.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

void ENTITY::save_begin ( logical  terminator = FALSE  )  const [protected, inherited]

Starts a save record.



Role: Writes a preamble to a save file record, which contains any subclass identifiers not known to this version of ACIS. Called by the save method.

Parameters:
terminator terminator flag.

void EDGE::save_common ( ENTITY_LIST entity_list  )  const [protected]

Handles the save operation.



Role: Writes out the savable data associated with the base class. In the case of ENTITY, saveable data is simply the attribute pointer. In the case of child classes derived from ENTITY, class-specific save_common methods handle the class-specific data. Called by the save method. (Supplied by the ENTITY_FUNCTIONS and SAVE_DEF macros.)

Each derived class's save_common method first writes out that class's identifier, calls its parent class's save_common method, and then writes out data particular to the derived class. Thus the save record consists of identifiers in leaf-to-base order, followed by class data in base-to-leaf order. As it writes out any ENTITY pointers, it adds them to the ENTITY_LIST, so that any dependent data also gets written to the file.

Parameters:
entity_list ENTITYs to save

Reimplemented from ENTITY.

Reimplemented in TEDGE.

void ENTITY::save_end ( ENTITY_LIST list  )  const [protected, inherited]

Terminates a save record.



Role: Writes out any data associated with subclasses not known to this version of ACIS before terminating the record. Called by the save method.

Parameters:
list list of entities.

REVBIT EDGE::sense (  )  const [inline]

Returns the sense of this EDGE.



Role: Indicates whether this EDGE shares the direction of the underlying CURVE, or has the opposite direction.

void ENTITY::set_attrib ( ATTRIB attr  )  [inherited]

Changes the attribute pointer of this ENTITY to point to the given attribute.



Parameters:
attr the new attribute.

void EDGE::set_bound ( SPAbox in_box  )  [inline]

Sets the bounding region (box) of this EDGE to the specified box.



Role: Sets the EDGE's SPAbox pointer to point to the given SPAbox. Before performing the 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.

Parameters:
box the new SPAbox.

void EDGE::set_coedge ( COEDGE coedge,
logical  reset_pattern = TRUE 
)

Sets the start of a list of COEDGEs corresponding to this EDGE.



Role: Before performing the 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.

Parameters:
coedge the new parent COEDGE.
reset_pattern internal use only.

void EDGE::set_convexity ( EDGE_cvty  cvty,
logical  reset_pattern = TRUE 
)

Sets the convexity of this EDGE to the given value.



Parameters:
cvty the new convexity.
reset_pattern internal use only.

void EDGE::set_end ( VERTEX vertex,
logical  reset_pattern = TRUE 
)

Sets the EDGE's end VERTEX.



Role: Before performing the 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.

Parameters:
vertex the new end VERTEX.
reset_pattern internal use only.

virtual void EDGE::set_end_ptr ( VERTEX vertex,
logical  reset_pattern = TRUE 
) [protected, virtual]

Assigns a pointer to the end VERTEX of this EDGE.



Role: The VERTEX pointer at either or both ends can be NULL, in which case the EDGE is taken to be unbounded in that direction. If the underlying CURVE is infinite, then so is the unbounded EDGE; if the CURVE is closed, then the VERTEX pointers must both be present or both NULL, and in the latter case the EDGE is the entire curve.

Parameters:
vertex the new end VERTEX.
reset_pattern internal use only.

virtual void EDGE::set_geometry ( CURVE crv,
logical  reset_pattern,
logical  reset_tol_geom 
) [virtual]

Sets this EDGE's geometry to the given CURVE.



Role: Side effects of this method are adjusting the use counts of the existing and new geometries, and deleting the existing geometry if it is no longer referenced. Before performing the 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.

Parameters:
crv the new CURVE.
reset_pattern internal use only.

virtual void EDGE::set_geometry_ptr ( CURVE crv  )  [protected, virtual]

Sets the pointer to the underlying CURVE geometry for this EDGE.



Parameters:
crv the new CURVE.
reset_pattern internal use only.

logical EDGE::set_param_range ( SPAinterval const &  range  ) 

Checks the parameter range of this EDGE.



Role: This method checks the given range against the start and end VERTEXes. If these are not in agreement it returns FALSE and does not set the range. If the range could be set it returns TRUE.

Parameters:
range the parameter range to check.

virtual void EDGE::set_sense ( REVBIT  sense,
logical  reset_pattern = TRUE 
) [virtual]

Sets the sense of this EDGE with respect to the underlying CURVE.



Role: Before performing the 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.

Parameters:
sense the new sense.
reset_pattern internal use only.

void EDGE::set_start ( VERTEX vertex,
logical  reset_pattern = TRUE 
)

Sets the EDGE's start VERTEX.



Role: Before performing the 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.

Parameters:
vertex the new start VERTEX.
reset_pattern internal use only.

virtual void EDGE::set_start_ptr ( VERTEX ,
logical  reset_pattern = TRUE 
) [protected, virtual]

Assigns a pointer to the start VERTEX of this EDGE.



Role: The VERTEX pointer at either or both ends can be NULL, in which case the EDGE is taken to be unbounded in that direction. If the underlying CURVE is infinite, then so is the unbounded EDGE; if the CURVE is closed, then the VERTEX pointers must both be present or both NULL, and in the latter case the EDGE is the entire curve.

Parameters:
vertex the new start VERTEX.
reset_pattern internal use only.

virtual void ENTITY::set_use_count ( int  use  )  [virtual, inherited]

Sets the reference use count of this ENTITY.



Role: If the ENTITY is not use counted, this method does nothing.

Parameters:
use new use count.

Reimplemented in CURVE, PCURVE, PHLV5_OCC, APOINT, REFINEMENT, RH_MATERIAL, RH_TEXTURE_SPACE, SURFACE, and VERTEX_TEMPLATE.

virtual unsigned EDGE::size (  )  const [virtual]

Returns the size, in bytes, of this ENTITY.



Role: (Supplied by the ENTITY_FUNCTIONS and UTILITY_DEF macros.)

Reimplemented from ENTITY.

Reimplemented in TEDGE.

VERTEX* EDGE::start (  )  const [inline]

Returns a pointer to the start VERTEX of this EDGE.



Role: The pointer can be NULL.

virtual SPAvector EDGE::start_deriv (  )  const [virtual]

Returns the derivative at the start parameter of this EDGE.



Role: This function does not take into account an optional transformation on the owning body. That is the responsibility of the calling function.

SPAparameter EDGE::start_param (  )  const

Returns the parameter defining the start of this EDGE.



Role: This const version of this function is less efficient than the non-const version because it cannot store the computed parameter range in the EDGE for future use, but is required for constant EDGEs.

SPAparameter EDGE::start_param (  ) 

Returns the parameter defining the start of this EDGE.



Role: This routine is for backwards compatibility. It saves the evaluated range and cannot be declared const.

virtual SPAposition EDGE::start_pos (  )  const [virtual]

Returns the start position of this EDGE.



Role: This function does not take into account an optional transformation on the owning body. That is the responsibility of the calling function.

EDGE_cvty EDGE::string_convexity ( char *  string  )  const

Assigns a convexity to this EDGE, for example, "concave", "tangent", and "unknown".



Parameters:
string string indicating the convexity.

tag_id_type ENTITY::tag ( logical  assign_new = TRUE  )  const [inline, inherited]

Data reading routine.



Parameters:
assign_new flag to assign a new tag number or not.

virtual const char* EDGE::type_name (  )  const [virtual]

Returns a name for this ENTITY's type.



Role: For the ENTITY class, unknown is returned.

Reimplemented from ENTITY.

Reimplemented in TEDGE.

virtual int ENTITY::use_count (  )  const [virtual, inherited]

Returns the use count of this ENTITY.



Role: Returns zero if the ENTITY is not use counted.

Reimplemented in CURVE, PCURVE, PHLV5_OCC, APOINT, REFINEMENT, RH_MATERIAL, RH_TEXTURE_SPACE, SURFACE, and VERTEX_TEMPLATE.

logical EDGE::vertex_bounded (  )  const

Returns TRUE if this EDGE is bounded by VERTEXes.


Member Data Documentation

COEDGE* EDGE::coedge_ptr [protected]

Pointer to one of the COEDGEs lying on this EDGE.

EDGE_cvty EDGE::cvty [mutable, protected]

The convexity of this EDGE.

VERTEX* EDGE::end_ptr [protected]

Pointer to the end VERTEX of this EDGE.



Role: The VERTEX pointer at either or both ends may be NULL.

CURVE* EDGE::geometry_ptr [protected]

Pointer to the CURVE describing the geometry of this EDGE.



Role: The geometry pointer can be NULL while both VERTEX pointers point to the same VERTEX.

The parametric bounding interval for this EDGE.



Role: Specifies an interval that includes the entire EDGE (with respect to the internal coordinate system of the BODY). The interval may be infinite if no such bound has been calculated since the EDGE was last changed.

REVBIT EDGE::sense_data [protected]

The sense of the CURVE describing this EDGE.



Role: Every curve description is of a directed curve; the sense defines whether or not this EDGE shares its underlying CURVE's direction.

VERTEX* EDGE::start_ptr [protected]

Pointer to the start VERTEX of this EDGE.



Role: The VERTEX pointer at either or both ends may be NULL.