*solid_cavity_detect_start

Detects cavities (protrusion only) from a solid.

Syntax

*solid_cavity_detect_start mark_id all_cavities get_n_cavities max_radius max_length min_concavity

Type

HyperMesh Tcl Modify Command

Description

This command finds cavities from solids, which may have been created by volume substraction from those solids. Internally, it merges identified cavities if they belong to the same volume.

The output of this command is a list of cavities, created as region entities. Each cavity is represented by a connected set of surfaces and one or more rims. Each rim is a connected set of edges. Cavities are sorted by descending order of their volume while creating the regions.

This command must be followed by a call to *solid_cavity_detect_end.

Inputs

mark_id
The ID of the mark containing the input solid surfaces. Valid values are 1 and 2.
all_cavities
1 - Cavities of all geometric shapes will be detected.
0 - Only cylindrical (simple cylinder) cavities will be detected.
get_n_cavities
If 0, all identified cavities are found. If > 0, the first N cavities are found in descending order of their volume.
max_radius
The maximum radius for circular cavities to be processed. For cavities of arbitrary shape the "effective" diameter is found as the cross section perimeter divided by pi. A value of of -1 ignores this option.
max_length
The maximum length of a cavity, mainly applicable for circular cavities. A value of of -1 ignores this option.
min_concavity
The minimum concavity factor. A value of 0.5 is default.

Examples

To detect cavities of all geometric types based on default arguments:

*createmark surfaces 1 "all"
*solid_cavity_detect_start 1 1 0 -1 -1 0.5
*solid_cavity_detect_end

To detect cavities of all geometric types, finding only the first five cavities:

*createmark surfaces 1 "all"
*solid_cavity_detect_start 1 1 5 -1 -1 0.5
*solid_cavity_detect_end

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

2019