MoI discussion forum
MoI discussion forum

Full Version: Select all faces inside an edge loop?

From: Chris (CEEN)
3 Mar 2023   [#1]
Hi,

another question: is there a way to select the faces inside an edge loop? The edge loop is the boundary for the faces selection so to say. Thank you!
From: Cody (ECHOLOCATING)
3 Mar 2023   [#2] In reply to [#1]
Here are a couple of scripts that I've gathered from the community here...

script: /* SELECT LOOP */ moi.geometryDatabase.selectLoop();

This one requires you to select one or more edges and then run it (sometimes 2 selected edges are required if it's nested among joined surfaces). It'll select all the bordering edges of the adjacent surface(s).

script: /* SELECT ALL NAKED EDGES */ var gd = moi.geometryDatabase; gd.deselectAll(); var breps = gd.getObjects().getBreps(); for ( var i = 0; i < breps.length; ++i ) breps.item(i).getNakedEdges().setProperty( 'selected', true );

This one doesn't require anything to be selected prior to running. It will select all the "border edges" of all joined and unjoined surfaces. It's a great way to see where a shape has problems becoming a watertight solid, as well.

...maybe these are what you are looking for.

EDIT: Sorry, I should mention that these scripts need to be added to the "shortcut keys" in the "options" popup to be used effectively.
From: Michael Gibson
3 Mar 2023   [#3] In reply to [#1]
Hi Chris,

re:
> another question: is there a way to select the faces inside an edge loop? The edge loop
> is the boundary for the faces selection so to say.

Could you please show an example?

- Michael
From: Chris (CEEN)
3 Mar 2023   [#4]
Hi,

thanks I have those 2 scripts in use already.

Fill slection is a workflow from polygon tools. For example here:

https://www.youtube.com/watch?v=q1iARRbYCvg

https://www.youtube.com/watch?v=WRGN1BSqnfI

The edge selection determines the faces selection border. That is a very effective workflow since it makes selctions on complex objects very easy
From: Michael Gibson
3 Mar 2023   [#5] In reply to [#4]
Hi Chris, try the attached SelectFill plugin.

Instructions for installing a plugin here.

You'll need to set up an edge selection first, like this:


Then when you run it, you need to pick a face:


And then only faces inside the same zone bounded by the edges should get selected:


Hope that was what you were looking for.

- Michael

Attachments:
SelectFill.js

Image Attachments:
select_fill1.jpg  select_fill2.jpg  select_fill3.jpg 


From: Chris (CEEN)
4 Mar 2023   [#6] In reply to [#5]
Hi Michael,

that is absoutely awesome! Thank you very much. You just accelerated my workflow tremendously!
From: Frenchy Pilou (PILOU)
5 Mar 2023   [#7]
not works ? https://moiscript.weebly.com/uploads/3/9/3/8/3938813/not_work.3dm


From: Michael Gibson
5 Mar 2023   [#8] In reply to [#7]
Hi Pilou, it doesn't work on your case there because those are independent surfaces not joined to each other.

If you select those surfaces and use Edit > Join to glue them together into a connected object, then it should work.

- Michael
From: Frenchy Pilou (PILOU)
5 Mar 2023   [#9] In reply to [#8]
Excellent!


From: Frenchy Pilou (PILOU)
6 Mar 2023   [#10]
You can click any face inside the loop!

here the last (or the first depending of your point of view! :)


From: Chris (CEEN)
6 Mar 2023   [#11] In reply to [#10]
Yes it is a great implementation by Michael. I already use it with shortcut and it is such a great addition to Moi. That workflow helps in many cases.