Tanget Edges - Chain Select
 1-12  13-31

Previous
Next
 From:  Frenchy Pilou (PILOU)
11506.13 In reply to 11506.12 
here the file that i used...
https://moiscript.weebly.com/uploads/3/9/3/8/3938813/extendedgeselection.js

And that is working like a charm!

As you see you can select on different volumes in the same time before call the function !


EDITED: 11 Aug 2024 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:  Zooen
11506.14 In reply to 11506.12 
Hi Psygorn,

I've created a short video in case
1-where the loop you want to select is executed all at once.

2-where the loop you want to select cannot be selected all at once.

The link https://vimeo.com/997450276

The method is explained in post 11506.8

Can you make your file or object available so we can test it?

EDITED: 12 Aug 2024 by ZOOEN

  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:  Psygorn (DRILLBIT)
11506.15 In reply to 11506.14 
Hi Zooen,

My model is a simple cube with fillets (take a look at the attached file)

The problem is that it seems the Extend Edge Selection doesn't work for me (Of course I have installed the js script) I did not made a short key for it though!

So, either I did not install the correct script or there is something I cannot figure it out at the moment!

- Psygorn

  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)
11506.16 In reply to 11506.15 
@ Psygorn

your cubic volume is woking fine for me!

So mystery is total! :)

PS i am on PC
  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:  Psygorn (DRILLBIT)
11506.17 In reply to 11506.16 
Hi Pilou,

so, the Js file is this right?

script :/* Étendre la sélection d'arêtes */ var angle_degrees = 20; var cos_ang = Math.cos( angle_degrees * Math.PI / 180.0 ); var done_edges =[]; while ( 1 ) { var any_change = false; var edges = moi.geometryDatabase.getSelectedObjects().getEdges(); for ( var i = 0; i < edges.length; ++i ) { var e = edges.item(i); if ( done_edges[e.id] ) continue; done_edges[e.id] = true; var ptA = e.getStartPt(); var ptB = e.getEndPt(); var done_faces = []; var faces = e.getFacesOfEdge(); while ( faces.length> 0 ) { var f = faces.item( faces.length-1 ); faces.removeObjectAt( faces.length-1 ); if ( done_faces[f.id] ) continue; done_faces[f.id] = true; var edges2 = f.getEdges(); for ( var j = 0; j < edges2.length; ++j ) { var e2 = edges2.item(j); var ptC = e2.getStartPt(); var ptD = e2.getEndPt(); var tol = 1.0e-6; var A = false, B = false, C = false, D = false; if ( moi.vectorMath.distance( ptA, ptC ) < tol ) { A = true; C = true; } else if ( moi.vectorMath.distance( ptA, ptD ) < tol ) { A = true; D = true; } else if ( moi.vectorMath.distance( ptB, ptC ) < tol ) { B = true; C = true; } else if ( moi.vectorMath.distance( ptB, ptD ) < tol ) { B = true; D = true; } if ( A || B ) { var tan_e = e.evaluateTangent( A ? e.domainMin : e.domainMax ); var tan_e2 = e2.evaluateTangent( C ? e2.domainMin : e2.domainMax ); if ( Math.abs( (tan_e.x * tan_e2.x) + (tan_e.y * tan_e2.y) + (tan_e.z * tan_e2.z) )> cos_ang ) { if ( !e2.selected ) { e2.selected = true; any_change = true; } } var faces2 = e2.getFacesOfEdge(); for ( var k = 0; k < faces2.length; ++k ) { var f2 = faces2.item(k); if ( !done_faces[f2.id] ) faces.addObject( f2 ); } } } } } if ( !any_change ) break; }

and I have installed it in commands folder here: C:\Users\Myname\AppData\Roaming\Moi\commands but there is not .htm file with it could that be the case?

- Psygorn
  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)
11506.18 In reply to 11506.17 
hml is when there are some menus! It's not the case here! :)
so no htm !

And yes i have the same than your folder!
  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:  MO (MO_TE)
