Home

tolerant_stitch_options Class Reference
[Stitching Models]

Specifies that api_stitch and api_stitch_nonmanifold should use tolerant stitching. More...

#include <stchapi.hxx>

Inheritance diagram for tolerant_stitch_options:

Inheritance graph
[legend]
Collaboration diagram for tolerant_stitch_options:

Collaboration graph
[legend]

List of all members.

Public Types

enum  NM_PROCESSING_MODE
 Specifies mode of non-manifold stitching. More...

Public Member Functions

logical get_allow_void_shells () const
 Returns the current value of the allow_void_shells option.
void get_coincident_face_partners (FACE const *face, ENTITY_LIST &partner_faces) const
 Fills the given ENTITY_LIST with all faces identified as coincident with the given face by api_stitch and api_stitch_nonmanifold under either SPASTITCH_COIN_SKIP mode or SPASTITCH_COIN_STITCH mode.
void get_coincident_faces (ENTITY_LIST &partner_faces) const
 Fills the given ENTITY_LIST with all faces identified as coincident by api_stitch and api_stitch_nonmanifold under either SPASTITCH_COIN_SKIP mode or SPASTITCH_COIN_STITCH mode.
virtual double get_max_stitch_tol () const
 Returns the value of the maximum stitch tolerance parameter set by set_max_stitch_tol().
ENTITY_LISTget_next_coincident_face_cluster () const
 Returns the next coincident face cluster.
ENTITY_LISTget_next_nonmanifold_edge_cluster () const
 Returns the next non-manifold edge cluster.
int get_number_of_coincident_face_clusters () const
 Returns the number of coincident face clusters that were identified during stitching.
int get_number_of_nonmanifold_edge_clusters () const
 Returns the number of non-manifold edge clusters that were identified during stitching.
STITCH_COIN_MODES get_stch_coincident_face_handling_mode () const
 Returns the mode under which api_stitch and api_stitch_nonmanifold will operate for identifying coincident face clusters.
void init_coincident_face_cluster_list () const
 Initializes the coincident face cluster list.
void init_nonmanifold_edge_cluster_list () const
 Initializes the non-manifold edge cluster list.
void set_allow_void_shells (logical choice)
 Accepts either TRUE or FALSE to indicate to api_stitch and api_stitch_nonmanifold whether or not to allow void shells in the output.
virtual void set_max_stitch_tol (double tol)
 Allows you to override internal algorithm which determines the maximum stitch tolerance parameter.
void set_nonmanifold_processing_mode (NM_PROCESSING_MODE mode)
 Sets the enum NM_PROCESSING_MODE to NM_IGNORE, NM_STITCH, or NM_DETECT for non-manifold processing in tolerant stitching.
void set_stch_coincident_face_handling_mode (STITCH_COIN_MODES mode)
 Sets the enum STITCH_COIN_MODES to SPASTITCH_COIN_ERROR, SPASTITCH_COIN_STITCH, or SPASTITCH_COIN_SKIP for doing coincident face clustering in tolerant stitch.
 tolerant_stitch_options ()
 Default constructor for memory allocation and initialization of the class object.
virtual ~tolerant_stitch_options ()
 Destructor to release the allocated memory when the object goes out of scope.


Detailed Description

Specifies that api_stitch and api_stitch_nonmanifold should use tolerant stitching.


Role: An object of type tolerant_stitch_options is passed as an argument to api_stitch and api_stitch_nonmanifold to specify stitching of faces with edges where edges have gaps greater than the ACIS tolerance SPAresabs.

Conversely, an object of type exact_stitch_options allows stitching of faces with edges that are strictly within SPAresabs.

The class edge_tolstitch_options has been derived from the tolerant_stitch_options class.

See also:
stitch_options

Member Enumeration Documentation

Specifies mode of non-manifold stitching.

Parameters:
NM_IGNORE Do not attempt non-manifold stitching.
NM_DETECT Detect edges that will result into non-manifold edges when stitched later.
NM_STITCH Attempt non-manifold stitching.


Constructor & Destructor Documentation

tolerant_stitch_options::tolerant_stitch_options (  ) 

Default constructor for memory allocation and initialization of the class object.

virtual tolerant_stitch_options::~tolerant_stitch_options (  )  [virtual]

Destructor to release the allocated memory when the object goes out of scope.


Member Function Documentation

logical tolerant_stitch_options::get_allow_void_shells (  )  const

Returns the current value of the allow_void_shells option.



Role: If FALSE is returned, api_stitch and api_stitch_nonmanifold will not output any void shells. All shells in the output will be peripheral shells. If TRUE is returned, these functions are allowed to make void shells if they find one shell inside of another.

The default value of allow_void_shells is TRUE.

void tolerant_stitch_options::get_coincident_face_partners ( FACE const *  face,
ENTITY_LIST partner_faces 
) const

