Delete non-quads

   8153   4   2
User Avatar
Member
166 posts
Joined: 10月 2008
Offline
Hi
I'm looking for a way to delete all primitives from an object that is not quads (four edges/points). I guess using the delete node is a suitable way to do it but I've looked through the help and can't find any suitable variable to use in the expression. Or if there is any other way to to it would be fine too.

Probably an easy thing to achieve but my Houdini skills aren't what their supposed to be just yet.
User Avatar
Member
44 posts
Joined: 7月 2005
Offline
Group them with a partition sop, using $NVTX (number of vertices in the primitive) as part of your rule, eg..

rule: prim_vertex_count_$NVTX will result in groups:

prim_vertex_count_3 with triangles, prim_vertex_count_4 with quads etc

Then just delete all the non quad groups.

Attachments:
delete_non_quads.hip (41.3 KB)

User Avatar
Member
606 posts
Joined: 5月 2007
Offline
Or one step faster, use $NVTX!=4 as filter expression in a delete SOP

eetu.
User Avatar
Member
44 posts
Joined: 7月 2005
Offline
Nice, I thought the expression had to return the primitive number like the range / pattern modes (I'll admit I didn't read the docs in great detail )

That's definitely going in the workflow.
User Avatar
Member
166 posts
Joined: 10月 2008
Offline
Thanks guys! I actually did notice the NVTX-parameter in the help but I must have misread the description. Anyway, this did the trick just perfect. Thanks.
  • Quick Links