Model.linecreateatplanesintersection#
- Model.linecreateatplanesintersection(plane1_normal, plane1_base, plane2_normal, plane2_base, length_option, length)#
Creates a line at the intersection of two input planes. Only a finite intersection segment line is created, as defined by the input parameters
length_optionandlength. An error is returned if the input planes are parallel or coincide.- Parameters:
plane1_normal (hwTriple) – The hwTriple object defining the plane normal components of the first temporary plene. User can also supply a Python list of three doubles.
plane1_base (hwTriple) – The hwTriple object defining the base point components of the first temporary plane. User can also supply a Python list of three doubles.
plane2_normal (hwTriple) – The hwTriple object defining the plane normal components of the second temporary plane. User can also supply a Python list of three doubles.
plane2_base (hwTriple) – The hwTriple object defining the base point components of the second temporary plane. User can also supply a Python list of three doubles.
length_option (int) –
Parameter specifying how the finite segment line is created. Valid options are:
0 - Base node of the first plane is projected to segment center; length is used as segment length
1 - Base node of the first plane is projected to segment start (see comments); length is used as segment length
2 - Base node of the first plane is projected to segment end (see comments); length is used as segment length
3 - Base node of the first plane is projected to segment start, base node of the second plane is projected to segment end (an error is generated if the length of the resulted segment is zero)
length (double) – When not ignored by
length_option, then specifies the length of resulted intersection curve segment.
Example#
Create an intersection segment between planes x=0 and y=0 with the center at point ( 1.0,2.0,3.0 ) and have a length of 3.62#import hm import hm.entities as ent model = hm.Model() model.linecreateatplanesintersection( plane1_normal=[1.0, 0.0, 0.0], plane1_base=[1.0, 2.0, 3.0], plane2_normal=[0.0, 1.0, 0.0], plane2_base=[1.0, 2.0, 3.0], length_option=0, length=3.62, )