They are now “swirling” chaotically around the outline, breaking the boundaries (the blocks must move within the outline in a certain sequence). Block orientation.gh (25.3 KB)
Get the attached for a start (Bad news: 100% code). Notify if you want a far more elaborated approach for placing the Polylines (like Rotate unti Fit (if possible), auto Scale etc etc).
I’m impressed with your solution and will go learn C## before I’ve even fully mastered Phyton
Really, thank you without sarcasm! I really like your unique approach, though “Rhino.Geometry.Curve.Contains(Rhino.Geometry.Point3d” is deprecated
That’s the condition for an inclusion of a module in the frame (at some pos) - for 3D stuff just add things in Z as well.
PS: If you are in the AEC market sector > forget P > go for the real thing. C# is kinda a BMW M3: there’s far better looking cars and far more desirable ones (not to mention reliability) … but that thing is the yardstick since the Dawn of Time.
PS: That said … forget Tetris as well > go for a challenging thing like this:
That said, here’s a small challenge for the brave (but the path is long and hilly).
Set onGrid == 2 and observe that the rnd pts are on a 3d Grid. Now … what I want from you is a simple thing: for any given pt … search in 3 dims (while the next position is occupied, if not stop) and create a 3d like collection of Boxes that should not share any Box with any other collection - like in the animated things above.
Is this solvable via some sort of LINQ (+ a proper Class)? Or via Karma? Or we should rely on Don Julio?
These are the critical questions (for the mankind as a whole).