hm_getbestcirclecenter
Returns the center and radius of the best fit circle from the input nodes, points or lines.
Syntax
hm_getbestcirclecenter entity_type mark_id any_tol ?panel_sensitive?
Type
HyperMesh Tcl Query
Description
This command calculates and returns the center point coordinates and radius of the circle that approximates the input set of lines, nodes or points. If the input entities are found to be on a straight line then an error is returned. The calculated information is returned as a list of four values, that specify x, y, z coordinates of the calculated circle center, and the radius of the circle.
Inputs
- entity_type
- Type of input entities. Valid values are nodes, points, or lines.
- ent_mark
- The mark of input entities.
- any_tol
- Parameter specifying whether the best fit is verified against the currently set geometry cleanup tolerance. Valid values are:
- panel_sensitive (optional)
- Can be used when multiple panel levels have been pushed, either using the shortcut function keys, or the hm_pushpanel command. This option determines whether to use the current panel or the previous panel for the operation. This option is relevant only when the mark has been created from a panel entity selector under the above conditions. Valid panel_sensitive options are:
Examples
To get the center and radius of the circle passing through nodes 11, 12 and 14:
*createmark nodes 1 11 12 14
hm_getbestcirclecenter nodes 1
To get the center and radius of the circle that approximates line 21:
*createmark lines 1 21
hm_getbestcirclecenter lines 1
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
10.0