Model.surfacecone#

Model.surfacecone(bottom_center, major_vector, normal_vector, base_radius, top_radius, aspect_ratio, start_angle, end_angle, height)#

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

Parameters:
  • bottom_center (Entity) – A node specifying the center of the cone.

  • major_vector (Entity) – A node specifying the major axis.

  • normal_vector (Entity) – A node specifying the axis which the cone spins around. The height is applied from the bottom center along the normal axis.

  • base_radius (double) – The radius of the bottom of the cone.

  • top_radius (double) – The radius of the top of the cone.

  • aspect_ratio (double) – A value less than 1.0 creates an elliptical cone or cylinder.

  • start_angle (double) – Angle at which the cone starts (0.0 to < end angle). 0.0 starts at the major vector.

  • end_angle (double) – Angle at which the cone ends (> start angle to 360.0).

  • height (double) – Height of the cone.

Example#

Create an elliptical cone use nodes with IDs 1 , 2 , and 3 , with base radius of 10.0 , top radius of 5.0 , and height of 10.0 , but not create any elements#
import hm
import hm.entities as ent

model = hm.Model()

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

model.surfacecone(
    bottom_center=ent.Node(model, 1),
    major_vector=ent.Node(model, 2),
    normal_vector=ent.Node(model, 3),
    base_radius=10.0,
    top_radius=5.0,
    aspect_ratio=0.5,
    start_angle=0.0,
    end_angle=360.0,
    height=10,
)

Note

If base_radius = top_radius, a cylinder is created, a cylinder is created.

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