*separate_holes_in_3d_body_new

Detects holes in 3D models, groups them by diameter and moves the surfaces defining the holes to separate components created for each hole diameter group.

Syntax

*separate_holes_in_3d_body_new entity_type input_mark_id output_mark_id flags string_array number_of_strings

Type

HyperMesh Tcl Modify Command

Description

This command takes as input a mark of surfaces or solids of a 3D body. It finds holes in the 3D body, collects the found connected holes in tubes, and groups the tubes by diameter either according to the user- specified diameter ranges or by autocreating the groups from the user-specified tolerance. The command creates a component with an autogenerated name for each diameter group and moves the relevant surfaces of the tubes to the corresponding components. Blind-holes and through-holes are considered as different groups, so they are grouped separately. Optionally, the surfaces of the detected holes can be put to an output mark.

The command parameters have the following meaning:

Inputs

entity_type
The type of selected input entites. surfaces and solids are supported:
If the surfaces mark is being used as input, it should be applied to all surfaces constituting each considered 3D body. If the surfaces mark is not applied to all surfaces of a 3D body, the result is unpredictable.
input_mark_id
The input surfaces or solids mark id of the input. Valid values are 1 and 2.
output_mark_id
The mark ID to mark the surfaces of the detected holes. Valid values are 0, 1 or 2. If set to 0 the detected holes’ surfaces are not marked.
flags
Sets a filter for the shape of cross sections of holes to be recognized. Supported values are:
  • 0 - Holes are not filtered by shape (arbitrarily shaped).
  • 1 - Only round holes are detected.
  • 2 - Only rounded slots are detected.
  • 3 - Both round holes and rounded slots are detected.
string_array
The ID of the string array that contains the fillet width and radius group information. The string array is created using the *createstringarray command. This should always be set to 1.
The first (optional) string in quotations may contain the following parameters as keywords followed by the parameters values. Keywords and the corresponding values can be separated by blanks and/or by "=":
cross_sect_size_max
Maximum length of the holes normal to the holes axes cross sections. This applies only to elongated holes (rounded slots or elliptical holes). If cross_sect_size_max = 0, then no limitation is applied. The default value is 0.
diam_tolerance
If this option is set, then the holes tube groups are to be autodefined by this specified tolerance and any group diameter ranges are ignored.
diam_min
Minimum diameter of holes for recognition. Default value is 0.
diam_max
Maximum diameter of holes for recognition. If specified to be 0, then no limit is applied. Default value is 0.
diams_ratio_max
Maximum ratio of diameters of adjacent co-axial cylindrical hole sections when the sections are considered within the same tube. Default value is 2.5.
All other strings may contain up to 3 quoted values. These indicate the group diameter ranges. It is not necessary to specify the string name, just the values:
min_group_diam
(double)
max_group_diam
(double)
group_flag (int) (optional)
Value of 0 (disable group) or 1 (enable group) indicating if that diameter group is considered. Default is 1 for all groups.
The group ranges should not overlap but may have gaps between them.
number_of_strings
Integer indicating the size (number of strings) in the string array created using *createstringarray.

Examples

To recognize round holes with diameters from 0 to 50 in 3D model, separate them in groups by diameter according the ranges: 10-11, 12-15, 17-20, 20-30 and 30-50, allow adjacent tube sections diameter ratio of up to 3.0 and to mark the detected holes surfaces on mark 2:


*createmark surfaces 2 ""
*createmark surfaces 1 "all"
*createstringarray 6 "cross_sect_size_max = 50 diams_ratio_max = 3.0" "10 11" "12 15" "17 20" "21 30" "30 50"
*separate_holes_in_3d_body_new surfs 1 2 0 1 6
The same example but the diameters range 12-15 should be disabled without removing it from the input:
*createmark surfaces 2 ""
*createmark surfaces 1 "all"
*createstringarray 6 "cross_sect_size_max = 50 diams_ratio_max = 3.0" "10 11" "12 15 0" "17 20" "21 30" "30 50"
*separate_holes_in_3d_body_new surfs 1 2 0 1 6

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

10.0