So I’m attempting to normalise the scale of two shapes that have the exact same geometry (i.e. they’re both rectangles) but they are of different sizes. I’m working solely in RhinoPython.
I’ve come up with two methods but attempting both has left me defeated:
Scale them to the lowest possible value in a hope they both reach a scale threshold.
Surround each in a bounding box and scale them accordingly.
I’m kind of at a loss as you can see haha. Would anyone be able to give me a push in the right direction?
I’m intending to achieve normalisation of two shapes that will have unique geometry to one another so getting some property from both might prove difficult but I’ll see what I can do. Thanks =)
In your post you mentioned the geometry is the same…
In case of different shapes, I’d go with bounding box comparison, don’t know if there is any other reliable way. Basic boundingbox (world or cplane aligned), or write a routine to find smallest bounding box for each, for a more fancy approach.
Maybe I am misreading it. What exactly do you mean by normalize? Have the rectangles have the same area, or scale both of them to the average sizes? An example image or file would be helpful.
Ah sorry @Jarek I should have been more specific in my post.
I’m trying to scale them both to an average size. I’m using two rectangles (of differing sizes) as example shapes as I feel if I can get them to the exact same size, I’d be able to scale shapes of different geometry to similar sizes as well.
For example:
The shapes start off at different sizes:
Thank you @Willem (and @Jarek!) that gave me the exact push I needed to figure out the normalisation!
Once I calculated the height of the bounding box of one shape I was able calculate the difference between its height and the desired height I wanted. I was able to figure out how much I needed to scale down (which I called my scaleFactor).
Thanks to everyone for helping me on this. I really appreciate your time and assistance