jimsunglady Posted July 23, 2020 Share Posted July 23, 2020 (edited) What do these two lines mean? I do not understand. Please explain. addvertex(0, prim, @ptnum); addvertex(0,prim,pt); I don't konw why "ptnum" is needed here. Edited July 24, 2020 by jimsunglady Quote Link to comment Share on other sites More sharing options...
fsimerey Posted July 23, 2020 Share Posted July 23, 2020 Because this foreach create a line between the point number @ptnum and a point from the list, here pt. Quote Link to comment Share on other sites More sharing options...
jimsunglady Posted July 24, 2020 Author Share Posted July 24, 2020 (edited) I don't understand. Is pt different from @ptnum? Isn't list a list of @ptnum? Edited July 24, 2020 by jimsunglady Quote Link to comment Share on other sites More sharing options...
fsimerey Posted July 24, 2020 Share Posted July 24, 2020 8 hours ago, jimsunglady said: I don't understand. Is pt different from @ptnum? Isn't list a list of @ptnum? First of all, VEX function run on all points at the same time. nearpoints() put in a list, all points found from the current point position in 2 m radius. For exemple for point number 0 : @list =[0,2,3,7] Then foreach will run over each point in this list, with variable pt (int pt) Exemple for the second loop : @ptnum = 0 pt= 2 The third loop: @ptnum = 0 pt = 3 Be aware than nearpoints() will always return the actual point (@ptnum) as the first of the list. So in your case, you will get some lines with the same point for each point in your geometry: The first loop: @ptnum = 0 pt = 0 Quote Link to comment Share on other sites More sharing options...
jimsunglady Posted September 16, 2020 Author Share Posted September 16, 2020 thank you ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.