Hello friends,
I was recently asked to rearrange some geo based on their attribute values using for loops. I hope i'll find some help here. Should be easy enough
AEFHIKLMNTVXYZBCDGJOPQRSUW
They have their individual textsymbol and textindex values.
I managed to do it by packing them and copying points on their location, then in the for loop replacing the position to the ordered points but they are separation is uneven. If there is a better way to go about it please let me know.
How to sort and reposition a set of geo based on attribute
2091 7 1- sparsh_goldeneye
- Member
- 6 posts
- Joined: March 2016
- Offline
- neil_math_comp
- Member
- 1743 posts
- Joined: March 2012
- Offline
Do you have an example HIP file?
The Sort SOP can sort points based on an attribute, and then you could use the point number to compute a position, instead of the attribute value. An example file would help get a better idea of what's going on, to try to help, though.
The Sort SOP can sort points based on an attribute, and then you could use the point number to compute a position, instead of the attribute value. An example file would help get a better idea of what's going on, to try to help, though.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
- sparsh_goldeneye
- Member
- 6 posts
- Joined: March 2016
- Offline
- tamte
- Member
- 8582 posts
- Joined: July 2007
- Offline
- sparsh_goldeneye
- Member
- 6 posts
- Joined: March 2016
- Offline
- neil_math_comp
- Member
- 1743 posts
- Joined: March 2012
- Offline
It looks like you can simplify it a bit, using the Sort SOP. (See attached)
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
- neil_math_comp
- Member
- 1743 posts
- Joined: March 2012
- Offline
Oh, also, the forum UI for uploading files has now been simplified a bit, since you were certainly not the only one who thought they were uploading a file but weren't. Your description helped make clear what the confusion was in the UI, so thanks!
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
- sparsh_goldeneye
- Member
- 6 posts
- Joined: March 2016
- Offline
-
- Quick Links