Model.surfacespherefromthreepoints#

Model.surfacespherefromthreepoints(center_node, radius, r_node, theta_start, theta_end, angle_node, phi_start, phi_end, angle_type)#

Creates a full or partial sphere, and optionally, prepares it for immediate use within the automesher. It can also identify a region in the shape of such a sphere for the automesher to use under the mesh without surface option.

Parameters:
  • center_node (Entity) – A node specifying the center.

  • radius (double) – The radius of the sphere.

  • r_node (Entity) – A node specifying the r vector.

  • theta_start (double) – Angle at which theta starts (0.0 to < theta end).

  • theta_end (double) – Angle at which theta ends (> theta start to 360.0).

  • angle_node (Entity) – A node specifying the angle vector.

  • phi_start (double) – Angle at which phi starts (-90.0 to < phi end).

  • phi_end (double) – Angle at which phi ends (> phi start to 90.0).

  • angle_type (int) –

    Defines whether the angle vector is to be theta or phi.

    0 - The angle vector will be theta.

    1 - The angle vector will be phi.

Example#

Create one quarter of a sphere with a radius of 10.0 through use nodes with IDs 1 , 2 and 3 , but not create any elements#
import hm
import hm.entities as ent

model = hm.Model()

model.surfacemode(mode=4)

model.surfacespherefromthreepoints(
    center_node=ent.Node(mode, 1),
    radius=10.0,
    r_node=ent.Node(model, 2),
    theta_start=0.0,
    theta_end=180.0,
    angle_node=ent.Node(model, 3),
    phi_start=0.0,
    phi_end=90.0,
    angle_type=0,
)

Note

The model.surfacemode(mode=4) directive tells HyperMesh not to pass the information on to the automesher for element creation.