Sheet Metal Workbench

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Sheet Metal Workbench

Post by shaise »

Hi Everyone,

I have recently written a simple Sheet Metal workbench to create parametric sheet metal parts. It's very basic but works quite nice and can be downloaded from here:
http://theseger.com/projects/2015/06/sh ... r-freecad/
However one small thing I was struggling with is how to parent the new created shapes objects over the base ones. (like what happens when you apply a fillet over a cube, the fillet object becomes the parent of the cube in the model tree)
Can someone point me out to a python example code of how to do this?

Thanks!
shai
Last edited by shaise on Thu Sep 09, 2021 12:15 pm, edited 1 time in total.
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: Sheet Metal Workbench

Post by shaise »

Ok, Found the solution myself:

I must use my own ViewProvider in order to control tree parenting. (as opposed to using the default provider)
The claimChildren() method is used to collect all child objects

shai
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Sheet Metal Workbench

Post by abdullah »

Hi shaise,

First at all thanks for your WB. It looks nice.

As you raised my awareness with this post (I have look into your blog, which linked the blog of another guy that also has done a collection of scripts), I would like to let you know that I would like to see a sheet metal Workbench in FC Master (not just as a plug-in).

I do not know if there are some community plans I am not aware of to develop one separately. I think that having an "official" sheet metal WB, apart from enriching the variety of tools FC has, would also join together this and that another developer, so that the community can profit from small contributions from different parties.

What do you think about this, guys?
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Sheet Metal Workbench

Post by microelly2 »

Python workbenches, macros and other standalone plugins have the property to allow very speedy development. I think they can live their own life until they are complete enough to move to the master. The git logs and the forum are good places to communicate. The development of the drawing dim workbench is a good example.
I watch the process and if there are interesting changes I update my environment.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Sheet Metal Workbench

Post by ickby »

What do you think about this, guys?
In my oppinion JMG's effort seems more comprehensive and has more functionality included, I would say we should see if his experiment is going to succeed and if we could integrate his work.
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: Sheet Metal Workbench

Post by shaise »

I definitely agree JMG's work is far better then mine, specially with the unfold option. If there is to be an official Sheet Metal workbench, it should be his. BTW I have uploaded my code to github: https://github.com/shaise/FreeCAD_SheetMetal
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Sheet Metal Workbench

Post by ulrich1a »

shaise wrote:specially with the unfold option.
Unfolding can be done with a macro. You may already know: http://www.freecadweb.org/wiki/index.ph ... alUnfolder

The macro is limited which type of bends it can handle. I can only handle bends correctly, where the side-edges are circle arcs.

Ulrich
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: Sheet Metal Workbench

Post by shaise »

Hey Ulrich!

Your macro works great on my folded metals!
What an amazing piece of code!

If you like I can add it to the work bench.

Image

Image

shai
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Sheet Metal Workbench

Post by abdullah »

Thanks for the feedback guys. I am happy to see so many different efforts.

Hopefully someday they will be integrated together and we will see them in a new WB. :)

But I understand that things need time...
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Sheet Metal Workbench

Post by ulrich1a »

shaise wrote:Hey Ulrich!

Your macro works great on my folded metals!
What an amazing piece of code!

If you like I can add it to the work bench.
Yes do it.
At the time I wrote this macro, there was no workbench available. It needs more options, but it was a start to support sheet metal work.

Ulrich
Post Reply