Reset (or change) block instances transformations (scale, rotation)

Hello,

my question is about block instances.
When you create a new instance of a block, you can change its rotation and scale, and this is great.
But what if you want to select a block instance and reset its rotation or/and scale?
For example, I create this block.

I create some block instances with different rotations

(Every instance has a specific transformation matrix)

Now… There is a way to “reset” selected block instances? Or a way to set all these instances with a rotation of, for example, 45°? Or to scale all instances to 2x?

It would be great if there was a way to do this quickly.

I was hoping that BoxEdit will help, but it shows 0° rotation even if the block is rotated.

I tried something with Grasshopper, but it doesn’t accept blocks.
Ok, there are plug-ins for import blocks in Grasshopper, but I’d prefer to find a quick solution directly in Rhino.

Thanks

Hi fradiniccolo - of course replacing the transformed block with a new instance (Insert command) at the same location will ‘revert’ the block instance. You can invert the transformation matrix in a script, but I don’t know if you can do that selectively to the scale and rotation only and not the translation.

-Pascal

The attached will essentally “reset” a block instance - both rotation and scale

To use, just drag & drop on top of a running Rhino. Then run “ResetBlock.”

ResetBlock.rvb (1.2 KB)

2 Likes

Thank you for the script @dale, this really help me.
I hope that one day there will be the possibility to set these parameters directly from the interface, it would be very useful in some cases.

Here some new scripts that can help with this as well.
Just if people go looking here.

3 Likes

Hey there. Is it possible to reupload the script “ResetBlock.rvb?” I would need that now too. I downloaded the scripts of ejnaren, and they are useful too, but the ResetBlock is missing there.

Here you go.

– Dale

4 Likes

Hi, could it be updated to work in r7? Or do I doing something wrong?

Hello- the code works here in V7 - are you sure you have all lines copied into your script? This needs to be there:

Dim arrBlocks, strBlock, arrPoint, arrVector, arrXform

-Pascal

1 Like

The problem was somewhere else, but its get working, thanks for helping :wink: