Home

acovr_options Class Reference
[Advanced Covering]

Options for covering with advanced covering. More...

#include <acover_opts.hxx>

Inheritance diagram for acovr_options:

Inheritance graph
[legend]
Collaboration diagram for acovr_options:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 acovr_options ()
 Constructs an acovr_options object.
acovr_optionsclone () const
 Deep copy method.
acovr_edge_constraint get_boundary_constraint (const EDGE *bdy_ent) const
 Returns the constraints of a boundary edge.
void get_conflict (int n, EDGE *&ed1, EDGE *&ed2, acovr_conflict_type &type) const
 Returns a description of the n-th constraint conflict.
void get_constrained_boundaries (ENTITY_LIST &oboundaries) const
 Retrieves the list of boundary edges.
acovr_edge_constraint get_default_constraint () const
 Returns a copy of the default constraint.
logical get_final_surf_check () const
 Returns whether or not advanced covering checks the correctness of candidate covering surfaces.
double get_flattening () const
 Returns the value of the flattening parameter.
void get_guide_curves (ENTITY_LIST &guide_edges) const
 Retrieves the edges defining the guide curves.
void get_guide_points (ENTITY_LIST &guide_vertices) const
 Retrieves the vertices defining the guide points.
double get_guide_tol (const ENTITY *constraining_ent) const
 Returns the G0 tolerance for the guide point (vertex) or guide curve (edge).
const FACEget_initial_face () const
 Returns a pointer to the initial_face.
int get_max_spans () const
 Returns the specified maximum number of spans.
int get_num_conflicts () const
 Returns the number of constraint conflicts found.
SPAunit_vector get_plane_normal () const
 Returns the current value of the plane_normal parameter.
logical input_plane_specified () const
 Returns TRUE, if the plane_normal parameter has been set or FALSE otherwise.
void report_max_gap (acovr_gap_report &gr) const
 Retrieves the maximum gap in position (G0) and angle (G1).
void set_boundary_constraint (EDGE *bdry_edge, acovr_continuity_level continuity)
 Overrides the default continuity specification for a particular boundary edge.
void set_boundary_constraint (EDGE *bdry_edge, const acovr_edge_constraint &constraint)
 Overrides the default continuity and tolerance specification for a particular boundary edge.
void set_boundary_constraints (const ENTITY_LIST &bdry_edges, acovr_continuity_level continuity)
 Overrides the default continuity specification for a list of boundary edges.
void set_boundary_constraints (const ENTITY_LIST &bdry_edges, const acovr_edge_constraint &constraint)
 Overrides the default continuity and tolerance specification for a list of boundary edges.
void set_default_constraint (const acovr_edge_constraint &default_values)
 Specifies the default continuity and tolerance.
void set_final_surf_check (logical new_final_check)
 Sets whether or not advanced covering checks the correctness of candidate covering surfaces.
void set_flattening (double flattening)
 Sets the value of the flattening parameter.
void set_guide (const ENTITY *constraining_ent, double tolerance)
 Specifies a guide point (vertex) or guide curve (edge).
void set_guide (const ENTITY *constraining_ent)
 Specifies a guide point (vertex) or guide curve (edge).
void set_guides (const ENTITY_LIST &constraining_ents, double tolerance)
 Specifies a list of guide points (vertices) or guide curves (edges).
void set_guides (const ENTITY_LIST &constraining_ents)
 Specifies a list of guide points (vertices) or guide curves (edges).
void set_initial_face (const FACE *face)
 Chooses an initial spline surface.
void set_max_spans (int max_spans)
 Sets the maximum number of spans in the covering surface.
void set_plane_normal (const SPAunit_vector &dir)
 Defines the initial projection plane.
 ~acovr_options ()
 Destructs an acovr_options object.


Detailed Description

Options for covering with advanced covering.


Role: This class is used to configure the covering problem. It allows you to specify constraint continuity, contraint tolerance, maximum number of the spline covering surface spans, and shape parameters for the covering algorithm. During the problem configuration, the acovr_options object can be queried to determine its current state. Following covering, the object can then be queried to determine how well the constraints were satisfied. You must call set_default_constraint before making any changes to the acovr_options object.

See also:
acovr_edge_constraint, acovr_gap_report, ENTITY_LIST

Constructor & Destructor Documentation

acovr_options::acovr_options (  ) 

Constructs an acovr_options object.

acovr_options::~acovr_options (  ) 

Destructs an acovr_options object.


Member Function Documentation

acovr_options* acovr_options::clone (  )  const

Deep copy method.



Role: This function is provides the basis for an acovr_options "factory" which produces acovr_options objects with user-specified input settings. An example use case is covering a collection of separate circuits, all with the same continuity and tolerance specifications.

acovr_edge_constraint acovr_options::get_boundary_constraint ( const EDGE bdy_ent  )  const

Returns the constraints of a boundary edge.



Parameters:
bdy_ent Given edge.

void acovr_options::get_conflict ( int  n,
EDGE *&  ed1,
EDGE *&  ed2,
acovr_conflict_type type 
) const

