Jump to content

matching values in a prim wrangle?


Recommended Posts

I'm creating horizontal and vertical lines from geometry,

and testing whether a horizontal line has a matching position in x as one of many vertical lines.

If not, it's not "supported" by a vertical post, and therefore should be deleted.

 

When I test it with a grid with lines copied to its points, it works fine.

But creating the lines from a points from volume SOP,

the prim wrangle is returning the wrong values,

deleting way more than it should.

 

I am hoping someone could point out why it would work in one case and not the other,

when the geometry I'm feeding in seems pretty comparable.

I think the code that is having issues is in my prim wrangle near the bottom:

 

------------------------------

int colCount = nprimitives(1);
float match;
 
for (int i=0; i<colCount; i++){
 
   match = prim(1,"xPos",i);
   
   if (@xPos == match){
   @die = 0;
   }
   
}
---------------------------------
 
 

Kinda hard to explain with words... file is attached :)

 

Anyone have any ideas?

mesh_wrangle.hiplc

Edited by alexisB
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...