• Login
sketchucation logo sketchucation
  • Login
🔌 Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

[REQ] Detect Overlaps mode

Scheduled Pinned Locked Moved Plugins
12 Posts 4 Posters 1.1k Views 4 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.
  • R Offline
    rv1974
    last edited by 21 Jan 2016, 10:46

    For visual purposes only! Kinda quality control before exporting.

    1 Reply Last reply Reply Quote 0
    • J Offline
      jolran
      last edited by 21 Jan 2016, 11:15

      ok..

      Looking at your Picture again I see that the faces are all "simple polygons" without holes. So this oneliner wont work. I overlooked this fact.

      I have a feeling this is not so simple to solve since we don't have any reference to compare with (?)
      It's easy to visually see the letters and how they should be formed, but in code it's just another polygon with the same properties as it's neighbours.

      I don't have time to dig deeper into this right now, maybe later..

      1 Reply Last reply Reply Quote 0
      • G Offline
        glro
        last edited by 21 Jan 2016, 11:46

        @rv1974 said:

        I'm really missing a visual mode that would clearly show all areas with overlapping faces. It'd solve many problems in export\rendering.

        Thanks in advance.

        it might be easier to achieve this considering a volume, instead of a surface

        and since your letters are 3d, you might consider transform them into solids

        1 Reply Last reply Reply Quote 0
        • J Offline
          jolran
          last edited by 21 Jan 2016, 12:03

          @unknownuser said:

          it might be easier to achieve this considering a volume, instead of a surface

          and since your letters are 3d, you might consider transform them into solids

          I agree.

          However I think Rv1974 is after a general purpose face overlapping detection.

          Thought about it during lunch, and can perhaps be solved if looking at face vertices winding order and comparing those with adjecent faces in the plane. Or maybe not 😄

          I don't have time to work on this though.. But an interesting problem.

          1 Reply Last reply Reply Quote 0
          • R Offline
            rv1974
            last edited by 21 Jan 2016, 12:43

            @unknownuser said:

            However I think Rv1974 is after a general purpose face overlapping detection.

            Exactly! Those letters were used for illustrating purposes only. And it supposed to be a heavy duty thing- displaying relatively large geometry.

            1 Reply Last reply Reply Quote 0
            • D Offline
              driven
              last edited by 21 Jan 2016, 15:28

              if each item has material, Visualizer quickly shows any overlaps...
              circles0059.png

              to fix them in code it is probably quickest to filter bounding box max/min of each item...

              once filtered you could jitter them a tiny amount to avoid z fighting that shows up in renderers...

              to check if a model [containing only solids] has any overlaps...

              original_count = 0
              ents = Sketchup.active_model.active_entities
              ent_n = ents.length
              ents.each do|e|
                original_count += e.definition.entities.grep(Sketchup;;Face).length
              end
              sel = Sketchup.active_model.selection
              Sketchup.active_model.active_entities.each do|e|
                sel.add(e) if sel.length == 0
                sel[0].outer_shell(e) if sel.length == 1
              end
              shell_count = sel[0].definition.entities.grep(Sketchup;;Face).length
              if shell_count != original_count
                p original_count - shell_count
                ent_n.times{Sketchup.undo}
                # run a jitter code
              end
              

              john

              learn from the mistakes of others, you may not live long enough to make them all yourself...

              1 Reply Last reply Reply Quote 0
              • R Offline
                rv1974
                last edited by 21 Jan 2016, 18:40

                So you suggest to render in application A in order to eliminate defects in application B.
                I'm not sure it's heading in right direction.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jolran
                  last edited by 21 Jan 2016, 19:08

                  @Rv1974 when you say "overlapping" faces where you refering to Z-fighting where non-intersected faces lie on top of each other ,as Driven has shown ?

                  Cause the first Picture show intersected faces which would mean a whole different thing, and dare I say quite more complicated algorithm...

                  Otherwise Driven's boundingbox tests idea might work.

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    rv1974
                    last edited by 21 Jan 2016, 21:32

                    All possible directions of course. And NOT 'solids'- SU is not about solids at all.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      driven
                      last edited by 21 Jan 2016, 21:49

                      @rv1974 said:

                      ...SU is not about solids at all.

                      SU has some very fast methods for handling solids that take forever on non-solid geometry...

                      The only reason for the overlapped geometry is sloppy modelling that can be more easily fixed if all are grouped solids...

                      are you importing the bad topography?

                      which renderer is failing to accept the errors?

                      are you really still using SU v8 Pro?

                      learn from the mistakes of others, you may not live long enough to make them all yourself...

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

                      Advertisement