Home

REFINEMENT Class Reference
[Faceting]

Controls the accuracy and types of polygons generated in the faceter. More...

#include <refine.hxx>

Inheritance diagram for REFINEMENT:

Inheritance graph
[legend]
Collaboration diagram for REFINEMENT:

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 (const SPAtransf &t, ENTITY_LIST &list, logical negate=FALSE, logical reset_pattern=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.
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.
REFINEMENTcopy () const
 This creates and returns a new REFINEMENT that is a copy of this REFINEMENT.
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.
void copy_to (REFINEMENT *to) const
 Copies the contents of this instance of REFINEMENT to the given REFINEMENT.
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 this entity is normally destroyed by lose (TRUE), or whether it is shared between multiple owners with a use count.
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.
AF_ADJUST_MODE get_adjust_mode () const
 Returns the triangle smoothing mode.
REFINEMENT_IFLOAT get_dynamic_surtol () const
 Returns the dynamic surface tolerance.
REFINEMENT_IFLOAT get_grid_aspect_ratio () const
 Returns the grid aspect ratio.
AF_GRID_MODE get_grid_mode () const
 Returns the grid mode.
REFINEMENT_IFLOAT get_max_edge_length () const
 Returns the maximum allowable size of an edge of a facet.
int get_max_grid_lines () const
 Returns the maximum allowable number of grid lines for a refinement.
int get_min_u_grid_lines () const
 Returns the minimum number of u grid lines.
int get_min_v_grid_lines () const
 Returns the minimum number of v grid lines.
REFINEMENT_IFLOAT get_normal_tol () const
 Returns the normal tolerance, which is the maximum difference between any two normals of facet.
AF_SURF_MODE get_surf_mode () const
 Returns the surface mode.
REFINEMENT_IFLOAT get_surface_tol () const
 Returns the surface tolerance.
AF_TRIANG_MODE get_triang_mode () const
 Returns the triangulation mode.
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.
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.
void merge (REFINEMENT *ref)
 Merges two refinements.
void merge_owner (ENTITY *other, logical delete_other)
 Notifies the REFINEMENT that its owning ENTITY is about to be merged with given entity.
logical needs_rollback () const
 Checks whether or not the record is already backed up.
virtual ENTITYowner () const
 Identifies the owner, if any, from the data structure of this ENTITY.
void print (FILE *fp=stderr) const
 Prints information about this refinement.
 REFINEMENT ()
 C++ allocation constructor requests memory for this object but does not populate it.
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.
logical same (REFINEMENT *ref) const
 Determines if two refinements have the same parameter values.
virtual void save (ENTITY_LIST &) const
 Performs a save operation.
void set_adjust_mode (AF_ADJUST_MODE adjustmode)
 The adjustment mode is used for triangle smoothing.
void set_attrib (ATTRIB *attr)
 Changes the attribute pointer of this ENTITY to point to the given attribute.
void set_grid_aspect_ratio (REFINEMENT_IFLOAT rat)
 Grid aspect ratio specifies the approximate aspect ratio of each cell in the grid.
void set_grid_mode (AF_GRID_MODE gridmode)
 The grid mode specifies whether a grid is used and whether the points where the grid cuts the edges should be inserted into the edge discretization.
void set_max_edge_length (REFINEMENT_IFLOAT len)
 The maximum edge length specifies the maximum length of a side of a cell in object space.
void set_max_grid_lines (int grid)
 The maximum grid lines specifies the maximum number of grid subdivisions.
void set_min_u_grid_lines (int grid)
 Sets the minimum number of u grid lines.
void set_min_v_grid_lines (int grid)
 Sets the minimum number of v grid lines.
void set_normal_tol (REFINEMENT_IFLOAT dev)
 The normal tolerance specifies the maximum normal deviation (in degrees) allowed between two normals on two adjacent facet nodes.
void set_surf_mode (AF_SURF_MODE surfmode)
 The surface mode specifies the type of surface to which the refinement is applicable.
void set_surface_tol (REFINEMENT_IFLOAT val)
 The surface tolerance specifies the maximum distance between a facet and the true surface.
void set_triang_mode (AF_TRIANG_MODE triangmode)
 This sets the triangulation control, which specifies how much triangulation to perform.
virtual void set_use_count (int val)
 Sets the reference use count of this ENTITY.
REFINEMENTshare ()
 Increments the use count if "this" and returns "this.".
virtual unsigned size () const
 Returns the size, in bytes, of this ENTITY.
void split_owner (ENTITY *new_entity)
 Notifies the REFINEMENT that its owner is about to be split into two parts.
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.

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 (const ENTITY *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.
virtual 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.


Detailed Description

Controls the accuracy and types of polygons generated in the faceter.


Role: Refinements control how entities are faceted. Refinements can be attached to a specific entity; for instance, a body or face. In addition, there are default refinements that control the faceting of all entities whose faceting is not controlled by a refinement on the entity or a refinement on a higher level topological entity.

Each refinement applies to a specific type of surface. Available surface types are:

AF_SURF_ALL all surface types. This is the default value.
AF_SURF_REGULAR a surface with planar cells.
AF_SURF_IRREGULAR a surface with possibly nonplanar cells.
AF_SURF_PLANE a planar surface.
AF_SURF_CONE a conical surface (including cylinder).
AF_SURF_SPHERE a spherical surface.
AF_SURF_TORUS a toroidal surface.
AF_SURF_SPLINE a spline surface.


These parameters can be used to control the faceting:

adjust mode specifies type of triangle smoothing to do. Specifies if facet nodes should be adjusted by smoothing. Also specifies if the grid points should be adjusted or not. The default value is AF_ADJUST_NONE.
normal tolerance specifies the maximum angle (in degrees) between any two normals of a facet.
surface tolerance specifies the maximum distance between the facet and the nearest point on the surface. This can be either a specific value or a fraction of the length of the diagonal of the bounding box of the body containing the face being faceted.
maximum edge length specifies the maximum size of an edge of a facet.
maximum grid lines specifies the maximum number of subdivisions on a face.
minimum u grid lines specifies the minimum number of u grid lines used to facet a face.
minimum v grid lines specifies the minimum number of v grid lines used to facet a face.
grid aspect ratio specifies the approximate aspect ratio of each cell in grid.
grid mode specifies whether a grid is used and whether the points where the grid cuts the edge is inserted to the edge.
triangulation control specifies how much triangulation to do.


For more information on the REFINEMENT class refer to the Technical Article Refinements.


Constructor & Destructor Documentation

REFINEMENT::REFINEMENT (  ) 

C++ allocation constructor requests memory for this object but does not populate it.



Role: The allocation constructor is used primarily by restore. Applications should call this constructor only with the overloaded new operator inherited from the ENTITY class (for example, x=new REFINEMENT(...)), because this reserves the memory on the heap, a requirement to support roll back and history management.

Creates a REFINEMENT with these settings:

surface type = AF_SURF_ALL
normal tolerance = 30.0
surface tolerance = -1 (use bounding box diagonal)
maximum edge length = 0.0 (ignored)
maximum grid lines = 2048
minimum u grid lines = 0
minimum v grid lines = 0
grid aspect ratio = 0.0 (ignored)
grid mode = AF_GRID_INTERIOR
triangulation control = AF_TRIANG_ALL
triangle smoothing = AF_ADJUST_NONE


Member Function Documentation

virtual void REFINEMENT::add (  )  [virtual]

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 from ENTITY.

static MethodFunction REFINEMENT::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.

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

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 in ASM_ASSEMBLY, ASM_MODEL_REF, BODY, COEDGE, CURVE, EDGE, ERROR_ENTITY, FACE, LAW, LOOP, LUMP, APATTERN, PCURVE, APOINT, SHELL, SUBSHELL, SURFACE, TCOEDGE, TEDGE, TEXT_ENT, TVERTEX, VERTEX, WCS, and WIRE.

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.

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

Returns the number of bulletins referring to this ENTITY.

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

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 in BODY, COEDGE, CONE, CURVE, EDGE, ELLIPSE, FACE, HELIX, INTCURVE, LOOP, LUMP, PCURVE, PLANE, APOINT, SHELL, SPHERE, SPLINE, STRAIGHT, SUBSHELL, SURFACE, TCOEDGE, TEDGE, TORUS, TVERTEX, UNDEFC, VERTEX, and WIRE.

virtual logical REFINEMENT::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.

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.

REFINEMENT* REFINEMENT::copy (  )  const

This creates and returns a new REFINEMENT that is a copy of this REFINEMENT.

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* REFINEMENT::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.

virtual void REFINEMENT::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.

void REFINEMENT::copy_to ( REFINEMENT to  )  const

Copies the contents of this instance of REFINEMENT to the given REFINEMENT.



Role: In addition to copying the contents of this refinement to the given refinement, the use count of the given refinement is reset to 0. This member function should be used with caution.

Parameters:
to where to copy.

virtual void REFINEMENT::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.

virtual logical REFINEMENT::deletable (  )  const [virtual]

Indicates whether this entity is normally destroyed by lose (TRUE), or whether it is shared between multiple owners with a use count.



Role: If shared, it gets destroyed implicitly when every owner has been lost (FALSE). The default is FALSE. This is an internal method that should not be used by an application.

Reimplemented from ENTITY.

void REFINEMENT::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.

virtual void REFINEMENT::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.

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.

AF_ADJUST_MODE REFINEMENT::get_adjust_mode (  )  const

Returns the triangle smoothing mode.



Note: Refer to the set_adjust_mode method.

REFINEMENT_IFLOAT REFINEMENT::get_dynamic_surtol (  )  const

Returns the dynamic surface tolerance.



Role: If a refinement is attached to a body and a dynamic or relative surface tolerance is used (that is, the given value for the surface tolerance is negative, causing the surface tolerance to be calculated as a fraction of the length of the diagonal of the body's bounding box), then this method can be called after faceting the body to obtain the surface tolerance value used. This can also be used with a default refinement if a single body is being faceted.

REFINEMENT_IFLOAT REFINEMENT::get_grid_aspect_ratio (  )  const

Returns the grid aspect ratio.



Role: The grid aspect ratio is the approximate ratio of the length in the u direction to the length in the v direction of each uv cell in the grid.

Note: Refer to the set_grid_aspect_ratio method.

AF_GRID_MODE REFINEMENT::get_grid_mode (  )  const

Returns the grid mode.



Note: Refer to the set_grid_mode method.

REFINEMENT_IFLOAT REFINEMENT::get_max_edge_length (  )  const

Returns the maximum allowable size of an edge of a facet.



Note: Refer to the set_max_edge_length method.

int REFINEMENT::get_max_grid_lines (  )  const

Returns the maximum allowable number of grid lines for a refinement.



Note: Refer to the set_max_grid_lines method.

int REFINEMENT::get_min_u_grid_lines (  )  const

Returns the minimum number of u grid lines.



Note: Refer to the set_min_u_grid_lines method.

int REFINEMENT::get_min_v_grid_lines (  )  const

Returns the minimum number of v grid lines.



Note: Refer to the set_min_v_grid_lines method.

REFINEMENT_IFLOAT REFINEMENT::get_normal_tol (  )  const

Returns the normal tolerance, which is the maximum difference between any two normals of facet.



Note: Refer to the set_normal_tol method.

AF_SURF_MODE REFINEMENT::get_surf_mode (  )  const

Returns the surface mode.



Note: Refer to the set_surf_mode method.

REFINEMENT_IFLOAT REFINEMENT::get_surface_tol (  )  const

Returns the surface tolerance.



Note: Refer to the set_surface_tol method.

AF_TRIANG_MODE REFINEMENT::get_triang_mode (  )  const

Returns the triangulation mode.



Note: Refer to the set_triang_mode method.

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

Returns a pointer to the history stream for this ENTITY.

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

Returns TRUE if this entity can have a pattern_holder.

For internal use only.

Reimplemented in BODY, COEDGE, CURVE, EDGE, FACE, LOOP, LUMP, PCURVE, APOINT, SHELL, SURFACE, VERTEX, and WIRE.

virtual int REFINEMENT::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.

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

Returns TRUE if this ENTITY can be deep copied.

Reimplemented from ENTITY.

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 REFINEMENT::is_use_counted (  )  const [virtual]

Indicates if this ENTITY is use-counted or not.



Role: The default implementation returns FALSE.

Reimplemented from ENTITY.

virtual int REFINEMENT::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.

virtual void REFINEMENT::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.

void REFINEMENT::merge ( REFINEMENT ref  ) 

Merges two refinements.



Role: The parameter values of this refinement are set to the tighter of the parameter values of this refinement and the given refinement.

Parameters:
ref second refinement.

void REFINEMENT::merge_owner ( ENTITY other,
logical  delete_other 
)

Notifies the REFINEMENT that its owning ENTITY is about to be merged with given entity.



Role: The application has the chance to delete or otherwise modify the attribute. After the merge, this owner will be deleted if the logical deleting owner is TRUE, otherwise it will be retained and other entity will be deleted. The default action is to do nothing. This function is supplied by the application whenever it defines a new attribute, and is called when a merge occurs.

Parameters:
other given entity.
delete_other deleting owner.

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

Checks whether or not the record is already backed up.

virtual ENTITY* ENTITY::owner (  )  const [virtual, inherited]

Identifies the owner, if any, from the data structure of this ENTITY.



Role: A return value of NULL indicates no owner or an unidentifiable one. Objects of the ENTITY base class have no identifiable owner.

Reimplemented in ASM_MODEL_REF, ATTRIB, CELL, CFACE, COEDGE, CSHELL, CURVE, EDGE, EE_LIST, FACE, LOOP, LUMP, PCURVE, APOINT, SHELL, SUBSHELL, SUPERCELL, SURFACE, TRANSFORM, VERTEX, and WIRE.

void REFINEMENT::print ( FILE *  fp = stderr  )  const

Prints information about this refinement.



Role: MAC, NT platforms only.

Parameters:
fp file.

virtual void REFINEMENT::remove ( logical  lose_if_zero = TRUE  )  [virtual]

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 from ENTITY.

void REFINEMENT::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.

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

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

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

logical REFINEMENT::same ( REFINEMENT ref  )  const

Determines if two refinements have the same parameter values.



Parameters:
ref refinement to test.

virtual void REFINEMENT::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.

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

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.

void REFINEMENT::set_adjust_mode ( AF_ADJUST_MODE  adjustmode  ) 

The adjustment mode is used for triangle smoothing.



Role: It specifies whether triangles should be smoothed. The nongrid mode preserves the planarity of cells by avoiding points that are corners of a cell. The allowable values are:

AF_ADJUST_NONE no smoothing. (This is the default value.)
AF_ADJUST_NON_GRID applies to points that are not part of a cell.
AF_ADJUST_ALL adjust all points connected to triangles.

When triangle smoothing is performed grid based tolerances may not be satisified.

Parameters:
adjustmode mode to set.

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 REFINEMENT::set_grid_aspect_ratio ( REFINEMENT_IFLOAT  rat  ) 

Grid aspect ratio specifies the approximate aspect ratio of each cell in the grid.



Role: If the value is close to 1, then the cell is close to a square. This does not guarantee the aspect ratio of the facet, which may consist of only a part of a cell. The default value is 0.0, meaning this parameter is ignored.

Parameters:
rat aspect ratio value.

void REFINEMENT::set_grid_mode ( AF_GRID_MODE  gridmode  ) 

The grid mode specifies whether a grid is used and whether the points where the grid cuts the edges should be inserted into the edge discretization.



Role: These are the allowable values:

AF_GRID_NONE do not subdivide face with a grid.
AF_GRID_INTERIOR use a grid but do not add model edge intersection points. (This is the default value.)
AF_GRID_ONE_DIR similar to AF_GRID_INTERIOR, but spherical faces have nodes that are evenly spaced only in the parametric u direction, and the v direction spacing is variable.
AF_GRID_TO_EDGES use a grid and insert edge intersections points.

Parameters:
gridmode mode to set.

void REFINEMENT::set_max_edge_length ( REFINEMENT_IFLOAT  len  ) 

The maximum edge length specifies the maximum length of a side of a cell in object space.



Role: Since a facet cannot be larger than the cell, this determines the maximum size of the facet. The default value is 0.0, meaning this parameter is ignored.

Parameters:
len maximum edge length.

void REFINEMENT::set_max_grid_lines ( int  grid  ) 

The maximum grid lines specifies the maximum number of grid subdivisions.



Role: This prevents the facet data of a face from getting too big. It can also be used to specify the exact number of divisions on a face by using it in conjunction with another parameter; e.g., a very small normal deviation. The default value is 2048.

Parameters:
grid maximum number of grid lines.

void REFINEMENT::set_min_u_grid_lines ( int  grid  ) 

Sets the minimum number of u grid lines.



Role: When the minimum number of u grid lines is a non-zero value, the faceting algorithm inserts the minimum number of uniformly sized grid cells in the u direction before attempting to satisify any other constraints. This refinement parameter has no meaning when grid mode is set to AF_GRID_NONE. The default value is 0.

Parameters:
grid at least this number of grid lines are generated in u direction.

void REFINEMENT::set_min_v_grid_lines ( int  grid  ) 

Sets the minimum number of v grid lines.



Role: When the minimum number of v grid lines is a non-zero value, the faceting algorithm inserts the minimum number of uniformly sized grid cells in the v direction before attempting to satisify any other constraints. This refinement parameter has no meaning when grid mode is set to AF_GRID_NONE. The default value is 0.

Parameters:
grid at least this number of grid lines are generated in v direction.

void REFINEMENT::set_normal_tol ( REFINEMENT_IFLOAT  dev  ) 

The normal tolerance specifies the maximum normal deviation (in degrees) allowed between two normals on two adjacent facet nodes.



Role: The value is independent of the model size. The default value is 30.0 degrees.

Parameters:
dev normal tolerance value.

void REFINEMENT::set_surf_mode ( AF_SURF_MODE  surfmode  ) 

The surface mode specifies the type of surface to which the refinement is applicable.



Role: The allowable surface modes are listed below. If more than one refinement is applicable to a face, the more specific one overrides the less specific one.

AF_SURF_ALL all surface types. (This is the default value.)
AF_SURF_REGULAR a surface with planar cells.
AF_SURF_IRREGULAR a surface with possibly nonplanar cells.
AF_SURF_PLANE a planar surface.
AF_SURF_CONE a conical surface (including cylinder).
AF_SURF_SPHERE a spherical surface.
AF_SURF_TORUS a toroidal surface.
AF_SURF_SPLINE a spline surface.

Parameters:
surfmode surface mode value.

void REFINEMENT::set_surface_tol ( REFINEMENT_IFLOAT  val  ) 

The surface tolerance specifies the maximum distance between a facet and the true surface.



Role: When this value is positive, it specifies the surface tolerance value. In this case the number of facets depends upon the model size. When this value is negative, it specifies a relative surface tolerance value. The surface tolerance is the absolute value of this negative number multiplied by a fraction (1/500) of the length of the diagonal of the bounding box of the body containing the face. The default value is -1.0, meaning the surface tolerance is (1/500) of the length of the diagonal of the bounding box of the body containing the face.

Parameters:
val surface tolerance value.

void REFINEMENT::set_triang_mode ( AF_TRIANG_MODE  triangmode  ) 

This sets the triangulation control, which specifies how much triangulation to perform.



Role: If AF_GRID_INTERIOR or AF_GRID_ONE_DIR is specified, triangulation will be performed at least at the fringe cells. Allowable values are:

AF_TRIANG_NONE no triangulation.
AF_TRIANG_FRINGE_1 triangulate at the fringe layer.
AF_TRIANG_FRINGE_2 triangulate 2 fringe layers.
AF_TRIANG_FRINGE_3 triangulate 3 fringe layers.
AF_TRIANG_FRINGE_4 triangulate 4 fringe layers.
AF_TRIANG_ALL triangulate all facets. (This is the default value.)

Parameters:
triangmode mode to set

virtual void REFINEMENT::set_use_count ( int  use  )  [virtual]

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 from ENTITY.

REFINEMENT* REFINEMENT::share (  )  [inline]

Increments the use count if "this" and returns "this.".

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

Returns the size, in bytes, of this ENTITY.



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

Reimplemented from ENTITY.

void REFINEMENT::split_owner ( ENTITY new_entity  ) 

Notifies the REFINEMENT that its owner is about to be split into two parts.



Role: The application has the chance to duplicate or otherwise modify the attribute. The default action is to do nothing. This function is supplied by the application whenever it defines a new attribute, and is called when a split occurs.

Parameters:
new_entity new entity.

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* REFINEMENT::type_name (  )  const [virtual]

Returns a name for this ENTITY's type.



Role: For the ENTITY class, unknown is returned.

Reimplemented from ENTITY.

virtual int REFINEMENT::use_count (  )  const [virtual]

Returns the use count of this ENTITY.



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

Reimplemented from ENTITY.