*extract_skeleton

Extracts the skeleton of a 3D model as a group of 1D elements.

Syntax

*extract_skeleton entity_type=<value> mark_id=<mark_id> resolution=<value> ?option1=<value1>? ?option2=<value2>? … ?optionN=<valueN>?

Type

HyperMesh Tcl Modify Command

Description

This command extracts the skeleton of a 3D model, representing it as a group of 1D elements. The refinement level of the skeleton is determined by the resolution parameter. Additionally, branches and individual 1D elements below specified length thresholds can be pruned or collapsed.

Before calling this command, it is recommended to fill all larger gaps and holes in the model. If this is not done, the command will automatically fill gaps and holes with a maximum width of 4 times the resolution provided. The patches used to fill these gaps and holes are organized in a separate component named "^Patch".

Inputs

entity_type=<value>
The type of input entities. Valid values are elements, components, parts, surfaces, and solids.
mark_id=<mark_id>
The ID of the mark containing the input entities. Valid values are 1 and 2.
resolution=<value>
The resolution determining the refinement level of the skeleton. The value must be a positive double, typically small compared to the general dimensions of the input model.
collapse_threshold=<value>
The length threshold below which individual 1D elements will be collapsed. The value must be a positive double (default 0.0).
prune_threshold=<value>
The length threshold below which branches consisting of one or more 1D elements will be deleted. The value must be a positive double (default 0.0).

Examples

To extract the skeleton of all displayed elements using default values:
*createmark elems 1 displayed
*extract_skeleton entity_type=elems mark_id=1 resolution=<value>
To extract the skeleton with a resolution of 10, collapse threshold of 20, and prune threshold of 100:
*createmark solids 2 displayed
*extract_skeleton entity_type=solids mark_id=2 resolution=10 collapse_threshold=20 prune_threshold=100

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

2025