Jump to content

&& in expression in group SOP


jeanmarc

Recommended Posts

Hi Magicians,

in a group SOP what would be the correct expression if i want to select only last and first points of a group ?

it look like never mind what is after && , it is nor evaluated

($PT > ($NPT -2) && ($PT < ($NPT -($NPT+1))))

jean-marc

Edited by jeanmarc
Link to comment
Share on other sites

Hi, simple option is to type 0 $N in the pattern. ($N is the last entity of the input it can be last point or last polygon depending upon what you are grouping)

If you want to use an expression

$PT==0 || $PT == $NPT-1

&& will not work as it means both the conditions(point being the first point and point being the last point) should be satisfied by a prim/point then only it will be in the group so expression with && look for points whose number is equal to zero and at the same time equal to the last point ( it is not possible except there is only single point in the geometry)

So use || (or) meaning if any of the condition (point being the first point and point being the last point) gets satisfied point / prim will be in the group.

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...