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

    Identification method

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 3 Posters 173 Views 3 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.
    • O Offline
      oasix
      last edited by

      Hi,
      I'm looking for some help. I Would like to code a little ruby script to identify all closed space in my model (like solid group).
      I don't see any way to do that without test all faces and group them each other and test if group is solid.

      I have done 3 pictures my problem, hope u can give me some advice.
      Thank you in advance.


      ScreenClip [1].png


      ScreenClip [2].png


      ScreenClip.png

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        @oasix said:

        I don't see any way to do that without test all faces and group them each other and test if group is solid.

        This sounds like a good answer to your own question.

        In other words, entities must be grouped, (by the user or your plugin,) in order to become a manifold solid.

        So anything that is not a group can be ignored, speeding up the process.
        solids = Sketchup.active_model.entities.grep(Sketchup::Group){|g| g.manifold? ? g : nil}.compact!

        Also a ComponentInstance can be a manifold solid.

        💭

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • O Offline
          oasix
          last edited by

          Ok, thanks.
          But don't you think that this method would be too long/loud for user ?

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            It shouldn't be too slow. Try it out, if it is too slow, then post back with the problem. But from what you've shown, processing won't even be noticeable.

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

            1 Reply Last reply Reply Quote 0
            • Dan RathbunD Offline
              Dan Rathbun
              last edited by

              I think he means that he wants a user command to select manifold solids.

              Perhaps thomthom's SelectionToys plugin can be modified to add a "manifold" filter ?

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • O Offline
                oasix
                last edited by

                it will be great but i'm trying to do it on my own.
                I have problem to find an order to group faces. If the order is wrong it can't become an manifold solid.
                Any suggestion ?

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  (1) Please go to the User Control Panel and fill in the statistics so we can better know about your level and use of SketchUp.

                  (2) Follow the Guide to learn standard Ruby basics, then simple SketchUp Ruby projects, before attempting advanced projects.

                  If you are attempting to program manifold solid features with or for the SketchUp Free edition, then you will need to be a very advanced programmer.

                  Look at the code that others have done in this area first. (It can save you a lot of time.)

                  I'm not here much anymore.

                  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