eVision Python API
Loading...
Searching...
No Matches
eVision.Easy3D.E3DObject Class Reference

A eVision.Easy3D.E3DObject is a geometric description of a set of 3D points, produced by E3DObjectExtractor. More...

Public Member Functions

None __init__ (self)
 Constructs an eVision.Easy3D.E3DObject with default (invalid) values.
None __init__ (self, eVision.Easy3D.E3DObject other)
 Copy constructor for the eVision.Easy3D.E3DObject.
None Load (self, str path)
 Loads the eVision.Easy3D.E3DObject.
None Load (self, eVision.ESerializer|None serializer)
 Loads the eVision.Easy3D.E3DObject.
None Save (self, str path)
 Saves the eVision.Easy3D.E3DObject.
None Save (self, eVision.ESerializer|None serializer)
 Saves the eVision.Easy3D.E3DObject.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.Easy3D.E3DObjectFeature feature, eVision.ERGBColor color, float zoomX, float zoomY, float panX, float panY)
 Draws the specified feature of the object in the given graphic context.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.Easy3D.E3DObjectFeature feature, eVision.ERGBColor color, float zoomX, float zoomY, float panX)
 Draws the specified feature of the object in the given graphic context.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.Easy3D.E3DObjectFeature feature, eVision.ERGBColor color, float zoomX, float zoomY)
 Draws the specified feature of the object in the given graphic context.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.Easy3D.E3DObjectFeature feature, eVision.ERGBColor color, float zoomX)
 Draws the specified feature of the object in the given graphic context.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.Easy3D.E3DObjectFeature feature, eVision.ERGBColor color)
 Draws the specified feature of the object in the given graphic context.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.Easy3D.E3DObjectFeature feature)
 Draws the specified feature of the object in the given graphic context.
None AddToMesh (self, eVision.Easy3D.E3DObjectFeature feature, eVision.Easy3D.EMesh mesh)
 Adds a 3D representation (in the form of a list of triangles) of the given feature to the given mesh.
eVision.Easy3D.E3DObject Transform (self, eVision.Easy3D.E3DTransformMatrix matrix)
 Transforms the 3D object with the given transformation matrix.
bool GetIsFeatureComputed (self, eVision.Easy3D.E3DObjectFeature feature)
 returns true or false depending if the feature was computed for this object
int NumPixels (self)
 Number of ZMap pixels composing the object.
eVision.Easy3D.E3DBox BoundingBox (self)
 The eVision.Easy3D.E3DBox (3D oriented bounding box) of the object.
eVision.Easy3D.E3DPoint AveragePosition (self)
 3D average position of the object.
eVision.Easy3D.E3DPoint LocalTopPosition (self)
 3D highest position of the object relatively to the object base plane.
eVision.Easy3D.E3DPoint ReferenceTopPosition (self)
 3D top position relative to the ZMap origin (this is the position with the highest Z coordinate)
float Length (self)
 Length of the object in metric units.
float Width (self)
 Width of the object in metric units.
float AspectRatio (self)
 Aspect ratio of the object.
float LocalHeight (self)
 Local height of the object in metric units.
float ReferenceHeight (self)
 Reference height of the object in metric units.
float Orientation (self)
 Orientation of the object.
eVision.Easy3D.E3DPlane Plane (self)
 Plane fitted to the object 3D positions.
float LocalTilt (self)
 Angle between the object plane and the base plane.
float ReferenceTilt (self)
 Angle between the object plane and the vertical (Z) axis.
float Area (self)
 Object area in metric units.
float Volume (self)
 Object volume in metric units.
eVision.Easy3D.E3DPlane BasePlane (self)
 Base plane.
float BaseTilt (self)
 Angle between the base plane and the vertical (Z) axis.
eVision.ERectangleRegion RectangleRegion (self)
 eVision.ERectangleRegion enclosing the object ZMap pixels.
eVision.ERegion Region (self)
 eVision.ERegion composed of the object ZMap pixels.
eVision.Easy3D.E3DSphere Sphere (self)
 Sphere fitted to the object.

Detailed Description

