you absolutely can do cross product lacing with basic python
cube_size = 4
points = []
for x in range(cube_size):
for y in range(cube_size):
for z in range(cube_size):
points.append((x, y, z))
sorted(points, key=lambda point: point[0])
sorted(points, key=lambda point: point[1])
sorted(points, key=lambda point: point[2])
But I’ll concede the point at large numbers this for loop would hang up. I’m not going to thread the code to prove a point. I’m not stopping using dynamo nodes all together. I’m only replacing our custom packages with direct python. When I said oob nodes, I meant I’m still using Out-of-the-box nodes (I forgot the t…). The selection nodes are not replaceable.
Lacing is not a problem in python is because there no scenario where you would write custom scripts not knowing what the list structure you are processing is. There should be no reason you would ever change the lacing on a python script.
I still Stan python as package replacement. You are right there lacing is problem, but it is on the dynamo side. You aren’t limited to 3 types of lacing in python, you write the lacing. If I want to grab the last 5 items from every second list that includes an “W24” in it and keep the list structure the way it was except keeps the list structure? It’s either a unreadable chain, or a code block. If someone doesn’t know Python, they can just throw it gpt and ask what it does.
How about this scenario: let us take a 20x20 point cube, twist it around the center 2 times and remove a random set of 1/10 of the points. Now for every point get the closest point above within a threshold of 2m and create a centerline representing the columns of our gravity system. The line will either be single height or double height depending on if it is under one of the removed points or not.
Now, this is possible using just nodes. But if you think about how you would set it up and the absolute lacing nightmare spaghetti it would look like. We could either have that, or we can get comfortable implementing python and have a graph that is 5 or 6 scripts piped together.
Even in step one, you have the dynamo limitation in comparing a list of points to itself, you have to come up with some form of work around just to have a point not return itself as potential match. Python actually opens up a lot more lacing options, it’s simple to write logic for every point in the list check it against every other point.
What to use is going to be case by case. There are going to be so many situations where Python was the more appropriate. True it is an intermediate skillset, but if you feel you are good with Dynamo, python is the next level. I started in Dynamo and added in Python later, it absolutely simplified my graphs and improved turn around time.
I’m going to push the GPL solution up the chain of command. That was really good suggestion, I’m stealing it.