Quicky Delete&Trim Tool/Command?

IIRC, I had a script for that in Rhino 3 or 4 …
Yes, depending on the type of work and on your workflow, it may be useful.
( Just like any other feature … )

a script which did both deleting and trimming in one go without any selection of trim objects?
but you think that implementing something like that into Rhino is a bad idea and too individual?

just imagine a tool which has this all and you can set it having no disadvantage and even combines many steps. why would that not be useful for everybody.

it’d be very confusing. i think you’re only thinking about this in certain scenarios.

what happens when you’re trying to trim part of a curve to another when this curve is also crossing other points or curves or surfaces?
– you won’t be able to quickly… in between every intersection (and in cases – apparent intersections) becomes it’s own little segment that you’ll have to go in and click on individual when you really just wanted to click once and have the rest of the curve go away.

or try to delete a circle that intersects with other lines… you can’t just delete the circle with one mouse click.

or delete a surface that has a circle drawn on it… can’t because you’ll either make a hole in the surface if you click inside the circle or you trim away all but a circular hole.

these are very real scenarios that are going to happen in many many drawings…

there IS a disadvantage… that being, some of times, the Delete-Trim tool will work… and some of the times, you need to use Delete… and some Trim… it’s like you’re wanting to combine two reliable tools into one semi-reliable tool

like, you’re not really simplifying and are actually complicating things… and the more complex the model becomes then the more useless this Delete-Trim tool becomes.

it’s a fine candidate for a scripted tool… perfectly fine.

why so set on it being included in the software?

2 Likes

you figured i didnt encounter daily life situations yet?

you are explaining basic work methods which anybody would be aware of soon enough,
who extensively worked with rhino for a couple of hours in construction and in finishing drawings.

how about being able to set it as you want? and/or how about
keeping/using the regular trim tool for such matters? so complicated you think?

what is it with you guys not reading along and firing at any shit at first glance? like in that thread where you kept going at me throwing around insults because you didnt read carefully enough? remember still? i dont take it personal mate, but i get the feeling each time i talk to you and Randy who diplomatically backed you up nicely here that i run into a deja vue. :wink:

why not? something which makes cleaning easier.
and why being so set on trying to convince how dumb this idea is?

calling me a sketchup lobbyist because i thought that might be nice to have?
paranoid maybe?

and mostly i am (call it set on it if you want), because i keep talking to people who dont read well while believing they are the only ones being able to work in real life situations in rhino. sorry but not sorry this is just ego mania pure.

this has become a non stop repetition battle here nothing else, i dont think it makes much sense to talk further like that. i worked with rhino long enough to know how lets say most of the tools work i am sure not perfect eager to learn along but fighting and convincing around will neither prove anything nor make it better in any sense.

if you dont see sense in a neat enhancment which could make life easier without losing control of the other options for people who have a lot of lines then pls dont jam up my attention and patience further and maybe also not only mine.

[quote=“RichardZ, post:58, topic:38556, full:true”]
and why being so set on trying to convince how dumb this idea is?[/quote]
pretty sure i’m just discussing the idea.

[quote]
calling me a sketchup lobbyist because i thought that might be nice to have?[/quote]
huh? you said something about how the sketchup eraser works and i said why it works that way… again. simple discussion.

call you a sketchup lobbyist-- say what?

yeah, i think maybe so.

[quote]
and mostly i am (call it set on it if you want), because i keep talking to people who dont read well while believing they are the only ones being able to work in real life situations in rhino. sorry but not sorry this is just ego mania pure.

this has become a non stop repetition battle here nothing else,[/quote]

seems to me if someone doesn’t agree with you or adds to the discussion something you don’t agree with then they’re ego maniacs… well, ok then.

[quote]
i dont think it makes much sense to talk further like that.[/quote]
ok Richard.
probably best.
i don’t like getting caught up in too much drama around here and i think i’ve reached my quota a couple of times now this quarter.
cya

jeff, dont take that too personal but if you dont read or remember the things you say
then what is it good for? its fun talking to people but i rather have fun talking to people who read.

sorry mate.

I think you do or you wouldn’t be going on about it.

Actually I was asking you to describe it better, reread your subject title and first post.

Point form maybe for us imbeciles.

  1. I would like a tool, when selected objects ( by paint brush,or magic wand or however )
  2. would be deleted or trimmed, my preference
  3. end tool

