Trim command

Next
 From:  rhodesy
2606.1 
Hi Michael, not sure if this has been asked before but here goes........ when trimming lots of objects at once with the intention of deleting half of them, it is a bit frustrating having to manually select all the peices individually to remove, could there be an option that selects all those trimmed objects on one side of the line or the other so you would just click on the side you wanted to delete? Also I'm still struggling to get used to pressing enter to delete 'remove' the objects instead of pressing the delete key - which seems more natural to me anyway.

Also completely different but im finding the object shading can become too dark (black) at some angles which makes it really hard to see what im doing - are there any plans for a better light set-up, perhaps like a traditional 3 point light setup?

Cheers
Rob
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2606.2 In reply to 2606.1 
Hi Rob,

> it is a bit frustrating having to manually select all the
> peices individually to remove

Generally when there is a batch of things you want to select, try using window selection rather than individual clicking.

Window selection is when you click in an empty area and drag out a selection box.

Here is a quick demo of using it with Trim:



There are 2 modes for the window select, depending on whether you drag it starting from the left going towards the right, or starting on the right going towards the left.

If you go from left to right, it will only select things that are completely contained within the window. The window outline shows as a solid line for this mode. This is often the one that you would want to use for grabbing trim fragments.

If you go from the right towards the left, it will select anything that touches the box in any way, not thing that are only fully contained. This mode will show the window with a dashed outline.

So strategic use of those can help avoid a ton of manual click selections.


> could there be an option that selects all those trimmed objects on
> one side of the line or the other so you would just click on the side
> you wanted to delete?

It would probably be kind of tough to do that, since Trim works on a lot more than just lines as the cutting objects. There is not always one "side" available like that.

Also for a line as the cutter you should pretty much always be able to grab a window around it easily, if the cutter is angled you may want to use the 3D view so you can rotate around for a good vantage point to do the window.

If you have an example file that you are having a problem with, can you please post it so I can take a look?


> Also I'm still struggling to get used to pressing enter to
> delete 'remove' the objects instead of pressing the delete
> key - which seems more natural to me anyway.

Really here I would recommend using right-click instead of either of those.

Right click inside of a viewport is also an alias for hitting the "Done" button the same as enter, and it tends to be more efficient.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2606.3 In reply to 2606.1 
Hi Rob, also re: Lighting - that is something that I want to tweak and have some different options for.

Right now one thing that can help is to set up a keyboard shortcut which will switch the light direction around.

To do that, go to Options / Shortcut keys, and add in a new entry. Put in whatever you want for the key, like maybe L , and then for the command part paste this in (this is all one long line to paste in):

script:var dir = moi.view.lightDirection; if ( dir.x == 1 && dir.y == 1 && dir.z == -1 ) { dir.set(-0.5,1,0); } else { dir.set(1,1,-1); } moi.view.lightDirection = dir;

Then if you are looking at an area that is dark, hit L and the light will flip to a different direction which will tend to be dark in other areas than that one.

That may help you currently.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
2606.4 In reply to 2606.3 
Hi Michael
Do you stock somewhere all your little scripts?
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2606.5 In reply to 2606.4 
Hi Pilou,

> Do you stock somewhere all your little scripts?

Petr stored a whole bunch of them on this page:
http://kyticka.webzdarma.cz/3d/moi/

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
2606.6 In reply to 2606.5 
Yes but for all news that you create along the posts?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2606.7 In reply to 2606.6 
Hi Pilou,

> Yes but for all news that you create along the posts?

I didn't create a new one for the post in this thread, I just looked it up on Petr's page and copied it here...

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  rhodesy
2606.8 In reply to 2606.2 
Firstly thanks for the light command - very helpful.

>>could there be an option that selects all those trimmed objects on
>>one side of the line or the other so you would just click on the side
>> you wanted to delete?

>It would probably be kind of tough to do that, since Trim works on a lot more than just lines as the cutting objects. There is not always one "side" available like that.

OK but surely the trim command just uses a single line to divide objects and moi knows which objects have been split and where as you can manually (including box select) select them. Im trying to think of a situation where there wouldn't be a 'side' or obvious divided group to select them, no doubt there is an obvious one im missing though!!

Cheers
Rob

