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

Script request find geometry and replace with component

Scheduled Pinned Locked Moved Plugins
6 Posts 3 Posters 1.5k Views
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.
  • R Offline
    Richard
    last edited by 5 May 2008, 06:36

    I would love a script that allows - I'll just do it by example as it is easier to explain:

    1. I import a tree generated by Onyz or similar,
    2. separate leaves into one group (as all geometry is loose),
    3. I select one of the leaf plates and select to make a component of that geometry and search and replace all similar geometry with a copy of this new component which would be located, rotated and orientated to suit the geometry being replaced.

    The aim is obviously to speed up the use of detailed trees etc imported into sketchup and further to allow the editing and texturing of the leaf plates via a component.

    I certainly feel this could be a proprietary script given the great advantages within sketchup!

    Any takers!!

    Cheers, Richard

    [BUILTBRAND.COM.AU](http://builtbrand.com.au/)

    1 Reply Last reply Reply Quote 0
    • R Offline
      Richard
      last edited by 22 May 2008, 06:10

      Got to bring this back up for some attention PLEASE!!!

      [BUILTBRAND.COM.AU](http://builtbrand.com.au/)

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by 22 May 2008, 09:53

        The biggest challenge is identifying the geometry for a leaf. My first thought was that if the leaves all have a surface area that is similar, it could make finding them a lot easier - you could find them by area.

        Can you post a sample skp of an imported tree?

        Maybe we can get you half-way there, if not all the way.

        Hi

        1 Reply Last reply Reply Quote 0
        • R Offline
          Richard
          last edited by 23 May 2008, 06:52

          @jim said:

          The biggest challenge is identifying the geometry for a leaf. My first thought was that if the leaves all have a surface area that is similar, it could make finding them a lot easier - you could find them by area.

          Can you post a sample skp of an imported tree?

          Maybe we can get you half-way there, if not all the way.

          Thanks for responding jim!

          I can't load up an onyx tree due to the user agreement, though the same effect would be buy grabbing any SU tree with component leaves and exploding down to base geometry.

          I would imagine the script would either search for alike areas or simply alike geometry. The script would only need to locate one similar face and then select all connected and replace!

          I would imagine the script wouldn't be so hard to do but could be a great time saver where ever a model contains numerous instances of the same geometry.

          [BUILTBRAND.COM.AU](http://builtbrand.com.au/)

          1 Reply Last reply Reply Quote 0
          • A Offline
            AdamB
            last edited by 23 May 2008, 11:45

            @richard said:

            @jim said:

            The biggest challenge is identifying the geometry for a leaf. My first thought was that if the leaves all have a surface area that is similar, it could make finding them a lot easier - you could find them by area.

            Can you post a sample skp of an imported tree?

            Maybe we can get you half-way there, if not all the way.

            Thanks for responding jim!

            I can't load up an onyx tree due to the user agreement, though the same effect would be buy grabbing any SU tree with component leaves and exploding down to base geometry.

            I would imagine the script would either search for alike areas or simply alike geometry. The script would only need to locate one similar face and then select all connected and replace!

            I would imagine the script wouldn't be so hard to do but could be a great time saver where ever a model contains numerous instances of the same geometry.

            My 0.02 of your earth pence worth...

            Area might be a good key, you might also want to group connected geometry, find its OBB (oriented bounding box) and then match on that. And of course then you'd have the necessary local transform "for free" too!

            The biggest problem is that processing geometry in Ruby is spectacularly slow and if you're going to be using dense geometry you might be waiting a long time.. Oh but you do raytracing don't you, so you're used to that. ๐Ÿ˜‰

            Adam

            Developer of LightUp Click for website

            1 Reply Last reply Reply Quote 0
            • R Offline
              Richard
              last edited by 27 May 2008, 03:53

              @adamb said:

              @richard said:

              @jim said:

              The biggest challenge is identifying the geometry for a leaf. My first thought was that if the leaves all have a surface area that is similar, it could make finding them a lot easier - you could find them by area.

              Can you post a sample skp of an imported tree?

              Maybe we can get you half-way there, if not all the way.

              Thanks for responding jim!

              I can't load up an onyx tree due to the user agreement, though the same effect would be buy grabbing any SU tree with component leaves and exploding down to base geometry.

              I would imagine the script would either search for alike areas or simply alike geometry. The script would only need to locate one similar face and then select all connected and replace!

              I would imagine the script wouldn't be so hard to do but could be a great time saver where ever a model contains numerous instances of the same geometry.

              My 0.02 of your earth pence worth...

              Area might be a good key, you might also want to group connected geometry, find its OBB (oriented bounding box) and then match on that. And of course then you'd have the necessary local transform "for free" too!

              The biggest problem is that processing geometry in Ruby is spectacularly slow and if you're going to be using dense geometry you might be waiting a long time.. Oh but you do raytracing don't you, so you're used to that. ๐Ÿ˜‰

              Adam

              thanks adam!

              Yes mate using the likes of maxwell I'm used to waiting LOL!!!

              I think though that the benefits of this idea given SU's lack of handling large hi poly models without taking advantage components and groups is worth the consideration of this time loss early rather than later!

              When I bring an onyx tree into SU the leaves are generally in 2 or 3 groups and need repainting. just exploding these three groups for regrouping into one can take my machine an hour now! And then I have no ability at any stage to map images to the leaves without doing them one at a time, 10000 leaves NOT A CHANCE!

              [BUILTBRAND.COM.AU](http://builtbrand.com.au/)

              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