Mesh¶
A Mesh is a geometric representation of a 3D surface, a set of connected 3D points.
In an EMesh .NET Python object, 3 points are connected to define a triangle. This kind of 3D representation is also called a triangle mesh.
A point cloud and the corresponding mesh viewed using E3DViewer .NET Python.¶
An EMesh .NET Python object contains a point cloud and the indexes of the vertices of all mesh triangles. It uses a metric space representation that can be generated from a depth map and that can be used to produce a ZMap.
Generation from a Depth Map¶
An
EMesh.NET Python object is generated from a depth map using the classEDepthMapToMeshConverter.NET Python.Like
EDepthMapToPointCloudConverter.NET Python, this class uses a calibration model to transform the depth map pixels to 3D world positions. In addition, the depth map pixel connectivity is used to build the triangle mesh. Adjacent pixels produce surface triangles.Use the method
EDepthMapToMeshConverter::SetCalibrationModel.NET Python to select a calibration model and the methodEDepthMapToMeshConverter::Convert.NET Python to generate anEMesh.NET Python from an 8 bits or 16 bits depth map.
Generation from a ZMap¶
An
EMesh.NET Python object is generated from a ZMap using the classEZMapToMeshConverter.NET Python.Use the method
EZMapToMeshConverter::SetMaxEdgeLength.NET Python to filter out the large triangles from the mesh. These large triangles occur when the colors of two neighboring pixels are very far apart.
Generation from a Point Cloud¶
An
EMesh.NET Python object is generated from a point cloud using the classEPointCloudToMeshConverter.NET Python.Use the method
EPointCloudToMeshConverter::SetProjectionPlane.NET Python to set the projection plane.Use the method
EPointCloudToMeshConverter::SetResolution.NET Python to specify the size of the triangles of the mesh.Use the method
EPointCloudToMeshConverter::SetMaxEdgeLength.NET Python to filter out the large triangles from the mesh.
See also
Access and Usage¶
In an
EMesh.NET Python object the 3D world positions are stored as anEPointCloud.NET Python (accessible through the methodEMesh::GetPointCloud.NET Python). The triangle mesh is stored as an array of point indexes, where 3 consecutive indexes define a triangle.The method
EMesh::GetTriangleIndexes.NET Python provides a read-only access to the triangle mesh.The normals are stored as an array of
E3DPoint.NET Python readable through theEMesh::GetNormals.NET Python method.
You can use either the proprietary format to save and load
EMesh.NET Python objects using theEMesh::Save.NET Python andEMesh::Load.NET Python methods, or use the STL standard file format using theEMesh::SaveSTL.NET Python andEMesh::LoadSTL.NET Python methods which respectively write to and read from ASCII or binary STL files.You can use an
EMesh.NET Python to produce a ZMap (see “Generating a ZMap”). Because anEMesh.NET Python represents a surface, the generated ZMap can show better continuity and less undefined pixels.