Fills the given ENTITY_LIST with all faces identified as coincident with the given face by api_stitch and api_stitch_nonmanifold under either SPASTITCH_COIN_SKIP mode or SPASTITCH_COIN_STITCH mode.

void tolerant_stitch_options::get_coincident_faces ( ENTITY_LIST partner_faces  )  const

Fills the given ENTITY_LIST with all faces identified as coincident by api_stitch and api_stitch_nonmanifold under either SPASTITCH_COIN_SKIP mode or SPASTITCH_COIN_STITCH mode.

virtual double tolerant_stitch_options::get_max_stitch_tol (  )  const [virtual]

Returns the value of the maximum stitch tolerance parameter set by set_max_stitch_tol().



Role: A negative value means that a maximum stitch tolerance has not been set and that api_stitch and api_stitch_nonmanifold will use its internal algorithm for determining the maximum stitch tolerance. Pairs of edges with gaps greater than the maximum stitch tolerance value will not be stitched by the API.

The default value for the maximum stitch tolerance is -1.

Reimplemented in edge_tolstitch_options.

ENTITY_LIST* tolerant_stitch_options::get_next_coincident_face_cluster (  )  const

Returns the next coincident face cluster.



Role: Use this function for obtaining the next cluster in the internal coincident face clusters list. The first call to this method should be preceded by a call to init_coincident_face_cluster_list(). Each successive call to this method will then return a unique cluster from an internal stored list of coincident face clusters. The method returns NULL when no more clusters remain to be returned. You should not delete the ENTITY_LIST returned by this method because it points to memory owned by the tolerant_stitch_options object.

ENTITY_LIST* tolerant_stitch_options::get_next_nonmanifold_edge_cluster (  )  const

Returns the next non-manifold edge cluster.



Role: Use this function for obtaining the next cluster in the internal non-manifold edge clusters list. The first call to this method should be preceded by a call to init_nonmanifold_edge_cluster_list(). Each successive call to this method will then return a unique cluster from an internal stored list of non-manifold edge clusters. The method returns NULL when no more clusters remain to be returned. You should not delete the ENTITY_LIST returned by this method because it points to memory owned by the tolerant_stitch_options object.

int tolerant_stitch_options::get_number_of_coincident_face_clusters (  )  const

Returns the number of coincident face clusters that were identified during stitching.



Role: If api_stitch and api_stitch_nonmanifold could not identify any coincident clusters, this method returns 0. For coincident face clusters to be identified during stitching, user needs to set the coincident face detection mode to either SPASTITCH_COIN_SKIP or SPASTITCH_COIN_STITCH by using the method set_stch_coincident_face_handling_mode(). For more details into the behavior of the API with different modes of coincident faces detection, refer to the documentation of method set_stch_coincident_face_handling_mode().

int tolerant_stitch_options::get_number_of_nonmanifold_edge_clusters (  )  const

Returns the number of non-manifold edge clusters that were identified during stitching.



Role: If api_stitch could not identify any non-manifold edge clusters, this method returns 0. For non-manifold edge clusters clusters to be identified during stitching, user needs to set the non-manifold processing mode to either NM_STITCH or NM_DETECT by using the method set_nonmanifold_processing_mode(). When non-manifold processing mode is NM_STITCH, the edges in the clusters are non-manifold edges. When non-manifold processing mode is NM_DETECT, the edges in each cluster when stitched together in another stitch attempt, will result in a non-manifold edge. For more details into the behavior of the API with different modes of non-manifold processing, refer to the documentation of method set_nonmanifold_processing_mode().

STITCH_COIN_MODES tolerant_stitch_options::get_stch_coincident_face_handling_mode (  )  const

Returns the mode under which api_stitch and api_stitch_nonmanifold will operate for identifying coincident face clusters.



Role: The possible return values of this function are SPASTITCH_COIN_SKIP, SPASTITCH_COIN_ERROR or SPASTITCH_COIN_STITCH.

The return value indicates the mode in which api_stitch and api_stitch_nonmanifold will operate in the event that it detects coincident faces. To change the value of this enum, use function set_stch_coincident_face_handling_mode(). The description of what each of these modes mean is described in detail in the description of the function set_stch_coincident_face_handling_mode().

The default mode in which the API will operate is SPASTITCH_COIN_ERROR. To change this, use function set_stch_coincident_face_handling_mode().

void tolerant_stitch_options::init_coincident_face_cluster_list (  )  const

Initializes the coincident face cluster list.



Role: This function is to be called before beginning to obtain the coincident face clusters one at a time using function get_next_coincident_face_cluster().

void tolerant_stitch_options::init_nonmanifold_edge_cluster_list (  )  const

Initializes the non-manifold edge cluster list.



Role: This function is to be called before beginning to obtain the non-manifold edge clusters one at a time using function get_next_nonmanifold_edge_cluster().

void tolerant_stitch_options::set_allow_void_shells ( logical  choice  ) 

Accepts either TRUE or FALSE to indicate to api_stitch and api_stitch_nonmanifold whether or not to allow void shells in the output.



