Skip to content

intersect_line_plane_object_model_3dintersect_line_plane_object_model_3dIntersectLinePlaneObjectModel3dIntersectLinePlaneObjectModel3dintersect_line_plane_object_model_3dT_intersect_line_plane_object_model_3d🔗

Short description🔗

intersect_line_plane_object_model_3dintersect_line_plane_object_model_3dIntersectLinePlaneObjectModel3dIntersectLinePlaneObjectModel3dintersect_line_plane_object_model_3dT_intersect_line_plane_object_model_3d — Intersect a line with a plane.

Signature🔗

intersect_line_plane_object_model_3d( object_model_3d ObjectModel3DPlane, point3d.x PX, point3d.y PY, point3d.z PZ, point3d.x QX, point3d.y QY, point3d.z QZ, attribute.name GenParamName, attribute.value GenParamValue, out point3d.x X, out point3d.y Y, out point3d.z Z, out number Index )intersect_line_plane_object_model_3d( : : ObjectModel3DPlane, PX, PY, PZ, QX, QY, QZ, GenParamName, GenParamValue : X, Y, Z, Index )void IntersectLinePlaneObjectModel3d( const HTuple& ObjectModel3DPlane, const HTuple& PX, const HTuple& PY, const HTuple& PZ, const HTuple& QX, const HTuple& QY, const HTuple& QZ, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* X, HTuple* Y, HTuple* Z, HTuple* Index )static void HOperatorSet.IntersectLinePlaneObjectModel3d( HTuple objectModel3DPlane, HTuple PX, HTuple PY, HTuple PZ, HTuple QX, HTuple QY, HTuple QZ, HTuple genParamName, HTuple genParamValue, out HTuple x, out HTuple y, out HTuple z, out HTuple index )def intersect_line_plane_object_model_3d( object_model_3dplane: MaybeSequence[HHandle], px: MaybeSequence[Union[int, float]], py: MaybeSequence[Union[int, float]], pz: MaybeSequence[Union[int, float]], qx: MaybeSequence[Union[int, float]], qy: MaybeSequence[Union[int, float]], qz: MaybeSequence[Union[int, float]], gen_param_name: Sequence[str], gen_param_value: Sequence[str] ) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[int]]

def intersect_line_plane_object_model_3d_s( object_model_3dplane: MaybeSequence[HHandle], px: MaybeSequence[Union[int, float]], py: MaybeSequence[Union[int, float]], pz: MaybeSequence[Union[int, float]], qx: MaybeSequence[Union[int, float]], qy: MaybeSequence[Union[int, float]], qz: MaybeSequence[Union[int, float]], gen_param_name: Sequence[str], gen_param_value: Sequence[str] ) -> Tuple[float, float, float, int]Herror T_intersect_line_plane_object_model_3d( const Htuple ObjectModel3DPlane, const Htuple PX, const Htuple PY, const Htuple PZ, const Htuple QX, const Htuple QY, const Htuple QZ, const Htuple GenParamName, const Htuple GenParamValue, Htuple* X, Htuple* Y, Htuple* Z, Htuple* Index )

static void HObjectModel3D::IntersectLinePlaneObjectModel3d( const HObjectModel3DArray& ObjectModel3DPlane, const HTuple& PX, const HTuple& PY, const HTuple& PZ, const HTuple& QX, const HTuple& QY, const HTuple& QZ, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* X, HTuple* Y, HTuple* Z, HTuple* Index )

void HObjectModel3D::IntersectLinePlaneObjectModel3d( double PX, double PY, double PZ, double QX, double QY, double QZ, const HTuple& GenParamName, const HTuple& GenParamValue, double* X, double* Y, double* Z, Hlong* Index ) const

static void HObjectModel3D.IntersectLinePlaneObjectModel3d( HObjectModel3D[] objectModel3DPlane, HTuple PX, HTuple PY, HTuple PZ, HTuple QX, HTuple QY, HTuple QZ, HTuple genParamName, HTuple genParamValue, out HTuple x, out HTuple y, out HTuple z, out HTuple index )

void HObjectModel3D.IntersectLinePlaneObjectModel3d( double PX, double PY, double PZ, double QX, double QY, double QZ, HTuple genParamName, HTuple genParamValue, out double x, out double y, out double z, out int index )

