Read inserted block scale

Hi Dennis, I used a GUID component, and a python component to get the matrix from the object-

image

-Pascal

1 Like

Ahh I see. Thanks.

Do I need to download some Python plugin or can it be done via C#?

Thanks
J

Hi J - I’m sure that py file is easy to translate to c#… it’s only a few lines. You can test using
RunPythonScript

or

! -RunPythonScript "Full path to py file inside double-quotes"

If you need it in GH, the same code should work fine in a script component.

GetBlockInstanceScaling.gh (11.6 KB)

-Pascal

Thank Pascal, I guess that solves it. I’m surprised it’s that hard to find out a block scaling factor.

Cheers
Jonas

The python script seems to work for backing out the scaling factor, what if you wanted to find the rotation. How would you go about finding out those values?

Hi Dennis - it’s a little more complicated but possible, I think, I just have not been able to get to it.

-Pascal

I would look into Elefront, which lets you extract block base plane.

Something like…

does not seem to work now

FWIW, in Rhino 8, the scale of a block instance can be read and changed from the Properties panel:

-wim

1 Like

Hello Wim, what about mirror? People sometimes mirror blocks by accident, then stuff goes to production and everyone is surprised. Being able to look for mirrored blocks using command / grasshopper nodes / side panel would be super useful.

Cheers
Jonas

1 Like

Hi Jonas -

Yes. It doesn’t make sense to me that block instances can be scaled or mirrored without forcing a new definitions, but such is life… At least being able to see the state would be good.
RH-72547 Blocks: Show mirrored state
-wim

1 Like

i dont understand, if there is scale -1 on an axis then it is mirrored. what more do you want to be able to see?

Hi Ivan -

Who’s asking for more ways to see? A way would be nice.
-wim

If it worked this way and if it was accessible from Rhino, that would be 100% sufficient for me.

_SelMirroredBlocks would also be nice.

1 Like

RH-72549 Block: Command to select mirrored blocks
Thanks,
-wim

1 Like

i have just tested wip and block scale does not read - or even does not allow to change scale into negative zone.

That’s right, hence the YT that Wim made

1 Like

RH-72549 is fixed in the latest WIP

2 Likes

Awesome, thanks @brian , @wim .

What about another one, _SelNonUniformBlocks?

Cheers
Jonas