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!
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: Sheet Metal Workbench

Post by shaise »

Hi Everyone,

I have updated the workbench to use Ulrich's latest version (17).
It seems to solve several unfolding issues.
Updated workbench: http://theseger.com/projects/2015/06/sh ... r-freecad/
Source: https://github.com/shaise/FreeCAD_SheetMetal

shai
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Sheet Metal Workbench

Post by triplus »

Nice work! It's easy to grasp the concept and to produce good results.

I noticed one issue:
Flatten.png
Flatten.png (7.17 KiB) Viewed 7246 times
If you create this and after change the placement of the Unfold object can you confirm FreeCAD freezes?
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: Sheet Metal Workbench

Post by shaise »

Hi Ulrich,

Someone has left an issue (#5) regarding the unfolding macro.
It seems that if you unfold an object, add folds to the unfolded sheet then unfold again, the unfolder macro fails.
I investigated it a bit, and it seems that the issue is because the flattened bends surfaces is not planes but rather "splined surfaces" or something. (The result of Part.makeRuledSurface) This causes an error at isVertOpposite function.
I have changed Part.makeRuledSurface to manually creating 4 flat faces.
From:

Code: Select all

   
    Bend_shell = Part.makeRuledSurface (o_wire, b_wire)
    # Part.show(Bend_shell)
        
    for shell_face in Bend_shell.Faces:
      flat_shell.append(shell_face )
To:

Code: Select all

    for i in range(len(o_wire.Edges)) :
      flat_shell.append(self.MakeFace(o_wire.Edges[i], b_wire.Edges[i]))
and add:

Code: Select all

  def MakeFace(self, e1, e2):
    e3 = Part.Line(e1.valueAt(e1.FirstParameter), e2.valueAt(e2.FirstParameter)).toShape()
    e4 = Part.Line(e1.valueAt(e1.LastParameter), e2.valueAt(e2.LastParameter)).toShape()
    w = Part.Wire([e1,e3,e2,e4])
    return Part.Face(w)
This seems to solve the problem.
If you have another solution, or support splined surfaces, please let me know.
Thanks!

Updated workbench: http://theseger.com/projects/2015/06/sh ... r-freecad/
Source: https://github.com/shaise/FreeCAD_SheetMetal

shai
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Sheet Metal Workbench

Post by ulrich1a »

Hi Shai,

thanks for looking into this issue. I am planning to redo the generation of the flattend bend faces. I want to support not only straight edges of flattened bend faces but also other types of geometry at this location.
I have worked on an algorithm how to generate other types of flattened edges. What is missing is the implementation in the sheet unfolder macro and an idea about a reasonable data structure to store the information about all the vertexes and edges involved and their relation against each other. The algorithm needs to inspect all these, and how to store the information will be the next step.

So I will look at your approach, because I do not want to support ruled surfaces in the next version.

Ulrich
efyx
Posts: 280
Joined: Fri Sep 26, 2014 7:36 pm

Re: Sheet Metal Workbench

Post by efyx »

Ulrich1a that means you will proceed sheet metal workbench? If so, it would be very good to add:
- ability of unfold to may perform holes on the bends and then fold it again;
- perform a tool, it should works like a shell - change solid into thin surface, user should be able to show rip edges and bend edges, then automatically it should be changed to sheet metal which could be flat patterned.
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Sheet Metal Workbench

Post by microelly2 »

efyx wrote: - perform a tool, it should works like a shell - change solid into thin surface, user should be able to show rip edges and bend edges, then automatically it should be changed to sheet metal which could be flat patterned.
its not for metal but for paper models
http://freecadbuch.de/doku.php?id=blog: ... _erstellen
efyx
Posts: 280
Joined: Fri Sep 26, 2014 7:36 pm

Re: Sheet Metal Workbench

Post by efyx »

microelly2 wrote: its not for metal but for paper models
Wow that's impressive, is that a problem to add some functionality from sheetmetal workbench +add the K factor and that would be quite good foundation for sheetmetal workbench? Or to use some of this code into sheetmetal workbench.
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Sheet Metal Workbench

Post by ulrich1a »

efyx wrote:- ability of unfold to may perform holes on the bends and then fold it again;
At the moment I am trying to solve the problem of unfolding bends with a hole in it. Unfortunately progress is actually slow. But this is a prerequisite for further enhancements. I will see.

Ulrich
User avatar
Tandini
Posts: 37
Joined: Sat Jul 09, 2016 6:14 pm

Re: Sheet Metal Workbench

Post by Tandini »

Hi, very useful addition to freeCAD!

I noticed one issue:
NoUnfoldingPossible.png
NoUnfoldingPossible.png (69.1 KiB) Viewed 6875 times
Unfolding is not possible. The red shape is instead created.
If you bend the green marked surfaces only, all works fine.
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: Sheet Metal Workbench

Post by shaise »

Tandini wrote: Unfolding is not possible. The red shape is instead created.
If you bend the green marked surfaces only, all works fine.
For unolding to work, you must first select a face that resides on the surface of the flattened sheet, then press unfold button.
Post Reply