Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loses the information whether the faces are triads or quads #4

Open
bvraghav opened this issue Nov 17, 2018 · 0 comments
Open

Loses the information whether the faces are triads or quads #4

bvraghav opened this issue Nov 17, 2018 · 0 comments

Comments

@bvraghav
Copy link

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant