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

Represents a 3D meshed object. More...

Public Member Functions

None __init__ (self)
 Creates an eVision.Easy3D.EMesh object.
None __init__ (self, eVision.Easy3D.EPointCloud pointCloud, list[int] triangleIndexes)
 Creates an eVision.Easy3D.EMesh object.
None __init__ (self, eVision.Easy3D.EPointCloud pointCloud, list[int] triangleIndexes, list[eVision._eVision.Easy3D.E3DPoint] normals)
 Creates an eVision.Easy3D.EMesh object.
None __init__ (self, eVision.Easy3D.EMesh other)
 Creates an eVision.Easy3D.EMesh object.
None Clear (self)
 Empties the Mesh.
None Load (self, str path)
 Loads the eVision.Easy3D.EMesh.
None Load (self, eVision.ESerializer|None serializer)
 Loads the eVision.Easy3D.EMesh.
None Save (self, str path)
 Saves the eVision.Easy3D.EMesh.
None Save (self, eVision.ESerializer|None serializer)
 Saves the eVision.Easy3D.EMesh.
None SaveSTL (self, str path, bool binary)
 Saves the triangle mesh to an STL file.
None SaveSTL (self, str path)
 Saves the triangle mesh to an STL file.
None LoadSTL (self, str path)
 Loads a triangle mesh from an STL file.
eVision.Easy3D.E3DPlane ComputePlaneBehind (self, eVision.Easy3D.E3DPoint normal, float margin)
 Returns the eVision.Easy3D.E3DPlane with given normal on which the eVision.Easy3D.EMesh lays.
eVision.Easy3D.E3DPlane ComputePlaneBehind (self, eVision.Easy3D.E3DPoint normal)
 Returns the eVision.Easy3D.E3DPlane with given normal on which the eVision.Easy3D.EMesh lays.
eVision.Easy3D.EPointCloud PointCloud (self)
 Returns the point cloud of the eVision.Easy3D.EMesh object.
ctypes.c_void_p TriangleIndexes (self)
 Returns a pointer to the index array (an array of 32 bit signed integers) representing the list of triangles.
ctypes.c_void_p Normals (self)
 Returns a pointer to the array (of eVision.Easy3D.E3DPoint) representing the list of normals.
int TriangleCount (self)
 Returns the number of triangles.

Detailed Description

Represents a 3D meshed object.

Remarks:

License(s): Easy3D

Constructor & Destructor Documentation

◆ __init__() [1/4]

None eVision.Easy3D.EMesh.__init__ ( self)

Creates an eVision.Easy3D.EMesh object.

◆ __init__() [2/4]

None eVision.Easy3D.EMesh.__init__ ( self,
eVision.Easy3D.EPointCloud pointCloud,
list[int] triangleIndexes )

Creates an eVision.Easy3D.EMesh object.

Parameters
pointCloudA point cloud
triangleIndexesThe triangle mesh is a list of indexes, referring to the array contained in "pointCloud".

