Hi,
If I have a file with multiple blocks scaled in random factors, can I read the scaling factor somewhere?
I tried _what, but I don’t know exactly how to read Transformation data, it stops making sense when I rotate the block.
Thanks
Jonas
Hi,
If I have a file with multiple blocks scaled in random factors, can I read the scaling factor somewhere?
I tried _what, but I don’t know exactly how to read Transformation data, it stops making sense when I rotate the block.
Thanks
Jonas
Hi Jonas - looks like GH can help - it has a component for that - I’ll see if I can make it do something useful in this case.
-Pascal
Are you sure about that? Last I checked GH couldn’t read blocks with a plug-in, and being able to back out scale fromm the transformation matrix according to Dale is cumbersome. I wish Rhino would have stored each transformation of a given block so it would be easier reset certain ones without affecting the others.
Well, it has a component, yes, but that only spits out the numbers in the matrix, it does not extract the individual transforms, so, back to the drawing board.
Here’s a python that maybe gets it right - give it a spin -
@djnelson75, @Jonish
ExtractInstanceScaling.py (639 Bytes)
-Pascal
Thanks I will give it a shot. Where in GH do you find the ability to reference blocks? I must be missing something.
Hi Dennis, I used a GUID component, and a python component to get the matrix from the object-
-Pascal
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