I am looking into ways of creating a pipework looking like geometry that is controlled by a simple volume referenced from Rhino. The best I could come up with was to create smaller voxels, randomly reduce their count ( to not have so much of a grid looking system) and then simply pipe the edges.
It does not, however, give me that exact thing i am looking to create. Maybe there a way to perhaps have certain criteria for how a poly line can be drawn within the volume (like always turn 90 degrees, min max length of the segment)? Or any other suggestions on how to approach this?
I have attached my script and the image of the resulted geometry. The pink and grey render image is kind of what I am trying to achieve.
As an indication/fun only … try the attached as well (works on a cubic like grid minus [an user option if voids > 0] random origin voids [of size vx,vy,vz]).
Time grows (10-20 ms) is you opt for pipes using poly segments as rails. No fillet option is implemented nor you can use the whole polyline as a pipe rail (VERY slow results in both cases for good reason).
Watch what the info panel has to say: there’s no guarantee that each polyline can have the maxNodes (since the directions of grow MAY are blocked by the previous ones).
BTW: The start of each poly is on some (randomly picked out of the 6) out side of the initial grid. But if the - optional - voids consume all the side pts … then there’s no start and nothing comes out. In fact several checks of that type must been implemented in order to achive(?) some(?) results(?) in any situation … but that was made just as an entry level Recursion demo for the people in the practice. Recursion is a freaky coding approach where a Method calls itself (LOL) until something right (cross fingers) happens and this paranoid loop terminates.
This means … er … hmm … that a red C# is not out of question (far from it).
Thus the usage of the whole thing is just for fun. Anyway I’ve added 2 “safety” checks more (out of a zillion required):
Added an autoZoom option (rather handy I guess) and a classic Indexing Tree (poly Nodes indexing, that is [requires ~ a millisecond more, but no pain no gain]):