Model.linecreatefromnodesonsurface#

Model.linecreatefromnodesonsurface(surf_entity, point_list, curve_type, options)#

Creates a line that lines on a surface by interpolating input points on that surface. If some of the input points do not reside on the same surface, then the location closest to those points on the surface point are used.

Parameters:
  • surf_entity (Entity) – The object describing the surface entity to create a line.

  • point_list (EntityList) – List of the input points or nodes. A minimum of 2 points or nodes must be selected.

  • curve_type (int) –

    Type of created curve. Valid values are:

    0 - Points are connected by linear segments.

    1 - Points are connected by linear segments into closed line.

    2 - Points are interpolated by a smooth curve.

    3 - Points are interpolated by a smooth closed curve.

  • options (int) –

    Flags that indicate different modes.

    Bit values are used and the value is calculated as (Bit0 + 2*Bit1). Valid Bit options are:

    Bit0

    Additional curve construction. Valid values are:

    0 - Curve is created as free line.

    1 - Created curve is used to trim input surface.

    Bit1

    Specifies how line entities are organized into components. Used only when Bit0 is set as 0. Valid values are:

    0 - Line is created in the current component.

    1 - Line is created in the surface component.

    Show Bit value calculator
    Radio Button Table
    Option Name Value
    Additional curve construction (Bit0)
    Specification of how line entities are organized into components (Bit1)
    Calculated argument value: 0

Example#

Create a spline that interpolates the nodes with IDs 11 , 12 and 13 on surface with ID 10#
import hm
import hm.entities as ent

model = hm.Model()

model.linecreatefromnodesonsurface(
    surf_entity=ent.Surface(model, 10),
    point_list=[ent.Node(model, 11), ent.Node(model, 12), ent.Node(model, 13)],
    curve_type=1,
    options=0,
)