Jump to content
Sign in to follow this  
hou_noob

Expressions and workflow

Recommended Posts

Hi all

I need to divide some points based on a pscale attribute.

1) less than .3 , pscale =0

2) 0<pscale<.6, pscale =.6

3)else pscale =1.0

I tried to use 3 point nodes with expressions. First one is easy.

if ($PSCALE<.3),0, $PSCALE. But how do you do compound expressions .like

0<pscale<.6 or

Pscale<.6 and pscale >0

Another workaround was to use a group node and delete nodes for each case. But it not elegant

Thanks in advance

Share this post


Link to post
Share on other sites

Try this in a partition SOP, in the rule parameter:

group_`if($PSCALE > 0.3 && $PSCALE < 0.6, 6, if($PSCALE <= 0.3, 0, 1))`

It should create 3 point groups named group_0, group_6 and group_1

 

cheers

Edited by rafaelfs

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×