-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
- wavefront_reader version: 0.2.2
- Python version: 3.7.1
- Operating System: Linux (arch x64)
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
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.
Metadata
Metadata
Assignees
Labels
No labels