"style select" within a solid subset.
All  1-20

Next
 From:  neilwilson3412
9477.1 
say i created a custom shape assigned a new color "style" then i used that shape to make five Boolean operations on another mesh with another "style" the beauty is it transfers the new style with those faces which makes for quick selecting

i know we can do this from clicking on the styles menu but i would love a script or command that i can hotkey please.



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
9477.2 In reply to 9477.1 
Hi Neil, I'll need a little more information on how you want the script to function. Like in your screenshot you've got 20-something styles there, how should the script determine which particular style you want to target for selection?

- 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:  neilwilson3412
9477.3 In reply to 9477.2 
sorry Michael.


i just want the function to select faces with in a solid the same as you can do from pushing the yellow selection circle.

just that script so i can pick a style press a hot key and that script will run without having to move my mouse over to that tiny little yellow circle.
  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
9477.4 In reply to 9477.3 
Hi Neil, re:

> just that script so i can pick a style press a hot key and that script will run without having
> to move my mouse over to that tiny little yellow circle.

The part I don't understand is the "pick a style" part, how do you want to pick the style?

Thanks,
- 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:  coi (MARCO)
9477.5 
hi,
maybe could try the SelectStyle script..

http://kyticka.webzdarma.cz/3d/moi/#SelectStyle
  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:  neilwilson3412
9477.6 In reply to 9477.5 
thanks for the suggestion... i have this script and use for object selection......however im looking to achieve the same result on a sub surface level within a solid ..the script you recommend does not perform that operation.
  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:  neilwilson3412
9477.7 In reply to 9477.4 
hi Michael,

i really hope this explains it better .... i was hoping it would be quite simple....

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
9477.8 In reply to 9477.7 
Thanks Neil, yes I think I understand now. Please try this script, does it do what you need:

script: /* Expand selection over same styles on sub objects */ var styles = new Array(); var parents = new Array(); var sel = moi.geometryDatabase.getSelectedObjects(); for ( var i = 0; i < sel.length; ++i ) { var obj = sel.item(i); if ( obj.selected ) { styles[obj.styleIndex] = true; } if ( !obj.isTopLevelObject ) { var par = obj.getTopLevelParent(); parents[par.id] = par; } } for ( var i in parents ) { var subobjs = parents[i].getSubObjects(); for ( var j = 0; j < subobjs.length; ++j ) { var subobj = subobjs.item(j); if ( subobj.isFace && styles[subobj.styleIndex] ) subobj.selected = true; } }

- 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:  neilwilson3412
9477.9 In reply to 9477.8 
Michael your a legend !!!!!!

it work perfect!!!!!!

thank you so much!!!
  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
9477.10 In reply to 9477.9 
That's great Neil, you're welome!

- 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)
9477.11 
does this old one for V2 "On objects" works also on V3? (seems yes but want to be sure! :)

script: /* Extend the selection of objects with the same style */ var objects = moi.geometryDatabase.getObjects();var styles = new Array();for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( obj.selected ) styles[obj.styleIndex] = true; } for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( styles[obj.styleIndex] ) obj.selected = true; }

EDITED: 25 Aug 2019 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
9477.12 In reply to 9477.11 
Hi Pilou, yes that one works ok on v2, v3, and v4.

- 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)
9477.13 
else i have a bug with the "sub-object" ?

  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)
9477.14 
else does this normal ?

after boolean Diff of a blue sphere from a Red Cube i have the "generative arc circle" on the result ?

So 2 "facetts" on the result!

  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
9477.15 In reply to 9477.13 
Hi Pilou,

re:
> else i have a bug with the "sub-object" ?

It looks like that's from your changes with editing the comment part of the code, script code can only have ascii characters in it.

- 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
9477.16 In reply to 9477.14 
Hi Pilou,

re:
> else does this normal ?
>
> after boolean Diff of a blue sphere from a Red Cube i have the "generative arc circle" on the result ?
>
> So 2 "facetts" on the result!

That's a normal result if that was where the closing "seam" edge of the sphere was at.

- 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)
9477.17 In reply to 9477.16 
"Seam's sphere" yes it's :)
So i suppose to rotate it before boolean Diff can solve this little disturb...

else
I correct the "sub object bug" in pasting your "English script" inside the "ShortCut" Moi editor and change comments directly !
(even with accents)
That works! :) I had previously copy / past the text from another prog... maybe this explain that! :)
  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:  neilwilson3412
9477.18 In reply to 9477.16 
hi Michael,


can you make another script to do the same for edges that get assigned a style.
  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
9477.19 In reply to 9477.18 
Hi Neil, re:

> can you make another script to do the same for edges that get assigned a style.

Sure, please give this one a try:

script: /* Expand selection over same styles on edge sub objects */ var styles = new Array(); var parents = new Array(); var sel = moi.geometryDatabase.getSelectedObjects(); for ( var i = 0; i < sel.length; ++i ) { var obj = sel.item(i); if ( obj.selected ) { styles[obj.styleIndex] = true; } if ( !obj.isTopLevelObject ) { var par = obj.getTopLevelParent(); parents[par.id] = par; } } for ( var i in parents ) { var subobjs = parents[i].getSubObjects(); for ( var j = 0; j < subobjs.length; ++j ) { var subobj = subobjs.item(j); if ( subobj.isEdgeCurve && styles[subobj.styleIndex] ) subobj.selected = true; } }

- 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:  neilwilson3412
9477.20 In reply to 9477.19 
nailed it thank you!
  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: All  1-20