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

Support for quadrilaterals? #1

Open
jamaa opened this issue Jun 15, 2016 · 1 comment
Open

Support for quadrilaterals? #1

jamaa opened this issue Jun 15, 2016 · 1 comment

Comments

@jamaa
Copy link

jamaa commented Jun 15, 2016

What would it take to make TriMesh also support quadrilateral faces? If you can point me in the right direction, I will try and make the necessary changes myself.

@yig
Copy link
Owner

yig commented Jun 22, 2016

The main problem is the assumption that .faces stores 3 vertex indices, as opposed to a 3 or 4 (or more!) number of vertex indices. It gets converted to a numpy.array in many places, but numpy.arrays need a fixed dimension. You could either (a) never convert it to a numpy.array or (b) convert it to a numpy.array whose second dimension is 4 (or higher if you want to support general polygons), padding triangles with invalid -1 indices to keep them straight. You could also use a numpy masked_array rather than -1 indices.

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

2 participants