Yes Cya …

&

… don’t believe everything you think

I have fun with people who draw, no language barriers

then read:

it explains that the eraser tool is not doing what your proposed tool is doing.

that is but an effect of something at a more fundamental level in the program.
sketchup creates sticky geometry… rhino doesn’t…

in order to make rhino’s delete/trim tools work like sketchup’s eraser then you don’t have to change the delete or trim tool… you have to change the entire program at a root level… good luck with that.

the entire point of me posting that was to make the point that sketchup does not have a trim tool… its eraser is only a delete tool… because everything is already split when it’s created. (and a trim tool is delete ANd split combined into one tool)

whether or not a certain functionality could or should be mimicked in rhino has nothing to do with what i said… i was discussing a core difference between sketchup’s workflow/ideology and rhino’s.


i don’t know what to tell you man… you’re apparently offended by my posts… what you read from them are taken as me being on the high horse and calling you names… firing insults… etc.
it’s some serious communication breakdown going on.

Thanks, from me as well … all I wanted was a better explanation of what he wanted.

“Cool Hand Luke” … what we have here is a failure to communicate

Here ya go…

import Rhino
import rhinoscriptsyntax as rs

def GetOneOrMoreObjects(prompt):
    #prompt==command line prompt
    go = Rhino.Input.Custom.GetObject()
    go.SetCommandPrompt(prompt)
    go.EnablePressEnterWhenDonePrompt(False)
    get_rc = go.GetMultiple(1,-1)
    if get_rc==Rhino.Input.GetResult.Object: return go.Objects()
    return

while True:
    objs=GetOneOrMoreObjects("Select objects to delete")
    if objs: rs.DeleteObjects(objs)
    else: break
1 Like

