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

    [Plugin] Component Array (Updated 27-Mar-2014)

    Scheduled Pinned Locked Moved Plugins
    32 Posts 13 Posters 47.0k Views 13 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.
    • sdmitchS Offline
      sdmitch
      last edited by sdmitch

      Made SU2014 compatible

      Generates a component array on selected face. Input consist of the component to place, the XY spacing, the rotation angle of the grid, if the grid is to be rectangular or triangular, and if components are to be placed vertically or perpendicular to the face.

      The point of origin for the grid is placed well outside the face to allow for any rotation of the face itself. A component is placed at each grid point that falls on the face. Depending on the origin of the component, the first component placed in each row my be inside the face boundary and the last component placed may extend outside the face boundary.

      Please get the latest version from the PluginStore http://sketchucation.com/pluginstore?pln=Component_Array

      Nothing is worthless, it can always be used as a bad example.

      http://sdmitch.blogspot.com/

      1 Reply Last reply Reply Quote 0
      • majidM Offline
        majid
        last edited by

        would you give us a visual tut?

        My inspiring A, B, Sketches book: https://sketchucation.com/shop/books/intermediate/2612-alphabet-inspired-sketches--inspiring-drills-for-architects--3d-artists-and-designers-

        1 Reply Last reply Reply Quote 0
        • W Offline
          wyatt
          last edited by

          I love this. I know I will use it a lot. Is there any reason the component selection window includes groups? Lots of components include sub-groups and that makes the list quite lengthy. Would it make more sense to only include components? Maybe you have a reason including groups that I'm missing.

          1 Reply Last reply Reply Quote 0
          • sdmitchS Offline
            sdmitch
            last edited by

            @unknownuser said:

            Is there any reason the component selection window includes groups? Lots of components include sub-groups and that makes the list quite lengthy. Would it make more sense to only include components? Maybe you have a reason including groups that I'm missing.

            No your not missing anything. The API model.definitions is suppose to only return components but apparently not. So far I haven't figured out how to filter the groups out.

            I doubt if there is a way to distinguish between a sub-component and the component containing it. The best I can do for now is suggest you know the name of the component you want and type the first letter. That will allow you to step through the list to find it.

            Oh no it isn't, I've just figured it out. Thanks for the question.

            Nothing is worthless, it can always be used as a bad example.

            http://sdmitch.blogspot.com/

            1 Reply Last reply Reply Quote 0
            • W Offline
              wyatt
              last edited by

              Thank you for updating the script. It works better...groups and sub-components no longer show up. The list now shows each instance as a unique component. Is there a way to filter it so component names only appear once?

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

                The model.definitions returns ALL definitions - which includes components, groups and images [the last two are just special kinds of component if you think about it].
                To make a list of just components loaded into the model use this...
                defs=model.definitions comp_names=[] defs.each{|d|comp_names << d.name if not d.group? and not d.image?}
                You then have a list of all "component" definitions in the model 'by name'...
                Use joined_names=comp_names.join("|") for the dialog dropdown...
                Later after the user has selected a component by name and pressed OK, to get a reference to that definition from the selected 'comp_name' use...
                def_to_use=defs[comp_name]
                much as you have done before... πŸ˜‰

                TIG

                1 Reply Last reply Reply Quote 0
                • EarthMoverE Offline
                  EarthMover
                  last edited by

                  Thanks Sam! You came through as always. πŸ‘ πŸ‘ It would be great to see this developed even further. Perhaps adding functionality for choosing up to three different components and randomly distributing them in the array. Perhaps also an option to randomize scale. Being that this started as a vegetation plugin, those things would make it great for mass plantings. It's a nice simplified version of component spray.

                  3D Artist at Clearstory 3D Imaging
                  Guide Tool at Winning With Sketchup
                  Content Creator at Skapeup

                  1 Reply Last reply Reply Quote 0
                  • sdmitchS Offline
                    sdmitch
                    last edited by

                    TIG, thanks for the tip. I had worked it out a different way but I think I like your method better.

                    Nothing is worthless, it can always be used as a bad example.

                    http://sdmitch.blogspot.com/

                    1 Reply Last reply Reply Quote 0
                    • sdmitchS Offline
                      sdmitch
                      last edited by

                      @earthmover said:

                      Thanks Sam! You came through as always. πŸ‘ πŸ‘ It would be great to see this developed even further. Perhaps adding functionality for choosing up to three different components and randomly distributing them in the array. Perhaps also an option to randomize scale. Being that this started as a vegetation plugin, those things would make it great for mass plantings. It's a nice simplified version of component spray.

                      I already did that, at least partially, it's called RandomComponentReplacement.

                      Nothing is worthless, it can always be used as a bad example.

                      http://sdmitch.blogspot.com/

                      1 Reply Last reply Reply Quote 0
                      • EarthMoverE Offline
                        EarthMover
                        last edited by

                        Great thanks Sam, I'll check it out. Maybe you can make a unified component tools plugin with one toolbar. I'm just being selfish and trying to make my life easier with no regard for your time. πŸ’š I just finished a project with 60 different kinds of plants spec'd in and it was a nightmare. No worries though, I have a few more keyboard shortcuts left. πŸ˜‰

                        3D Artist at Clearstory 3D Imaging
                        Guide Tool at Winning With Sketchup
                        Content Creator at Skapeup

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

                          Thanks again Sam.

                          I'm not sure if anyone else would like this to evolve anymore than it has, but I'll ask anyway! πŸ˜’

                          Is it possible to have:
                          The result be grouped or made a component with the [quantity] x [component name] as the new group/component name.
                          Array grouping.png

                          The option of having the face and lines surrounding the selection to be removed after component array is run. Although delete key usually does a good job of this if i remember to do so after running plugin...
                          Array selection.png

                          I could easily get carried away a few requests! Feel free to say bugger off! πŸ˜‰
                          I have played around with the script for use with paved areas (takes me forever... hence the requests)

                          Thanks

                          Cheers
                          Justin

                          1 Reply Last reply Reply Quote 0
                          • brookefoxB Offline
                            brookefox
                            last edited by

                            Thanks for sharing... I guess experimentation may reveal how to best cope with tidiness (arraying strictly within, and even better, trimming to fit within bounds).
                            component array-1.JPG

                            On second thought, I guess a situation where that that kind of tidiness is desired is not what this is for.

                            Joel is working on a remotely similar hatch plugin which is targeted to accomplish these things, but the poor guy has some kind of other life going on.
                            http://forums.sketchucation.com/viewtopic.php?f=323&t=38637

                            ~ Brooke

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

                              Sam,

                              I need to make a chain and sproket for a piece of machinery similar to a bicycle chain and sproket assembly. Which one of your plugins is most suitable for this? I have a chain link made into a component. Thank You


                              cat-chain-sprocket.jpg

                              1 Reply Last reply Reply Quote 0
                              • EarthMoverE Offline
                                EarthMover
                                last edited by

                                Paul, try either Component Stringer or Shape Bender, both by Chris Fulmer.

                                3D Artist at Clearstory 3D Imaging
                                Guide Tool at Winning With Sketchup
                                Content Creator at Skapeup

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

                                  Thanks Earthmover. I do have Shape Bender, which is a wonderful plugin. It's just that I'm a little thick and have to re-learn how to make it work each time. Was hoping Sam had something because his plugins are always very easy to use. I am testing his Comp String plugin right now.

                                  1 Reply Last reply Reply Quote 0
                                  • sdmitchS Offline
                                    sdmitch
                                    last edited by

                                    Comp String is the only thing like that that I have but don't think it will work very well since the components will need to overlap precisely.

                                    Nothing is worthless, it can always be used as a bad example.

                                    http://sdmitch.blogspot.com/

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

                                      Thanks Sam. Working nights now but will give Comp String another shot on my next day off.

                                      1 Reply Last reply Reply Quote 0
                                      • sdmitchS Offline
                                        sdmitch
                                        last edited by

                                        Made SU2014 compatible.

                                        Nothing is worthless, it can always be used as a bad example.

                                        http://sdmitch.blogspot.com/

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

                                          I have added it to the PluginStore.
                                          http://sketchucation.com/pluginstore?pln=Component_Array

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • N Offline
                                            Neeko
                                            last edited by

                                            Thank you.
                                            I was looking for a plugin that would help me "spray" a grass instance regularly on a selected surface to "fill" it up. Now I just have to randomize the rotation of the components with "scale and rotate multiple" and that would make a perfect grass πŸ˜„

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement