checking if a Prim is a closed polygon

What’s the best way to determine if a Prim is a closed polygon?
The SOP To DAT in “Primitives” mode has a “closed” column, but I don’t see a way to access that directly from python.
There’s probably a way to do it by looking at the first and last vertices and checking their associated point positions and/or UV coordinates, but it seems like something that should be directly exposed.
This would correspond to the the “closed” parameter in sop.appendPoly().

The first and last vertices don’t coincide in the case of closed polygons.
Instead a flag is used to render/process the connecting edge.
Looks like this is missing from the python class.
We will add it shortly.

Note, it will only be defined for Polygon class.
Mesh class will have separate U and V close members added,
and Primitive in general doesn’t define a value.

Thanks for posting,
Rob.

The fix for this will be available on our next released build.

To see if a polygon/mesh is closed:
For Polygon (poly), you can use “closed” and for meshes use “closedU” or “closedV” depending on if you are checking it in U or V.

Thanks!

thanks!

looks like this is missing in the documentation!

Hey @josefpelz

cheers
Markus

Ah, thanks! I was looking for that in the prim class itself.