[Plugin] Solid Inspector
-
Can't tell you TT how ecstatic I am with SI.
Although I have some suggestions for improvement, it still amazes me how it can find tiny random elements that SU says are "~0 in" in length that prevent a solid from forming, that would be simply impossible to find without SI.When Google upgraded SU to form solids, something like SI should have been a native function, far more important and useful than merging solids that are only available with Pro. But Google has always displayed excellent software for internally identifying errors, but rate a serious for telling us exactly what the error is and where to find it to fix.
My only suggestions to improve SI are;
1- allow it to function INSIDE the group/comp. Right now it is a repetitive set of operations to
** select the group/comp,- call-up SI (which is my "S" key shortcut),
- hit <return> to locate the next error,
- zero in on it and place the cursor on the red highlighted object,
- press <spacebar> to exit SI,
- enter EDIT mode and
- select the offender and then
- delete it, which is 99.999% of the time the required fix.
- Then, exit edit mode,
- reselect the group/comp and, IF the solid has not formed (Entity Info box),
- do it all over again.* This gets tedious.
If SI worked INSIDE the group/comp, you would only need to
** select the group/comp,- call-up SI,
- then hit <enter> to select the first offender,
- then <delete> to fix it,
- <enter><delete> <enter><delete>* etc.
I would not want SI to automatically delete offenders, as in rare cases this is not the desired fix.
2- If the group/comp is already or finally a valid solid, paint a green circle around it, and if in edit mode, exit the solid.
-
Yup - I want SI to work inside the active group as well. On the todo list.
I just haven't had much time lately for plugins. -
This is the greatest thing I have ever used.
Thanks for making this!
-
Version 1.1.0
If nothing is selected then the current context will be inspected. -
Thanks Thom
-
Thanks, Thomthom
-
Just noticed the update. Thanks, thomthom.
-
It seems natural that when using Solid Inspector for nested models, that when I click on nothing it should go to the parent context and start checking that. And conversely, double-clicking a Group/Component while using ST could enter that context (except I know it's not possible in the current API ) What do you think?
-
Ah - navigate the current context like the native Selection too does. Yes - not bad idea. Closing is doable, but it does have a nasty bug where the event is not added to the undo stack when you use Ruby - which cause geometry havoc when you do try to undo/redo anything.
( wouldn't mind if more peope, besides me, went nagging to Google about the open/close context issue.) -
In a hurry and just got to get this one out....
doh! What do you mean not a solid you stupid machine, aaaaagh!Thanks thomthom, you have saved me so much trouble.
Come to Yorkshire UK and I will buy you a pint! -
Just discovered a shortcut (sort of) to getting at those tiny fragments buried deep inside a complex solid.
I many cases you cannot easily get to see a fragment inside a solid due to short sightlines and clipping when getting up close, or the red circle seems to be disconnected visually from the fragment.
Pan/zoom till the red circle is around mid screen and then zoom in as close as you can but still outside the solid.
Switch to WIREFRAME view and now you can see the red fragment clearly. Put the pointer ON the fragment and exit SI by pressing the SpaceBar. Double click to enter edit mode. The cursor should still be on or very close to the fragment, click on the fragment to select and then delete it.
Go back to a solid view to make sure you did not open a face. Continue on to the next fragment.
You can also engage SI in XRAY, but you cannot select fragments through the transparent faces.
-
thomthom, I can't even begin to thank you enough for this tool. You rock.
-
Just downloaded this after pulling my hair out trying to find why something wasn't solid. This found the problem right quick! Awesome!
-
ThomThom, once again your plugins have saved me from exploding out of frustration. THANK YOU FOR THIS!!!!!!!!!!!
- Helmholtz
-
Using this with fix solid is great http://forums.sketchucation.com/viewtopic.php?t=33471
Thanks for the awsome plugin,
I dont know why SketchUp does not have this feature included in it. -
@jgb said:
Can't tell you TT how ecstatic I am with SI.
Although I have some suggestions for improvement,
I would not want SI to automatically delete offenders, as in rare cases this is not the desired fix.After using SI extensively over the last few months, I wish to modify my statement above.
I have yet to have a failed solid where deleting every single fragment or duplicate face or lines failed to solve the problem, or worse, partially undo a solid.
Therefore, as an option, I would have SI delete every found element, either all automatically when hitting the <del> key, or sequentially by hitting the <del> key after the <enter> key cycling through the found bits. I think the very rare occurrence of "damage" to the solid by just deleting offenders (never happened to me yet) would also be very easy to fix.
So, yes, delete automatic is my vote.
-
There are cases where a solid has tiny holes, where SketchUp fails to create a face because the edges are too small.
-
@thomthom said:
There are cases where a solid has tiny holes, where SketchUp fails to create a face because the edges are too small.
But aren't these then capable of 'healing'... any!edge.faces[1]
can be tested for tiny length [say <= 0.5mm ?] and then its end vertex transformed to be over its start vertex so it then ceases to exist...
a long thin hole with one or more tiny sides becomes an edge with no hole, a hole with all tiny sides simply ceases to exist at all.
I have tested some code and I admit that making the ends of a tiny edge coincident isn't working - as you are left with an edge of zero length [!] with two coincident edges too! Moving vertices to become coincident must be possible - the TT-vertex-tools ? I am stumped -
@tig said:
I have tested some code and I admit that making the ends of a tiny edge coincident isn't working - as you are left with an edge of zero length [!] with two coincident edges too! Moving vertices to become coincident must be possible - the TT-vertex-tools ? I am stumped
The only way I found, was a method similar to how you heal edges, you make a temp edge and then erase it. That will merge the vertices located at the same position and remove the zero length edge.
-
Actually, there is some more to it. Here are a few methods I use in Vertex Tools 1.1 to heal geometry after manipulating vertices:
<span class="syntaxdefault"><br /> </span><span class="syntaxcomment"># Heal geoemtry<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># (i) When vertices are merged into one point it one end up with zero size<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># faces and edges. These produce a messy mesh and cause errors to be<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># reported when Su validates the model.<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment">#<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># If one draw a dummy edge with SU's native edge tool it heals the <br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># geometry. But if one does the same with the Ruby API it doesn't.<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment">#<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># Thanks to Gulcan Ocali from Tgi3D for suggesting a workaround where<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># the edge is created in a dummy group - then exploded. This appear to<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># make SU heal the geometry. The dummy edge is turned into a zero length<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># edge before exploding so it's automatically cleaned up when the group<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># is exploded.<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment">#<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># http://forums.sketchucation.com/viewtopic.php?f=180&t=35470#p312814<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment">#<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># This does however feel too much like a dirty hack. Would be nice to<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># know how to correctly do this.<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment">#<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># (?) Turn into a reusable method accepting an array of vertices to heal.<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment">#<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># (?) Is it nessesary to also do the same to soft-selected vertices?<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment">#<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># @since 1.1.0<br /></span><span class="syntaxdefault"> def self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">heal_vertex</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> entities</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> point </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> point </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> point</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">position if point</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">is_a</span><span class="syntaxkeyword">?(</span><span class="syntaxdefault"> Sketchup</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">Vertex </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> temp_group </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> entities</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">add_group<br /> temp_edge </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> temp_group</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">entities</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">add_line</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> point</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> point</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">offset</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> Z_AXIS </span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> temp_group</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">entities</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">transform_by_vectors</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">temp_edge</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">end</span><span class="syntaxkeyword">],</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[</span><span class="syntaxdefault">Z_AXIS</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">reverse</span><span class="syntaxkeyword">]</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> temp_group</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">explode<br /> end<br /> <br /> </span><span class="syntaxcomment"># @since 1.1.0<br /></span><span class="syntaxdefault"> def self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">heal_vertices</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> entities</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> points </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> if points</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">is_a</span><span class="syntaxkeyword">?(</span><span class="syntaxdefault"> Enumerable </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> for point in points<br /> self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">heal_vertex</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> entities</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> point </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> end<br /> else<br /> self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">heal_vertex</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> entities</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> points </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> end<br /> end<br /> <br /> </span><span class="syntaxcomment"># Tries to heal all zero length edges in the given set of entities. This<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># should also heal zero size faces since they are bound by zero length edges.<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment">#<br /></span><span class="syntaxdefault"> </span><span class="syntaxcomment"># @since 1.1.0<br /></span><span class="syntaxdefault"> def self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">heal_entities</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> entities </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> return if entities</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">length </span><span class="syntaxkeyword">==</span><span class="syntaxdefault"> 0<br /> parent </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> entities</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">first</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">parent<br /> for entity in entities<br /> next unless entity</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">is_a</span><span class="syntaxkeyword">?(</span><span class="syntaxdefault"> Sketchup</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">Edge </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> if entity</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">length </span><span class="syntaxkeyword">==</span><span class="syntaxdefault"> 0<br /> self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">heal_vertex</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> parent</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> entity</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">start </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> end<br /> end<br /> end<br /></span>
Advertisement