Model.hm_wadlinesend#

Model.hm_wadlinesend()#

Clears memory and ends the WAD lines module. This must be preceded by any calls to Model.hm_wadlinesinit() and other Model.hm_wadlines APIs. Any database changes made while inside of the WAD lines module will invalidate and delete any WAD results.

Returns:

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)

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()