hm_wadlinesispointintestzone

Returns whether a point is inside a test zone by taking in the coordinates of the zone boundary.

Syntax

hm_wadlinesispointintestzone <option1> <value1> ?<option2> <value2>? ... ?<optionN> <valueN>?

Type

HyperMesh Tcl Query Command

Description

Returns whether a point is inside a test zone by taking in the coordinates of the zone boundary returned byhm_wadlinesgetadulttestzone and hm_wadlinesgetchildtestzone, along with the impact direction of the impact point. The impact point and zone boundary are projected to a plane perpendicular to the impact direction, then tested to find if the projection of the impact point is within the polygon defined by the zone boundary.

Num_pts should always be provided before the points option

Inputs

normal
The normal direction x/y/z of the plane to which the zone boundary and test point is projected. This is expected to be along the impact direction of the impact point.
num_pts
The number of points defining the zone boundary. Must be provided before points.
points
The ordered x/y/z coordinate values of all points of the zone boundary.
testpoint
The x/y/z coordinates of the impact point to be tested.
tolerance
Test points that are within this tolerance to the zone boundary are also returned as inside the zone boundary. Default 1e-6.

Examples

To test if design point 38 is inside a zone boundary:

set id 38
set pos [hm_getvalue designpoint id=$id dataname=position]
hm_wadlinesispointintestzone testpoint {*}$pos normal 0 0 1 num_pts 10 points 1343.514343661 709.91761797527 973.43251742578 1334.7036682323 703.07456401521 973.15886027621 1327.8482379749 697.4142871779 972.93366355648 1323.86674249 694.00118686161 972.79787178914 1310.125533079 681.68252694578 972.30776823337 1309.4710911285 681.07217688483 972.28348517521 1301.5068502671 673.437787072 971.97974746194 1297.3418689169 669.34475639184 971.81690435206 1293.2547572113 665.2922768409 971.65567458753 1289.222029365 661.21716017109 971.49354419

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

2021