Show messages:
1-13
14-31
From: Zooen
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?
From: Psygorn (DRILLBIT)
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
Attachments:
Extend Edge Selection_Not_Working_for_me.3dm
From: Frenchy Pilou (PILOU)
@ Psygorn
your cubic volume is woking fine for me!
So mystery is total! :)
PS i am on PC
From: Psygorn (DRILLBIT)
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
From: Frenchy Pilou (PILOU)
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!
From: MO (MO_TE)
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
From: Frenchy Pilou (PILOU)
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...
From: Zooen
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).
Message 11506.22 was deleted
From: Frenchy Pilou (PILOU)
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! ;)
From: Zooen
@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!
From: Frenchy Pilou (PILOU)
@ Zoen
Sure ...it's just another solution to the Custom UI list when you don't love infinity of Shortcuts to memorize! :)
From: Psygorn (DRILLBIT)
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
From: Frenchy Pilou (PILOU)
Have you an image of your scripts menu ?
From: Psygorn (DRILLBIT)
Yes Pilou,
Here:
From: Frenchy Pilou (PILOU)
Must be a specific UI different than Custom UI
In any case that take the original names files existing! )
From: Zooen
I see you don't have the same name as your file: ExtendEdgeSelection.js, on the drop-down menu I read: Extend Edge Selection!??
From: Psygorn (DRILLBIT)
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
Show messages:
1-13
14-31