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

[Req] Random Component/Group

Scheduled Pinned Locked Moved Plugins
9 Posts 2 Posters 918 Views 2 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.
  • P Offline
    Physicsguy1
    last edited by 20 Jun 2009, 05:16

    Could anyone create a plugin that will make random groups of specified geometry, and possibly groups of only connected faces & lines?

    1 Reply Last reply Reply Quote 0
    • C Offline
      Chris Fullmer
      last edited by 20 Jun 2009, 05:24

      Hi Chris, I've already got a similar script and I want to make sure its not what you're asking for.

      Imagine you have a 20 circles drawn, each not touching eachother or anything else. 20 separate circles. Run my script and it will find the first entity in the model - an edge or a face, then it selects everything connected to that entity and groups all of that. So it finds the first edge, and then grabs all edges and the face and turns the entire circle into a group. It then moves on to the next ungrouped entity int he model and keeps going until all loose geometry is grouped.

      Is that what you are looking for?

      Or are you thinking more like this:

      Say you have a sphere. You want a script the will take the first entiy, a line or a face, end then select a few connected faces and group those. Then move and do the same again, maybe with more or less faces in the next group. So in the end your sphere, a single object, gets sliced up into a series of groups. (which I'm guessing would be perfect for exploding a sphere into chunks in SP?)

      Anyhow, I already have version 1 written and its called loose2groups.rb. #2 could be done in a few minutes if you'd like.

      Chris

      Lately you've been tan, suspicious for the winter.
      All my Plugins I've written

      1 Reply Last reply Reply Quote 0
      • C Offline
        Chris Fullmer
        last edited by 20 Jun 2009, 06:05

        I'm thinking about the 2nd method I listed above. I can think of a few ways to randomize splitting up the geometry into groups. I was hoping for some more info from you about what you are trying to use it for.

        One option is that it could look at a faces and then keep adding neighboring faces until the square area of the faces is somewhere in certain range. Helpful so you can sort of guage the size of groups.

        Another would be just tell it how many faces to add per group. It could min.max value. So a minimum of 5 faces and maximum of 20.

        Both of the above methods ssume that you don't have many loose edges without faces. It would be easiest to write it to sort of ignore loose edges or just group them with thmeselves. So I'll probably do that at least in the first round. If this is even what you had in mind for the script.

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • P Offline
          Physicsguy1
          last edited by 20 Jun 2009, 06:12

          #2. If possible, can geometry be placed where the split occurred to fill the gap, and could it possibly be convex?

          1 Reply Last reply Reply Quote 0
          • C Offline
            Chris Fullmer
            last edited by 20 Jun 2009, 06:39

            The way I'm seeing it, there is no gap. Maybe could make a picture explaining what you mean with that?

            I have a feeling you're looking for something much more complex than merely splitting geometry up into random groups. But i'd like to see a diagram explaining what you're imagining.

            I'm thinking maybe booltools or something like that might be along the lines of what you need.

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 Reply Last reply Reply Quote 0
            • P Offline
              Physicsguy1
              last edited by 20 Jun 2009, 07:47

              Well, let's say we have an open face, which are not coplanar. i was thinking that the concave side could be made convex by bridging the endpoints with geometry.
              Example:


              bs - Scene 1.jpg

              1 Reply Last reply Reply Quote 0
              • C Offline
                Chris Fullmer
                last edited by 20 Jun 2009, 15:06

                Oh yea, that is what I thought you meant. Sorry, that is beyond the scope of what I could write easily.

                Chris

                Lately you've been tan, suspicious for the winter.
                All my Plugins I've written

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Physicsguy1
                  last edited by 20 Jun 2009, 21:50

                  Well, I don't need that. it would probably slow down the simulation in sketchyphysics.

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    Physicsguy1
                    last edited by 20 Jun 2009, 21:55

                    Would it be possible to just write a script that selects only outer edge lines, and then uses .find_faces to cover them?

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

                    Advertisement