MoI discussion forum
MoI discussion forum

Full Version: Tracing solid perimeter

Show messages: All  1-3  4-9

From: Michael Gibson
23 Jul   [#4] In reply to [#3]
Hi Frederick, if the "other solid" is always an extrusion like you show here then creating the closed perimeter curve is probably the easiest method.

If you want to do that with the least amount of steps set up a keyboard shortcut for Ctrl+L to have this:
script: moi.geometryDatabase.selectLoop();

Then select 2 adjacent edge curves on the top face:


Push Ctrl+L to extend selection to all the edges on the outer boundary of the top face:


Now use Edit > Join to make the closed boundary curve.

If you don't want to make a boundary curve I guess you could take the solid and stretch it vertically so it is is longer than the other solid and do a boolean difference with it.

- Michael

Image Attachments:
frederick_perimeter1.jpg  frederick_perimeter2.jpg 


From: fcwilt
23 Jul   [#5] In reply to [#4]
Hi Michael,

The selectLoop() function does most of the work for me.

Now I need to turn it into a custom command where I select the two edges and it does the selectLoop and then Joins the edges into a closed curve.

Moi is simply AMAZING!

Thanks much.

Frederick
From: Zooen
24 Jul   [#6] In reply to [#5]
Hi fcwilt,

The “ExtendEdgeSelection” script allows you to select all edges starting from a single edge on certain faces of solids or surfaces. It works for your part because it has no corners. For parts with corners, you can adjust the first parameter: “var angle_degrees = 20;” to suit your needs.
With the attached file, you can test the green part using the default value of 20.
Select the designated edge and run the script; this will select 3 edges. If you replace the value 20 with 90 (and save), you’ll select all the edges on the top face of the solid. You’ll need to close MoI and restart it for this to work. I use Notepad++
Well, Michael will explain all this more clearly than I can. I have very little knowledge of scripts, so I often work by trial and error.

Oops, I forgot the sample file
Warning! Translation from French using DeepL Pro

Attachments:
Example_of_Odd_Shaped_Hole_Zooen.3dm
ExtendEdgeSelection.js


From: fcwilt
24 Jul   [#7] In reply to [#6]
Hello,

Thank you very much for those files.

Frederick
From: Frenchy Pilou (PILOU)
24 Jul   [#8]
don't works for this file...
https://moiscript.weebly.com/uploads/3/9/3/8/3938813/bul.3dm

but this works! : script:/*Loop selection*/moi.geometryDatabase.selectLoop();
From: Zooen
25 Jul   [#9] In reply to [#8]
Of course it does—it works—but for it to work, you have to set it up right.

Show messages: All  1-3  4-9