How to use the pyassimp.pyassimp.load function in pyassimp

To help you get started, we’ve selected a few pyassimp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lucasw / simple_sim_ros / bullet_server / scripts / mesh.py View on Github external
rospy.init_node("stl")

file_name = rospy.get_param("~file_name")

if False:
    import vtk
    reader = vtk.vtkSTLReader()
    reader.SetFileName(fil_name)
    reader.Update()
    polydata = reader.GetOutput()
    print polydata.GetPoints()
    print polydata.GetPolys()


scene = pyassimp.load(file_name)
print scene
mesh = scene.meshes[0]

print dir(mesh)
print mesh.faces[0].indices
# print mesh.vertices