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

    Copy components in place

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    20 Posts 4 Posters 1.9k 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.
    • J Offline
      joeyp7784
      last edited by

      Hello all,

      First post! I work a lot with urban planning adding simple, mass produced units to a 3d plan. They can be VERY large areas with hundreds of units, so of course any shortcuts with copying the buildings in are more than welcome.

      These plans always come imported from autoCAD so I know the best solution is of course to have the building footprints themselves made as blocks, making them components as soon as they're imported in.

      However unfortunately this isn't always the case as it has come from another Architect who I didn't have the chance to tell them to make it as a block and instead they're simply lines. Here's an example below.

      Imported lines and made faces

      So the linework is imported and it was easy enough to make the faces, and there is the unit as a component. There are several plugins that allow copying of components to every cpoint or face etc, in this case I use Chris Fullmers components to faces.

      components to each face

      Unfortunately this is more of a tool for copying trees/people or ofc units that are in-line with eachother (grid layout would be fine) But for plans like the ones I work with we have many different angles in the layout and the result doesn't help, having to manually rotate every building.

      Result

      So are there any ideas? How can I get these units copied in line with the footprints?

      Many thanks in advance,

      Joey

      1 Reply Last reply Reply Quote 0
      • pilouP Offline
        pilou
        last edited by

        If each rectangle is a Component
        use the fabulous Random Replace Component by Sdmitch (with no random or yes πŸ˜„
        So you can have many different houses if you want! Not Shown here) πŸ˜‰

        House + its rectangle is the Source, Rectangle(s) alone the Target πŸ€“

        GIF_rectsd.gif

        Multiple houses πŸ˜„
        Click on the image for see animation! πŸ€“
        GIF_rectsdm1.gif

        Frenchy Pilou
        Is beautiful that please without concept!
        My Little site :)

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

          @pilou said:

          If each rectangle is a Component
          use the fabulous Random Replace Component by Sdmitch (with no random or yes πŸ˜„
          So you can have many different houses if you want! Not Shown here) πŸ˜‰

          House + its rectangle is the Source, Rectangle(s) alone the Target πŸ€“

          Multiple houses πŸ˜„
          Click on the image for see animation! πŸ€“

          Thank you Pilou for the quick response! I would like to try this plugin however:

          embarrassingly I have no idea how do deal with the .rb files Sdmitch has posted that plugin in.

          The linework imported is not squares as components, they are simply faces, so perhaps if we can work out how to easily turn all the squares into components we can start cooking. So it could be getting there!

          J

          1 Reply Last reply Reply Quote 0
          • pilouP Offline
            pilou
            last edited by

            From your first image seems you can easily make this

            Kill all is not rectangles
            then
            Loose to Groups by Chris Fullmer

            then Group to Component by Thomthom

            then Sdmitch replace random components! πŸ˜‰

            About the SDmitch plugin goto http://sdmitch.blogspot.fr
            and load the Component Replacement plugin! πŸ˜‰

            PS you can also look at Architect Tools by Thomthom about import DWG inside SketchUp

            Frenchy Pilou
            Is beautiful that please without concept!
            My Little site :)

            1 Reply Last reply Reply Quote 0
            • pilouP Offline
              pilou
              last edited by

              Or more easy and speedy but you must use the Ruby Console πŸ€“
              Menu Window / Ruby Console (not so difficult! πŸ˜„

              This TIG Code converts all faces selected into Components
              (doesn't change anything of the existing groups or components)
              (but first explode all for more easy use)
              (do you see my image? )

              http://forum.zbrush.fr/index.php?action=dlattach;topic=1622.0;attach=15210;image

              Code by TIG

                
              m=Sketchup.active_model;
              n=m.active_entities;
              m.selection.to_a.each{|e|(g=n.add_group(e);
              g.to_component.definition.name="Face#1")if e.class==Sketchup;;Face}
              
              

              The process

              • Select all faces
              • Open the Ruby Console
              • Past all the code inside the bottom box of the Ruby Console then Enter
                = you have each face selected as single component! πŸ€“

              So use now the Sdmitch plugin is a game's boy! β˜€

              Frenchy Pilou
              Is beautiful that please without concept!
              My Little site :)

              1 Reply Last reply Reply Quote 0
              • R Offline
                rv1974
                last edited by

                http://sketchucation.com/forums/viewtopic.php?p=484308#p484308

                To use rb files put it manually to plugins folder in Appdata

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

                  Most plugins now come in RBZ format which can be installed using the native Extension Manager > Install red-button.
                  BUT if you have a simple script RB file you place it into your Plugins folder and restart SketchUp to load it.
                  It might not be compatible with a newer version of SketchUp, but you can try it.

                  To open your Plugins folder use this snippet of code, copy+paste+enter in the Ruby Console:
                  UI.openURL("file:///#{Sketchup.find_support_file('Plugins')}")

                  TIG

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

                    @pilou said:

                    Or more easy and speedy but you must use the Ruby Console πŸ€“
                    Menu Window / Ruby Console (not so difficult! πŸ˜„

                    This TIG Code converts all faces selected into Components
                    (doesn't change anything of the existing groups or components)
                    (but first explode all for more easy use)

                    Code by TIG

                    The process

                    • Select all faces
                    • Open the Ruby Console
                    • Past all the code inside the bottom box of the Ruby Console then Enter
                      = you have each face selected as single component! πŸ€“

                    So use now the Sdmitch plugin is a game's boy! β˜€

                    Hey nice one! So we are very NEARLY there! So we have the faces to components very easily (great code). And have been able to download the Sdmitch plugin and it does work.

                    HOWEVER, I still very sadly am getting the same result I have with other similar plugins, the result rotates the targets! 😠
                    But i have seen on your first reply with the images you attached it is possible! SO what am i doing wrong?! As shown below the result of the plugin

                    house and targets

                    result.png

                    1 Reply Last reply Reply Quote 0
                    • pilouP Offline
                      pilou
                      last edited by

                      Curious result! πŸ˜„

                      Re-Found the trick! β˜€
                      All "targets" rectangles must be at start the same "copy" component before select all them and named "Target" !

                      As you have before using the plugin all different "target components" πŸ˜„
                      So use the Thomthom ComponentComparaison!

                      @unknownuser said:

                      Compares components for geometric similarities - replaces the instances of similar definitions to use the same definition.

                      pavillon01.jpg

                      Result after the use of Thomthom Component Comparaison
                      pavillon02.jpg

                      Of course depending of the original rotation of your "target" rectangle it self!
                      pavillon03.jpg
                      pavillon04.jpg

                      Frenchy Pilou
                      Is beautiful that please without concept!
                      My Little site :)

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

                        @pilou said:

                        Curious result! πŸ˜„

                        Try this one! πŸ˜‰

                        Rename it in "ComponentReplace.rbz"[/url] so you can install it directly from SketchUp! πŸ€“
                        (Maybe you must restart )
                        It will named "Pilou Relative" in the Extension Menu SDM Tools/CorG!
                        Disable Random(if you don't want a same order) & Relative (if you have same size Source / Target)

                        PS I have find the trick!
                        All "targets" rectangles must be at start the same "copy" component before select all them and named "Target" !

                        As you have before use the plugin all different "target components" πŸ˜„
                        So use the Thomthom ComponentComparaison!

                        @unknownuser said:

                        Compares components for geometric similarities - replaces the instances of similar definitions to use the same definition.

                        oooooo no I thought we were so close! haha. Yes you are right they must all be the same component, furthermore the faces to components script does not allign the axis to the component, so even if SDM CorG did work on different components, it would allign to the targers of their repective axis', and not to the rectangles themselves:

                        Not alligned

                        However it is a moot anyway because if they were all the same component then I could simply build the house on one of the components and they would all build anyway πŸ˜›

                        BUT at least this narrows down our question to this: "is it possible to swap components to faces that share the same dimensions while rotating the axis in the process?"

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

                          @pilou said:

                          Curious result! πŸ˜„

                          Re-Found the trick! β˜€
                          All "targets" rectangles must be at start the same "copy" component before select all them and named "Target" !

                          As you have before using the plugin all different "target components" πŸ˜„
                          So use the Thomthom ComponentComparaison!

                          Correction! Sorry I just saw that the THomthom plugin you suggested WAS pretty much exactly what I was looking for great!!!!

                          It wasn't perfect here is the result below (all same components with reverse face showing)

                          Thomthom component comparison result

                          As you can see didnΓ€y work on all of them but did more than half, which at this point, I would consider more or less a success! Maybe I can put the others in a different model and try again etc. But its definitely going to be a time saver!

                          Thanks!

                          1 Reply Last reply Reply Quote 0
                          • pilouP Offline
                            pilou
                            last edited by

                            Why not makes all faces in the same reversing before launch the Thomthom plugin ?
                            Automatic Face Reverser by Didier Bur

                            Select faces : Right Click / View-Based Face Reverser / Scan Model πŸ˜‰

                            Frenchy Pilou
                            Is beautiful that please without concept!
                            My Little site :)

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

                              @pilou said:

                              Why not makes all faces in the same reversing before launch the Thomthom plugin ?
                              Automatic Face Reverser by Didier Bur

                              Select faces : Right Click / View-Based Face Reverser / Scan Model πŸ˜‰

                              Because it wasn't me I promise! πŸ˜› It was Thomthoms plugin that did it for some reason, heres the before and after:

                              All individual components

                              Thomthom plugin result (grey ones are now all the same component)

                              1 Reply Last reply Reply Quote 0
                              • pilouP Offline
                                pilou
                                last edited by

                                You wish all rectangles white or all grey?

                                I don't see why you can't have them with all that is said above! πŸ˜„
                                (if all rectangles has same size)

                                Can you send the file skp? (saved in v6 for a more large audience)

                                Frenchy Pilou
                                Is beautiful that please without concept!
                                My Little site :)

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  rv1974
                                  last edited by

                                  Mate, have you tried the link I posted above?


                                  g2.gif

                                  1 Reply Last reply Reply Quote 0
                                  • R Offline
                                    rv1974
                                    last edited by

                                    watch his promo video. you should mouse click axes to scatter precisely. use s4u Scale to reset possible distortions 'en mass'.
                                    P.S. BTW, it's not a crime to do it semi-manually. with align (by 3 points) script.
                                    say, you've got 200 plots. it takes ~10sec to align 1 (shortcut is a must!). ~30min to all of them. You've burned already much more time in this thread πŸ˜‰

                                    1 Reply Last reply Reply Quote 0
                                    • pilouP Offline
                                      pilou
                                      last edited by

                                      @unknownuser said:

                                      plugin would create two different components no?

                                      No! Only one! πŸ€“

                                      You can increase the tolerance inside the Thomthom plugin...
                                      but your problem is that you have not exactly the same module every where!
                                      And sometime overlapsed!

                                      Frenchy Pilou
                                      Is beautiful that please without concept!
                                      My Little site :)

                                      1 Reply Last reply Reply Quote 0
                                      • pilouP Offline
                                        pilou
                                        last edited by

                                        You can make more speed if you copy / draw manually a same diagonal (component) inside each rectangle
                                        then use the Sdmitch plugin πŸ˜„ Maybe 10 minutes! πŸ˜„

                                        You've burned already much more time in this thread! πŸ˜‰
                                        But learn many funny things! πŸ˜„

                                        Frenchy Pilou
                                        Is beautiful that please without concept!
                                        My Little site :)

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

                                          @rv1974 said:

                                          Mate, have you tried the link I posted above?

                                          Hi yes I did have that plugin (sorry I thought your first post was regarding .rb files in general!)

                                          Tried but it has rather unexpected results:

                                          S4U plugin

                                          @pilou said:

                                          You wish all rectangles white or all grey?

                                          I don't see why you can't have them with all that is said above! πŸ˜„
                                          (if all rectangles has same size)

                                          Can you send the file skp? (saved in v6 for a more large audience)

                                          Its not a problem if they are reversed faces or not; I was just highlighting that only half of them were made to components. HOWEVER, upon closer inspection it looks as though there are in fact TWO different sized rectangles in this model 😲 , but one would think that Thomthoms plugin would create two different components no? Here's the model:

                                          Model file

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

                                            @pilou said:

                                            You've burned already much more time in this thread! πŸ˜‰
                                            But learn many funny things! πŸ˜„

                                            @rv1974 said:

                                            You've burned already much more time in this thread πŸ˜‰

                                            Haha no doubt you're both correct! Still I feel I have learned useful things from both of you in this thread that I will experiment with, maybe I can find the perfect solution in the end, I do a lot of this plans so I think its on of those worth it once you learn how type things.

                                            Thank you both!

                                            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