Jump to content

hou,geo?


Omy

Recommended Posts

I have a grid.I want to find the number of polygons points and prims in the grid.could anyone share a code snippet.thnks

geo = hou.node().geometry()

npts = len(geo.points())

npr = len(geo.prims())

print npts

print npr

not sure what you mean by polys as a poly is a prim, unles its a mesh. :blink:

Edited by 3dbeing
Link to comment
Share on other sites

geo = hou.node().geometry()

npts = len(geo.points())

npr = len(geo.prims())

print npts

print npr

not sure what you mean by polys as a poly is a prim, unles its a mesh. :blink:

coool

can we also find uv cordinates and the number of vertices

Link to comment
Share on other sites

coool

can we also find uv cordinates and the number of vertices

Yes! :ph34r:

test =0
for x in geo.prims():
     test = test+x.numVerticies()

print test

also this brought up the realisation that prims is a rather generic term. Perhaps you were referring to faces earlier?

Prim Type

I found this one interesting

hou.primType.Mataball (sp?)

as for uv's i think this is what you're after, but hmmmm

http://www.sidefx.com/docs/houdini11.1/hom/hou/Surface#vertex

Edited by 3dbeing
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...