Returns a description of the n-th constraint conflict.



Role: The boundary constraint geometry may inadverntantly conflict with user-input tangency or curvature data. This function returns a description of the n-th such conflict.

Parameters:
n Which conflict to query.
ed1 First EDGE; conflict occurs at VERTEX joining the two edges.
ed2 Second EDGE; conflict occurs at VERTEX joining the two edges.
type Type of conflict.

See also:
get_num_conflicts

void acovr_options::get_constrained_boundaries ( ENTITY_LIST oboundaries  )  const

Retrieves the list of boundary edges.



Role: This method overwrites the "boundaries" list with a list of all the edges which had a constraint applied to them through the set_edge_constraint or set_edge_constraints methods.

Note: Because edges are usually replaced with tolerant edges during the Advanced Covering process, this API sets "boundaries" to an empty list when called after the acovr_options object has been used in a call to api_advanced_cover.

Parameters:
oboundaries Constrained edges.

acovr_edge_constraint acovr_options::get_default_constraint (  )  const

Returns a copy of the default constraint.

logical acovr_options::get_final_surf_check (  )  const

Returns whether or not advanced covering checks the correctness of candidate covering surfaces.



Role: By default, candidate covering surfaces are checked and rejected if bad. If the final_surf_check flag is false, this checking will not occur. WARNING - if this flag is false, advanced covering can produce bad surfaces, i.e., surfaces which may cause problems during downstream ACIS operations.

See also:
set_final_surf_check

double acovr_options::get_flattening (  )  const

Returns the value of the flattening parameter.



See also:
set_flattening

void acovr_options::get_guide_curves ( ENTITY_LIST guide_edges  )  const

Retrieves the edges defining the guide curves.



Parameters:
guide_edges Guide edges.

void acovr_options::get_guide_points ( ENTITY_LIST guide_vertices  )  const

Retrieves the vertices defining the guide points.



Parameters:
guide_vertices Guide vertices.

double acovr_options::get_guide_tol ( const ENTITY constraining_ent  )  const

Returns the G0 tolerance for the guide point (vertex) or guide curve (edge).



Parameters:
constraining_ent vertex or edge.

const FACE* acovr_options::get_initial_face (  )  const

Returns a pointer to the initial_face.



Role: A return value of NULL means that the initial_face is unset, in which case the initial surface will be obtained from the projection plane. Note that the plane_normal parameter is ignored if an initial_face is set.

int acovr_options::get_max_spans (  )  const

Returns the specified maximum number of spans.



Role: This is an integer and controls the maximum number of B-spline spans in each direction that the covering surface can have. Small values result in surfaces without many degrees of freedom that may have large gaps, while large values may result in surfaces with many control points, which adversely affects performance.

int acovr_options::get_num_conflicts (  )  const

Returns the number of constraint conflicts found.



Role: The boundary constraint geometry may inadverntantly conflict with user-input tangency or curvature data. This function returns the number of conflicts found.

See also:
get_conflict

SPAunit_vector acovr_options::get_plane_normal (  )  const

Returns the current value of the plane_normal parameter.



Role: This method should only be called if a plane_normal parameter has been set, i.e. if input_plane_specified() returns TRUE.

See also:
set_plane_normal

logical acovr_options::input_plane_specified (  )  const

Returns TRUE, if the plane_normal parameter has been set or FALSE otherwise.

void acovr_options::report_max_gap ( acovr_gap_report gr  )  const

Retrieves the maximum gap in position (G0) and angle (G1).



Role: This method examines each boundary edge's constraint and reports the maximum gap in position (G0) and angle (G1). Guide curve gaps are not considered. Note that for performance reasons, the gap reported is the gap between points that Advanced Covering was trying to make coincide.

Parameters:
gr Contains maximum gap values.

void acovr_options::set_boundary_constraint ( EDGE bdry_edge,
acovr_continuity_level  continuity 
)

Overrides the default continuity specification for a particular boundary edge.



Parameters:
bdry_edge Boundary edge.
continuity Continuity level (G0 or G1).

void acovr_options::set_boundary_constraint ( EDGE bdry_edge,
const acovr_edge_constraint constraint 
)

Overrides the default continuity and tolerance specification for a particular boundary edge.



Parameters:
bdry_edge Boundary edge.
constraint Edge constraint.

void acovr_options::set_boundary_constraints ( const ENTITY_LIST bdry_edges,
acovr_continuity_level  continuity 
)

Overrides the default continuity specification for a list of boundary edges.



Parameters:
bdry_edges Boundary edges.
continuity Continuity level (G0 or G1).

void acovr_options::set_boundary_constraints ( const ENTITY_LIST bdry_edges,
const acovr_edge_constraint constraint 
)

Overrides the default continuity and tolerance specification for a list of boundary edges.



Parameters:
bdry_edges Boundary edges.
constraint Edge constraint.

void acovr_options::set_default_constraint ( const acovr_edge_constraint default_values  ) 

Specifies the default continuity and tolerance.



