• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Random Delete?

Scheduled Pinned Locked Moved SketchUp Discussions
sketchup
12 Posts 6 Posters 2.2k Views 6 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.
  • T Offline
    thomthom
    last edited by 3 Dec 2007, 09:37

    Is there a plugin that deletes random object of the current selection? I've been searching for one, but haven't found any.

    The reason is that I'm modelling a large surface where objects are placed at irregular intervals. I was thinking that I'd array copy them uniformly and then randomly delete them. However the objects are about 1500 once placed uniformly so I had hoped there's be an automated way as oppose to do it manually.

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

    1 Reply Last reply Reply Quote 0
    • G Offline
      Gidon Yuval
      last edited by 3 Dec 2007, 12:00

      I hope I understood correctly what you're trying to achieve.
      Have a look at the attached file and tell me if it helps.
      random clones.jpg
      random clones.skp
      Cheers,

      Gidon

      If you don't know where you're going, you're never going to get there.

      1 Reply Last reply Reply Quote 0
      • T Offline
        thomthom
        last edited by 3 Dec 2007, 12:12

        Thanks for the reply, but I'm afraid it wasn't quite what I was looking for.
        I'll try to explain somewhat better:

        I'm modelling a façade.
        The façade follows an irregular shaped curving path.
        It consists of three different types of boards.
        At random intervals there's boards missing, leaving holes.
        Due to the size of the building, each board when arrayed uniformly along the path counts to about 1500. Because of this I was hoping to find a tool that would delete random objects from a selection set. Being able to adjust the randomness would be a plus.

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

        1 Reply Last reply Reply Quote 0
        • A Offline
          Anssi
          last edited by 3 Dec 2007, 18:58

          Thomthom,

          Perhaps you are overdoing it. Sounds like an enormous model. The boards alone would create 27000 faces and 54000 edges. I would recommend using a suitable texture.

          Then there is the thing about randomness. Do you really want it, the real thing? We architects usually strive for a result that "looks" random, and relatively few of the possible random arrangements actually do. That is why it is best done by eye. I don't think that apparent randomness can be mathematically defined.

          Anssi

          securi adversus homines, securi adversus deos rem difficillimam adsecuti sunt, ut illis ne voto quidem opus esset

          1 Reply Last reply Reply Quote 0
          • T Offline
            TIG Moderator
            last edited by 3 Dec 2007, 19:42

            Try:
            http://www.sketchucation.com/forums/scf/viewtopic.php?p=12977#p12977
            which links to a Random Delete ruby script. It deletes a percentage of a selection. Percentage is from a dialog... Use with care...

            TIG

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 4 Dec 2007, 08:57

              @Anssi
              Yes, it does become a large model. However, a texture won't work as some views are close up. (Though I could have modelled that separately, if only the views was fixed.) The whole thing is a study of the façade surface so I need the detail. Fortunately they just gave me a new computer at the office so the computer can handle it. 😄

              I did end up deleting very thing my hand. But since things often change quickly I wanted to see if I could get my hands on a tool that let me do quick test of various setups. Quick and dirty prototyping. In a more final stage I'd do it by hand to ensure better control.
              I fully understand what you're saying though. Thanks for your input.

              @TIG
              Thanks for that script. But I've not been able to try it out. I don't find a way to invoke the command in SU. I had a look at the source and see that there should be an menu item in the plugins menu, but none appears.
              I know PHP, JS, VBS scripting, so I can read parts of the script, but I've not done any Ruby yet so I can't spot the issue. (Or could other plugins be interfering?)

              I should set of some time to learn Ruby and the SU API as I figured it'd be a simple loop iterating the selection. I can see that it'd be useful especially to perform special repetitive tasks.

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

              1 Reply Last reply Reply Quote 0
              • T Offline
                thomthom
                last edited by 4 Dec 2007, 09:17

                Doh!
                Never mind my previous post about not being able to use it. It was solely and entirely due to faulty user, not plugin. (Which I suspected to begin with... 😳 )
                When I saved it I saved it in one of the subfolder of the plugin folder. No wonder it didn't turn up.

                I tried the script and it works just like I wanted! 😄 Thank you very much for taking the time to assist me.

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

                1 Reply Last reply Reply Quote 0
                • D Offline
                  Dave R
                  last edited by 4 Dec 2007, 11:54

                  TIG, that's a neat script. I don't know what I'll use it for but it is kind of fun to make a large array and then run the script watching stuff disappear. I could see using it to create a forest.

                  If the elements in the array are copies of a few different components, there'd be no problems with loading up the file.

                  Etaoin Shrdlu

                  %

                  (THERE'S NO PLACE LIKE)

                  G28 X0.0 Y0.0 Z0.0

                  M30

                  %

                  1 Reply Last reply Reply Quote 0
                  • tbdT Offline
                    tbd
                    last edited by 4 Dec 2007, 12:22

                    [shameless plug] add Randor in the mix and you have a good looking forest, crowd, ... [/shameless plug]

                    SketchUp Ruby Consultant | Podium 1.x developer
                    http://plugins.ro

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      thomthom
                      last edited by 4 Dec 2007, 13:08

                      Great! I might actually have to do that at some point. The current trees in the model isn't great.

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

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        TIG Moderator
                        last edited by 4 Dec 2007, 20:15

                        Another shameless plug... try my MatrixProximity script. That adds two functions. There are guides on use too - See Didier's site etc. See: http://www.crai.archi.fr/RubyLibraryDepot/Ruby/em_cam_page.htm

                        'Matrix' places 1D, 2D and 3D arrays of a selected component, arrayed as you choose from a dialog, you can use fixed-spacing or randomized-about-a-spacing for the pattern in XYZ and also for the XYZ rotation and XYZ scaling/handing. If you make a random matrix of trees above a ground surface at the end you can 'drop' them onto that surface if desired...

                        It's cousin loaded in the same script is 'Proximity', which lets you swap components for more-complex/less-complex ones, depending how far they are away from the camera. So for example you model a stadium with a simple component seat called 'seat-' and position you camera. Run Proximity and enter the camera-distance 'ranges' in the dialog and as long as you have 'family' components called 'seat+' and 'seat~', then the near and mid-distance ones get swapped for these - so the nearer the camera the more detail is seen. Make your image and swap the "seat"s back to their simplest one for general working. This helps keep poly counts low. It can be also used for trees, people, cars etc.

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          thomthom
                          last edited by 5 Dec 2007, 08:12

                          Yet another great addon! 😄
                          I really like the Proximity script. Same kind of function I'm familiar with from 3DSMax.

                          I love how SU can be extended so easily. Like Firefox, addons makes it such much more invaluable.

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

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

                          Advertisement