CVBpy 15.0
Plane3D Class Reference

A plane in 3D space in Hessian normal form. More...

Inherits object.

Public Member Functions

cvb.AffineMatrix3D align_to_xy_plane (self)
 Calculates a rigid body transformation that maps the plane into the xy plane of the global coordinate system. More...
 
float distance_to_point (self, cvb.Point3D pt)
 Calculates the distance to the point pt. More...
 
float distance_to_point (self, float x, float y, float z)
 Calculates the distance to the point pt. More...
 

Properties

 distance_to_origin = property
 float: Gets or sets the distance to the origin in point units.
 
 normal = property
 cvb.Point3D: Gets or sets the normal vector of the plane.
 

Detailed Description

A plane in 3D space in Hessian normal form.

Creates a new Plane3D object from the given normal vector components and the distanceToOrigin.

Parameters

nx : float Normal vector x component.

ny : float Normal vector y component.

nz : float Normal vector z component.

distance_to_origin : float Distance to origin in point units.

Member Function Documentation

◆ align_to_xy_plane()

cvb.AffineMatrix3D align_to_xy_plane (   self)

Calculates a rigid body transformation that maps the plane into the xy plane of the global coordinate system.

If a point cloud contains a tilted plane (e.g. representing a conveyer belt), which is not aligned to the xy plane, the following steps should be taken:

  1. Calulate a plane fit on the data using function FitPlane.
  2. Align the output plane to the xy plane with AlignToXYPlane.

Please note the following:

  • The transformation includes only a rotation about x and y axis. The resulting transformation will not contain any rotation about the global Z-axis.
  • The translation to the origin of the global coordinate system is done along z axis.

Returns

cvb.AffineMatrix3D Calculated transformation to move the plane to xy plane.

◆ distance_to_point() [1/2]

float distance_to_point (   self,
cvb.Point3D  pt 
)

Calculates the distance to the point pt.

Parameters

pt : cvb.Point3D Point to calculate the distance to.

Returns

float The distance to the specified point.

◆ distance_to_point() [2/2]

float distance_to_point (   self,
float  x,
float  y,
float  z 
)

Calculates the distance to the point pt.

Parameters

x : float Point x component.

y : float Point y component.

z : float Point z component.

Returns

float The distance to the specified point.