hm_lineparameterization

Find the parameters of a 2D parameterized points.

Syntax

hm_lineparameterization u_coords v_coords id_joints

Type

HyperWorks Tcl Query

Description

This command returns the parameters (params) of 2D points (u_coords, v_coords), given the relative parameterization (id_joints). These 2D points can be collects into consecutive arcs and segments. The connection points between the arcs and the segments are called joints (id_joints) and are identified with the id of the corresponding 2D points (u_coords, v_coords). The command returns the parameters list. This list contains the sequence of arcs and segments and the parameters that identified an arc or a segment. The parameters are the following:
params
N, sec_type, sec_start_id , sec_end_id, segm_lenght/u_center, angle/v_center, 0/radius, 0/angle1, 0/angle2, u_up_bbox, v_up_bbox, u_down_bbox, v_down_bbox,…
………………..
sec_type_i, sec_start_id_i , sec_end_id_i, segm_lenght_i/u_center_i, angle1_i/v_center_i, 0/radius_i, 0/angle1_i, 0/angle2_i, u_up_bbox_i, v_up_bbox_i, u_down_bbox_i, v_down_bbox_i …
………………..
sec_type_N, sec_start_id_N , sec_end_id_N, segm_lenght_N/u_center_N, angle1_N/v_center_N, 0/radius_N, 0/angle1_N, 0/angle2_N, u_up_bbox_N, v_up_bbox_N, u_down_bbox_N, v_down_bbox_N.
  1. N: number of the sections (arcs and segments) used to parameterize the 2D points.
  2. sec_type: the section type can be 1 in case of segment or 2 in case of arc.
  3. sec_start_id: section start point id.
  4. sec_end_id: section end point id.
    • seg) segm_lenght: length of the segment.
    • arc ) u_center: u arc center coordinate.
    • seg) angle: angle between the segment and the horizontal axis.
    • arc ) v_center: v arc center coordinate.
    • seg) 0: dummy
    • arc ) radius: arc radius
    • seg) 0: dummy
    • arc ) angle1: dummy
    • seg) 0: dummy
    • arc ) angle2: dummy
  5. u_up_bbox: u upper bounding box corner that contains the segment or the arc.
  6. v_up_bbox: v upper bounding box corner that contains the segment or the arc.
  7. u_down_bbox: u lower bounding box corner that contains the segment or the arc.
  8. v_down_bbox: v lower bounding box corner that contains the segment or the arc.

Example

To get the parameters (params) 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 params [hm_lineparameterization $u_coords $v_coords $id_joints]
The “params”  is:
6 
2       0 2    -3.48875160217E+001 -3.11903247833E+001 4.67971687317E+001 0 2 0 0 1.07994279861E+001 -4.13233528137E+001 
2       2 4     8.83823394775E+001 -1.71791915894E+001 8.12529907227E+001 0 2 1.07994279861E+001 -4.13233528137E+001 2.34239730835E+001 -6.59896316528E+001 
2       4 21   1.12553962708E+002 1.09440757751E+002 1.96773925781E+002 0 2 2.34239730835E+001 -6.59896316528E+001 2.05586959839E+002 -6.39513969421E+001 
1      21 23   1.72258739471E+001 6.70434265137E+001 0 0 0 2.05586959839E+002 -6.39513969421E+001 2.12305618286E+002 -4.80897979736E+001 
1      23 24   4.29388046265E+001 8.87234573364E+001 0 0 0 2.12305618286E+002 -4.80897979736E+001 2.13262222290E+002 -5.16164922714E+000 
1      24 25 1.36976184845E+001 4.38981437683E+001 0 0 0 2.13262222290E+002 -5.16164922714E+000 2.23132354736E+002 4.33598518372E+000

Errors

An empty string is returned if it isn’t possible to parameterize the given point.
if { [llength $params]==0} { 
#Handle error here //I can't find the parameters.
}