Model.surfacecreatenormalfromedges#

Model.surfacecreatenormalfromedges(collection, distance, reserved, comp_mode)#

Creates surfaces in the normal direction from the edges of adjacent surfaces. The new surfaces are created by dragging these surface edges along the normal direction of the surfaces to which the main edges belong. In the event the neighbor surfaces are tangent enough to each other, the average normal is used as the drag direction. When two or more input edges meet at a vertex, result surfaces are separated by a new edge created along that vertex.

Parameters:
  • collection (Collection) – The collection containing the line entities entities that are surface edges.

  • distance (double) – The distance to drag along the calculated direction. Both positive and negative values are accepted. If the distance is negative, the direction opposite to the normal direction is used.

  • reserved (int) – Reserved for future use. Must be set to 0.

  • comp_mode (int) –

    0 - New surfaces are created in the current component.

    1 - New surfaces are created in the same component as the input edges.

Example#

Create surfaces extend normally from edges with IDs 75 and 68 by a distance of 12.0 units . The new surfaces will be created in the same component as the input edges .#
import hm
import hm.entities as ent

model = hm.Model()

model.surfacecreatenormalfromedges(
    collection=hm.Collection(model, ent.Line, [75, 68]),
    distance=12.0,
    reserved=0,
    comp_mode=1,
)