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!
    ⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

    Plug In - Copy to Path troubles

    Scheduled Pinned Locked Moved Developers' Forum
    9 Posts 4 Posters 783 Views 4 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.
    • A
      arcaterra
      last edited by

      Hi
      Everytime I scale a component down, and then try use Copy to Path > Copy to Spacing, what get's copied is the component at its original insertion size, and the scaled down version remains untouched. Is there something I am doing wrong?
      Thanks

      1 Reply Last reply
      Reply Quote 0
      • thomthomT
        thomthom
        last edited by

        the copy to path doesn't take into account the scale. Scale Definition before you Copy to Path.

        (I'm moving his to the Developer section)

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

        1 Reply Last reply
        Reply Quote 0
        • TIGT
          TIG Moderator
          last edited by

          ... so, Scale the contents [i.e. during an Edit of an Instance] of a 'made_unique' version of that Component before using that with Copy to Path - then it'll work as wanted...

          TIG

          1 Reply Last reply
          Reply Quote 0
          • thomthomT
            thomthom
            last edited by

            @tig said:

            ... so, Scale the contents [i.e. during an Edit of an Instance] of a 'made_unique' version of that Component before using that with Copy to Path - then it'll work as wanted...

            If you edit the content of the component you'll affect all other instances. What if you have instances of different scvale?
            If you Right-Click and choose Scale Definition then it won't affect the rest of your component - it just redefines the default size.

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

            1 Reply Last reply
            Reply Quote 0
            • TIGT
              TIG Moderator
              last edited by

              @thomthom said:

              @tig said:

              ... so, Scale the contents [i.e. during an Edit of an Instance] of a 'made_unique' version of that Component before using that with Copy to Path - then it'll work as wanted...

              If you edit the content of the component you'll affect all other instances. What if you have instances of different scvale?
              If you Right-Click and choose Scale Definition then it won't affect the rest of your component - it just redefines the default size.

              That's why I suggested using make_unique on a version so that the original is unchanged by any Scaling you do to that...

              TIG

              1 Reply Last reply
              Reply Quote 0
              • nikusknxN
                nikusknx
                last edited by

                Is it possible to do the "right-click scale definition" with Sketchup api?

                1 Reply Last reply
                Reply Quote 0
                • thomthomT
                  thomthom
                  last edited by

                  @nikusknx said:

                  Is it possible to do the "right-click scale definition" with Sketchup api?

                  Take the scale of the instance, scale the definition by this scale - then scale the instances by the inverse scaling transformation.

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

                  1 Reply Last reply
                  Reply Quote 0
                  • nikusknxN
                    nikusknx
                    last edited by

                    @thomthom said:

                    @nikusknx said:

                    Is it possible to do the "right-click scale definition" with Sketchup api?

                    Take the scale of the instance, scale the definition by this scale - then scale the instances by the inverse scaling transformation.

                    Ok its seems to work but the position of instances are not good : I do this to scale the instances by the inverse scaling transformation :

                     
                          definition.entities.transform_entities(t,self.entities.to_a)
                          inv = t.inverse
                          definition.instances.each do |instance|
                             instance.transform! inv
                          end
                    
                    

                    Any idea?

                    1 Reply Last reply
                    Reply Quote 0
                    • nikusknxN
                      nikusknx
                      last edited by

                      Ok I get the good position with a translate:
                      definition.instances.each do |instance| originBefore = instance.transformation.origin instance.transform! inv tr = instance.transformation vectorTranslate = originBefore - instance.transformation.origin translate = Geom::Transformation.translation(vectorTranslate) instance.transform!(translate) end

                      but when the axes changes (y axes become z axis for exemple) the scale are not good and switch...
                      I try to get the model.edit_transform , manualy I can get it but with the API it's always the same problem : I can't do the right click Component edit...
                      Any Idea to get the local axes?

                      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