polygons with holes

30 views
Skip to first unread message

Patrick Janssen

unread,
Aug 18, 2015, 10:04:58 PM8/18/15
to pycollada
I note that polygons with holes are currently unsupported. I have two questions regarding this. 

Q1: How can I get the polygon vertices, but just ignore holes? At the moment I am not getting anything. So for example, if I have a polygon with one hole:

boundgeom = list(mesh.scene.objects('geometry'))
print boundgeom 
print list(boundgeom[0].primitives())

will print 

[<BoundGeometry id=ID2, 1 primitives>]
[<BoundPolygons length=0>]

But if length is 0, it means I am not getting any vertices.

Q2: How hard do you think it would be to add support for holes to pycollada? I had a look at the xml, and it seems to be a fairly straightforward representation of holes.  Maybe someone can give me some hints as to what would be required. 

                <polygons count="1" material="Material2">
                    <input offset="0" semantic="VERTEX" source="#ID7" />
                    <ph>
                        <p>0 1 2 3</p>
                        <h>4 5 6 7</h>
                    </ph>
                </polygons>






Reply all
Reply to author
Forward
0 new messages