A triangle is defined by 3 indexes (T1a T1b T1c T2a T2b T2c T3a ....). Index values must be in [0, N[ with N the number of points in the eVision.Easy3D.EPointCloud. The triangle index array size is a multiple of 3.

◆ __init__() [3/4]

None eVision.Easy3D.EMesh.__init__ ( self,
eVision.Easy3D.EPointCloud pointCloud,
list[int] triangleIndexes,
list[eVision._eVision.Easy3D.E3DPoint] normals )

Creates an eVision.Easy3D.EMesh object.

Parameters
pointCloudA point cloud
triangleIndexesThe triangle mesh is a list of indexes, referring to the array contained in "pointCloud".

A triangle is defined by 3 indexes (T1a T1b T1c T2a T2b T2c T3a ....). Index values must be in [0, N[ with N the number of points in the eVision.Easy3D.EPointCloud. The triangle index array size is a multiple of 3.

Parameters
normalsNormals of each of the faces of the mesh. Must be the third of the size of "triangleIndexes".

If not provided, they will be computed automatically from the faces by assuming the vertices are listed in counter-clock-wise order from outside (which is the convention used by the stl file format).

◆ __init__() [4/4]

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

Creates an eVision.Easy3D.EMesh object.

Parameters
otherAnother eVision.Easy3D.EMesh.

Member Function Documentation

◆ Clear()

None eVision.Easy3D.EMesh.Clear ( self)

Empties the Mesh.

◆ ComputePlaneBehind() [1/2]

eVision.Easy3D.E3DPlane eVision.Easy3D.EMesh.ComputePlaneBehind ( self,
eVision.Easy3D.E3DPoint normal )

Returns the eVision.Easy3D.E3DPlane with given normal on which the eVision.Easy3D.EMesh lays.

This is useful when projecting an eVision.Easy3D.EMesh on an eVision.Easy3D.EZMap.

Parameters
normalThe normal of the plane.

◆ ComputePlaneBehind() [2/2]

eVision.Easy3D.E3DPlane eVision.Easy3D.EMesh.ComputePlaneBehind ( self,
eVision.Easy3D.E3DPoint normal,
float margin )

Returns the eVision.Easy3D.E3DPlane with given normal on which the eVision.Easy3D.EMesh lays.

This is useful when projecting an eVision.Easy3D.EMesh on an eVision.Easy3D.EZMap.

Parameters
normalThe normal of the plane.
marginLet P be the plane, A point of the eVision.Easy3D.EMesh closest to P and B the of the eVision.Easy3D.EMesh furthest to B. margin = dist(P, A) / dist(P, B). Must be positive. Default: 0.02.

◆ Load() [1/2]

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

Loads the eVision.Easy3D.EMesh.

Supported formats are eVision proprietary and STL. The given eVision.ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ Load() [2/2]

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

Loads the eVision.Easy3D.EMesh.

Supported formats are eVision proprietary and STL. The given eVision.ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ LoadSTL()

None eVision.Easy3D.EMesh.LoadSTL ( self,
str path )

Loads a triangle mesh from an STL file.

Parameters
pathThe path to the STL file.

◆ Normals()

ctypes.c_void_p eVision.Easy3D.EMesh.Normals ( self)

Returns a pointer to the array (of eVision.Easy3D.E3DPoint) representing the list of normals.

If the eVision.Easy3D.EMesh object has no triangle mesh data, this method returns NULL.

◆ PointCloud()

eVision.Easy3D.EPointCloud eVision.Easy3D.EMesh.PointCloud ( self)

Returns the point cloud of the eVision.Easy3D.EMesh object.

◆ Save() [1/2]

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

Saves the eVision.Easy3D.EMesh.

Supported formats are eVision proprietary and STL. 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.EMesh.Save ( self,
str path )

Saves the eVision.Easy3D.EMesh.

Supported formats are eVision proprietary and STL. The given eVision.ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ SaveSTL() [1/2]

None eVision.Easy3D.EMesh.SaveSTL ( self,
str path )

Saves the triangle mesh to an STL file.

Parameters
pathThe path to the STL file.

◆ SaveSTL() [2/2]

None eVision.Easy3D.EMesh.SaveSTL ( self,
str path,
bool binary )

Saves the triangle mesh to an STL file.

Parameters
pathThe path to the STL file.
binaryOptional parameter, activates the binary file format (default is true).

◆ TriangleCount()

int eVision.Easy3D.EMesh.TriangleCount ( self)

Returns the number of triangles.

If the eVision.Easy3D.EMesh object has no triangle mesh data, the method returns 0.

◆ TriangleIndexes()

ctypes.c_void_p eVision.Easy3D.EMesh.TriangleIndexes ( self)

Returns a pointer to the index array (an array of 32 bit signed integers) representing the list of triangles.

Indexes are referring to the array of eVision.Easy3D.E3DPoint.

A triangle is defined by 3 indexes (T1a T1b T1c T2a T2b T2c T3a ....). The triangle index array size is a multiple of 3.

Index values must be in [0, N[ where N is the number of points in the point cloud. If the eVision.Easy3D.EMesh object has no triangle mesh data, this method returns NULL.