*findandremovethreads

Finds cylindrical threads in 3D geometry and replaces them with smooth surfaces.

Syntax

*findandremovethreads entity_type mark_id max_depth replacement_type flags reserved1 reserved2

Type

HyperMesh Tcl Modify Command

Description

This command tries to recognize threads with a depth less than the specified maximum value. Then the recognized threads are replaced with simple smooth surfaces (usually a combination of cylinders, cones and smooth NURBS surfaces). A search for recognition and removal of threads is performed within a given selection of surfaces or solids. Optionally, the input selection can be considered as a seed selection, allowing attached surfaces to also become involved in the recognition and removal.

Inputs

entity_type
The entity types to find threads in. Valid values are surfs and solids.
mark_id
The mark ID containing the entities. Valid values are 1 and 2.
max_depth
The maximum depth of threads to find and remove.
replacement_type
The type of major cylinder surface to use for replacing the thread:
  • -2 - Autodecide (by minor diameter for holes, by major diameter for bolts).
  • -1 - Replacement by minor diameter.
  • 0 - Replacement by mean diameter.
  • 1 - Replacement by major diameter.
flags
Flags controlling the mode of thread removal. Bit values are used and the value is calculated as (Bit0).
Bit0
0 - Attached surfaces can also be considered, with input surfaces used as seeds.
1 - Only surfaces specified as input can be considered
reserved1
Reserved for future use. Must be set to 0.
reserved2
Reserved for future use. Must be set to 0.

Example

To recognize and remove cylindrical threads with a depth less than 5.0 for a given surface selection considered as a seed selection, with auto replacement:
*createmark surfaces 1 1583 1234
*findandremovethreads surfaces 1 5.0 -2 0 0.0 0.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