Model.lineimprintpoints#

Model.lineimprintpoints(collection, double_array, max_distance)#

Imprints locations/points, given by coordinates, onto free lines or edges within a given max distance.

Parameters:
  • collection (Collection) – The collection containing the line entities to imprint.

  • double_array (hwDoubleList) – The double array that contains the point coordinates to imprint.

  • max_distance (double) – The maximum imprint distance. If negative, there is no restriction.

Example#

Imprint the lines with ID 5 and 7 with 4 locations#
import hm
import hm.entities as ent

model = hm.Model()

model.lineimprintpoints(
    collection=hm.Collection(model, ent.Line, [5, 7]),
    float_array=[
        42.41,
        -35.16,
        65.90,
        42.49,
        -30.06,
        65.93,
        44.49,
        -32.58,
        66.97,
        24.41,
        -28.13,
        66.34,
    ],
    max_distance=-1.0,
)