cpinto
cpinto
About Me
Connect
LOCATION
Not Specified
ウェブサイト
Houdini Engine
Availability
Not Specified
Recent Forum Posts
How to delete primitive based on distance from one another? 2023年12月17日18:08
Ah ok, thanks for the help folks and explanations.
How to delete primitive based on distance from one another? 2023年12月17日13:31
Oh wait, sorry I found it.
I just change the delete_prims wrangle from
"int index = findattribval ( 1, "point", "id", @primnum );
if ( index == -1 )
removeprim ( 0, @primnum, 1 );"
to
"int index = findattribval ( 1, "point", "id", @primnum );
if ( index > -1 )
removeprim ( 0, @primnum, 1 );"
I just change the delete_prims wrangle from
"int index = findattribval ( 1, "point", "id", @primnum );
if ( index == -1 )
removeprim ( 0, @primnum, 1 );"
to
"int index = findattribval ( 1, "point", "id", @primnum );
if ( index > -1 )
removeprim ( 0, @primnum, 1 );"
How to delete primitive based on distance from one another? 2023年12月17日13:26
animatrix_
Hi,
If you don't need to use connectivity, you can create a point per primitive and then perform a point cloud look up like this:
create_pts_per_prim (Primitive Wrangle):addpoint ( 0, @P ); removeprim ( 0, @primnum, 1 );
id (Point Wrangle):@id = @ptnum;
pcfind (Point Wrangle):int pts [ ] = pcfind ( 0, "P", @P, ch("radius"), chi("maxpts") ); if ( len ( pts ) > 1 ) removepoint ( 0, @ptnum );
delete_prims (Primitive Wrangle):int index = findattribval ( 1, "point", "id", @primnum ); if ( index == -1 ) removeprim ( 0, @primnum, 1 );
Heya Animatrix_,
Thanks for that, I tried it and it looks like it does the inverse? So it removed everything but the floating circle letter primitives. Is there a way in vex to say do the opposite. Thanks again.