Model.hm_wadlinesgetsectionmax#
- Model.hm_wadlinesgetsectionmax(origin, plane_normal, direction)#
Returns the most outward intercept of a cross section of the model as measured in a given direction. A plane, located at the given origin and with the given normal, is cut through the model and points are generated where all elements and surface facet edges are bisected by the plane. The dot product of each point and the given direction is used to determine which point is the maximum point lying in the plane. This is intended to assist in the positioning of impact devices.
- Parameters:
origin (hwTriple) – The list of objects defining the origin of the plane used to cut the cross section.
plane_normal (hwTriple) – The list of objects defining the plane normal components. User can also supply a Python list of three doubles.
direction (hwTriple) – The list of objects defining the vector used to evaluate the each point on the cross section.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values: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 ) _,resultlist = model.hm_wadlinesgetsectionmax( origin=[0, 0, 0], plane_normal=[1, 0, 0], direction=[0, 1, 0] ) model.hm_wadlinesend() for result in resultlist: print("pointCoordinates",result.pointCoordinates)