Role: A value of TRUE indicates that tolerant stitch is allowed to make void shells if it finds one shell inside the other. A value of FALSE indicates that api_stitch and api_stitch_nonmanifold shall not output any void shells. All shells in the output will be peripheral shells.

The default value for allow_void_shells is TRUE.

NOTE: When using an edge_tolstitch_options object, if fix_body_orientation option is set to FALSE, then edge stitching shall ignore the allow_void_shells option. api_stitch will not change the orientation of all shells based on the allow_void_shells option. The orientation of all shells in output shall remain the same to that in the input, irrespective of the allow_void_shells option. Refer to edge_tolstitch_options for help with the fix_body_orientation option.

virtual void tolerant_stitch_options::set_max_stitch_tol ( double  tol  )  [virtual]

Allows you to override internal algorithm which determines the maximum stitch tolerance parameter.



Role: api_stitch and api_stitch_nonmanifold will not stitch pairs of edges with gaps greater than maximum stitch tolerance.
You are recommended to set the max_stitch_tol parameter to be smaller than the minimum feature size and bigger than the maximum gap expected to be stitched in the model. Otherwise the API may remove small (sliver) edges smaller than the max_stitch_tol parameter that should have been kept.

The default value for the maximum stitch tolerance is -1.

Parameters:
tol maximum stitch tolerance value.

Reimplemented in edge_tolstitch_options.

void tolerant_stitch_options::set_nonmanifold_processing_mode ( NM_PROCESSING_MODE  mode  ) 

Sets the enum NM_PROCESSING_MODE to NM_IGNORE, NM_STITCH, or NM_DETECT for non-manifold processing in tolerant stitching.



Role: The behavior of api_stitch depends upon the current non-manifold processing mode.

If the non-manifold processing mode is NM_IGNORE, api_stitch will

  • Perform manifold stitching. The API will stitch not more than two faces at an edge.
  • Not attempt non-manifold stitching at all.
You are recommended to use this setting if you desire only manifold stitching. This is the default mode.

If the mode is NM_DETECT, this API will
  • Perform manifold stitching like in NM_IGNORE mode.
  • Detect potential edges such that when these edges are stitched together in another stitch attempt, they will result in a non-manifold edge.
  • Give out information of the potential non-manifold edges in the form of non-manifold edge clusters.
You are recommended to use this setting if you desire manifold stitching but at the same time wish to know presence of potential non-manifold edge junctions.


If the mode is NM_STITCH, this API will
  • Perform non-manifold stitching. The API will stitch more than two faces at an edge.
  • Give out information of stitched non-manifold edges in the form of non-manifold edge clusters.
You are recommended to use this setting if you desire non-manifold stitching.

The non-manifold edge clusters can be obtained by using methods
 init_nonmanifold_edge_cluster_list();
 get_next_nonmanifold_edge_cluster();
 
Parameters:
mode An enum to set the non-manifold processing mode in tolerant stitching to NM_IGNORE, NM_STITCH, or NM_DETECT.

void tolerant_stitch_options::set_stch_coincident_face_handling_mode ( STITCH_COIN_MODES  mode  ) 

Sets the enum STITCH_COIN_MODES to SPASTITCH_COIN_ERROR, SPASTITCH_COIN_STITCH, or SPASTITCH_COIN_SKIP for doing coincident face clustering in tolerant stitch.



Role: The behavior of api_stitch and api_stitch_nonmanifold depend upon the current mode for handling coincident faces.

If you pass SPASTITCH_COIN_SKIP and if api_stitch and api_stitch_nonmanifold detects coincident faces, it will not stitch the two faces together along the edge, and process of stitching continues. The coincident face pair is recorded internally and this API throws a warning. You are recommended to use this setting. In this case, this API will return coincident face clusters (if found), that can be obtained using methods:

 init_coincident_face_cluster_list();
 get_next_coincident_face_cluster();
 

If you pass SPASTITCH_COIN_ERROR and if this API detects coincident faces, it will just fail with COINCIDENT_FACE error, without returning any coincident face clusters. The state of the model is rolled back to the unstitched state.

If you pass SPASTITCH_COIN_STITCH, then and if this API detects coincident face, then it will stitch the two faces together along the edge and process of stitching continues. The coincident face pair is recorded internally and this API throws a warning. Since this produces back-to-back faces, downstream ACIS operations may fail. Hence, it is recommended that you do not use this option. In the coincident stitching mode, the API will return coincident face clusters (if found), that can be obtained using methods:
 init_coincident_face_cluster_list();
 get_next_coincident_face_cluster();
 


The default mode for handling coincident faces is SPASTITCH_COIN_ERROR.
Parameters:
mode An enum to set the coincident face clustering behavior in tolerant stitching to SPASTITCH_COIN_ERROR, SPASTITCH_COIN_STITCH, or SPASTITCH_COIN_SKIP.