Solid Inspector²

There is something odd happening here.

   Error: #<NoMethodError: undefined method `<<' for #<Sketchup::Set:0x0000001605eb80>>
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/error_finder.rb:48:in `block in find_errors'
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/error_finder.rb:34:in `each'
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/error_finder.rb:34:in `grep'
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/error_finder.rb:34:in `find_errors'
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/inspector_tool.rb:159:in `analyze'
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/inspector_tool.rb:186:in `block in create_window'
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/window.rb:95:in `call'
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/window.rb:95:in `block in trigger_events'
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/window.rb:94:in `each'
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/window.rb:94:in `trigger_events'
C:/Users/hp/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/window.rb:35:in `block in initialize'
SketchUp:1:in `call'

Can you mark the entire message up in Pre Formatted text please? It would make it much easier to read.

I’m going by a guess here since I don’t have the full error message - but are you by any chance using the first release of SketchUp 2014 and opening it by double clicking on SKP files? There was a bug that caused some extensions to fail, but it was fixed in later maintenance releases of SU2014. Can you please make sure you have the latest release of SU2014 and try again?

Are you going to have to start replacing < with &lt; in your exceptions? Hehe

I was just about to start looking into the possibilities of making a forum extension that detects error messages and marks it up - because this is just plain painful. The most useful part of the error message is always lost unless the user marks it up. :frowning:

It looks as though something has messed up the API namespace. I’m not making use of Sketchup::Set anywhere - so it appear that someone re-referenced Set = Sketchup::Set in the global namespace - which is very naughty.

Only thing I can recommend is that you disable your extensions one by one until you find the culprit. (Please report back which one it was so I can contact the developer.)

Found it, it was Quick Selection, a Didier that you guys had already discussed for exactly this reason.
I obviously didn’t edit the rb correctly when I recently tried it.
I didn’t like it much as a plugin anyway so have deleted it.

1 Like

Yes, I already updated the example I gave in that thread.

1 Like

Ah, yes, it did sound familiar but I couldn’t recall. So it’s not a published version? That’s good.

If you need to use it again then using Jim’s updated example should work and avoid clashes.

I’m happy to lose it.
I thought I had broken it by doing some cleanup on my PC, glad to have it working again.

It says:

Degenerate face!
Error: #<TypeError: can't convert Geom::Point3d into Float>
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/error_finder.rb:516:in `transform'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/error_finder.rb:516:in `block in transform_ray'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/error_finder.rb:516:in `map'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/error_finder.rb:516:in `transform_ray'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/error_finder.rb:395:in `reversed_face?'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/error_finder.rb:286:in `find_errors'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/inspector_tool.rb:159:in `analyze'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/inspector_tool.rb:186:in `block in create_window'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/window.rb:95:in `call'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/window.rb:95:in `block in trigger_events'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/window.rb:94:in `each'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/window.rb:94:in `trigger_events'
C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/tt_solid_inspector2/window.rb:35:in `block in initialize'
SketchUp:1:in `call'

I did use soap skin bubble to make the leg, just used skin part
Plus Im not sure why but it considers the one with lines on it a solid and does not say anything to the one without any lines on it. Also I have no idea how those lines disappeared, just this one random day I copied it and I am not sure what else but the lines were gone and I thought oh good, looks neater.

All of the Spoiler Angles SU14 Copy.skp (626.4 KB)

I edited your post so that the error message was wrapped up in Preformatted Text:

Without that part of the error message was lost.

The lines are there on both meshes - it’s just that one of them has all the edges set as Soft and Smooth.
See this article for more info: Soft vs Smooth vs Hidden Edges | Procrastinators Revolt!

You can see all edges by toggling View > Hidden Geometry.

In the model you attached - which one where giving you the error?

Ah - that one. The error has been fixed in version 2.2 which will be released shortly. I’ll announce it here in the thread.

It’s quite possible to have a ‘solid’ object that will not 3d-print !
The last image shows one - the two ‘legs’ are solid and penetrate the other part.
As they have not been intersected SketchUp thinks it’s a ‘solid’ but a 3d-printer will break !

A final check on an object that is otherwise ‘solid’ would be to intersect all of its geometry with itself, if the result is not [ ] then it’s likely no longer object.manifold? and needs further work to become a ‘solid’ again - which can be 3d-printed !

That’s true. Though, as part of how SI2 works it’s a bit tricky as it first analyse the mesh, then present the findings in the dialog - without modifying the model. One would have to make use of a temp operation - and then there is the issue of intersect_with’s performance. Maybe some bounds checking which be able to catch some of this.

You can easily do an operation and abort it, undoing the result.
If the res=entities.intersect_with(…) is [ ] then there are no problems.
BUT if it makes some geometry then it’s not ‘really’ a ‘solid’ !
In a similar way to it containing a nested group or component, that also messes it up …

The potential performance hit with larger meshes is a concern. Could make SketchUp freeze up for minutes…

But you can never trust bounding-box intersections, as they can appear to intersect when there is no actual penetrative intersection…
Alternative idea !
Select a edge at random and get edge.all_connected.
If the result + [edge] is not the same length as edge.parent.entities.to_a then there is some unconnected geometry ?
BUT of course a true printable solid could have two quite separate collections of unconnected geometry !
AND you can make a solid that pierces itself ! With every ting connected!! SoildThatIsNotSolid.skp (44.8 KB)
entities.intersect_with(…) seems the only foolproof way ??

1 Like

Yea, it’s tricky. I already detect and sort out disconnected geometry. But as you say, a mesh can self intersect.

What makes intersect slow is the merge controller. Maybe it can be resolved with a Ruby C Extension to perform intersection test. I’d think there would be libraries out there to do this already.

Thanks for the sample model. I’m building up a collection of edge cases for automated tests.