Inverse Selection - where is it?
-
thanks for the response TIG .. and any further assistance you may be able to add..
i'm not sure if this little video clip is going to make my wishes clear or further compound the confusion but i'll give it a shot :)...
you'll notice my hi tech number system in the lower left corner of the video.. the only operation you won't see me doing is pushing the delete key on my keyboard..
-
selecting the surface and deleting it.. this is exactly opposite of what i'd like to be able to do which is select the surface and delete everything else (ie - select, invert, delete)
-
trying to do just that with invertselection.rb... selecting only the face then inverting and deleting
-
double clicking the surface in order to get the edges as well then inverting and deleting... this way would be fine as well except the hidden geometry comes into play upon the inversion which causes the surface to delete.
-
in order for the face to remain, i have to show hidden geometry and select all of the hidden lines + the individual faces... then, when i invert and delete, i'm left with what i want .. however, the flow of doing it like this is not practical at all (especially when considering the more complex forms that i really want this script for)
does this make any sense? if so, is it possible to tweak the script?
thanks,
jeff
-
-
You want this in one click?
-
@unknownuser said:
You want this in one click?
no, not exactly and i think i'm confusing things by bringing 'delete' into the conversation..
what i want is an exact interpretation on the term 'inverse selection'... if i have some lines and faces selected, i'd like to be able to switch those to unselected and everything else selected...
the downfall of the script (imo) is that it introduces hidden geometry even if that option is off..
a perfect example of what i'm talking about can be seen on the cylinder that you've posted above..
draw the cylinder and make sure hidden geometry is turned off (as in -- sketchup -> view -> Hidden Geometry... it should be turned off so that the outside face appears smooth with no dotted lines running down it)...
now select all.. everything that is visible highlights.. by my logic, running the inverse select script at this point should deselect everything but it doesn't... everything visible deselects but now the hidden geometry shows up and is highlighted..
try it out.. see what i mean?
jeff
-
I understand your problem, Jeff - and also I'd say the script is working "logically" since those softened (or hidden) edges were not selected until you ran the script so now they got selected.
Also I understand that you wish the script didn't work this way. Maybe TIG can tweak it a bit...
-
ok, cool.. i'm glad i'm getting my point across now.. i admit, i'm no wordsmith.
the thing about what's logical or not is confusing because sketchup deals with it two different ways.. if i use edit -> select all (βA) or the select tool's window to encompass everything, then the hidden lines remain hidden and unselected (unless i have hidden geometry turned on)... if i use a triple click, then it includes everything including the hidden geometry...
i'm basing mine off the first choice but the other one makes just as much sense to me.. i just hope both situations are easy to deal with in ruby language (which i know Absolutely zero about) -
Ah yes, triple select always selects hidden geometry as well. I haven't figured out its logic in this but there may be one.
However I'm a total non-programmer so I can only use scripts.
-
Now I see...
Here v1.1 - it works the same as before, BUT if the selection includes faces then it now assumes you want to include those faces' edges in the selection (visible/hidden/smoothed) even if you haven't explicitly picked any edges: then when it inverts the selection (and say you delete the now selected stuff) any previously selected faces AND their edges are retained...
Feedback please...
Gaieus - you might want to move this to the Ruby realms...
-
works fine when you delete
but when you hide seems curious result
(hidden geometry was enable for select facett then disable after selection and only 2 facets were selected)Edited : all works fine, it was only result when you click on the selected facetts!
-
@tig said:
...Gaieus - you might want to move this to the Ruby realms...
Yeah, it makes sense - "done".
Thanks for the update, TIG! -
-
@ TIG,
that's just fantastic what you're doing here.
I face a problem an two minutes later it's been solved thanks to your script. Great -
-
Curious, has the selection behavior of hidden geom changed in recent versions?
-
@jim said:
Curious, has the selection behavior of hidden geom changed in recent versions?
What/how do you mean?
-
Just my mind being illogical - it makes sense that hidden geoms are included when inverting the selection.
It always feels like hidden geoms should not be included in the active_entities collection. -
@jim said:
Just my mind being illogical - it makes sense that hidden geoms are included when inverting the selection.
nah
hidden geometry (by my logic at least) shouldn't come into the equation unless you have it turned on.. otherwise, it should remain hidden..
that said, this script will still mess with hidden geometry.. if i draw a cube and a sphere, hide the cube, select the sphere, then invert the selection... the hidden cube will become selected..
in my mind, when something is hidden, it should mean that no operations affect it.. it should be ignored..
using the sphere/cube example again.. if i hide the cube and do a 'select all', only the sphere(which is visible) will be selected.. that's how it should work i think.
[and the same could be said for a window select operation.. if something is hidden and i do a window select over it, it shouldn't be selected because i've chosen to hide it]
-
@unknownuser said:
nah
hidden geometry (by my logic at least) shouldn't come into the equation unless you have it turned on.. otherwise, it should remain hidden..
I agree from a user point of view; alttough I can see it both ways. I meant it's logical when using the Ruby API. Otherwise, there would be no way to reference hidden entities.
-
But the API can access whether Hidden Geometry is on or not..
-
I recently wrote a plugin that will hide all unselected entities:
http://forums.sketchucation.com/viewtopic.php?t=31378
For some of you, this is what you are trying to accomplish by inverting the selection.
I'm pretty sure I first inverted the selection, and then hid geometry, so you are welcome to look at the code and modify (or add a menu option).
--
Karen -
This is an old post, but it comes up first on a google search for "Sketchup, invert selection". What I do is select the entire entity that I only want part of (usually a big spiral with 1000s of segments) and then hold down the shift key (you'll see the little + and - sign indicating you can add or subtract elements now) and I'll subtract the pieces I want to keep. Once they have been removed from the selection, I'll delete everything else.
So, "inverse" for me means start by selecting everything as opposed to only selecting the things you want, once you have selected everything unselect the things you want to keep.
Advertisement