EDIT: Re the delete issue: Yes I do use right click a lot although I can get myselft confused with how many times i've pressed it during an opperation and where i am in an opperation, often clicking not enough or too many times and repeating the command. Im just used to hitting the delete key to get rid of things which is common in most apps I use - is there a way to use either the delete key or enter key for this command?

EDITED: 30 Apr 2009 by RHODESY

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2606.9 In reply to 2606.8 
Hi Rob,

> OK but surely the trim command just uses a single line to divide objects

Actually no - you are not restricted to only use a line as the cutting object, you can use any intersection between solids, surfaces, or curves, including when things swoop around with 3D shapes instead of only planar shapes.

Here's a quick example of 2 non-planar surfaces:



Now using the second one as a cutting object to trim the first:




When things are all swooping around in 3D rather than all on a plane, there may not be something that equates with a "side" as you may have in a 2D plane type situation.


Also if it took everything off to one side in 2D situations, it would then make some things not work, like for example here I had a goal of trimming off only one part that intersected with the line, not everything:







If it only worked by throwing away everything to one side, that result above would not be possible without extra steps to draw a shorter cutting line.

By selecting which fragments are to be removed (or kept if you have switched to "keep" mode), it lets you have this kind of flexibility.


In the future I may be able to add something like you are talking about for the 2D curve case, where if you clicked on an empty space rather than on a fragment, it would see if it could determine a side and do a kind of batch select. I've thought about that some before. But that's a pretty customized selection function that is not really similar to other current selection functions, so it will take some extra work to make that happen, that's why it is not in there yet.

Really the window select should make what you need there happen pretty easily though - does it not work well with something you are trying to do? Maybe if you could post the 3DM file that would help me to understand what you are running into, or maybe I could then demonstrate how to make it work quickly with your specific example.


> is there a way to use either the delete key or enter key for this command?

There is no way to do it currently, it will require making the Trim command have a kind of special override for that key so that it would not trigger the usual shortcut for the Delete command. I'll see what is involved in setting that up.


> although I can get myselft confused with how many times
> i've pressed it during an opperation and where i am in an
> opperation, often clicking not enough or too many times
> and repeating the command.

Try to watch what the prompt text says, in this area:



That's meant to be a kind of guide for what is currently going on, like what action MoI is currently expecting for you to do.

It will say things like "Pick a Point", "select objects to do something to", etc...

If you look up there it can help you to know what is going on right at that stage.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2606.10 In reply to 2606.8 
Hi Rob, here is another example where the "side" is not so clearly defined.

Here I am trimming the zig-zag with the line:



Which side of the line do you consider this fragment to be on:



When things don't fully divide the entire plane up into different regions, there may not be a fully defined "side" really in there...

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  rhodesy
2606.11 
Thanks michael once again for your in depth reply. On your last post I would say there are three fragments. Perhaps rather than just having two sides as it were moi could temporarily auto group objects that have been split or partially split by the cutting object so here there would be three groups availiable for selection rather than a series of individual lines. This could be purely as an additional option on top of the current work flow. I remember working on a dummy test file and being frustrated by having to manually select the trimmed lines/objects - probably some sort of standing seam roof. Im often in two minds whether to use trim or bool in some situations as they often have the same outcome - which is no bad thing I guess.

Cheers
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2606.12 In reply to 2606.11 
Hi Rob,

> I remember working on a dummy test file and being
> frustrated by having to manually select the trimmed
> lines/objects - probably some sort of standing seam roof.

Do you happen to still have the file around? If so, can you please post it?

That would let me demonstrate on that particular example how to use a strategic window select to grab a batch of things, instead of manually clicking on each one.


> Im often in two minds whether to use trim or bool in some
> situations as they often have the same outcome - which is no
> bad thing I guess.

Yeah for curves there are many situations where they work the same. But the difference is much more pronounced when you use them with solids - Trim will cut only the "skin" of a solid, while booleans will work on the volumes of a solid.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
2606.13 In reply to 2606.8 
Hi Rob - also I've got it set up for the next v2 beta so you can hit the Delete key in Trim to finish after picking pieces to discard, it works the same as Enter, clicking "Done", or right-clicking.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  rhodesy
2606.14 
sweet thanks for that michael im sure it will save me a lot of cursing! I think with the right clicking I do look at the top right info box but sometimes its too late or im a bit over eager on the buttons, also I'f im using that technique I like to look at the area im working on rather than the top right of the screen. Think for this command i'll just stick to my old fashioned delete key.

Thanks again.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All