I am trying to automatically position this doughnut shape to completely encapsulate a form or 3d volume or model. It is about a 3d clay printing robot but instead of making the shape fit the workspace of the clay 3d printer I want to position the 3d printer in a specific designated area.
I don’t have any GH script because honestly, I have no idea where to start, first, I was experimenting with collision detection but can’t make it work for the shape to be inside the donut or the workspace volume without manually positioning it.
the criteria is for the model to fit inside the workspace, and the model and workspace have to be locked in the Z-axis, and not rotate when checking if the model fits inside! and it doesn’t have to best position as long as it fits inside
If I understood correctly, the movement of the object is to be restricted to XY plane. In addition, the object cannot be rotated around any axis. The doughnut is a constant shape and stays put.
So you can move the object in XY plane and when it does not collide with the doughnut surface, and is inside the doughnut, the placement can be accepted? So there are millions of solutions to this, but you just need one.
Try Mesh Clash in Grasshopper. Turn the doughnut into a mesh and the object also. Then use something like an MD Slider to move the object in XY plane. Create a panel or some indicator in Grasshopper or Rhino that triggers when there is a collision (this can be anything, a Symbol or turn the object red when colliding…) Then just fiddle with that MD slider until you are satisfied.
Kangaroo solutions are also possible, but maybe start with this semi-automatic thingy to get the hang of it.
I’m sure that handling a variety of parts is much more complicated than this, which tests only the X axis. Y and Z also need to be checked. And this happens to return only one result where there would often be many to choose from. Parts are internalized, no need for Rhino file.
I heard you say that before but why? The donut represents the tool, correct? Makes more sense to move the part. As to Z axis, the method I used aligns their volumetric centers which may not be good? So Z position should not change?
OK, that makes more sense but as @_RC says, maybe it doesn’t matter? What will matter is if you expect to provide a list of parts instead of solving for one at a time…
In any case, this version is WAY BETTER The ‘UV Count’ slider (dark blue group) determines the X and Y “resolution” of positions checked. It gets slow with many positions. As you can see, three possibilities are presented in this case. Which one to choose?
There is a single point at the blue part and three points inside the donut corresponding to three possible solutions.
The parts are still being modeled, The part that I’ve provided is just a place holder the end product will be wavy and parametric, think of it like a jigsaw puzzle, in the end, the positions will be printed out on a big paper format or I will use augmented reality to position the robot in those places.
I will provide you with a few more models right now and maybe you will understand better.
The distance between each part has to be precise when the robot will be moved into the exact place to start printing.
Multiple donuts will have to be positioned relative to each other and ten all of the donuts will be exported as a 3d model containing some extra positioning points for AR or they will be printed out in a big paper format later on.