Model.linecreatenormal2d#
- Model.linecreatenormal2d(line_entity, point_entity, plane_normal, plane_base, length, mode)#
Creates a straight segment line of the specified length. The line lies on the specified plane, beginning closest to the specified input point, and normal to the specified line/surface edge.
- Parameters:
line_entity (Entity) – The object describing the line entity. It can also be a surface edge.
point_entity (Entity) – The object describing the input point entity. Valid entities are node and points.
plane_normal (hwTriple) – The hwTriple object defining the plane normal components of the temporoary plane. User can also supply a Python list of three doubles.
plane_base (hwTriple) – The hwTriple object defining the base point components of the temporary plane. User can also supply a Python list of three doubles.
length (double) – The length of the generated line.
mode (int) –
Indicates different modes. Bit values are used and the value is calculated as (Bit0 + 2*Bit1).
Bit0
0 - The normal direction is used, which is the default value.
1 - The direction opposite to the normal direction is used to create the segment.
Bit1
Specifies how entities are organized into components. Valid values are:
0 - Line is created in the current component, which is the default value.
1 - Line is created in the input line component.
Example#
Create straight segment normal to line with ID 5 , start closest to node with ID 15 , in the x - y plane with base node ( 0.0,0.0,0.0 ) with length 10.0#import hm import hm.entities as ent model = hm.Model() model.linecreatenormal2d( line_entity=ent.Line(model, 5), point_entity=ent.Point(model, 15), plane_normal=[1.0, 0.0, 0.0], plane_base=[1.0, 0.0, 0.0], length=10.0, mode=0 )