Is there any way I can loop the nodes? For example, I need to some complicated work for each pipe of a selected pipe network. How can I create a loop to do it?
Hi @DavidFan74,
Looping in a visual programming context is a bit tricky. In many cases though, you don’t need to think too much about looping. You can just provide a node with a list and it will process all the items. In some really complex cases it might be simpler to write up a quick Python node to handle the looping, but most of the time that isn’t necessary.
If you can share a little more about your goal, we can figure out a way to hook everything up.
Yes, generally no looping needed. This case is odd. I’m trying to find all the crossing points for selected pipes to a pipe network. If I use the list of the pipe network pipes directly, it gives me 2 empty lists. If I use only one pipe from the network, it works. That’s why I’m thinking of using looping to check each pipe in the list. I’ve attached the script below. Thanks.
UTIL-PNG-ANNO-XingLabelProfileView-25simp.dyn (59.6 KB)
Have you tried cross product lacing? Basically, “intersect each pipe with every other pipe”.
Yes, “cross product” works.