Model.solidcone#

Model.solidcone(base_x, base_y, base_z, mvec_x, mvec_y, mvec_z, nvec_x, nvec_y, nvec_z, base_radius, top_radius, aspect_ratio, start_angle, end_angle, height)#

Creates a full or partial cone or cylindrical solid.

Parameters:
  • base_x (double) – The x-coordinate specifying the center point of the cone/cylinder base location.

  • base_y (double) – The y-coordinate specifying the center point of the cone/cylinder base location.

  • base_z (double) – The z-coordinate specifying the center point of the cone/cylinder base location.

  • mvec_x (double) – The x-coordinate specifying the major axis vector direction from the base location.

  • mvec_y (double) – The y-coordinate specifying the major axis vector direction from the base location.

  • mvec_z (double) – The z-coordinate specifying the major axis vector direction from the base location.

  • nvec_x (double) – The x-coordinate specifying the normal vector (along the length) from the base location.

  • nvec_y (double) – The y-coordinate specifying the normal vector (along the length) from the base location.

  • nvec_z (double) – The z-coordinate specifying the normal vector (along the length) from the base location.

  • base_radius (double) –

    The radius of the bottom of the cone/cylinder (at the major axis in case of elliptical cone or cylinder).

    If the top_radius and base_radius are equal, this creates a cylindrical solid.

  • top_radius (double) –

    The radius of the top of the cone/cylinder (at the major axis in case of elliptical cone or cylinder).

    If the top_radius and base_radius are equal, this creates a cylindrical solid.

  • aspect_ratio (double) –

    A value less than 1.0 creates an elliptical cone/cylinder. A value smaller than 1.0 indicates a more elliptical shape.

    Must be > 0.0.

  • start_angle (double) – The angle at which the cone/cylinder starts (0.0 < start_angle< end_angle). The 0.0 starts at major axis.

  • end_angle (double) – The angle at which the cone/cylinder ends (start_angle < end_angle < 360.0)

  • height (double) – The height of the cone/cylinder.

Example#

Create a full elliptical cone solid with center at (0.0, 0.0, 0.0) , with major axis vector (1.0, 0.0, 0.0) , normal axis vector (0.0, 0.0, 1.0), base radius of 20.0, top radius of 10.0, ratio between minor and major axis of 0.5, and a height of 30.0#
import hm
import hm.entities as ent

model = hm.Model()

model.solidcone(
    base_x=0.0,
    base_y=0.0,
    base_z=0.0,
    mvec_x=1.0,
    mvec_y=0.0,
    mvec_z=0.0,
    nvec_x=0.0,
    nvec_y=0.0,
    nvec_z=1.0,
    base_radius=20.0,
    top_radius=10.0,
    aspect_ratio=0.5,
    start_angle=0.0,
    end_angle=360.0,
    height=30,
)