sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    FredoBend | Powerful new bending tool for SketchUp Download

    Possible to change component size to a fixed value?

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 510 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 Online
        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

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

            Advertisement