Component:Defeature

From DocR22

(Redirected from Defeaturing)
Jump to: navigation, search
All Defeature Articles | C++ APIs | Scheme Extensions | Error Codes
edit  

Defeature Component


The Defeaturing Component (DFT) supplies functionality that recognizes and/or removes features from an ACIS model. Operating in default mode, the interface function api_find_and_remove_features recognizes sets of faces on the model whose geometry are consistent with standard feature shapes and removes them. Through the use of an options object, defeature_options, parameters that control whether a particular shape is recognized as a feature (such as the maximum diameter of holes) can be specified. In addition, by using an options object you can stop the process after feature recognition (and before feature removal), examine the features that were recognized, and/or specify features that should not be removed before proceeding to feature removal. This supports a typical workflow that you may want to expose to your end users.

Before Feature Recognition
After Feature Recognition
After Feature Removal



edit  

Defeature Operations


Operation Description
Feature Recognition The feature recognition algorithm recognizes sets of faces on the model whose geometry and topology are consistent with standard feature shapes. Parameters specifying the shape of the recognized features are user-modifiable.
Feature Removal The feature removal algorithm removes the recognized features from the model.


edit  

Defeature Topics


Defeaturing Workflow

Customer applications may use defeaturing in either interactive or non-interactive workflows.

Supported Features

Defeaturing currently supports three types of features.

Limitations

Defeaturing has relatively few limitations.



edit  

Defeature Interface


C++ API Functions

The interface to defeaturing contains the following two signatures of the API function api_find_and_remove_features:

outcome api_find_and_remove_features(BODY* input_body,
                                     defeature_options* dfopts = NULL,
                                     AcisOptions* aopts = NULL);
 
outcome api_find_and_remove_features(const ENTITY_LIST& input_bodies,
                                     defeature_options* dfopts = NULL,
                                     AcisOptions* aopts = NULL );

Note that the two signatures differ only in taking a single body versus taking a list of bodies. The single body signature serves as a convenience routine; it produces the same results as the "list of bodies" signature called with a single body in the list.

Defeature Options

You can use the defeature_options object to configure the behavior of api_find_and_remove_features. The defeature_options object fulfills three roles:

  • Manages the settings for parameters that control whether a particular shape is recognized as a feature (for example, the maximum diameter of holes), and provides reasonable defaults.
  • Controls whether api_find_and_remove_features performs only feature recognition, or feature recognition and removal.
  • Provides an interface for managing and viewing the features to be removed. More specifically, it provides methods to obtain the number of features recognized and methods to obtain a list of faces corresponding to each feature. In addition, the options object allows you to specify features that are not to be removed by calling the keep_face method on any face in the feature. Finally, the options object allows you to query the number and faces corresponding to features which were marked for removal but not removed (through the failed_feature methods).

In general, the options object manages parameters through get_* and set_* methods. For example, the methods get_hole_max_diameter and set_hole_max_diameter control the hole_max_diameter parameter. Calling a set function without any arguments resets the parameter to its default value. Calling the API function without an options object is equivalent to passing in a default options object.

Refer to the following table for the default value of the parameters in the defeature_options object:

Parameter Default Value
pause_after_recognize FALSE
recognize_blends TRUE
blends_max_radius 10.0
blends_num_curvature_samples 1
blend_supports_max_angle 175.0
recognize_chamfers TRUE
chamfers_max_width 10.0
chamfer_supports_max_angle 105.0
recognize_holes TRUE
hole_max_dia 10.0
recognize_spherical_holes TRUE

Scheme Extensions

The workflow in Scheme is identical to the C++ workflow: you may either use the default defeature_options parameters and make a single call to the Defeaturing component or use a custom defeature_options object for a more interactive approach.

The api_find_and_remove_features call is contained within the body:defeature Scheme command. All calls to manipulate and work with the defeature_options object are wrapped under the Scheme commands (defeature:****).

The types of features that can be removed are holes, blends, and chamfers. The parameters in the defeature_options object control the removal of these features. For example, if you want to remove blends only, then you should set the recognize_holes and recognize_chamfers parameters to #f. Furthermore, you may set the blend_max_radius parameter to the appropriate value to control the blends that are to be removed. Similarly, you can control the behavior of the hole and chamfer removal by setting the appropriate parameters on the defeature_options object. Refer to the Defeaturing Scheme Extensions for more details.

Error Codes

The interface to the ACIS Defeaturing Component obeys a "no-throw" contract: neither the API functions nor the methods of the options object may throw C++ exceptions. In most cases error conditions are signaled by returning an ACIS outcome object. The exception to this is the get_num_features and get_num_failed_features methods of the options object, which return -1 when called inappropriately.

Upon failure of a Defeaturing API function an error code will be returned that explains the failure and suggests possible actions for correction. For a complete enumeration of all Defeaturing Component error codes, refer to Defeature Error Codes.



edit  

See Also

Personal tools