Model.surfacetorus#
- Model.surfacetorus(center, major_vector, normal_vector, minor_radius, major_radius, major_start_angle, major_end_angle, minor_start_angle, minor_end_angle)#
Creates a full or partial torus, and optionally, prepares it for immediate use in the automesher. It also can identify a toroidal region for the automesher to use with the mesh without surface option.
- Parameters:
center (Entity) – The enity node specifying the major center of the torus.
major_vector (Entity) – The entity node specifying the major axis of the torus.
normal_vector (Entity) – The entity node specifying the normal axis of the torus.
minor_radius (double) – The minor radius of the torus.
major_radius (double) – The major radius of the torus.
major_start_angle (double) – Angle at which the major radius of the torus starts (0.0 to <
major_end_angle).major_end_angle (double) – Angle at which the major radius of the torus ends (>
major_start_angleto 360.0).minor_start_angle (double) – Angle at which the minor radius of the torus starts (0.0 to <
minor_end_angle).minor_end_angle (double) – Angle at which the minor radius of the torus ends (>
minor_start_angleto 360.0).
Example#
Create the bottom half of a torus with center at node with ID 1 , normal vector at node with ID 12 , major vector at node with ID 4 , and a major radius of 10.0 and a minor radius of 2.5 , but does not continue to the automesher for element creation#import hm import hm.entities as ent model = hm.Model() model.surfacemode(mode=4) model.surfacetorus( center=ent.Node(model, 1), major_vector=ent.Node(model, 12), normal_vector=ent.Node(model, 4), minor_radius=2.5, major_radius=10.0, major_start_angle=0.0, major_end_angle=360.0, minor_start_angle=180.0, minor_end_angle=360, )
Note
The
model.surfacemode(mode=4)directive tells HyperMesh not to pass the information on to the automesher for element creation