Utilising @wedgenum[] in file output for nested wedges

   390   2   0
User Avatar
Member
15 posts
Joined: April 2013
Online
Hey,
I'm currently trying to process some geometry using nested wedges.
Dropping `@wedgenum` in the file path of the rop, creates the expected latest wedge number value, but I need to use the array @wedgenum as described in the help page [www.sidefx.com] in order to get usable unique indices for my geometry.

Putting `@wedgenum` in the file path does not evaluate to anything - am I misunderstanding how this is supposed to work?

Dominic
User Avatar
Staff
352 posts
Joined: May 2014
Offline
The parm expressions don't have syntax for accessing the entire array. You can only access the components of the attribute using a particular index such as @wedgenum.0, @wedgenum.1, etc. Alternatively, you can use the function equivalent – pdgattribute(“wedgenum”, 2) to access the element at index 2 for example.

Wedgenum is also not an array by default - you'll need to toggle the “Preserve Wedge Numbers” option on each of the wedge node(s). Each wedge will append the wedgenum value on the end of the existing array when that option is on, rather than overwriting the single, scalar value.

For a file path, you might do something like $HIP/$OS.`@wedgenum.0`.`@wedgenum.1`.$F4.bgeo.sc.
Edited by tpetrick - Jan. 14, 2020 17:41:02
User Avatar
Member
15 posts
Joined: April 2013
Online
Brilliant, that works perfectly. Thanks!

I feel that this note regarding parm expressions would be helpful if included with the wedge TOP docs.
  • Quick Links