A eVision.Easy3D.E3DObject is a geometric description of a set of 3D points, produced by E3DObjectExtractor.

Several 3D features are available. All 3D features are expressed in the ZMap metric coordinate system.

Remarks:

License(s): Easy3D

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.Easy3D.E3DObject.__init__ ( self)

Constructs an eVision.Easy3D.E3DObject with default (invalid) values.

◆ __init__() [2/2]

None eVision.Easy3D.E3DObject.__init__ ( self,
eVision.Easy3D.E3DObject other )

Copy constructor for the eVision.Easy3D.E3DObject.

Parameters
otherThe other eVision.Easy3D.E3DObject that we will copy into this one.

Member Function Documentation

◆ AddToMesh()

None eVision.Easy3D.E3DObject.AddToMesh ( self,
eVision.Easy3D.E3DObjectFeature feature,
eVision.Easy3D.EMesh mesh )

Adds a 3D representation (in the form of a list of triangles) of the given feature to the given mesh.

If the feature is not defined for the eVision.Easy3D.E3DObject, this method has no effect.

◆ Area()

float eVision.Easy3D.E3DObject.Area ( self)

Object area in metric units.

◆ AspectRatio()

float eVision.Easy3D.E3DObject.AspectRatio ( self)

Aspect ratio of the object.

The aspect ratio is the smallest dimension divided by the largest dimension, its value is always between 0 and 1. The smaller the ratio, the more elongated the object is. A value of 1 means a perfectly square object (length=width).

◆ AveragePosition()

eVision.Easy3D.E3DPoint eVision.Easy3D.E3DObject.AveragePosition ( self)

3D average position of the object.

◆ BasePlane()

eVision.Easy3D.E3DPlane eVision.Easy3D.E3DObject.BasePlane ( self)

Base plane.

The base plane is calculated using points surrounding the object.

◆ BaseTilt()

float eVision.Easy3D.E3DObject.BaseTilt ( self)

Angle between the base plane and the vertical (Z) axis.

◆ BoundingBox()

eVision.Easy3D.E3DBox eVision.Easy3D.E3DObject.BoundingBox ( self)

The eVision.Easy3D.E3DBox (3D oriented bounding box) of the object.

The bounding box is oriented in the XY plane of the ZMap space (rotation over the ZMap Z axis). The bounding box X and Y sizes are the object length and width (see eVision.Easy3D.E3DObject.Length and eVision.Easy3D.E3DObject.Width). The bounding box Z size is always in the ZMap Z axis direction.

◆ Draw() [1/6]

None eVision.Easy3D.E3DObject.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.Easy3D.E3DObjectFeature feature )

Draws the specified feature of the object in the given graphic context.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
featureThe feature to draw.

◆ Draw() [2/6]

None eVision.Easy3D.E3DObject.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.Easy3D.E3DObjectFeature feature,
eVision.ERGBColor color )

Draws the specified feature of the object in the given graphic context.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
featureThe feature to draw.
colorThe color in which to draw the feature (optional).

◆ Draw() [3/6]

None eVision.Easy3D.E3DObject.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.Easy3D.E3DObjectFeature feature,
eVision.ERGBColor color,
float zoomX )

Draws the specified feature of the object in the given graphic context.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.

◆ Draw() [4/6]

None eVision.Easy3D.E3DObject.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.Easy3D.E3DObjectFeature feature,
eVision.ERGBColor color,
float zoomX,
float zoomY )

Draws the specified feature of the object in the given graphic context.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ Draw() [5/6]

None eVision.Easy3D.E3DObject.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.Easy3D.E3DObjectFeature feature,
eVision.ERGBColor color,
float zoomX,
float zoomY,
float panX )

Draws the specified feature of the object in the given graphic context.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [6/6]

None eVision.Easy3D.E3DObject.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.Easy3D.E3DObjectFeature feature,
eVision.ERGBColor color,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the specified feature of the object in the given graphic context.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ GetIsFeatureComputed()

bool eVision.Easy3D.E3DObject.GetIsFeatureComputed ( self,
eVision.Easy3D.E3DObjectFeature feature )

returns true or false depending if the feature was computed for this object

Parameters
featureThe feature that is either computed or not.