[quote=“RichardZ, post:56, topic:38556”]
a script which did both deleting and trimming in one go without any selection of trim objects?
[/quote/

No, as script for repeatedly delete objects only.
… But I lke the idea of a single click quick-trim, when the object only has one intersection …

Whether ideas in Rhino are good or bad it’s only a problem of priority IMO.
We all know that RMA has limited resources, they cannot implement several things just because they have not enough time.
… And obviously because they generally don’t use external libraries (for good reasons), but write a lot of code in house.
If you also take in account that Rhino is used for a lot of different purposes, you quickly realize that picking the features to implement is not a trivial task for Bob … :smiley:

… But anyway, as I said, I like the idea of a quick trim, but I have no idea how hard it would be to write it …
and also to precisely define what it would need to do …

and how often shall i do that? when i keep repeating the same things over and over again it gets boring. especially when i have to start discussing general and well know facts of how to use trim or how to delete.

to repeat once more also as you pointed out yourself a tool which deletes and trims objects on touch.
according to your preference with no disadvantage to tools used prior. thats the idea and i believe that could be very smooth.

and to point that out one last time, i am not longing for a recreation or to produce sticky geometry. all that is there in rhino shall be done the same just a bit more handsome to call it like that at least that would be the wish for it.

1 Like

merci beaucoup monsieur Helvetosaur_e :smile_cat: that works very fine now as i wished, while getting something to read and compare. maybe if i understand Python soon enough hopefully i could combine yours and Pascals to one funky tool.

if Emilio does not find his anymore

yes thats true in any matter, but if there is something which causes no disadvantages and only enhances positively then i should hope it would be considered rather sooner than later.

hmm i personally have not much knowledge about coding, i only know a bit CSS and a dash of javascript maybe not even enough to understand it. but anway if such a tool would be lets say even though a bit more extensively due to the core language but still similar easy in its idea like the Python pendants here then maybe its even feasible in quite a short time. but then again as you say i am sure there are many opinions on what to implement and what not, and so far i have not heard anything here regarding the consideration of it.

thanks to all for the lovely implementations and brainstormings. :roller_coaster:

Here ya go!
Delete first then trim …

import Rhino
import scriptcontext as sc
import rhinoscriptsyntax as rs

def GetOneOrMoreObjects(prompt):
    #prompt==command line prompt
    go = Rhino.Input.Custom.GetObject()
    go.SetCommandPrompt(prompt)
    go.EnablePressEnterWhenDonePrompt(False)
    get_rc = go.GetMultiple(1,-1)
    if get_rc==Rhino.Input.GetResult.Object: return go.Objects()
    return

while True:
    objs=GetOneOrMoreObjects("Select objects to delete")
    if objs: rs.DeleteObjects(objs)
    else: break

def TrimObjects ():
    Ids = rs.NormalObjects()
    rs.EnableRedraw(False)
    rs.SelectObjects(Ids)
    for Id in Ids:
        obj = sc.doc.Objects.Find(Id)
        obj.Highlight(False)

    rs.EnableRedraw(True)
    rs.Command ("_Trim")
    rs.UnselectAllObjects()

if __name__ == "__main__":
    TrimObjects() # Call the function defined above

Delete objects first …

right-click to enter trim command …

Cheers :crystal_ball:

DeleteAndTrim.py (836 Bytes)

Her is the script
It’s an old Rhino 4 rvb file: VBScript, not Python

function confirm(msg)
confirm=vbtrue
ok=rhino.getstring(msg&" Ok ?","Yes",array("Yes","No","Exit"))
if ok="Exit" then confirm=null:exit function
if ucase(left(ok,1))="N" then confirm=vbfalse
end function

sub rtn
obs=rhino.selectedobjects
if isarray(obs) then
  rhino.deleteobjects obs
  exit sub
end if
dim ar()
redim ar(-1)
do
  ob=rhino.getobject("Object ?")
  if isnull(ob) then exit do
  las=ob
  redim preserve ar(ubound(ar)+1)
  ar(ubound(ar))=ob
  rhino.hideobject ob
loop
ok=confirm("Last object picked")
if not ok then
  rhino.showobject las
  redim preserve ar(ubound(ar)-1)
end if
rhino.enableredraw false
rhino.showobjects ar
rhino.deleteobjects ar
rhino.enableredraw true
rhino.print cstr(ubound(ar)+1)&" objects deleted"
end sub

rtn

… But you’ll find nothing more than in the scripts by Mitch and Pascal.

Actually, I had not noticed Pascal’s script for trimming …
Very nice !
I’ll have to try that … :smiley:

Thank you @pascal

Yes, exactly.

Same for FIlletSrf and for selection in general.
Using FilletSrf in wireframe, is sometimes particularly difficult finding a point on a border/isocurve to pick, so that Rhino could build the desired surface.
Often it (silently) builds nothing at all, or keeps building the fillet on the wrong side

Trimmed surfaces are sometimes impossible to fillet, so that I have to build a temporary base surface to be able to build the fillet surf

Same for long/large surfaces, a temporary smaller surface (built trimming a copy of the original surface by isocurves) may be necessary.

I agree.

BTW, speaking of Trim and Split:

What about allowing the Split command to select first the splitting objects and then the object to split, when needed ?
I had to write a small script for that.
Sometimes you have to preselect the splitting objects.
… Well … Unless selection sets be introduced in Rhino :slight_smile:

Yes there are times when selection can be difficult. I have noticed the problem most often when the fillet comes to a point. Increasing isocurve density can help.
I usually work in wireframe, but sometimes the picking problem makes it faster to switch to shaded mode for making fillets, Picking for filletSrf was more robust in Rhino2.

It seems to me, that nothing is done until after the user has picked both sets so why does it matter which selection set is first?

Yes, but more isocurves on complex objects are confusing to me …
I would need to rise and then lower the isocurve number repeatedly for several objects … too complicated.

But I have to remember your suggestion about using shaded mode when needed.
In certain cases it can certainly help. :slight_smile:

Yes, unfortunately Rhino 3 was not able to keep Rhino 2’s smoothness …

For example, at times I have to split a large surface by many smaller (poly)surfaces.
And those splitting objects are already selected due to previous operations.
In this case running ‘SplitBack’ on the already selected splitting objects and simply select the object to split feels simple and fast.
Having to lose that selection to run Split, select the surface to split and finally reselect all those splitting objects (often a difficult/long task) … well, feels somewhat stupid. :wink:

Thank you, Jim !
Regards

Hi Emilio - SelPrev should help here - deselect, start Split, select the target surface, Enter, then SelPrev and Enter. Does that do it?

-Pascal

Yeeeeees, it works. :smiley:

Thank you Pascal !

EDIT:

BTW looks like I have problems understanding which command can be run inside which …:confused: