sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Possible to change component size to a fixed value?

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 431 Views 3 Watching
    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

      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
      • TIGT Offline
        TIG Moderator
        last edited by

        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

          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
          • thomthomT Offline
            thomthom
            last edited by

            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
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement