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?
5910 4 0- olivierth
- Member
- 1074 posts
- Joined: April 2017
- Offline
- olivierth
- Member
- 1074 posts
- Joined: April 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
- 8780 posts
- Joined: July 2007
- Offline
- olivierth
- Member
- 1074 posts
- Joined: April 2017
- Offline
- altobi
- Member
- 3 posts
- Joined: Nov. 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