Home

simplify_options Class Reference
[Healing Models]

This class contains parameters that govern the behavior of api_simplify_entity. More...

#include <entity_simplify.hxx>

Inheritance diagram for simplify_options:

Inheritance graph
[legend]
Collaboration diagram for simplify_options:

Collaboration graph
[legend]

List of all members.

Public Member Functions

int do_approximate () const
 Returns the value of the do_approximate parameter.
int do_curve_simplification () const
 Returns the value of the do_curve_simplification parameter.
logical do_elliptical_cone_simplification () const
 Returns the value of the do_elliptical_cone_simplification parameter.
logical do_elliptical_cylinder_simplification () const
 Returns the value of the do_elliptical_cylinder_simplification parameter.
int do_force_simplification () const
 Returns the value of the do_force_simplification parameter.
logical do_limit_surfs_to_faces () const
 Returns TRUE if face simplification will limit consideration of the surface to the face's parameter range.
int do_surface_simplification () const
 Returns the value of the do_surface_simplification parameter.
double max_radius () const
 Returns the value of the max_radius parameter.
void set_do_approximate (int val)
 Sets the value of the do_approximate parameter to ON or OFF.
void set_do_curve_simplification (int val)
 Sets the value of the do_curve_simplification parameter to ON or OFF.
void set_do_elliptical_cone_simplification (logical allow_elliptical_cone)
 Sets the value of the do_elliptical_cone_simplification parameter to ON or OFF.
void set_do_elliptical_cylinder_simplification (logical allow_elliptical_cylinder)
 Sets the value of the do_elliptical_cylinder_simplification parameter to ON or OFF.
void set_do_force_simplification (int val)
 Sets the value of the do_force_simplification parameter to ON or OFF.
void set_do_limit_surfs_to_faces (int val)
 Sets the value switching whether face simplification limits consideration of the surface to the face's parameter range.
void set_do_surface_simplification (int val)
 Sets the value of the do_surface_simplification parameter to ON or OFF.
void set_max_radius (double radius)
 Sets the value of the max_radius parameter.
void set_simplification_tol (double tol)
 Sets the value of the simplification_tol parameter.
double simplification_tol () const
 Returns the value of the simplification_tol parameter.
 simplify_options ()
 C++ initialize constructor requests memory for this object and initializes the values of all the parameters as -1.


Detailed Description

This class contains parameters that govern the behavior of api_simplify_entity.


Role: The following table lists parameters available in the simplify_options class. The constructor of simplify_options initializes all the parameters to their default value. Refer to api_simplify_entity documentation for the parameter default values. You can use the set functions mentioned below to change any of the parameters and the get functions to obtain the current value of the parameter set into a simplify_options object. The acceptable value for each parameter is indicated in the following table:

Parameters GET routines SET routines Acceptable values Default values Description
simplification_tol simplification_tol() set_simplification_tol(double) -1 (default),
any positive value.
SPAresabs api_simplify_entity replaces the spline geometry by analytic geometry only if possible within this user-specified tolerance.
max_radius max_radius() set_max_radius(double) -1 (default),
any positive value.
SPAresabs/SPAresnor api_simplify_entity will not make any analytic geometry whose radius is greater than the value of this parameter.
do_curve_simplification do_curve_simplification() set_do_curve_simplification(int) -1 (default),
0 (OFF),
1 (ON).
1 (ON) curve simplification is attempted only if this parameter is ON.
do_surface_simplification do_surface_simplification() set_do_surface_simplification(int) -1 (default),
0 (OFF),
1 (ON).
1 (ON) surface simplification is attempted only if this parameter is ON.
do_elliptical_cylinder_simplification do_elliptical_cylinder_simplification() set_do_elliptical_cylinder_simplification(logical) -1 (default),
0 (OFF),
1 (ON).
1 (ON) elliptical cylinder simplification is attempted only if this parameter is ON. Note that this option has an effect only if do_surface_simplification is ON.
do_elliptical_cone_simplification do_elliptical_cone_simplification() set_do_elliptical_cone_simplification(logical) -1 (default),
0 (OFF),
1 (ON).
1 (ON) elliptical cone simplification is attempted only if this parameter is ON. Note that this option has an effect only if do_surface_simplification is ON.
do_approximate do_approximate() set_do_approximate(int) -1 (default),
0 (OFF),
1 (ON).
0 (OFF) option to replace the existing procedural geometry by its approximate B-Spline geometry, in case simplification with analytic geometry is not possible within the user-specified tolerance.
do_force_simplification do_force_simplification() set_do_force_simplification(int) -1 (default),
0 (OFF),
1 (ON).
0 (OFF) If this parameter is ON, then api_simplify_entity will simplify a surface or curve (if possible within the user-specified tolerance) even if simplification would result in invalidities in the entity.

