triangulate method
Contents
[
Hide
]triangulate(, scene)
Convert all polygon-based meshes into full triangle mesh
@staticmethod
def triangulate(scene):
...
Parameter | Type | Description |
---|---|---|
scene | Scene | The scene to process |
Example
The following code shows how to merge all objects from a scene into a single mesh.
from aspose.threed import Scene
from aspose.threed.entities import Cylinder, PolygonModifier
mesh = Cylinder().to_mesh()
# Triangulate this quadrangle-based mesh to triangle-based
mesh = PolygonModifier.triangulate(mesh)
scene = Scene(mesh)
scene.save("test.obj")
triangulate(, mesh)
Convert a polygon-based mesh into full triangle mesh
Returns
The generated new triangle mesh
@staticmethod
def triangulate(mesh):
...
Parameter | Type | Description |
---|---|---|
mesh | Mesh | The original non-triangle mesh |
Example
The following code shows how to merge all objects from a scene into a single mesh.
from aspose.threed import Scene
from aspose.threed.entities import Cylinder, PolygonModifier
mesh = Cylinder().to_mesh()
# Triangulate this quadrangle-based mesh to triangle-based
mesh = PolygonModifier.triangulate(mesh)
scene = Scene(mesh)
scene.save("test.obj")
triangulate(, control_points)
@staticmethod
def triangulate(control_points):
...
Parameter | Type | Description |
---|---|---|
control_points | list |
triangulate(, control_points, polygons)
@staticmethod
def triangulate(control_points, polygons):
...
Parameter | Type | Description |
---|---|---|
control_points | list | |
polygons | list |
triangulate(, control_points, polygon)
@staticmethod
def triangulate(control_points, polygon):
...
Parameter | Type | Description |
---|---|---|
control_points | list | |
polygon | list |
triangulate(, control_points, polygons, generate_normals, nor_out)
@staticmethod
def triangulate(control_points, polygons, generate_normals, nor_out):
...
Parameter | Type | Description |
---|---|---|
control_points | list | |
polygons | list | |
generate_normals | bool | |
nor_out | any |
See Also
- module
aspose.threed.entities
- class
PolygonModifier