solid-inspector icon indicating copy to clipboard operation
solid-inspector copied to clipboard

False External Faces were detected #2

Open palexvs opened this issue 5 years ago • 3 comments

False External Faces were detected: test.zip image

Maybe it could be fixed by adding

next if edge.vertices.map(&:position).any? { |pt| face.classify_point(pt) == Sketchup::Face::PointOutside }

here https://github.com/thomthom/solid-inspector/blob/2.4/src/tt_solid_inspector2/shell.rb#L368

Have not had time to check yet

Great plugin! Thanks!

palexvs avatar Apr 19 '19 02:04 palexvs

Hmm.. that's and interesting case. I'd have to look closer to see what cause it to get confused.

As for the suggested fix, I'm not seeing how that would really do anything. That section of the code is looping over the edges in the face. The vertices in that line of code would all belong to the face - and should not be "outside" the face.

thomthom avatar Apr 19 '19 09:04 thomthom

The roof face has 3!! internal loops instead of 1 as I would expect. And one loop is not on a face almost, it confuses your algorithm: image

This code should help sometimes, but not always:

next if edge.vertices.map(&:position).any? { |pt| face.classify_point(pt) == Sketchup::Face::PointOutside }

image

palexvs avatar Apr 22 '19 16:04 palexvs

hmm... that might indicate that the loops for the face isn't as they should be. This seems like a SketchUp bug to me. I'll file a bug report.

I've run into models before where the loops haven't been correct - edges referring to the same face multiple times. In these cases all bets are off for any sane analysis by extensions.

thomthom avatar Apr 23 '19 10:04 thomthom