Jump to content

use @area inside divide sop


anicg

Recommended Posts

Very few of the nodes, allow you to reference vex attributes inside the parameter fields. The @ prefix is a vex construct, but the parameter fields for each node executes hScript. You can still reference an attribute using an hScript function, like this.

prim("../measure1",0,"area",0)/12

The function reaches into the measure1 sop and grabs the value of @area for primitive #0.

You may see the immediate problem with this approach. What if you have multiple primitives with different areas? How do you know which primitive to chose the value from?

Edited by Atom
  • Like 1
Link to comment
Share on other sites

You may see the immediate problem with this approach. What if you have multiple primitives with different areas? How do you know which primitive to chose the value from?

Exactly!
And in some situations it's a good idea to promote the area attribute to detail, using the Sum of all primitives area

I can see you have only one poligon so you shouldn't worry about and just the 0 one

I added the 2 exemplos to your file:

area_divide.hiplc

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