Untrim

Next
 From:  DannyT (DANTAS)
3545.1 
Hi Michael,

We know how busy you are and all with finalising V2, so this request can wait until you have the time, is it possible to have a one click script to untrim a surface, I'm envisioning the script would pick the edges of a selected surface then the delete operation to untrim.
The reason I ask is that I have a model that needs editing and there are a lot of surfaces.

Cheers
~Danny~
  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
3545.2 In reply to 3545.1 
Hi Danny, try setting up the following on a keyboard shortcut:

script: /* Untrim the selected surface */ var gd = moi.geometryDatabase; srfs = gd.getSelectedObjects().getSingleFaceBReps(); gd.deselectAll(); for ( var i = 0; i < srfs.length; ++i ) srfs.item(i).getEdges().setProperty( 'selected', true ); moi.command.execCommand( 'delete' );


To use it, select some individual surfaces (that are not joined to any other surfaces), and hit that keyboard shortcut.

It's the equivalent of selecting all the edges of those surfaces and doing delete.

- 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:  DannyT (DANTAS)
3545.3 In reply to 3545.2 
Perfect Michael, you're a superstar!

Cheers
~Danny~
  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)
3545.4 
Practical indeed!
---
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:  Frenchy Pilou (PILOU)
3545.5 
But the previous lines of the holes are always existing!
Maybe that will be useful that the holes selection stay for erase them if need ;)
  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)
3545.6 
And curious that work on a surface but not on several surfaces of a volume!
Circles will be trimed and surfaces erased
So holes created then

Select all the plan : call the plug -->works :)
Select all the cube : call the plug --> don't works :(

Edit : "select some individual surfaces (that are not joined to any other surfaces)"

Haaaaaaaa! :) That limit the possibilities!

EDITED: 18 May 2010 by PILOU

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:  BurrMan
3545.7 In reply to 3545.6 
Frenchy. Be sure to seperate the cube into individual surfaces. I just tried it here and it seems to work. Remember Joined surfaces wont untrim.
  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)
3545.8 In reply to 3545.7 
<Remember Joined surfaces wont untrim.
Yes that was the trick !
I must separate all before apply the plug :)
  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:  DannyT (DANTAS)
3545.9 
Remember guys you can still delete openings in a joined surface, by selecting the edge of the opening, but only if it is a single edge.



Cheers
~Danny~
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:  BurrMan
3545.10 In reply to 3545.9 
Aha...So Frenchy was right in a sense. The joined box will untrim if you select and delete single edges....But the script wont work unless the surfaces are seperated...
  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
3545.11 In reply to 3545.10 
Well, it could be possible to change the script to work in some different way if someone wanted it to erase all unjoined edges from an object that had other parts that were joined.

It works the way it currently does because from what I understood from Danny's request he wanted something to work on individual surfaces.

- 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:  pafurijaz
3545.12 In reply to 3545.2 
I was lucky to find this script
  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
3545.13 In reply to 3545.12 
Hi pafurijaz, this old thread was from before there was a scene browser in MoI.

Now this script isn't necessary because you can use the Scene Browser to do the same thing.

If you want to untrim all individual unjoined surfaces, right click on the eye icon on the "Surfaces" entry in the Scene Browser. Now only individual unjoined surfaces will be visible.

Now click on the selection dot on Scene browser > Types > Edges.

That will select all edges of the current visible objects so all edges of the unjoined surfaces will now be selected and you can hit Delete to untrim them all.


Another way you can do it is by using the detailed object properties selection functions.

For this way, select everything then press the "Details..." button to open up the detailed object properties dialog. In the "Type" section of the dialog you'll see a report on the types of the current selection like "3 solids, 6 open surfaces". Click on the "6 open surfaces" label to narrow selection down to those, then click on the edges label to switch selection to the edges of those surfaces and then you can hit delete.

The properties dialog selection narrowing way doesn't need to fiddle with changing visibility.

- 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
3545.14 In reply to 3545.13 
Or another way to do it in the scene browser without altering visibility - go to the Scene Browser > Types section and do a Ctrl+left click on the selection dot for Types > Surfaces.

That turns on a selection filter for individual surfaces.

Now you can go click on the selection dot for Types > Edges and all edges of only individual surfaces (because of the filter) will be selected and you can now hit Delete to untrim, then hit the Esc key to clear the selection filter.

- 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:  pafurijaz
3545.15 In reply to 3545.14 
Thanks you, for this. :)
  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