Model.add_rib#
- Model.add_rib(plane_normal, plane_base, surface_entity1, surface_entity2, x1, y1, z1, x2, y2, z2, width, draft_angle, plane_position, options)#
Creates a rib whose position is determined by a profile plane together with two points that are located on two given surfaces, respectively. The mid-plane of the rib will be always parallel to the profile plane. The rib is allowed to cut into some other ribs transversely as it goes from
surface_entity1tosurface_entity2, hence creating multiple walls in between. They are also allowed to go over some other ribs or bumps.- Parameters:
plane_normal (hwTriple) – The hwTriple object defining the rib profile plane normal components. User can also supply a Python list of three doubles.
plane_base (hwTriple) – The hwTriple object defining the base point components of the rib profile plane. User can also supply a Python list of three doubles.
surface_entity1 (Entity) – The object describing the first surface entity on which a rib end is located.
surface_entity2 (Entity) – The object describing the second surface entity on which a rib end is located.
x1 (double) – The x-coordinate of the first rib end point.
y1 (double) – The y-coordinate of the first rib end point.
z1 (double) – The z-coordinate of the first rib end point.
x2 (double) – The x-coordinate of the second rib end point.
y2 (double) – The y-coordinate of the second rib end point.
z2 (double) – The z-coordinate of the second rib end point.
width (double) – The distance between the side planes of the rib measured at the top plane of the rib. It is the width of the top plane of the rib and its value must always be greater than zero.
draft_angle (double) – The tilt angle of the side planes of the rib with respect to the mid-plane of the rib. If the draft angle is zero, then the sides of the rib will be parallel to the mid-plane of the rib. As the draft angle increases, the side planes open up from the bottom of the rib, keeping the locations fixed at the top plane of the rib. Negative draft angles are allowed, but if too large, might result in intersection of side planes with each other hence the rib might fail to be created.
plane_position (unsigned int) – Specifies if the profile plane is going to be coincident with the mid-plane (i.e., value 0), or if it will be on its left or right (i.e., values 1 and 2, respectively) at a distance which is equal to half of the width.
options (unsigned int) –
0 - Triangular rib
1 - Quadrilateral rib
Note
The first and second rib point do not have to be on the profile plane but they should be close enough for accurate positioning of the rib. The intersection line of
surface_entity1(orsurface_entity2respectively) with the profile plane is calculated and the closest location on this line to the input is used, which would be located both onsurface_entity1(orsurface_entity2respectively) and the profile plane at the same time.Example#
Create a triangular rib that has a width of 0.8 and a draft angle of 4.0 degrees , using the x - y plane with base ( 0 , 0 , and 0 ) . The rib will be created on the left of this profile plane . The rib will start at surface with ID 9 and end at surface with ID 6 . The exact start location is the closest point to point ( 12.0 , 35.0 , and 22.0 ) that is at the intersection of surface with ID 9 with profile plane and the exact end position is determined similarly by point ( 10.5 , 35.5 , and 17.5 ) using surface with ID 6 and profile plane .#import hm import hm.entities as ent model = hm.Model() model.add_rib( plane_normal=[0.0, 0.0, 1.0], plane_base=[0.0, 0.0, 0.0], surface_entity1=ent.Surface(model, 9), surface_entity2=ent.Surface(model, 6), x1=12.0, y1=35.0, z1=22.0, x2=10.5, y2=35.5, z2=17.5, width=0.8, draft_angle=4.0, plane_position=2, options=0, )