Model.hm_wadlinesgetgridpoints#
- Model.hm_wadlinesgetgridpoints(wad_child_min, wad_child_max, wad_adult_min, wad_adult_max, side_tolerance, protocol_method=0, protocol_version=7, grid_spacing=100, vertical_spacing=100)#
Returns coordinate data defining WAD grid points. The data will be returned as a list of one string, two integers, and three doubles. The string defines whether the point is child, middle or adult. The two integers are the row and column indices of the grid point. The three doubles are the X, Y, and Z coordinates of the grid point.
- Parameters:
wad_child_min (double) – The WAD line where child impact points begin.
wad_child_max (double) – The WAD line where child impact points end.
wad_adult_min (double) – The WAD line where adult impact points begin.
wad_adult_max (double) – The WAD line where adult impact points end.
side_tolerance (double) –
GTR - No impact points are found within this distance of the side reference lines.
EuroNCAP, CNCAP - Impact points found within this distance will be deactivated.
protocol_method (int) –
The method to use for measuring the side_tolerance distance.
0 - Euro NCAP (default if not specified)
1 - Homologation
2 - ECER
3 - UN-R127 for corners, Euro NCAP elsewhere
4 - CNCAP
protocol_version (double) – Used for Euro NCAP protocol, 7.0 (default if not specified), 8.0 or 8.2.
grid_spacing (double) –
The spacing between the impact points, default 100.0.
EuroNCAP, CNCAP - The grid spacing between the two nearest impact points in the same row or column.
GTR - The spacing between headform points on a wadline.
vertical_spacing (double) – For GTR, it is the spacing between 2 wadlines on which impact points need to be created, default 100.0.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:pointType (str)
rowIndex (int)
columnIndex (int)
pointCoordinates (numpy.ndarray)
Example#
Setup and extract WAD lines data#import hm import hm.entities as ent model = hm.Model() model.hm_wadlinesinit() model.hm_wadlinessetparameters( side_angle=45.0, front_angle=50.0, spacing=100.0, rear_reference_radius=100.0, reference_resolution=50.0, upper_bumper_angle=20.0, lower_bumper_angle=25.0, corner_angle=60.0, ) model.hm_wadlinessetaxes( origin=[0.0, 0.0, 0.0], forwardvec=[1.0, 0.0, 0.0], leftvec=[0.0, 1.0, 0.0] ) comps1 = hm.Collection( model, ent.Component, "Name=bonnet OR Name=bumper OR Name=fenderL OR Name=fenderR" ) comps2 = hm.Collection(model, ent.Component, "Name=windshield OR Name=a-pillars") model.hm_wadlinessetentities_bycollection(frontEntities=comps1, rearEntities=comps2) elems = hm.Collection( model, ent.Element, hm.Collection(model, ent.Component, name="wipers") ) model.hm_wadlinessetwipers( wiperEntities=elems, use_for_reference_line=False, use_for_wad_line=True ) model.hm_wadlinesgetreferenceline(line_location=0) model.hm_wadlinesgetreferenceline(line_location=1) model.hm_wadlinesgetreferenceline(line_location=2) model.hm_wadlinesgetreferenceline(line_location=3) model.hm_wadlinesgetreferenceline(line_location=4) model.hm_wadlinesgetreferenceline(line_location=5) model.hm_wadlinesgetreferenceline(line_location=6) model.hm_wadlinesgetreferenceline(line_location=7) model.hm_wadlinesgetwadline(distance=1000.0) model.hm_wadlinesgetwadline(distance=1500.0) model.hm_wadlinesgetwadline(distance=1700.0) model.hm_wadlinesgetwadline(distance=2100.0) _,result = model.hm_wadlinesgetgridpoints( wad_child_min=1000.0, wad_child_max=1500.0, wad_adult_min=1700.0, wad_adult_max=2100.0, side_tolerance=50.0, ) model.hm_wadlinesend() print("pointType",result.pointType) print("rowIndex",result.rowIndex) print("columnIndex",result.columnIndex) print("pointCoordinates",result.pointCoordinates)