*createbestcirclecenternode

Creates a node or a point at the center of the circle that best approximates the input set of lines or points.

Syntax

*createbestcirclecenternode entity_type mark_id point_flag any_tol make_circle

Type

HyperMesh Tcl Modify

Description

This command creates a node or a point at the center of the circle that best approximates the input set of lines or points. If the input entities are found to be on a straight line, then an error is returned.

Inputs

entity_type
Input entity types. Valid values are:
  • Nodes
  • Points
  • Lines
mark_id
The ID of the mark containing the input entities. Valid values are 1 and 2.
point_flag
Parameter specifying whether a node or point is created at the approximated circle center. Valid values are:
  • 0 – Create node.
  • 1 – Create point.
any_tol
Parameter specifying whether the best fit is verified against the currently set geometry cleanup tolerance. Valid values are:
  • 0 – An error is returned, if the input entities are not on the circle within the geometry cleanup tolerance.
  • 1 – Tolerance is ignored and best fit circle is always calculated.
make_circle
Parameter specifying whether a circle is also created:
  • 0 – Only center point/node is created.
  • 1 – Center point/node and a circle are created.

Examples

To create a node at the center of the circle passing through nodes 11, 12 and 14:
*createmark nodes 1 11 12 14
*createbestcirclecenternode nodes 1 0 1 0
To create a circle that approximates line 21, along with a point at the center of the circle:
*createmark lines 1 21
*createbestcirclecenternode lines 1 1 1 1

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

10.0