Description🔗

intersect_line_plane_object_model_3dIntersectLinePlaneObjectModel3d intersects a line with a plane given as a 3D object model that is specified by the parameter ObjectModel3DPlaneobjectModel3DPlaneobject_model_3dplane. A plane can be created using gen_plane_object_model_3dGenPlaneObjectModel3d.

The line is defined by a starting point P (PXPXpx, PYPYpy, PZPZpz) and end point Q (QXQXqx, QYQYqy, QZQZqz).

The following generic parameters GenParamNamegenParamNamegen_param_name and the corresponding values GenParamValuegenParamValuegen_param_value are supported:

  • 'plane_mode'"plane_mode": Specifies the plane mode. The modes 'extent'"extent" and 'infinite'"infinite" are supported.

    Default: 'extent'"extent".

The result is a 3D point Xxx, Yyy, Zzz, as well as an index Indexindexindex which contains the indices of the input lines or planes which that have intersections.

Parameter Broadcasting🔗

This operator supports parameter broadcasting. This means that each parameter can be given as a tuple of length 1 or N. Parameters with tuple length 1 will be repeated internally such that the number of created items is always N.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on internal data level.

Parameters🔗

ObjectModel3DPlaneobjectModel3DPlaneobject_model_3dplane (input_control) object_model_3d(-array) → (handle)(handle)HTuple (HHandle)HObjectModel3D, HTuple (IntPtr)MaybeSequence[HHandle]Htuple (handle)

Handle of plane as 3D object model.

PXPXpx (input_control) point3d.x(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

X coordinate of the first point of the line.

PYPYpy (input_control) point3d.y(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Y coordinate of the first point of the line.

PZPZpz (input_control) point3d.z(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Z coordinate of the first point of the line.

QXQXqx (input_control) point3d.x(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

X coordinate of the second point of the line.

QYQYqy (input_control) point3d.y(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Y coordinate of the second point of the line.

QZQZqz (input_control) point3d.z(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Z coordinate of the second point of the line.

GenParamNamegenParamNamegen_param_name (input_control) attribute.name-array → (string)(string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Names of the generic parameters.

Default: [][]
List of values: 'plane_mode'"plane_mode"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value-array → (string)(string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Values of the generic parameters.

Default: [][]
Suggested values: 'extent', 'infinite'"extent", "infinite"

Xxx (output_control) point3d.x(-array) → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Resulting X coordinate of the intersection point.

Yyy (output_control) point3d.y(-array) → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Resulting Y coordinate of the intersection point.

Zzz (output_control) point3d.z(-array) → (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Resulting Z coordinate of the intersection point.

Indexindexindex (output_control) number(-array) → (integer)(integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Index of the intersection point.

Example🔗

(HDevelop)


gen_plane_object_model_3d ([0.1,0.2,0.3,110,110,0,0], [30, 0, -30, 0], [0, 30, 0, -30], Plane)
P:= [10.2,0.3,30]
Q:= [-10.2,0.3,-30]
intersect_line_plane_object_model_3d( Plane,P[0], P[1], P[2], Q[0], Q[1], Q[2],[], [], X, Y, Z, Index)
gen_object_model_3d_from_points ([P[0], Q[0]],[P[1], Q[1]],[P[2], Q[2]], LineModel3D)
set_object_model_3d_attrib_mod (LineModel3D, 'lines', [], [2,0,1])
gen_sphere_object_model_3d_center (X, Y, Z, 0.5, IntersectionModel3D)
dev_get_window (WindowHandle)
visualize_object_model_3d (WindowHandle, [Plane, LineModel3D, IntersectionModel3D], [], [], [], \
                           [], [], [], [], PoseOut)

Result🔗

intersect_line_plane_object_model_3dIntersectLinePlaneObjectModel3d returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

gen_plane_object_model_3dGenPlaneObjectModel3d, get_line_of_sightGetLineOfSight, affine_trans_point_3dAffineTransPoint3d

Possible successors

gen_object_model_3d_from_pointsGenObjectModel3dFromPoints

See also

intersect_plane_object_model_3dIntersectPlaneObjectModel3d

Module🔗

3D Metrology