Quicky Delete&Trim Tool/Command?

rhinoformac
rhino6

#1

it would be really lovely to get a tool which you activate once and then just click into it as it comes to delete plenty of lines or other objects which are not needed. rather than painfully selecting first with shift or separately, hitting the delete button afterwards.

even better in combination with trim which automatically detects an intersection and deletes the overlapping lines. something similar like in sketch up maybe.


#2

not that this is what you’re asking for but…

there is the _Select command… this would allow you to make multiple selections without using the shift key… then hitting delete only once at the end of all the selecting.


#3

…trying out the 7 minutes old MacroEditor command in rhino for mac :smiley_cat:

you might like that ?


#4

thanks jeff, but its not really helpful…

to delete you have to activate, then select, then end the command, before you even can press an extra delete button, its just too complicated pressing those many buttons, i dont even want to press the delete button you see? just activate click click click… while each click already does the job including trim, thats how i would love to flow :slight_smile:

the macro editor looks like a fun tool, but that should be maybe rather more for less common combinations. what i am talking about is to increase the work efficiency without making myself knots into my brain. this is something which should be there long ago without needing to do extra magic. i mean nothing against some tricks, but this is basic work flow.


#5

well shift-select and delete key in that case.
that’s what’s fastest and you don’t have to call any commands for it.

i mean, i understand what you’re wanting (the eraser tool in sketchup)… but to me, that’s not fastest or flowy_est so i’m not sure if these should be the reasonings given for adding a new tool to rhino.

pretty sure the exact functionality you’re after could be made with python but maybe using such a script still wouldn’t be satisfying? otherwise, someone might write the script for you to use.


#6

The following should do it:

import rhinoscriptsyntax as rs
while True:
    obj=rs.GetObject("Select an object to delete")
    if obj: rs.DeleteObject(obj)
    else: break

#7

@jeff_hammond i am not asking this for myself only, this is meant to be a suggestion. which everybody could profit from without tuning the heck out of it.

and how one could think that this is not faster, when every click deletes is now beyond my comprehension :smiley:
i am not fond of extra clicks and pushes, if that supports your flow more then ok… but thats not for me.
or do you think i am the only one who likes to work more sufficient? or lets say lazy :wink:

but thanks for your help anyway, appreciated!

@Helvetosaur can that be executed with RunPythonScript ? did you make it? can it be enhanced with a trim function for example? and how can i implement it that it stays in rhino, i am not very skilled with python, only tried it once.

if that could be activated over an alias it could nicely serve as a personal substitute for sure. still i am hoping that this becomes a basic set up which i dont have to carry around and install on each computer i work with…


#8

Yes and yes. It’s just a very simple “infinite” loop that stops when no more objects are selected. If you want to put it in a button or as an alias you will need the following code:

! _-RunPythonScript (
import rhinoscriptsyntax as rs
while True:
    obj=rs.GetObject("Select an object to delete")
    if obj: rs.DeleteObject(obj)
    else: break
)

I’m not sure what you want here, if you’re looking at combining Trim with Delete in the same command, I don’t think so. Note that Trim already works this way, select all the objects involved in the operation at the first prompt, then just start clicking away at the parts you want to trim off.

–Mitch


#9

i just quote the initial request since it contains the actual idea. hopefully as an upcoming tool. i did not categorize that because i have no clue wether such a tool may be in serengeti since i didnt try it yet so i left it blank. according to the response here it seems to me that such a time saver is not much appreciated, if understood at all…

anyway thanks for the script it can be a starting point for understanding python. i have the primer on my desk lying around for almost forever already and if you dont mind i may bug later with some questions :wink:


(Wim Dekeyser) #10

Isn’t it fun how people are different?
(of course now Tony is going to hit me over the head again for being grumpy and not embracing everything new)


#11

sure, but difference is not the only quality people can have i believe :wink:


#12

Mitch taught me most of what i know about python and is actually the person who convinced me it was worthwhile to learn in the first place. :smiley:

(i’m far from master level… but i now know enough to create certain project specific scripts and a handful of general tools)

but yeah, if you’re wanting to get into python, this place is a good place to bug people


edit- i also picked up a bit from these guys:
http://designalyze.com

they have some helpful grasshopper stuff as well.


#13

thanks for encouraging jeff, i will have a look at this. what i wanted to do mostly with it is to create mathematical shapes like explicit sine based 3d formulas, maybe even implicit or parametric. the python primer corners this issue as i have seen so that also got me interested then. there is a math plugin for windows but not for mac at least when i looked last.

@dale this is also meant for mac but hopefully for any future version. in this matters i have asked @pascal once but maybe he was not the right person for this, so is it possible to categorize threads with 2 or 3 simultaneous categories?

is there nobody out there whom such a quicky eraser as described would make happy?


