Classes | |
| class | edge_tolstitch_options |
| Specifies that api_stitch should use restricted tolerant stitching. More... | |
| class | exact_stitch_options |
| Specifies that api_stitch should use exact stitching. More... | |
| class | stitch_options |
Abstract base class from which specific stitch options classes, such as exact_stitch_options, tolerant_stitch_options and edge_tolstitch_options, are derived. More... | |
| class | stitch_progress_info |
| Abstract base class for providing stitch progress information. More... | |
| class | tedge_repair_options |
| Specifies the options for api_check_and_fix_tedge. More... | |
| class | tolerant_stitch_options |
| Specifies that api_stitch and api_stitch_nonmanifold should use tolerant stitching. More... | |
Typedefs | |
| typedef int(* | proc_stitch_progress_callback )(stitch_progress_info *) |
| Function pointer to implement stitch progress meter. | |
Enumerations | |
| enum | STITCH_COIN_MODES |
| Specifies how a stitching operation handles coincident faces. More... | |
| enum | STITCH_TYPE |
| Specifies the type of stitching to be performed by the stitching operation. More... | |
Functions | |
| outcome | api_check_and_fix_tedge (TEDGE *tedge, logical &fixed, logical &already_good, tedge_repair_options *tedrepopts=NULL, AcisOptions *aopts=NULL) |
| Attempts to repair level 30 check errors in TEDGEs. | |
| outcome | api_initialize_stitching () |
| Initializes the Stitch Component library. | |
| outcome | api_stitch (const ENTITY_LIST &to_be_stitched, ENTITY_LIST &output_bodies, ENTITY_LIST &new_bodies, stitch_options *sopts, AcisOptions *aopts=NULL) |
| Stitches together the given entities. | |
| outcome | api_stitch_nonmanifold (const ENTITY_LIST &parting_faces, const ENTITY_LIST &primary_bodies, ENTITY_LIST &output_bodies, ENTITY_LIST &new_bodies, tolerant_stitch_options *sopts, AcisOptions *aopts=NULL) |
| Performs tolerant, non-manifold stitching between parting faces and part bodies. | |
| outcome | api_terminate_stitching () |
| Terminates the Stitch Component library. | |
| proc_stitch_progress_callback | get_stitch_progress_callback () |
| Function for getting the stitch progress callback pointer. | |
| void | set_stitch_progress_callback (proc_stitch_progress_callback callback_func_ptr) |
| Function for setting the stitch progress callback pointer. | |
| typedef int(* proc_stitch_progress_callback)(stitch_progress_info *) |
Function pointer to implement stitch progress meter.
| enum STITCH_COIN_MODES |
Specifies how a stitching operation handles coincident faces.
| SPASTITCH_COIN_ERROR | Throw an error if coincident faces are found. | |
| SPASTITCH_COIN_STITCH | Stitch pairs of coincident faces. | |
| SPASTITCH_COIN_SKIP | Do not stitch pairs of coincident faces. |
include <stchapi.hxx>
| enum STITCH_TYPE |
Specifies the type of stitching to be performed by the stitching operation.
| TOLERANT_STITCH_TYPE | Perform tolerant stitching. | |
| EXACT_STITCH_TYPE | Perform exact stitching. | |
| EDGE_TOLERANT_STITCH_TYPE | Perform tolerant stitching on a user-specified list of edges. |
include <stchapi.hxx>
| outcome api_check_and_fix_tedge | ( | TEDGE * | tedge, | |
| logical & | fixed, | |||
| logical & | already_good, | |||
| tedge_repair_options * | tedrepopts = NULL, |
|||
| AcisOptions * | aopts = NULL | |||
| ) |
Attempts to repair level 30 check errors in TEDGEs.
Role: api_check_and_fix_tedge attempts to fix level 30 check errors in TEDGEs but does not guarantee that these errors will be fixed. The repairing operation will be limited to modifying the ingredients of the TEDGE, its TCOEDGEs and its TVERTEXes. After the repairing operation, if the API detects one or more level 30 check errors in the modified TEDGE, then the API will reinstate the original state of the TEDGE, its TCOEDGEs and its TVERTEXes.
Presently, the API has the capability to fix the following types of errors.
1. TCOEDGE and TEDGE geometry appear to be incompatible. TOL_GEOM_INCOMPATIBLE 2. Geometry at start of TCOEDGE and TEDGE appear inconsistent. START_INCONS_TOL_GEOM 3. Geometry at end of TCOEDGE and TEDGE appear inconsistent. END_INCONS_TOL_GEOM
The first argument tedge is the pointer to the TEDGE that is to be repaired.
The second argument fixed is a logical (by reference). The API puts TRUE in this logical if the resultant TEDGE has no check errors at level 30 (this could be TRUE either because the incoming TEDGE was already good at level 30 or because the API successfully repaired the TEDGE). The API puts FALSE in this logical if the API could not repair the level 30 check error in the TEDGE.
The third argument already_good is a logical (by reference). The API puts TRUE in this logical if the incoming TEDGE was already good at level 30.
The fourth argument takes a pointer to an object of class tedge_repair_options. At the moment, this is a blank class that has been defined and added from the futuristic point of view in order to make it easier to introduce options that can be passed to the API.
The fifth argument is a pointer to an AcisOptions class object. This has a default value of NULL.
Journal: Available
| tedge | TEDGE to repair | |
| fixed | logical to denote if tedge was repaired. | |
| already_good | logical to denote TEDGE already good at level 30. | |
| tedrepopts | configuration information | |
| aopts | ACIS options |
include <tedrepapi.hxx>
| outcome api_initialize_stitching | ( | ) |
Initializes the Stitch Component library.
Effect: System routine
Journal: Not Available
include <stchapi.hxx>
| outcome api_stitch | ( | const ENTITY_LIST & | to_be_stitched, | |
| ENTITY_LIST & | output_bodies, | |||
| ENTITY_LIST & | new_bodies, | |||
| stitch_options * | sopts, | |||
| AcisOptions * | aopts = NULL | |||
| ) |
Stitches together the given entities.
Role: api_stitch stitches together the given entities based on the mode specified by the stitch_options object given as input.
The three modes are:
EXACT_STITCH TOLERANT_STITCH EDGE_TOLERANT_STITCH AcisOptions object as input. outcome object that contains information of errors and problems encountered while stitching. exact_stitch_options object needs to be passed using the stitch_options argument for the API to operate in this mode.BODYs SPAresabs. tolerant_stitch_options object needs to be passed using the stitch_options argument for API to operate in this mode.BODYs FACEs . FACE is a FACE that is a top-level entity and has no owner. Note that free FACEs are not legal in ACIS, but this API still accepts them. However, we recommend that this API be passed only BODYs.tolerant_stitch_options object. DOUBLE_SIDED faces for an output sheet body and SINGLE_SIDED faces for an output solid body. tolerant_stitch_options object. The Coincident Face Detection section elaborates the various coincident face detection modes. edge_tolstitch_options object needs to be is passed using the stitch_options argument for API to operate in this mode.EDGEs EDGEs appearing in the list are chosen as candidates for stitching.EDGEs. A free EDGE is an edge that is associated with only one FACE and hence, has only one COEDGE. Furthermore, the top-level owner of each given free EDGE should either be a free FACE or should be a BODY.EDGEs that are associated with one or more FACE(s) . tolerant_stitch mode.TOLERANT_STITCH and EDGE_TOLERANT_STITCH mode, you can specify the maximum stitch tolerance value by setting the max_stitch_tol parameter in the corresponding stitch_options object. For details of how to set this parameter, refer to documentation for tolerant_stitch_options. SPAresabs. SPAresabs. The API will fail with an error INVALID_STITCH_MAX_TOL and the state of the model will roll back to its initial state. TOLERANT_STITCH and EDGE_TOLERANT_STITCH mode, this API internally uses heuristics to set up the necessary internally used stitch tolerances. For more details refer to the Stitching Tolerances portion of the Healing Tolerances documentation. tolerant_stitch_options or edge_tolstitch_options object passed to this API. The API is not guaranteed to detect all coincident faces. It detects coincident faces only if it encounters them in the process of stitching. The coincident faces are recorded and returned as coincident face clusters.SPASTITCH_COIN_SKIP mode: Under this option, if api_stitch comes across a pair of coincident faces, SPASTITCH_COIN_STITCH mode: Under this option SPASTITCH_COIN_ERROR mode: Under this option outcome as a "nearly coincident faces" problem encountered by this API. For more details, refer to the section Coincident Faces Detection. SPASTITCH_COIN_SKIP, SPASTITCH_COIN_STITCH, and SPASTITCH_COIN_ERROR modes interact with careful global option, refer to the section Failsafe Behavior of this API. INVALID_STITCH_MAX_TOL COINCIDENT_FACES (in SPASTITCH_COIN_ERROR mode) INPUT_NOT_AN_EDGE EDGE_ALREADY_STITCHED EDGE_HAS_NO_FACE NOTHING_TO_STITCH FACE_WITH_OWNER UNACCEPTABLE_ENTITY IMPROPER_STITCH_OPTION EDGE_HAS_FACE_WITH_NO_BODY TRUE onto the global option careful before calling api_stitch (and popping it after the call). When the failsafe behavior is switched off, this API will fail and roll back to its initial state when the first error is encountered. careful option is set to TRUE.careful is TRUE, this API will behave as given: SPASTITCH_COIN_ERROR mode - This API will roll and exit immediately. SPASTITCH_COIN_SKIP and SPASTITCH_COIN_STITCH modes - It will record the coincident face information and continue stitching and roll the model back to its initial state before exiting. This API keeps the model unstitched, but provides the coincident face information.
careful option is set to FALSE, this API will behave as given: SPASTITCH_COIN_ERROR mode - This API will roll the model back to its initial state. FALSE, then this API has fully succeeded; that is, errors were not encountered. TRUE, and outcome::ok() returns TRUE, then this API has encountered error(s), yet it proceeded further successfully. In this case, the bodies in the output_bodies list are not guaranteed to be usable for further modelling operations. FALSE, then this API has failed and rolled the model back to the state before this API was called. outcome returned. For more details, refer to the documentation of outcome and the section Failsafe Behavior. This API reports following errors and problems: EDGE SPAresabs EDGE is neither a FACE nor a BODY EXACT_STITCH mode, this API will operate only on BODYs. TOLERANT_STITCH mode, this API will operate only on BODYs or free FACEs. A free FACE is a FACE that is a top-level entity and has no owner. Note that free FACEs are not legal in ACIS, but this API still accepts them. It is recommended, however, that this API be passed only BODYs. EDGE_TOLERANT_STITCH mode, this API will operate only on free EDGEs. A free EDGE is an edge that is associated with only one FACE and hence has only one COEDGE. Further the top level owner of each given free or solid EDGE should either be a free FACE or should be a BODY. FACEs to be stitched are intended to become multiple partially or fully overlapping BODYs (for example, connected parts in an assembly), the FACEs for each BODY should be separately sent to this API. If all the FACEs are passed together to this API, then the behavior of API is unpredictable. This holds true for all modes of stitching. | to_be_stitched | This is an input argument.
| |
| output_bodies | This is an output argument. The output from this API is only bodies, which will be returned in output_bodies. This is the complete set of bodies that belong to the user. In TOLERANT_STITCH mode and EDGE_TOLERANT_STITCH mode, if free FACEs are passed into the API, then the API will wrap these free FACEs in new BODYs, which will also be returned in the output_bodies list. Note that any new BODYs created by the API will also be returned back in the new_bodies list. | |
| new_bodies | This is an output argument. new_bodies will contain all the new bodies resulting from the API. This list will be a subset of output_bodies. This list is provided so that it is convenient to the user to find out the new bodies that the user will have to take ownership of (for example, the users may have to register new bodies in their application and/or do memory management for those). | |
| sopts | This is an input argument. sopts encapsulates optional user parameters that govern the behavior of api_stitch. sopts must be a pointer to a valid object of either of class exact_stitch_options, or class tolerant_stitch_options or class edge_tolstitch_options. The object defines the mode of api_stitch.
There are different options available in each of these sub-classes of class stitch_options, for the different modes ofstitching. This argument sopts cannot be passed in as a NULL pointer. Further class tolerant_stitch_options or class edge_tolstitch_options also support methods to query coincident-faces related information, if needed, after the API completes. | |
| aopts | ACIS options. |
include <stchapi.hxx>
| outcome api_stitch_nonmanifold | ( | const ENTITY_LIST & | parting_faces, | |
| const ENTITY_LIST & | primary_bodies, | |||
| ENTITY_LIST & | output_bodies, | |||
| ENTITY_LIST & | new_bodies, | |||
| tolerant_stitch_options * | sopts, | |||
| AcisOptions * | aopts = NULL | |||
| ) |
Performs tolerant, non-manifold stitching between parting faces and part bodies.
This API specifically supports mold and die design processes.
Role: This API performs non-manifold stitching between parting faces and primary bodies.
parting_faces list and primary bodies in the primary_bodies list. You can pass free FACEs or sheet BODYs (containing one or more faces) as parting faces, although it is recommended that they be passed as sheet BODYs (even if they contain single faces), because free FACEs are not legal in ACIS. api_stitch_nonmanifold. The parting_faces list cannot be empty. If you supply an empty parting_faces list, then the API reports back the error "Parting face list is empty". However, the primary_bodies list may be empty, in which case the API proceeds to stitch only the parting faces. tolerant_stitch_options object. For details on how to set this parameter, refer to the tolerant_stitch_options documentation. SPAresabs. If you set the maximum stitch tolerance to a value less than SPAresabs, then the API will fail with an error INVALID_STITCH_MAX_TOL and the state of the model will roll back to its initial state. The only way to specify the max_stitch_tol parameter to the API is through tolerant_stitch_options. If you do not set any value in max_stitch_tol, then the API uses heuristics to choose a max_stitch_tol by itself. However, this choice may not be suitable to the entities being stitched. The API may remove small (sliver) edges smaller than the max_stitch_tol parameter. Hence you are strongly recommended to set the max_stitch_tol parameter to be smaller than the minimum feature size and greater than the maximum gap to be stitched in the model. Note that if maximum gap is greater than the minimum feature size in the model, this API might face problems during stitching. Refer to the topic Stitching in the Technical Articles for details on the internal tolerances used by the stitching algorithm. api_stitch_nonmanifold is not guaranteed to detect all coincident faces. It detects coincident faces only if it encounters them in the process of stitching.The detection and processing of the coincident faces by this API depends upon the mode set in tolerant_stitch_options object passed to this API. The behavior under different modes is as mentioned below: SPASTITCH_COIN_SKIP mode: Under this option, while attempting to stitch a pair of faces along an edge, if api_stitch_nonmanifold comes across a pair of coincident faces, it will not stitch the two faces together along the edge, and stitching continues. The coincident face pair is recorded internally, and this API throws a warning of COINCIDENT_FACE. This API optionally returns a list of one or more face-clusters, each of which contains a set of coincident faces detected during stitching. For example, if face A is coincident with face B, and face A is coincident with face C, then faces A, B, C form one cluster. The exact methods to obtain the clusters of coincident faces can be found in the description of tolerant_stitch_options class. SPASTITCH_COIN_STITCH mode: Under this option, while attempting to stitch a pair of faces along an edge, if api_stitch_nonmanifold comes across a pair of coincident faces, it will stitch the two faces together along the edge, and stitching continues. The coincident face pair is recorded internally, and this API throws a warning of COINCIDENT_FACE. This API optionally returns a list of one or more face-clusters, each of which contains a set of coincident faces detected during stitching. For example, if face A is coincident with face B, and face A coincident with face C, then faces A, B, C form one cluster. The exact methods to obtain the clusters of coincident faces can be found in the description of the tolerant_stitch_options class. Because this produces back-to-back stitched faces, it is likely downstream ACIS operations will fail; therefore, this mode is strongly discouraged. SPASTITCH_COIN_ERROR mode: Under this option, while attempting to stitch a pair of faces along an edge, if api_stitch_nonmanifold comes across a pair of coincident faces, it will immediately return with the error COINCIDENT_FACE. The state of the model is rolled back to the unstitched state. outcome as a "nearly coincident faces" problem encountered by this API. For more details, refer to the topic Coincident Face Detection in the Tolerant Stitching Technical Article. SPASTITCH_COIN_SKIP, SPASTITCH_COIN_STITCH and SPASTITCH_COIN_ERROR modes interact with the careful global option, refer to the section Failsafe Behavior below. SINGLE_SIDED. The faces of the incoming sheet bodies are marked DOUBLE_SIDED with containment as BOTH_OUTSIDE. Refer to the section Limitations below. INVALID_STITCH_MAX_TOL COINCIDENT_FACES (in SPASTITCH_COIN_ERROR mode) INPUT_NOT_AN_EDGE NOTHING_TO_STITCH FACE_WITH_OWNER UNACCEPTABLE_ENTITY IMPROPER_STITCH_OPTION PARTING_FACE_LIST_EMPTY TRUE onto the global option careful before calling api_stitch_nonmanifold (and popping it after the call). When the failsafe behavior is switched off, this API fails and rolls back to its initial state when the first error is encountered. careful option is set to TRUE.careful is TRUE, this API behaves as given: SPASTITCH_COIN_ERROR mode - This API rolls and exits immediately. SPASTITCH_COIN_SKIP and SPASTITCH_COIN_STITCH modes - The API records the coincident face information, continues stitching, and rolls the model back to its initial state before exiting. This API keeps the model unstitched, but provides the coincident face information.
careful option is set to FALSE, this API behaves as given: SPASTITCH_COIN_ERROR mode - This API rolls the model back to its initial state. api_stitch and Problem Reporting FALSE, then this API has fully succeeded; that is, errors were not encountered. TRUE, and outcome::ok() returns TRUE, this means that this API has encountered error(s), yet it proceeded further successfully. In this case, the bodies in the output_bodies list are not guaranteed to be usable for further modelling operations. FALSE, this API has failed and rolled the model back to the state before this API was called. SPAresabs EDGE is neither a FACE nor a BODY DOUBLE_SIDED with containment as BOTH_OUTSIDE, even if a portion of the non-manifold body encloses finite volume. However, if the user provides one or more solid bodies (with or without sheet bodies) in the primary bodies list to be stitched with parting faces list, then all the faces of the incoming solid bodies will be marked SINGLE_SIDED. The faces of the incoming sheet bodies will be marked DOUBLE_SIDED with containment as BOTH_OUTSIDE. DOUBLE_SIDED face as BOTH_INSIDE. If you intend to stitch a model to make an internal partition embedded in a solid, then although this API will stitch the faces, it will not get the containment correct. So such a stitched model will report check errors. In order to correct such a model, manually set the containment of the internal partition faces to BOTH_INSIDE. Refer to the topic Non-manifold Stitching in the Tolerant Stitching Technical Article for an illustration. | parting_faces | This is an input argument. parting faces should contain only pointers to BODYs or free FACEs. A free FACE is a FACE that is a top-level entity and has no owner. Note that free FACEs are not legal in ACIS, but the API still accepts them. We recommend, however, that the API be passed only BODYs. Refer to the topic Non-manifold Stitching for an illustration of primary body and parting faces. | |
| primary_bodies | This is an input argument. primary_bodies should contain only pointers to BODYs or free FACEs. Refer to the topic Non-manifold Stitching in the Tolerant Stitching Technical Article for an illustration of primary body and parting faces. | |
| output_bodies | This is an output argument. The output from this API is only bodies, which will be returned in output_bodies. This is the complete set of bodies that belongs to the user. Note that any new BODYs created by the API will also be returned in the new_bodies list. | |
| new_bodies | This is an output argument. new_bodies will contain all the new bodies resulting from the API. This list will be a subset of output_bodies. This convenient list allows you to find new bodies of which you may have to take ownership (for example, you may have to register new bodies in your application and/or do memory management for them). | |
| sopts | This is an input argument. sopts encapsulates optional user parameters that govern the behavior of api_stitch_nonmanifold. sopts must be a pointer to a valid object of class tolerant_stitch_options. Further class tolerant_stitch_options also support methods to query coincident-faces related information, if needed, after the API completes. | |
| aopts | ACIS options. |
include <stchapi.hxx>
| outcome api_terminate_stitching | ( | ) |
Terminates the Stitch Component library.
Effect: System routine
Journal: Not Available
include <stchapi.hxx>
| proc_stitch_progress_callback get_stitch_progress_callback | ( | ) |
Function for getting the stitch progress callback pointer.
Role: The stitch progress callback function pointer can be obtained by get_stitch_progress_callback.
include <stitch_progress_info.hxx>
| void set_stitch_progress_callback | ( | proc_stitch_progress_callback | callback_func_ptr | ) |
Function for setting the stitch progress callback pointer.
Role: The callback mechanism is enabled by installing a custom callback function with the set_stitch_progress_callback function. The set_stitch_progress_callback function accepts one argument, which is the custom callback function.
| callback_func_ptr | custom callback function pointer. |
include <stitch_progress_info.hxx>