Hello,
I'm doing a scatter on a model (not scattering based on primitive area) and am having it compute the nearest point which stores it in the attribute ‘ptarea’. When I try and group them based on an expression, for example: ptarea > 0.5 , I don't get anything despite details view showing plenty of points with a ptarea value higher than 0.5.
Curiously, when I do the expression: ptarea < , it selects all the points. I feel like I'm missing something really simple here, any help is greatly appreciated. Thanks!
edit: I uploaded a .hip that illustrates the problem.
Problem using attribute in group expression
4018 2 1-
- Kurtoon
- Member
- 4 posts
- Joined: Nov. 2007
- Offline
-
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
Indeed it's quite simple, just to catch the difference between variables and attributes. “ptarea” is in your case a point attribute, which doesn't have in assistance local variable (could have it, if you create variable mapping for it).
All you need to do is to use point() expression to retrieve attribute from your points: point(opinputpath(“.”,0), $PT, “pteare”,0) < 0.5
(opinputpath() here, returns first input of groupSOP so you don't have to hard code its name into expression.)
For a detailed explanation of variables versus attributes check out (specially the very last post of tstex):
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=11090&highlight=attributes+name+rule [sidefx.com]
Hope this helps,
cheers!
Simon.
All you need to do is to use point() expression to retrieve attribute from your points: point(opinputpath(“.”,0), $PT, “pteare”,0) < 0.5
(opinputpath() here, returns first input of groupSOP so you don't have to hard code its name into expression.)
For a detailed explanation of variables versus attributes check out (specially the very last post of tstex):
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=11090&highlight=attributes+name+rule [sidefx.com]
Hope this helps,
cheers!
Simon.
Edited by - Oct. 9, 2008 06:21:00
-
- Kurtoon
- Member
- 4 posts
- Joined: Nov. 2007
- Offline
-
- Quick Links