A sample snippet code to illustrate the usage is given below:

 simplify_options simp_opts;
 simp_opts.set_do_curve_simplification(0); // Switch OFF curve simplification
 outcome result = api_simplify_entity (body, &simp_opts);
 

See also:
api_simplify_entity

Constructor & Destructor Documentation

simplify_options::simplify_options (  ) 

C++ initialize constructor requests memory for this object and initializes the values of all the parameters as -1.



Role: The constructor initializes the values of all the parameters as -1. A "-1" value of a parameter instructs api_simplify_entity to use the default value of the particular parameter.


Member Function Documentation

int simplify_options::do_approximate (  )  const

Returns the value of the do_approximate parameter.

int simplify_options::do_curve_simplification (  )  const

Returns the value of the do_curve_simplification parameter.

logical simplify_options::do_elliptical_cone_simplification (  )  const

Returns the value of the do_elliptical_cone_simplification parameter.

logical simplify_options::do_elliptical_cylinder_simplification (  )  const

Returns the value of the do_elliptical_cylinder_simplification parameter.

int simplify_options::do_force_simplification (  )  const

Returns the value of the do_force_simplification parameter.

logical simplify_options::do_limit_surfs_to_faces (  )  const

Returns TRUE if face simplification will limit consideration of the surface to the face's parameter range.

int simplify_options::do_surface_simplification (  )  const

Returns the value of the do_surface_simplification parameter.

double simplify_options::max_radius (  )  const

Returns the value of the max_radius parameter.

void simplify_options::set_do_approximate ( int  val  ) 

Sets the value of the do_approximate parameter to ON or OFF.



Parameters:
val Takes values -1 (default), 0 (OFF), 1 (ON).

void simplify_options::set_do_curve_simplification ( int  val  ) 

Sets the value of the do_curve_simplification parameter to ON or OFF.



Parameters:
val Takes values -1 (default), 0 (OFF), 1 (ON).

void simplify_options::set_do_elliptical_cone_simplification ( logical  allow_elliptical_cone  ) 

Sets the value of the do_elliptical_cone_simplification parameter to ON or OFF.



Parameters:
val Takes values -1 (default), 0 (OFF), 1 (ON).

void simplify_options::set_do_elliptical_cylinder_simplification ( logical  allow_elliptical_cylinder  ) 

Sets the value of the do_elliptical_cylinder_simplification parameter to ON or OFF.



Parameters:
val Takes values -1 (default), 0 (OFF), 1 (ON).

void simplify_options::set_do_force_simplification ( int  val  ) 

Sets the value of the do_force_simplification parameter to ON or OFF.



Parameters:
val Takes values -1 (default), 0 (OFF), 1 (ON).

void simplify_options::set_do_limit_surfs_to_faces ( int  val  ) 

Sets the value switching whether face simplification limits consideration of the surface to the face's parameter range.



Parameters:
val Takes values -1 (use default setting), 0 (OFF), 1 (ON).

void simplify_options::set_do_surface_simplification ( int  val  ) 

Sets the value of the do_surface_simplification parameter to ON or OFF.



Parameters:
val Takes values -1 (default), 0 (OFF), 1 (ON).

void simplify_options::set_max_radius ( double  radius  ) 

Sets the value of the max_radius parameter.



Parameters:
radius Maximum curve radius.

void simplify_options::set_simplification_tol ( double  tol  ) 

Sets the value of the simplification_tol parameter.



Parameters:
tol simplification tolerance.

double simplify_options::simplification_tol (  )  const

Returns the value of the simplification_tol parameter.