11506.19 In reply to 11506.17 
Hi Psygorn
"Extend Edge Selection.js" has a couple space characters in its name.
When you run the script by typing its name in the input field or setting a shortcut key, it'll run the first piece of the name before the space character.
So, when you type "Extend Edge Selection", it will run the "Extend" command.

There is a simple solution for this:
Change the script name to something without spaces like:
ExtendEdgeSelection.js
or
Extend_Edge_Selection.js
  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)
11506.20 
Bravo ! Mystery maybe revealed! :)

But it was on my image list example! ;)
And inside my name file linked! ;)

And no problem if you use the Custom UI because it takes the name itself of the file! ;)
(made without spcace(s) ) Valid_Name, VALide_NAME, etc...

EDITED: 12 Aug 2024 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:  Zooen
11506.21 
Hi everyone,

My apologies. As I'm translating the names of the srcipts into French, I had to re-translate them into English to make them available and omit the dashes in the 8. I've corrected this in post 11506.4, I'm really sorry.

That said, the simplest method for this kind of script (if you use them very often) is to copy the "Extend_Edge_Selection.js" file into the C:\Users\xxx\AppData\Roaming\Moi\scripts folder. Then create a shortcut in Options>Shortcuts.
To avoid making a mistake with the name of the script, simply right-click on the file, select Rename from the drop-down menu, only the file name (without the extension) is selected, right-click again on the selection, select Copy from the drop-down menu. All you have to do is Paste into Options>Shortcuts in the command box opposite the shortcut you've created. The explanation may seem a bit long, but it's really quick.

What's more, with the Moi folder and its sub-folders, when a new version of MoI3D is released (perhaps also for beta versions?) we'll have all the scripts and so on directly available! Michael explained this, I don't know in which thread (if anyone can find it).

- Zooen

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

Message 11506.22 deleted 12 Aug 2024 by WN

Previous
Next
 From:  Frenchy Pilou (PILOU)
11506.23 
you can also to copy the file's name input the numeric box after press Tab ! Then Enter...
the function will be applyed to an edges selection...

Here just before Enter (or even Right Click ! ) for valid the selection!


Next use only Rigth Click after another selection(s) for recall last function used! ;)

EDITED: 12 Aug 2024 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:  Zooen
11506.24 In reply to 11506.23 
@Pilou, Nothing will be easier, more efficient or faster than a keyboard shortcut.

For the record, if Psygorn had created a keyboard shortcut from the "Extend Edges Selection.js" file, i.e. with spaces, the script would have worked, as style7 happily used it!

EDITED: 12 Aug 2024 by ZOOEN

  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)
11506.25 In reply to 11506.24 
@ Zoen
Sure ...it's just another solution to the Custom UI list when you don't love infinity of Shortcuts to memorize! :)
  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:  Psygorn (DRILLBIT)
11506.26 In reply to 11506.19 
Hi MO,

It works now! I changed the name to "ExtendEdgeSelection"

By the way I did not run the script by typing in the input field nor a short key! I simply choose it from scripts menu and it didn't work!

but now it works! after applying your simple remedy. :-)

-Psygorn
  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)
11506.27 In reply to 11506.26 
Have you an image of your scripts menu ?
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel 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:  Psygorn (DRILLBIT)
11506.28 In reply to 11506.27 
Yes Pilou,

Here:

  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)
11506.29 In reply to 11506.28 
Must be a specific UI different than Custom UI
In any case that take the original names files existing! )
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel 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:  Zooen
11506.30 In reply to 11506.28 
I see you don't have the same name as your file: ExtendEdgeSelection.js, on the drop-down menu I read: Extend Edge Selection!??

EDITED: 14 Aug 2024 by ZOOEN

  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:  Psygorn (DRILLBIT)
11506.31 In reply to 11506.30 
Hi Zooen,

The screenshot is taken when I had problem running the script. After MO's suggestion on changing the .js file's name; things started to work as they supposed to.
It means if I send u a new screenshot there u will see "ExtendEdgeSelection" instead of "Extend Edge Selection"

And I congratulate you; it seems you have keen eyes! ;-)

- Psygorn
  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

 

 
 
Show messages:  1-12  13-31