• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Possible to change component size to a fixed value?

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 3 Posters 431 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    marksolberg
    last edited by 6 Jan 2012, 19:53

    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

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 6 Jan 2012, 20:19

      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'.
      😕 🤓

      TIG

      1 Reply Last reply Reply Quote 0
      • M Offline
        marksolberg
        last edited by 6 Jan 2012, 20:31

        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

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 6 Jan 2012, 23:46

          You could edit the tranaformation matrix directly...

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            1/4
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement