sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Originate component axes

    Scheduled Pinned Locked Moved Plugins
    15 Posts 11 Posters 12.5k Views 11 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.
    • mitcorbM Offline
      mitcorb
      last edited by

      I guess you saw "Axis component" by sahi. (in Plugins Index) This only helps set axes within the components as far as I know, and probably only one by one.

      I take the slow, deliberate approach in my aimless wandering.

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

        This one liner copy/paste + <enter> into the Ruby Console will move the insertion points [axes] of all selected instances to the origin, also making multiple-copies unique...

        m=Sketchup.active_model;s=m.selection.to_a;is=s.find_all{|i|i.class==Sketchup;;ComponentInstance};m.start_operation('t');is.each{|i|i.make_unique if i.definition.instances[1];d=i.definition;t=i.transformation;es=d.entities;es.transform_entities(t, es.to_a);i.transform!(t.inverse)};m.commit_operation
        

        TIG

        1 Reply Last reply Reply Quote 0
        • GaieusG Offline
          Gaieus
          last edited by

          Prefect, this is exactly what I meant (and nested components are not affected, exactly as I wished).

          Thank you very much, TIG! 😍

          (Note to myself and others: the plugin uses the original world axes so if one moves the axes elsewhere, do not be surprised)

          I'd have a question though. Now I have a bunch of lines of code: what do I need to do to have a plugin from those?


          And thanks Tim as well of course - but I did not go to try after this 😄

          Gai...

          1 Reply Last reply Reply Quote 0
          • mitcorbM Offline
            mitcorb
            last edited by

            That's ok, Csaba. If I were TIG, I would have done the same thing as he. 😆
            EDIT: only, it would have taken me a week to get back to you.

            I take the slow, deliberate approach in my aimless wandering.

            1 Reply Last reply Reply Quote 0
            • PixeroP Offline
              Pixero
              last edited by

              Funny, just today I was needing the same thing.
              Thanks!

              1 Reply Last reply Reply Quote 0
              • GaieusG Offline
                Gaieus
                last edited by

                Thanks very much again, TIG!!!

                Gai...

                1 Reply Last reply Reply Quote 0
                • simon le bonS Offline
                  simon le bon
                  last edited by

                  Hi Gaï, TIG, tim, Jan, 😄

                  Can someone shows in what sort of case this new plugin is (very) useful? Excuse me but my mind is dry to imagine it 😕

                  😎 simon

                  PS: However, thank you TIG for this one and how many others+++

                  1 Reply Last reply Reply Quote 0
                  • mitcorbM Offline
                    mitcorb
                    last edited by

                    Hi, simon:
                    What I understand is this plugin will place the axes/origin of numerous components at the global axes origin of the model space. Gaieus can explain his purpose better than me. I was just cruising the Plugins Index in response to his request.

                    I take the slow, deliberate approach in my aimless wandering.

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      chrisjk
                      last edited by

                      As long as components haven't been purged from model, it would make it very easy to replace stuff that has been deleted from the working model - sort of paste in place for things not on the clipboard.

                      Chris

                      1 Reply Last reply Reply Quote 0
                      • demD Offline
                        dem
                        last edited by

                        It's great plugin!

                        But unfortunately it do not work for proper crop orientation of "make unique texture" function(

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          jaceguay
                          last edited by

                          There is a way to make it work on any components and groups in the model not only the top level ones?

                          1 Reply Last reply Reply Quote 0
                          • john2J Offline
                            john2
                            last edited by

                            I would like it to work for all nested components within a component. So if we use the co nand on one component, all the nested components should also get originated axes. Currently it works for a single component. We have to manually select the nested components every tome within a component to make this plugin work.

                            Sketchup Make 2017 (64-bit), Vray 4.0 , Windows 10 – 64 bit, corei7-8750H, 16GB RAM, Nvidia GeForce GTX 1050Ti 4GB

                            1 Reply Last reply Reply Quote 0
                            • josephkim626J Offline
                              josephkim626
                              last edited by

                              In addition to making this work on groups as well as the components, It should have option to work on all nested groups and components?

                              Also, perhaps way to choose which axis to change to. Not limited to the world only, but perhaps to the axis of the currently active component or group?

                              I hope this makes sense.

                              1 Reply Last reply Reply Quote 0
                              • panixiaP Offline
                                panixia
                                last edited by

                                Is there a similar plugin to force align ALL selected component/groups AND nested subgroups/subcomponents local Y+ axes to world Z+?
                                That would be extremely handy when preparing models for game engines and similar stuff..
                                I'm searching everywhere with no luck.. 😢

                                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