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.
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).
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):