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...
Advertisement