Model.hm_wadlinesgetleggridline#
- Model.hm_wadlinesgetleggridline()#
Returns a series of three doubles denoting the points for the line calculated by the previous call to
Model.hm_wadlinesgetgridpointsleg(). This API must be called after a call toModel.hm_wadlinesgetgridpointsleg(). The line that is returned is based on the arguments passed in toModel.hm_wadlinesgetgridpointsleg().height=0, version=7.0: Upper Bumper Reference Line
height=0, version=8.0: Internal Bumper Reference Line
height=1, version=7.0: Front Reference Line
height=1, version=8.0: WAD Line
These lines may have extra points added to them due to the requirements of the grid point marking standards compared to lines extracted using the
Model.hm_wadlinesgetreferenceline()API. The extra points will ensure that any type of line (linear or smooth) will pass through all of the grid points. Thus, if you are drawing the markup lines for the grid points, use this API instead of the reference line API to get the lines.Note than any line stored after one call to the
Model.hm_wadlinesgetgridpointsleg()API is overwritten by subsequent calls to theModel.hm_wadlinesgetgridpointsleg()API.- Returns:
hwReturnStatus- Status objectHmQueryResultList- Result list object containingHmQueryResultobjects with the following output data: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, 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) model.hm_wadlinesgetgridpointsleg(height=0, spacing=100.0, version=7.0 ) _,resultlist1 = model.hm_wadlinesgetleggridline() model.hm_wadlinesgetgridpointsleg(height=1, spacing=100.0, version=7.0 ) _,resultlist2 = model.hm_wadlinesgetleggridline() model.hm_wadlinesgetgridpointsleg(height=0, spacing=100.0, version=8.0 ) _,resultlist3 = model.hm_wadlinesgetleggridline() model.hm_wadlinesgetgridpointsleg(height=1, spacing=100.0, version=8.0 ) _,resultlist4 = model.hm_wadlinesgetleggridline() model.hm_wadlinesend() for result1 in resultlist1: print("pointCoordinates1",result1.pointCoordinates) for result2 in resultlist2: print("pointCoordinates2",result2.pointCoordinates) for result3 in resultlist3: print("pointCoordinates3",result3.pointCoordinates) for result4 in resultlist4: print("pointCoordinates4",result4.pointCoordinates)