#14

Normally I just window or crossing select stuff and then hit the delete button. With shift held down you get multiple windows or picks. SelBrush is also handy, but not available in Mac Rhino yet.

If I have multiple disparate elements that can’t easily be selected with the above methods, than I just hold the shift key down and click away to select all… then hit Delete.


#15

yes sure Mitch, thats clear to me. i mean the good old shift click add selection which you have in so many other applications… it has been there since the dawn of keyboards almost…

but its still an uncomfortable process to mark all you need which sometimes is a delicate process and then you have to delete, instead it would be so much easier to aim at those objects you want to rid and done, including trim.

all those tricks to select touching or framing them are neat but do not help in a situation where you have many lines distributed. also the later coming selection tool which you can curve around at least for mac will not make that much better.

do you know that tool in sketchup? i only opened it 3-4 times to play with it and this though simple but so much helpful tool really made an impression on me and while clicking around in rhino i all over sudden figured that simple tools like that for a far more comfortable workflow are absolutely obligat.


#16

Well, as I said before, Trim already works this way, if you have ApparentIntersections=Yes it will also delete elements that are not being crossed by others. (Windows Rhino video, but Mac should work the same)


#17

yes i know that, but you still have to select the cutting objects first and then select your trim.

if you tried once the eraser you know what i mean. no need to complicatedly select cutting tools first and then to trim off overlapping objects, or lets say curves and surfaces.

i am talking about a tool which combines 3 steps to an easier click erase and trimming tool. pls look at the sketchup eraser if you haven´t already. there is a free version which has this implemented. it makes no sense when i try to explain that maybe its so much easier to experience it.


now if this as mentioned above, and the following ->

and why not also this ->

could be combined to one tool which immediately deletes on click and trims clicked objects. than this would be something which could make life in rhino a lot easier and at least would be a good start in enhancing usability at least IMHO if you need so.


#18

the reason it works like that in sketchup is because everything is automatically split when an intersection occurs in sketchup… as in, you can’t make a plus sign ( + ) in sketchup and have 2 lines… you’ll have 4 lines.

it’s not the eraser tool that’s making this happen… the lines were split upon initial creation.

sketchup and rhino are fundamentally different in this area and i think you’ll have a very hard time lobbying to get rhino to acquire sketchup’s ‘stickiness’…
it’s beneficial for some things while pretty bad for others… with rhino, you have to explicitly tell what curves to split in a relatively rapid manner… with sketchup, you have to explicitly tell it when not to split in a rather weird manner (to make a line not auto-split or stick to a surface etc, you have to make a group or component out of it first then move it into place…


#19

you have to tell any software where to split that will never do without.
but rhino is in this matter just too complicated still.

again, the better difference would be if the app detects a related overlap
and lets you trim that without selecting the cutting or trimming object first.

i am not a sketch up pro, but if it decides to trim or delete objects i have not aimed at,
then thats an issue google has to deal out, thats surly not what i am asking for.

maybe not that fundamentally but yes thats something where one could profit and learn from another.

now this is something which could be traced recursively as already suggested. i am not asking for a direct copy of the eraser but rather for something which has this idea of its simplicity.

also dont forget that i am asking for a combination tool. its not just how trim works.


#20

How is the app going to know you want to trim? DO you have to start the command or get a popup when you click on something asking if you want this trimmed or split or copied or moved?

Really? If I select all the items to trim and to cut with in one swoop and then run trim I can just click on the part to trim. How can this be any simpler? My alias for select all or select curves is one key, then my alias for trim is one key, so I tap twice and start clicking. I don’t use Sketchup, so no reference. Pictures are worth something in this case.

Also like Mitch said …

Oh, the Swiss Army Trim & Delete tool.

So now we have to select options, that sure speeds things up, more keys to press.

I think we need a Photoshop type erase tool. Once we select the tool all viewports freeze and I just paint over everything I don’t want. I think everybody could use a tool like that.

I have been using Rhino for 5 days a week for 9 years and i haven’t even used a lot of the tools. What tools I use and how I work is just that, how I do things. What I think is speedy and needed is just in my head. [quote=“RichardZ, post:1, topic:38556, full:true”]
it would be really lovely to get a tool which you activate once and then just click into it as it comes to delete plenty of lines or other objects which are not needed. rather than painfully selecting first with shift or separately, hitting the delete button afterwards.[/quote]

So what does “click into it” mean? Or maybe a Photoshop lasso tool for selection, probably there in WinRhino already. I am not sure you are articulating what you want.

This could be overcome with better layer organization at the start so you can select selective objects. All my cutting lines one one layer, all my objects to be cut on another. But that is just my work flow.

I would like a “make that ring” button. But i have to use the tools that are there and learn new ones as time permits.

Cheers!