Model.nodecreateatvectorplaneintersection#

Model.nodecreateatvectorplaneintersection(vector, vector_base, plane_or_vector, plane_or_vector_base, vector_use, plane_use, point_flag)#

Creates node or point at location of intersection between two vectors or a vector and a plane.

Parameters:
  • vector (hwTriple) – The hwTriple object defining the vector direction. User can also supply a Python list of three doubles.

  • vector_base (hwTriple) – The hwTriple object defining the base point components of the vector. User can also supply a Python list of three doubles.

  • plane_or_vector (hwTriple) – The hwTriple object defining the plane normal of the temporary plane if plane_use=0 or the direction of the vector if plane_use is 1, 2 or 3. User can also supply a Python list of three doubles.

  • plane_or_vector_base (hwTriple) – The hwTriple object defining the base point components of the plane if plane_use=0 or the base point of the vecor if plane_use is 1, 2 or 3. User can also supply a Python list of three doubles.

  • vector_use (int) –

    Parameter specifying whether input data specified by vector or vector_base parameters is interpreted as a plane of vector. Valid values are:

    0, 1 - Input data specified by vector or vector_base parameters is used as undirected vector (straight line that passes through the base point specified by vector parameter in the direction of the normal specified by vector parameter).

    2 - Input data specified by vector or vector_base parameters is used as directed vector (ray that starts at base point specified by vector parameter and continues in the direction of normal specified by vector parameter).

    3 - Input data specified by vector or vector_base parameters is used as finite length vector (segment that starts at base point specified by vector parameter and ends at the end of normal vector specified by vector parameter).

  • plane_use (int) –

    Parameter specifying whether input data specified by plane_or_vector or plane_or_vector_base parameters is interpreted as a plane of vector. Valid values are:

    0 - Input data specified by plane_or_vector or plane_or_vector_base parameters is used as plane.

    1 - Input data specified by plane_or_vector or plane_or_vector_base parameters is used as undirected vector (straight line that passes through the base point specified by plane_or_vector or plane_or_vector_base parameters in the direction of the normal specified by plane_or_vector or plane_or_vector_base parameters).

    2 - Input data specified by plane_or_vector or plane_or_vector_base parameters is used as directed vector (ray that starts at base point specified by plane_or_vector or plane_or_vector_base parameters and continues in the direction of normal specified by plane_or_vector or plane_or_vector_base parameters).

    3 - Input data specified by plane_or_vector or plane_or_vector_base parameters is used as finite length vector (segment that starts at base point specified by plane_or_vector or plane_or_vector_base parameters and ends at the end of normal vector specified by plane_or_vector or plane_or_vector_base parameters).

  • point_flag (int) –

    Parameter specifying whether nodes or points are created. Valid values are:

    0 - Create nodes

    1 - Create points

Examples#

Create nodes at the intersections between straight line ( x=1.0 , y=2.0 ) and the plane z=2.0#
import hm
import hm.entities as ent

model = hm.Model()

model.nodecreateatvectorplaneintersection(
    vector=[0.0, 0.0, 1.0],
    vector_base=[1.0, 2.0, 0.0],
    plane_or_vector=[0.0, 0.0, 1.0],
    plane_or_vector_base=[0.0, 0.0, 2.0],
    vector_use=0,
    plane_use=0,
    point_flag=0,
)
Create points at the intersection between ray that starts at point ( 1.0 , 2.0 , 4.0 ) and propagates in the direction of y axis and a ray that starts at point ( 1.0 , 4.0 , 0.0 ) and propagates in the direction of z axis#
import hm
import hm.entities as ent

model = hm.Model()

model.nodecreateatvectorplaneintersection(
    vector=[0.0, 1.0, 0.0],
    vector_base=[1.0, 2.0, 4.0],
    plane_or_vector=[0.0, 0.0, 4.0],
    plane_or_vector_base=[1.0, 4.0, 0.0],
    vector_use=2,
    plane_use=2,
    point_flag=1,
)