MoI discussion forum
MoI discussion forum

Full Version: Edge Flange Script

Show messages:  0-19  20-36

From: MO (MO_TE)
1 Sep   [#1]
Hi everyone
Today, I like to share a script that will help you make simple edge flanges.





I've borrowed the base of the script from one of Michael Gibson's scripts named "RotateAndExtrudeFace2". Thanks Michael for all your helps :)
https://moi3d.com/forum/lmessages.php?webtag=MOI&msg=8126.38


You can get two types of edge bend: rounded and segmented.
By default bending radius will be equal to 1/2 of the edge thickness, But, It is possible to change the radius manually.

You can use these shortcut keys while script is running.
Press 'f' to Flip flange direction
Press 's' to toggle Segmented flange

Also, It is possible to run the script with different parameters.

examples:
edgeFlange 5 true false 4 Auto 1 false false /* Rounded edge flange with 5 degree angle constraint and auto radius*/
edgeFlange 5 true true 4 Manual 0.6 false false /* Segmented edge flange */
edgeFlange 5 true true 1 Manual 0.51 false true /* 1 segment flange without extrude */

Command parameters:
Param 0: Angle Constraint ( number )
Param 1: Disable Objects Snaps ( boolean )
Param 2: Segmented ( boolean )
Param 3: Segments ( number ) // Only takes effect if Segmented set to true
Param 4: Radius Type ( Auto - Manual )
Param 5: Inner Bending Radius ( number ) // Only takes effect if radius type set to Manual
Param 6: Keep Rail ( boolean )
Param 7: Disable Extrude ( boolean )

Attachments:
edgeFlange.zip

Image Attachments:
EdgeFlange_GIF_01.gif  EdgeFlange_IMG_01.png  EdgeFlange_IMG_02.png 


From: vic
1 Sep   [#2]
Very Nice Script and Raw. Thanks
From: christian (CHRI)
1 Sep   [#3] In reply to [#1]
Hi MO

Great Job
Thanks for sharing

Chri
From: AlexPolo
1 Sep   [#4]
fantastic script makes modelling sheetmetal parts so much easier within moi.

thanks
From: MO (MO_TE)
1 Sep   [#5]
Hi
You're welcome! Glad to hear it's useful for you. :)
From: Michael Gibson
1 Sep   [#6] In reply to [#1]
Nice work MO!

- Michael
From: Larry Fahnoe (FAHNOE)
2 Sep   [#7] In reply to [#1]
Very nice indeed Mo, I think this will be quite helpful, thank you! Also, kudos to you for the documentation here and in the code.

--Larry
From: RayCAD1962 (RAYCAD003)
2 Sep   [#8]
Dear MO,
Thank you for this amaze script that you create. Hope to have more script commands in the future to make 3Dmoi better then ever.
Keep it up the good work and thanks again.
From: MO (MO_TE)
2 Sep   [#9]
Thank you all for these kind words. :)
From: Mik (MIKULAS)
3 Sep   [#10] In reply to [#9]
Hi Mo, excellent script, indeed!
Many thanks for sharing.
It would be nice to have some complementary "unfold" script too for laser cut machine :-)
Mik
From: Fredrik (CARL_FREDRIK)
4 Sep   [#11] In reply to [#10]
That would be really nice.
A "unfold and flatten" script, for laser as well as for water-cutting too.
The possibilites would be almost endlessly for stamped sheet and metal goods.
From: Finema
4 Sep   [#12]
Very usefull.
Thanks !
From: MO (MO_TE)
4 Sep   [#13] In reply to [#10]
Hi Mik

I think doing an unfold tool for all kinds of surfaces is just way beyond me! :) I don't have enough geometry/programming information to do this.

On the other hand, I read your thread about using flow as an unfold tool since 2015.
And I think this technique can be a good fit for edge flange script as it can produce simple objects.

Here are some thoughts:

In V5 there is a function to store user information to objects (setUserText), Also one to get the information. (getUserText)

I think it is possible to change the edge flange script to store some information like bend radius, bend start point, arc center, arc length and hierarchical order of the produced objects.
Then maybe a script can use this information to flatten the parts like you demonstrated in this thread. ( I don't know how yet! )
https://moi3d.com/forum/index.php?webtag=MOI&msg=7406.1

Here is a screenshot of using flow to unfold an object created with edge flange script. (Manually)


Right now I don't have the time and a solid plan to work on it.
Also, you can use freecad's dedicated SheetMetal Workbench and SheetMetal Unfold tool. Although, I haven't tried it myself.

Image Attachments:
EdgeFlange_IMG_Unfold.png 


From: Frenchy Pilou (PILOU)
5 Sep   [#14]
Cool script and links!

And with SubDiv_beta9 by Max Smirnov



Will be fine if we can have this choice! ( Negative Angle or Flip Direction don't give that!
(edit see following posts that is yet possible! :)


From: mk (MARKY)
6 Sep   [#15] In reply to [#14]
It's great for HVAC ducts routes in architecture, at least in the concept design stage.
From: Frenchy Pilou (PILOU)
6 Sep   [#16]
In fact that is working! :) Bravo!

But you must be in "Manual" and make a full rotation in "Flip Direction" before draw!

French Version
https://moiscript.weebly.com/brides-de-rives.html


From: Frenchy Pilou (PILOU)
8 Sep   [#17] In reply to [#1]
@Mo_te
Can you make something for have the possibility to recall your script at the end ?

Because now when we make Right Click it's the Extrude function who is recalled! :)
From: MO (MO_TE)
8 Sep   [#18] In reply to [#17]
Hi PILOU
The extrude part can be skipped by setting the last command parameter to true.
code:
edgeFlange 5 true false 4 Auto 1 false true

code:
edgeFlange 5 true true 4 Auto 1 false true

This way you can repeat the 'edgeFlange' command by right click.

But if you like to run the extrude command at the end, It will change the last executed command to 'extrude'. That's why right click repeats the extrude command.
Another option is to set a shortcut key for 'edgeFlange' command and run it from there.
From: Frenchy Pilou (PILOU)
8 Sep   [#19] In reply to [#18]
Of course i wish run the "Extrude" at the end of the process before the "remake" ! ;)

So maybe Michael will have a trick! ;)
From: Frenchy Pilou (PILOU)
9 Sep   [#20]
<<< Sorry no there isn’t currently a way to do that.
I have some ideas for a mechanism that would manage running a sequence of several commands in a row.
That would probably help with this case but it’s currently at the idea stage and is not implemented yet.

Michael>>>

So wait & see! :)

Show messages:  0-19  20-36