Model.linessmoothtoangle#

Model.linessmoothtoangle(collection, cosangle)#

Smooths a line based on a give angle.

Parameters:
  • collection (Collection) – The collection containing the lien entities to smooth.

  • cosangle (double) – The cosine of the angle used to determine if two joints on a line should be combined (smoothed). If the angle between two joints on a line is greater than the angle the two joints are combined and smoothed.

Example#

Smooth all joints on line with ID 1 that have an angle greater than 90.0 degrees#
import hm
import hm.entities as ent

model = hm.Model()

model.linessmoothtoangle(collection=hm.Collection(model, ent.Line, [1]), cosangle=0.0)