hm_linechordaldev
Find the chordal deviation of a 2D parameterized points.
Syntax
hm_linechordaldev u_coords v_coords id_jointsType
HyperWorks Tcl Query
Description
This command returns the maximum chordal deviation of 2D points (u_coords, v_coords). These points are parameterized and this parameterization is given by the joints id (id_joints). An empty string is returns, if it isn’t possible to value the chordal deviation. Look into hm_lineparameterization for the joints definitions.
Example
To get the maximum chordal deviation value (max_chordaldev) of 2D points (u_coords,v_coords) given the relative parameterization (id_joints), it is necessary to define the list of u points coordinates and v points coordinates and the to define the original parameterization using joints list.
set u_coords [list 0.000000 10.389167 10.799428 20.727764 23.423974 42.734559 49.901730 59.757235 67.861408 75.676024 91.959414 110.374456 112.949959 132.361140 133.266055 152.622247 160.284810 171.744063 179.946321 189.909714 203.083731 205.586958 208.036666 212.305623 213.262217 223.132359 ]
set v_coords [list -0.000000 -19.358287 -41.323354 -62.178159 -65.989635 -70.947494 -72.348809 -74.493402 -77.463426 -79.283795 -84.868338 -88.764562 -89.196400 -89.578244 -89.509692 -86.233976 -84.091731 -79.320866 -74.689641 -71.649317 -64.896589 -63.951396 -58.390596 -48.089798 -5.161649 4.335985 ]
set id_joints [list 0 2 4 21 23 24 25]
set max_chordaldev [hm_linechordaldev $u_coords $v_coords $id_joints]
The maximum chordal deviation value is 2.577.
Errors
if { [llength $max_chordaldev]==0} {
#Handle error here //I can't find the maximum chordal #deviation value.
}