Model.surfacecreatedraglinealongvector#

Model.surfacecreatedraglinealongvector(collection, vector, distance, options, comp_mode, node_ptr, scale, twistangle, solid_stitch=0)#

Creates surface(s) by dragging line(s) along a vector. If the distance is negative, the opposite direction to vector is used for dragging.

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

  • vector (hwTriple) – Temporary vector defining the direction of the drag.

  • distance (double) – The length of the drag. Negative values indicate opposite direction to the vector.

  • options (int) –

    0 - Do not merge input lines. A surface is created for each input line.

    1 - Merge input lines into smooth lines when possible. A surface is created for each group that forms tangentially continuous line.

  • comp_mode (int) –

    Parameter specifying how entities are organized into components:

    0 - Surfaces are created in the current component.

    1 - Surfaces are created in the same component as the selected lines. The result is not predictable if the lines are originally in different components.

  • node_ptr (Entity) – Node entity used to define the base point coordinates. If not required, set to None.

  • scale (double) – Scale factor to be applied. Set to 0.0 if not required.

  • twistangle (double) – Twist angle. Set to 0.0 if not required.

  • solid_stitch (int) –

    0 - Created surface will not be stitched to a solid.

    1 - Created surface will be stitched to a solid.

Example#

Create 3 surfaces by dragging the input lines with IDs 35 , 27 and 29 along the x - axis 5.0 units , creating the surfaces in the current component#
import hm
import hm.entities as ent

model = hm.Model()

model.surfacecreatedraglinealongvector(
    collection=hm.Collection(model, ent.Line, [35, 27, 29]),
    vector=[1.0, 0.0, 0.0],
    distance=5.0,
    options=0,
    comp_mode=0,
)