Open bvraghav opened 6 years ago
I was trying to read a cube exported as obj from blender. Which exports quads. But the obj reader does not retain the information whether it is quad or triads...
import wavefront_reader mesh = read_wavefront('/path/to/cube.obj') print(mesh)
'usemtl': 'Material', 's': 'off', 'v': array([[ 1. , -1. , -1. ], [ 1. , -1. , 1. ], [-1. , -1. , 1. ], [-1. , -1. , -1. ], [ 1. , 1. , -0.999999], [-1. , 1. , -1. ], [-1. , 1. , 1. ], [ 0.999999, 1. , 1.000001], [ 1. , -1. , -1. ], [ 1. , 1. , -0.999999], [ 0.999999, 1. , 1.000001], [ 1. , -1. , 1. ], [ 1. , -1. , 1. ], [ 0.999999, 1. , 1.000001], [-1. , 1. , 1. ], [-1. , -1. , 1. ], [-1. , -1. , 1. ], [-1. , 1. , 1. ], [-1. , 1. , -1. ], [-1. , -1. , -1. ], [ 1. , 1. , -0.999999], [ 1. , -1. , -1. ], [-1. , -1. , -1. ], [-1. , 1. , -1. ]]), 'vt': (), 'vn': array([[ 0., -1., 0.], [ 0., -1., 0.], [ 0., -1., 0.], [ 0., -1., 0.], [ 0., 1., 0.], [ 0., 1., 0.], [ 0., 1., 0.], [ 0., 1., 0.], [ 1., 0., 0.], [ 1., 0., 0.], [ 1., 0., 0.], [ 1., 0., 0.], [-0., -0., 1.], [-0., -0., 1.], [-0., -0., 1.], [-0., -0., 1.], [-1., -0., -0.], [-1., -0., -0.], [-1., -0., -0.], [-1., -0., -0.], [ 0., 0., -1.], [ 0., 0., -1.], [ 0., 0., -1.], [ 0., 0., -1.]]), 'material': {'Ns': 96.078431, 'Ka': (1.0, 1.0, 1.0), 'Kd': (0.64, 0.64, 0.64), 'Ks': (0.5, 0.5, 0.5), 'Ke': (0.0, 0.0, 0.0), 'Ni': 1.0, 'd': 1.0, 'illum': 2}}}
This object loses the vital information whether the geometry is to be rendered as quad or triad.
Description
I was trying to read a cube exported as obj from blender. Which exports quads. But the obj reader does not retain the information whether it is quad or triads...
What I Did
This object loses the vital information whether the geometry is to be rendered as quad or triad.