Model.surfacecreatespinnodeswithoffsetangle#

Model.surfacecreatespinnodeswithoffsetangle(nodelist, rotplane_normal, rotplane_base, start_angle, end_angle, solid_stitch=0)#

Spins a list of nodes to create a surface, and optionally, prepares it for immediate use within the automesher. It can also identify a region in the shape of a surface of revolution for the automesher to use under the mesh without surface option.

Parameters:
  • nodelist (EntityList) – The list of the nodes to be spun.

  • rotplane_normal (hwTriple) – The hwTriple object defining the plane normal components. User can also supply a Python list of three doubles.

  • rotplane_base (hwTriple) – The hwTriple object defining the base point components of the plane. User can also supply a Python list of three doubles.

  • start_angle (double) – Degrees value of initial rotation angle: lines made from selected nodes are rotated by this value before surface “sweeping” begins.

  • end_angle (double) – Degrees value of final rotation angle: surface “sweeping” stops at this value.

  • solid_stitch (int) –

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

    1 - Created surface will be stitched to a solid.

Example#

Spun a line made through nodes with IDs 8, 9, 10 and 11 from 45.0 to 90.0 degrees about an axis given by the vector (1.0, 2.0, 3.0) with rotation center at point (4.0, 5.0, 6.0), creating a surface of revolution but not creating any elements on it#
import hm
import hm.entities as ent

model = hm.Model()

model.surfacemode(mode=4)

node1 = ent.Node(model, 8)
node2 = ent.Node(model, 9)
node3 = ent.Node(model, 10)
node4 = ent.Node(model, 11)

model.surfacecreatespinnodeswithoffsetangle(
    nodelist=[node1, node2, node3, node4],
    rotplane_normal=[1.0, 2.0, 3.0],
    rotplane_base=[4.0, 5.0, 6.0],
    start_angle=45.0,
    end_angle=90.0,
)