[question / wish] additional option for scripted "squish" / "unroll"

I wish it was possible when creating the flattened surfaces to avoid placing them overlapping one another.

I might be missing something, but cant you just add a translation in your script after the unroll command runs?

How big would that translation be?
You do not know the size of the plates in advance.
Also, they are arbitrary rotated.

No doubt that is the workaround.

Just get the boundingbox of the unrolled surfaces if you dont need advanced nesting.

I do that, but they are overlapped, which is the main issue I am targeting here. It is visual clutter that’s the problem and selectability, not the accurateness or the extraction of the data.

No advanced nesting is needed, but I guess I have to store the size and position of each previous plate so that the next one is moved relative to that. That could easily be part of the command.

iterate of your pieces, create a vector from boundingbox[0] to [3], transform your next set of unrolls with that and add the new vector from the new boundingbox. you can put in some extra offset to get more space and be done.

you’re missing one important point (in the title) I am talking about the scripted commands and not RhinoCommon methods.

Squish doesn’t have a RhinoCommon method, at least not publicly accessible.

me too. But I dont see how my solution will not work.

You will have to make a loop to iterate through your surfaces one at a time, once each squish is added to the document, get its ID, get the bounding box, get the largest X coordinate of that bb (right side) and store it. Then on the next surface in the loop, once the squish is finished, select the ID and use MoveObject to move it to the right so that the left corner of the bb is now at the right corner of the previous bb (plus a space). Rinse and repeat.

1 Like

you don’t pick the point where the result is created when scripting the commands, this is what I meant

no, you translate the resulting geometry.

1 Like