◆ Length()

float eVision.Easy3D.E3DObject.Length ( self)

Length of the object in metric units.

The length is the largest dimension of the object on the XY plane of the ZMap space.

◆ Load() [1/2]

None eVision.Easy3D.E3DObject.Load ( self,
eVision.ESerializer | None serializer )

Loads the eVision.Easy3D.E3DObject.

The given eVision.ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ Load() [2/2]

None eVision.Easy3D.E3DObject.Load ( self,
str path )

Loads the eVision.Easy3D.E3DObject.

The given eVision.ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ LocalHeight()

float eVision.Easy3D.E3DObject.LocalHeight ( self)

Local height of the object in metric units.

The local height of the object is relative to the surroundings. The base plane is used as the reference for the calculation of the local height. If it is not possible to evaluate a base plane, the local height has the same value as the reference height (eVision.Easy3D.E3DObject.ReferenceHeight)

◆ LocalTilt()

float eVision.Easy3D.E3DObject.LocalTilt ( self)

Angle between the object plane and the base plane.

◆ LocalTopPosition()

eVision.Easy3D.E3DPoint eVision.Easy3D.E3DObject.LocalTopPosition ( self)

3D highest position of the object relatively to the object base plane.

If it is not possible to evaluate a base plane, the local top position is the reference top position (eVision.Easy3D.E3DObject.ReferenceTopPosition)

◆ NumPixels()

int eVision.Easy3D.E3DObject.NumPixels ( self)

Number of ZMap pixels composing the object.

◆ Orientation()

float eVision.Easy3D.E3DObject.Orientation ( self)

Orientation of the object.

The orientation is the angle between the object major (longest) axis and the ZMap X axis.

◆ Plane()

eVision.Easy3D.E3DPlane eVision.Easy3D.E3DObject.Plane ( self)

Plane fitted to the object 3D positions.

◆ RectangleRegion()

eVision.ERectangleRegion eVision.Easy3D.E3DObject.RectangleRegion ( self)

eVision.ERectangleRegion enclosing the object ZMap pixels.

◆ ReferenceHeight()

float eVision.Easy3D.E3DObject.ReferenceHeight ( self)

Reference height of the object in metric units.

The reference height of the object is relative to the ZMap origin (also known as the reference plane).

◆ ReferenceTilt()

float eVision.Easy3D.E3DObject.ReferenceTilt ( self)

Angle between the object plane and the vertical (Z) axis.

◆ ReferenceTopPosition()

eVision.Easy3D.E3DPoint eVision.Easy3D.E3DObject.ReferenceTopPosition ( self)

3D top position relative to the ZMap origin (this is the position with the highest Z coordinate)

◆ Region()

eVision.ERegion eVision.Easy3D.E3DObject.Region ( self)

eVision.ERegion composed of the object ZMap pixels.

◆ Save() [1/2]

None eVision.Easy3D.E3DObject.Save ( self,
eVision.ESerializer | None serializer )

Saves the eVision.Easy3D.E3DObject.

The given eVision.ESerializer must have been created for writing.

Parameters
serializerThe eVision.ESerializer object that is written to.

◆ Save() [2/2]

None eVision.Easy3D.E3DObject.Save ( self,
str path )

Saves the eVision.Easy3D.E3DObject.

The given eVision.ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ Sphere()

eVision.Easy3D.E3DSphere eVision.Easy3D.E3DObject.Sphere ( self)

Sphere fitted to the object.

◆ Transform()

eVision.Easy3D.E3DObject eVision.Easy3D.E3DObject.Transform ( self,
eVision.Easy3D.E3DTransformMatrix matrix )

Transforms the 3D object with the given transformation matrix.

The transformation matrix must contain a rigid transformation (translation and rotation only). Image based attributes of the 3D object are unchanged.

Parameters
matrixThe 3D transformation matrix.

◆ Volume()

float eVision.Easy3D.E3DObject.Volume ( self)

Object volume in metric units.

◆ Width()

float eVision.Easy3D.E3DObject.Width ( self)

Width of the object in metric units.

The width is the smallest dimension of the object on the XY plane of the ZMap space.