*remove_solid_holes

Detects and removes holes in 3D geometry.

Syntax

*remove_solid_holes entity_type mark_id max_diam cross_sect_size_max options string_array number_of_strings

Type

HyperMesh Tcl Modify

Description

Detects and removes holes in 3D geometry, up to a maximal diameter. The shape of the hole cross-section can optionally be filtered, limiting to circular holes only or/and rounded slots. Optionally fixed points and tags can be placed at the center of the removed holes.

When a hole cannot be removed, the surfaces of such holes can optionally be moved to auto-created components with auto-generated names.

Optionally any number of additional ranges of holes for removal with different shape and post-processing options can be specified using a flexible string input.

Inputs

entity_type
The name of entity to consider. Valid values are surfaces and solids.
If surfaces are being used as input, all surfaces constituting each considered 3D body should be selected to generate proper results. If all surfaces of a 3D body are not selected, the command result is unpredictable.
mark_ID
The ID of the mark containing the entities. Valid values are 1 and 2.
max_diam
The maximum diameter for holes to be removed. For holes of arbitrary shape, the “effective” diameter is found as the cross section perimeter/Pi. If the hole shape is limited by rounded slots, the hole diameter is taken as the hole rounded tip diameter.
cross_sect_size_max
The maximum size of the cross-section (normal to the axes) for rounded slots or elliptical holes. This must exceed max_diam.
options
Flags that indicate different options for cross-section recognition and additional hole removal post-processing parameters.. Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3 + 16*Bit4).
Bit0
0 – Holes are not filtered by shape (arbitrarily shaped).
1 – Only round holes should be detected.
Bit1
0 – Holes are not filtered by shape (arbitrarily shaped).
1 – Only round slots should be detected.
Bit2
0 – Do not place fixed points.
1 – Place fixed points at the centers of end cross-sections of removed holes.
Bit3
0 – Do not place tags.
1 – Place tags containing the hole size attached to the center fixed points. Bit2 must be used.
Bit4
0 – Failed hole surfaces are not organized.
1 – The surfaces of holes that failed to be removed are organized to auto-created components with auto-generated names. This can be used for manual removal of such holes.
string_array
The ID of the string array that contains the additional input parameters. The string array is created using the *createstringarray command. This should always be set to 1.
All input strings (each one in separate quotation marks) have the same format and contain user defined diameter ranges. Each range string has the following format : "min_range_diam max_range_diam options"
The diameters ranges should not overlap but may have gaps between them.
The options string is derived from the options argument and can be customized for each range.
number_of_strings
Integer indicating the size (number of strings) in the string array created using *createstringarray.

Examples

To remove all holes with diameters from 0 to 8.0 and remove round holes and rounded slots only in the range from 8.0 to 20.0 with maximal rounded slot length 25.0. No options are used for the lower range, but a value of 15 is used for the upper range (find only rounded holes and slots, and place fixed points with tags).

*createmark surfaces 1 all
*createstringarray 1 "8.0 20.0 15"
*remove_solid_holes surfaces 1 8.0 25.0 0 1 1 

To remove only round holes up to a diameter of 12.0, put fixed points at the centers, and move any failed hole surfaces to the auto-created component:

*createmark solids 1 all
*remove_solid_holes solids 1 12.0 15.0 21 1 0 

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

11.0.101