ClassesClasses | | Operators

intersect_plane_object_model_3dT_intersect_plane_object_model_3dIntersectPlaneObjectModel3dIntersectPlaneObjectModel3d (Operator)

Name

intersect_plane_object_model_3dT_intersect_plane_object_model_3dIntersectPlaneObjectModel3dIntersectPlaneObjectModel3d — Intersect a 3D object model with a plane.

Signature

intersect_plane_object_model_3d( : : ObjectModel3D, Plane : ObjectModel3DIntersection)

Herror T_intersect_plane_object_model_3d(const Htuple ObjectModel3D, const Htuple Plane, Htuple* ObjectModel3DIntersection)

void IntersectPlaneObjectModel3d(const HTuple& ObjectModel3D, const HTuple& Plane, HTuple* ObjectModel3DIntersection)

static HObjectModel3DArray HObjectModel3D::IntersectPlaneObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HPoseArray& Plane)

HObjectModel3D HObjectModel3D::IntersectPlaneObjectModel3d(const HPose& Plane) const

static void HOperatorSet.IntersectPlaneObjectModel3d(HTuple objectModel3D, HTuple plane, out HTuple objectModel3DIntersection)

static HObjectModel3D[] HObjectModel3D.IntersectPlaneObjectModel3d(HObjectModel3D[] objectModel3D, HPose[] plane)

HObjectModel3D HObjectModel3D.IntersectPlaneObjectModel3d(HPose plane)

Description

intersect_plane_object_model_3dintersect_plane_object_model_3dIntersectPlaneObjectModel3dIntersectPlaneObjectModel3dIntersectPlaneObjectModel3d intersects a 3D object model with a plane that is defined by the x-y plane of the pose that is specified with the parameter PlanePlanePlanePlaneplane. The z-axis of the pose corresponds to the normal of the plane.

The result is a set of 3D points connected by lines that is returned as 3D object model in ObjectModel3DIntersectionObjectModel3DIntersectionObjectModel3DIntersectionObjectModel3DIntersectionobjectModel3DIntersection. Every triangle that intersects with the plane creates two intersection points and a line between the two points. The resulting set of lines is coplanar.

The lines can be displayed with disp_object_model_3ddisp_object_model_3dDispObjectModel3dDispObjectModel3dDispObjectModel3d and queried with get_object_model_3d_paramsget_object_model_3d_paramsGetObjectModel3dParamsGetObjectModel3dParamsGetObjectModel3dParams using the parameter 'lines'"lines""lines""lines""lines".

Note that if a 3D object model is no longer needed or should be overwritten, the memory has to be freed first by calling the operator clear_object_model_3dclear_object_model_3dClearObjectModel3dClearObjectModel3dClearObjectModel3d.

Execution Information

Parameters

ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D (input_control)  object_model_3d(-array) HObjectModel3D, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Handle of the 3D object model.

PlanePlanePlanePlaneplane (input_control)  pose(-array) HPose, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Pose of the plane.

Default value: [0,0,0,0,0,0,0]

ObjectModel3DIntersectionObjectModel3DIntersectionObjectModel3DIntersectionObjectModel3DIntersectionobjectModel3DIntersection (output_control)  object_model_3d(-array) HObjectModel3D, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Handle of the 3D object model that describes the intersection as a set of lines.

Example (HDevelop)

gen_object_model_3d_from_points (rand(20)-0.5, rand(20)-0.5,\
                                 rand(20)-0.5, ObjectModel3D)
convex_hull_object_model_3d (ObjectModel3D, ObjectModel3DConvexHull)
intersect_plane_object_model_3d (ObjectModel3DConvexHull, [0,0,0,0,0,0,0], \
                                 ObjectModel3DIntersection)
dev_get_window (WindowHandle)
visualize_object_model_3d (WindowHandle, [ObjectModel3DIntersection, \
                           ObjectModel3DConvexHull], [], [], \
                           ['alpha_1'], [0.5], [], [], [], PoseOut)

Result

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

Possible Predecessors

read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3d, select_points_object_model_3dselect_points_object_model_3dSelectPointsObjectModel3dSelectPointsObjectModel3dSelectPointsObjectModel3d

Possible Successors

connection_object_model_3dconnection_object_model_3dConnectionObjectModel3dConnectionObjectModel3dConnectionObjectModel3d

See also

reduce_object_model_3d_by_viewreduce_object_model_3d_by_viewReduceObjectModel3dByViewReduceObjectModel3dByViewReduceObjectModel3dByView

Module

3D Metrology


ClassesClasses | | Operators