Model.hm_wadlinesgetgridpointsleg#
- Model.hm_wadlinesgetgridpointsleg(height, spacing=100.000000, version=DBL_MAX, end_gap=50.000000, clearance=75.000000, height_option=DBL_MAX, max_depth=10.000000, method=0)#
Returns grid points for either upper or lower leg impact analysis. The output is a series of four numbers for each grid point. The first number will be the column value, such as -2. The next three numbers will be the x, y, and z values of the grid point. It will use the front entities set using
Model.hm_wadlinessetentities_bycollection()orModel.hm_wadlinessetentities_bymode()and the corner_angle set withModel.hm_wadlinessetparameters()to determine the “Corner of Bumper.” IfModel.hm_wadlinessetbumper()has been used, the outermost ends of those entities will be determined. All points for the internal bumper reference line will fit laterally between either the “Corner of Bumper” or the outermost ends of the bumper entities, whichever is larger. This is the “Edge of Bumper Test Zone.”For
version7.0, the front reference line will be used to determine upper leg grid points and the upper bumper reference line will be used to determine lower leg grid points.For
version8.0, a WAD line of a specified distance will be used for the upper leg grid points and the internal bumper reference line will be used to determine the lower leg grid points. Note that theModel.hm_wadlinesgetinternalbumperline()API does not need to be called prior to calling this API. If the internal bumper reference line has not been generated it will automatically be calculated and used.Note that not all options below are used for every
versionand upper/lower option.- Parameters:
height (int) –
0 - Lower leg
1 - Upper leg
spacing (double) – The lateral distance, starting from the vehicle center line, at which the points will be placed.
version (double) – Used for Euro NCAP protocol, 7.0, 8.0 or 8.2.
end_gap (double) – For the lower leg (
height=0), if the distance between the last grid point placed at the given spacing value and the Edge of Bumper Test Zone is greater thanend_gap, an additional grid point is placed atend_gapdistance away from the last grid point. For the upper leg (height=1), any grid points placed within theend_gapdistance of the Edge of Bumper Test Zone are removed. Default 50.0.clearance (double) – Only used for the upper leg (
height=1) forversion8.0. If the distance between the Edge of Bumper Test Zone and the last grid point is greater than the clearance, an additional grid point is placed atend_gapdistance inboard of the end of the Edge of Bumper Test Zone. Default 75.0.height_option (double) –
For the upper leg (
height=1), place the distance of the WAD line to be used in this field. Default 775.0.For the lower leg (
height=0), place the maximum height of the internal bumper reference line in this field. Default 520.0.max_depth (double) – For the lower leg (
height=0), sets the maximum depth of the internal bumper reference line (the maximum rearward distance a point can be from the first point of contact and still be used to find the height of the bumper entities) (default 10.0). This is unused for the upper leg (height=1).method (int) –
The method to use for measuring. If left blank and
Model.hm_wadlinessetoptions()has been used to set theModel.protocol_method, that value is used.0 - Euro NCAP (default if not specified)
1 - Homologation
2 - ECER
3 - UN-R127 for corners, Euro NCAP elsewhere
- Returns:
hwReturnStatus- Status objectHmQueryResultList- Result list object containingHmQueryResultobjects with the following output data:columnIndex (int)
pointCoordinates (numpy.ndarray)
Examples#
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, 182.0], forwardvec=[-1.0, 0.0, 0.0], leftvec=[0.0, -1.0, 0.0] ) comps1 = hm.Collection( model, ent.Component, ids=[100000199, 100000200, 290000007, 410000016, 411000016, 420000004, 420000005, 420000006, 420000007, 420000008, 420000009, 420000010, 420000011, 420000012, 420000013, 420000014, 420000015, 420000016,420000019, 420000020 ] ) comps2 = hm.Collection(model, ent.Component, ids=[100000003, 100000010, 100000022, 100000113]) model.hm_wadlinessetentities_bycollection(frontEntities=comps1, rearEntities=comps2) components = hm.Collection(model, ent.Component, ids=[407000001, 407000002]) model.hm_wadlinessetbumper(entities=components) _,resultlist = model.hm_wadlinesgetgridpointsleg(height=0, spacing=100.0, version=7.0 ) model.hm_wadlinesgetgridpointsleg(height=1, spacing=100.0, version=7.0 ) model.hm_wadlinesgetgridpointsleg(height=0, spacing=100.0, version=8.0 ) model.hm_wadlinesgetgridpointsleg(height=1, spacing=100.0, version=8.0 ) model.hm_wadlinesend() for result in resultlist: print("columnIndex",result.columnIndex) print("pointCoordinates",result.pointCoordinates)