decode method
Contents
[
Hide
]decode(self, file_name)
Decode a point cloud or mesh from the specified stream.
Returns
A Mesh
or PointCloud
instance
def decode(self, file_name):
...
Parameter | Type | Description |
---|---|---|
file_name | str | The input stream |
Example
The following code shows how to decode a mesh from a PLY file:
from aspose import pycore
from aspose.threed import FileFormat
from aspose.threed.entities import Mesh, Sphere
# Generate a test file for decoding
FileFormat.PLY.encode(Sphere(), "sphere.ply")
# Decode the file
mesh = pycore.cast(Mesh, FileFormat.PLY.decode("sphere.ply"))
decode(self, stream)
Decode a point cloud or mesh from the specified stream.
Returns
A Mesh
or PointCloud
instance
def decode(self, stream):
...
Parameter | Type | Description |
---|---|---|
stream | io.RawIOBase | The input stream |
Example
The following code shows how to decode a mesh from a PLY file:
from aspose import pycore
from aspose.threed import FileFormat
from aspose.threed.entities import Mesh, Sphere
# Generate a test file for decoding
FileFormat.PLY.encode(Sphere(), "sphere.ply")
# Decode the file
mesh = pycore.cast(Mesh, FileFormat.PLY.decode("sphere.ply"))
decode(self, file_name, opt)
Decode a point cloud or mesh from the specified stream.
Returns
A Mesh
or PointCloud
instance
def decode(self, file_name, opt):
...
Parameter | Type | Description |
---|---|---|
file_name | str | The input stream |
opt | PlyLoadOptions | The load option of PLY format |
Example
The following code shows how to decode a mesh from a PLY file:
from aspose import pycore
from aspose.threed import FileFormat
from aspose.threed.entities import Mesh, Sphere
# Generate a test file for decoding
FileFormat.PLY.encode(Sphere(), "sphere.ply")
# Decode the file
mesh = pycore.cast(Mesh, FileFormat.PLY.decode("sphere.ply"))
decode(self, stream, opt)
Decode a point cloud or mesh from the specified stream.
Returns
A Mesh
or PointCloud
instance
def decode(self, stream, opt):
...
Parameter | Type | Description |
---|---|---|
stream | io.RawIOBase | The input stream |
opt | PlyLoadOptions | The load option of PLY format |
Example
The following code shows how to decode a mesh from a PLY file:
from aspose import pycore
from aspose.threed import FileFormat
from aspose.threed.entities import Mesh, Sphere
# Generate a test file for decoding
FileFormat.PLY.encode(Sphere(), "sphere.ply")
# Decode the file
mesh = pycore.cast(Mesh, FileFormat.PLY.decode("sphere.ply"))
See Also
- module
aspose.threed.formats
- class
Geometry
- class
Mesh
- class
PlyFormat
- class
PointCloud