Script to select all edges and merge

Next
 From:  Peticel
10861.1 
Hi,

I'm looking for a script to select all edges and merge them.
Any help is appreciated.
  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
10861.2 In reply to 10861.1 
Hi Peticel, you can select the entire object and then run the Merge command. After selecting the object, push the Tab key, then type merge then push Enter.

Only areas where there are 2 edges meeting that are tangent to each other can be merged.

- 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:  Peticel
10861.3 In reply to 10861.2 
Hi Michael, thank you for the reply. This is how I've been doing it until now but I was hoping to bind this to a key.

I've tried this - Ctrl+M - script:moi.geometryDatabase.selectAll(); Merge;
but I get an error message saying - ReferenceError: Can't find variable: Merge

Any suggestions? Thank you in advance!
  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)
10861.4 In reply to 10861.3 
Careful Merge is also a Boolean trimming function! ;)

EDITED: 26 Sep 2022 by PILOU

  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
10861.5 In reply to 10861.3 
Hi Peticel, the problem is that the contents for a shortcut key can either be a command name or it can be script code to run.

But in your case there you've got both of those together.

You'll need to put in this instead:

script:moi.geometryDatabase.selectAll(); moi.command.execCommand( 'Merge' );

- 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:  Peticel
10861.6 In reply to 10861.5 
Thank you, Michael. Works perfectly!

Kind regards,
Peticel
  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