The neighbour(s)(count) functions are all for points. Is there a way to do the same thing for primitives? …or do I have to start by finding point neibours and… (*jumps through hoops) …find the primitives a few line of code later?
-Olivier
find primitive neighbours?
5941 4 0- olivierth
- Member
- 1075 posts
- Joined: 4月 2017
- Offline
- olivierth
- Member
- 1075 posts
- Joined: 4月 2017
- Offline
Ah!
So, instead of running over primitives I ran over points with this. The trick was to use the pointprims function and the len function to see what point was connected to more than one primitive:
-Olivier
So, instead of running over primitives I ran over points with this. The trick was to use the pointprims function and the len function to see what point was connected to more than one primitive:
int ptprims[] = pointprims(0, @ptnum); i@group_needsstairs = 0; if(len(ptprims) >= 2) { foreach(int currentprim; ptprims) { setprimgroup(0, "needsstairs", currentprim, 1, "set"); } }
-Olivier
- tamte
- Member
- 8786 posts
- Joined: 7月 2007
- Offline
- olivierth
- Member
- 1075 posts
- Joined: 4月 2017
- Offline
- altobi
- Member
- 3 posts
- Joined: 11月 2017
- Offline
I wrote a solution for this over in this thread:
https://www.sidefx.com/forum/topic/70966/?page=1#post-301099 [www.sidefx.com]
https://www.sidefx.com/forum/topic/70966/?page=1#post-301099 [www.sidefx.com]
Director / Lead FX TD
-
- Quick Links