Easy way to select Fillet Faces?

Next
 From:  ed (EDDYF)
9775.1 
Hi Michael,

I’m looking for a way to easily select the faces that make up a Fillet immediately after creation.

Often I need to assign a different color to the fillet only. Example: A fillet around a car window needs a unique color so a chrome trim material can be assigned in the render program.

Clicking around to select all the fillet faces gets tedious. Is there a script that remembers and highlights the faces the Fillet just created?

I’m looking for similar behavior as when you construct a Loft. Upon completion of a Loft, the curves remain selected.

- Ed Ferguson
  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
9775.2 In reply to 9775.1 
Hi Ed,

re:
> I’m looking for a way to easily select the faces that make up a Fillet immediately after creation.

Here's a way that could work - it will involve 2 scripts, one that you run before doing the fillet and one that you run after.

The first pre-fillet one will set the name property on all faces to mark them.

Then after you do the fillet, any faces that have that mark on them will have descended from an original face that was trimmed. Fillets being newly created faces will not have that mark so the second script will select faces that do not have the mark.

script: /* Mark faces, use before filleting */ var breps = moi.geometryDatabase.getObjects().getBReps(); for ( var i = 0; i < breps.length; ++i ) breps.item(i).getFaces().setProperty( 'name', '1' );


script: /* Select any unmarked faces */ moi.geometryDatabase.deselectAll(); var breps = moi.geometryDatabase.getObjects().getBReps(); for ( var i = 0; i < breps.length; ++i ) { var faces = breps.item(i).getFaces(); for ( var j = 0; j < faces.length; ++j ) { var f = faces.item(j); if ( f.name != '1' ) f.selected = true; } }


Maybe I can add some kind of built in mark for this so that only one post-fillet script would be needed.

- 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:  ed (EDDYF)
9775.3 In reply to 9775.2 
Michael -

Thanks for the quick response and scripts!

It works great on a single fillet edge.

However, I'm having an issue with the newly assigned color on a Fillet reverting back to its original color as soon as I Fillet a new edge on the same object.

I'm using a simple box from the Draw / Edit menu to test on.

Ed
  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
9775.4 In reply to 9775.3 
Hi Ed, I can't repeat that problem over here. Here's what I tried:

Made a box and selected this edge to fillet:



Ran pre-fillet script, did fillet, then ran post fillet script:



Assigned style to the fillet, then selected other edge:



Ran pre-fillet script, did fillet, then ran post fillet script:



Assigned style to new fillet:



Are your steps different?

- 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:  ed (EDDYF)
9775.5 
That's interesting. I'm on Ver 4 Jan 22,2020. Assigned Mark Script to ctrl-F and the After Fillet Script to ctrl-G.

Using the same steps on a box as you outlined. I hit ctrl-F after selecting the edge, then I Fillet. After I hit "Done" I ctrl-G, the fillet highlights, and I assign a new color.

The newly assigned Fillet color disappears as soon as a 2nd Fillet is applied to the box (whether or not the scrips are run for the 2nd Fillet). I also tried assigning the color before and after hitting "Done" on the fillet operation - same results.

Maybe another user can test this and comment.

Ed
  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
9775.6 In reply to 9775.5 
Hi Ed, hmm yes I'm using the same version. What method are you using for assigning the color?

- 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:  ed (EDDYF)
9775.7 In reply to 9775.6 
When the 2nd script highlights the fillet face I click once on one of the colors in the Styles pane.

I can then go do another task, like draw a circle, and the new color remains on the box fillet face.

But if I come back and do any type of operation on the box, such as extruding a face, the newly assigned color reverts back.

- Ed
  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
9775.8 In reply to 9775.7 
Hi Ed, and if you don't use the script at all and just select the face by a click that doesn't happen?

In your moi.ini file do you possibly have:
[Styles]
DisableSubObjectStyles=y

?

- 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:  ed (EDDYF)
9775.9 In reply to 9775.8 
Michael -

Changing my moi.ini to: DisableSubObjectStyles=n fixed the issue. That's weird because I've rarely changed settings, and only when a forum posting gives a good reason to (I don't know what most those settings do anyway :)

I tested the scripts on some complex geometry and it works very well. Beats clicking on all the individual fillet faces to assign a style. Hopefully you can get it down to one script on future versions.

Thanks again for the great support!

Ed Ferguson
  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
9775.10 In reply to 9775.9 
You're welcome Ed, I'm glad it's working now!

For the next v4 beta I've added in a .isNew property on faces that will tell if it is a newly created one. That will remove the need for the pre-fillet script.

- 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)
9775.11 
As I have made it for my French site!
Not a big deal to convert :)

  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:  vector illustrator (QUARITEXA)
9775.12 In reply to 9775.2 
Instead this may be add some code to moi.geometryDatabase.selectLastCreated() for new created fillet support?
  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
9775.13 In reply to 9775.12 
Hi Quaritexa,

re:
> Instead this may be add some code to moi.geometryDatabase.selectLastCreated() for new created fillet support?

I have added a new moi.geometryDatabase.getLastCreated() as a helper to use for this.

There is also a similar flag added on edges so new edges that were created by the intersection between objects instead of as a copy or trimmed part of an existing one can be targeted as well.

- 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:  vector illustrator (QUARITEXA)
9775.14 In reply to 9775.13 
Will there be documentation on api v4?
  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
9775.15 In reply to 9775.14 
Hi Quaritexa,

re:
> Will there be documentation on api v4?

I can put together a list of new properties and functions that are available since they are not derived from moi.idl anymore.

- 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:  vector illustrator (QUARITEXA)
9775.16 In reply to 9775.15 
With short descriptions?
  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:  Michael Gibson
9775.17 In reply to 9775.16 
> With short descriptions?

Probably the same ones from the beta release notes.

- 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
 

Reply to All Reply to All