Parameters:
default_values Edge constraint default values.

void acovr_options::set_final_surf_check ( logical  new_final_check  ) 

Sets whether or not advanced covering checks the correctness of candidate covering surfaces.



Role: By default, candidate covering surfaces are checked and rejected if bad. If the final_surf_check flag is false, this checking will not occur. WARNING - after setting this flag is false, advanced covering can produce bad surfaces, i.e., surfaces which may cause problems during downstream ACIS operations. The option is provided mainly as a diagnostic for cases in which covering fails; users may then loosen tolerances, check input constraints (tangent vs position) for conflicts, or both.

Parameters:
new_final_check New setting for final check (TRUE or FALSE).

See also:
get_final_surf_check

void acovr_options::set_flattening ( double  flattening  ) 

Sets the value of the flattening parameter.



Role: Flattening parameter is a positive number that controls the effect of G1 constraints on the shape of the covering surface. When G1 constraints force a large change between the shape of the covering and initial surfaces, the flattening parameter controls the region of effect of the G1 constraints. A large (0.7 or so) flattening parameter will cause the "rotation" (deviation of slope from that of the initial surface) of the covering surface to be localized to the vicinity of the G1 constrained edge, resulting in a flattened interior which has a shape close to that of the corresponding G0 cover. A small flattening parameter will cause the effects of the G1 constraint to be spread out, resulting in a more "domed" interior. When performing a G1 cover of the top of a cylinder, for example doming, the height of the dome is controlled purely by the flattening parameter. Small values of flattening result in high, round domes, while large values result in short, flat domes. In general, small values (0.1 or so) should be used when the support surfaces for all G1 constraints are already close to being tangent to the initial surface, while large values (0.4 to 0.7) should be used when the support surfaces are close to perpendicular (as in the case of the top of a cylinder).

Parameters:
flattening Flattening parameter to set.

void acovr_options::set_guide ( const ENTITY constraining_ent,
double  tolerance 
)

Specifies a guide point (vertex) or guide curve (edge).



Role: Any edge specified must be contained within an ACIS body.

Parameters:
constraining_ent vertex or edge.
tolerance requested G0 tolerance.

void acovr_options::set_guide ( const ENTITY constraining_ent  ) 

Specifies a guide point (vertex) or guide curve (edge).

Uses default G0 tolerance.

Role: Any edge specified must be contained within an ACIS body.

Parameters:
constraining_ent vertex or edge.

void acovr_options::set_guides ( const ENTITY_LIST constraining_ents,
double  tolerance 
)

Specifies a list of guide points (vertices) or guide curves (edges).



Role: Any edge specified must be contained within an ACIS body.

Parameters:
constraining_ents Guide entities (edges or vertices).
tolerance requested G0 tolerance.

void acovr_options::set_guides ( const ENTITY_LIST constraining_ents  ) 

Specifies a list of guide points (vertices) or guide curves (edges).

Uses default G0 tolerance.

Role: Any edge specified must be contained within an ACIS body.

Parameters:
constraining_ents Guide entities (edges or vertices).

void acovr_options::set_initial_face ( const FACE face  ) 

Chooses an initial spline surface.



Role: The initial surface will be obtained by copying the geometry of the face argument. The initial face can be unset by calling this routine with a face parameter of NULL. Note that the plane_normal parameter is ignored if an initial_face is set.

Parameters:
face Face whose geometry specifies initial surface.

void acovr_options::set_max_spans ( int  max_spans  ) 

Sets the maximum number of spans in the covering surface.



Role: This is an integer and controls the maximum number of B-spline spans in each direction that the covering surface can have. Small values result in surfaces with few degrees of freedom that may have large gaps, while large values may result in surfaces with many control points, which adversely affects performance.

Parameters:
max_spans Maximum number of spans.

void acovr_options::set_plane_normal ( const SPAunit_vector dir  ) 

Defines the initial projection plane.



Role: Since the boundary circuit will be projected into this plane, only a normal vector is needed; the absolute position of the plane is irrelevant. Advanced Covering automatically calculates a default initial plane from the shape of the boundary circuit; the plane_normal parameter should be set if this default plane is unsatisfactory. Usually this will occur because the default algorithm picks a plane that would result in a double-valued covering surface (not allowed) or because the model containing the boundary circuit has a symmetry that is not obeyed by the boundary circuit (G1 covers only). For example, consider performing a G1 cover of a cylinder that has been sliced by a plane whose normal was not perpendicular to the axis of the cylinder. Advanced Covering tries to satisfy G1 constraints by pushing the covering surface up in the normal direction of the initial surface. The default plane for the sliced cylinder will have the same normal as the slicing plane; the G1 constraints in this case will cause the covering surface to bulge away from the axis of the cylinder. A much more natural shape is found when the normal vector is set to coincide with the axis; in this case the bulge is along the axis, with a very smooth transition between surfaces. Note that the plane_normal parameter will be ignored if an initial spline surface has been specified with set_initial_face.

Parameters:
dir normal vector for initial plane.