Possible to change component size to a fixed value?
-
Is it possible to change the size of a component to a fixed size along an axis? I know you can use transform! or transformation to scale it relative to its previous size but I want to set it to a fixed length regardless of previous size.
Thanks,
Mark
-
Haven't you answered your question yourself ?
Rescale it by using its current_size and the new_size to get a proportion
In cod-code
trs=Geom::Transformation.scale(point, axis, size/old_size)
If it's 10.0 units now and you want it 5.0 units then 5.0/10.0 = 0.5 so it's scaled down to 'size'.
OR [if it's 5.0 units now and you want it to be 10.0 units then 10.0/5.0 = 2.0 so it's scaled up to 'size'.

-
Thanks TIG,
Didn't think of that. Since you can scale and "scale to a fixed size" using the Sketchup tools I thought I was just missing the method.Mark
-
You could edit the tranaformation matrix directly...
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement