Sheet metal Addon for FreeCAD

Update 29 Apr 2016: Updated Ulrich Brammer’s Unfolding tool to ver 17. Thank you Ulrich!

As part of doing home made projects one needs some kind of CAD software to design mechanical parts. As a fan of open source software I use FreeCAD which is a great alternative to the market’s highly expensive Solid CAD software.

One thing I use a lot, is designing Sheet Metal parts. As there is no special support for it in FreeCAD, it tends to take time to design Sheet Metal parts, as I need to manually add sketches, extrude walls, and add fillets. Furthermore, If I found something to be wrong in the base part, I have to go over the entire process to fix it.

This is where open source software shines. If I need a new feature, I can just go ahead and add it. Turns out FreeCAD is very friendly to extensions. So I decided to add a sheet metal extension and share it with others. One thing worth mentioning: there is this guy who is working on a sheet metal extension which will probably be far better then mine, but until he releases it, my extension can help speed up part design.

Installing the extension

To use the sheet metal extension, first you need to install the latest version of FreeCAD (0.16 at the time of writing) if yo dont have it already.
Now go ahead and download the extension: SheetMetal_V0.0.18
Extract this zip file into the Mod directory under the FreeCAD installation path. (on Windows it’s something like “C:\Program Files\FreeCAD 0.16\Mod”)
You should now see a new directory under Mod: SheetMetal.
That’s all for installation.

Working with the Sheet Metal extension

To simply understand how to work with the Sheet Metal extension, here is a sample workflow:

Start with thin layer solid shape, either by extruding a sketch, or creating a thin Box. From the workbench drop-down select “Sheet Metal”. Now select one of the side faces of your objects:

smcap1

The Sheet Metal workbench shows 2 command icons:

BendIcon Bend: Add bended extension

ExtrudeIcon Extrude: Add a strait extrusion of the face

Click the Bend tool:

smcap2

A 90 degrees bended extension with default values will be added. You can now play with the bend parameters by selecting the Bend part in the model tree, and then the Data tab underneath. In the parameters table, change the length to 7mm and add a 2mm gap on both sides:

smcap3m

Let’s extend the bended flap sideways. Select both side faces of the new wall. (Press and hold Control to select multiple faces). Now click the Extrude tool:

smcap4

Shape the result: In the parameters panel, set length to 5mm and gap2 to 1mm:

smcap5m

Now let’s add more bended extensions. This time select 2 side faces of the base to make 2 symmetric bends. Click Bend. Set the length to 7mm:

smcap6

That’s it, you can continue now and add more bends and extrusions until you get you desired final part. The nice thing about it all that the final part is fully parametric. This means that any change in a parent part will immediately propagate to the dependent parts, without the need to redo them. Click the gray “Cube” part from the model tree, and change the Length to 60mm. See how all the bends adjusts accordingly:

smcap7

The parameters of the Bend give you lots of flexibility. You can for example add just the bend, by setting the Length to zero, or even just add the relief cuts, by setting the bend angle to zero as well:

smflex

Upon completion of the sheet metal part, you can select the OpenScad workbench and use the Refine (RefineIcon) tool to cleanup the geometry.

Here is a sample part made with several symmetric bends:

smcap10

That’s all! Hope it helps someone. Over time I will try to add some more features and keep the above SheetMetal.zip updated. You are welcome to leave comments and suggestions.

Update 13 Jun 2015: Ulrich Brammer’s Unfolding tool Added. Thank you Ulrich!

Ulrich Brammer’s great unfolding tool is now integrated into the workbench. Many thanks for the developer. To use it, simply select any one of the faces of the folded sheet metal and press the Unfold (UnfoldIcon) icon

Before:
unfold_before

After:
unfold_after

SHS

69 Responses to 'Sheet metal Addon for FreeCAD'

  1. Claus says:

    GOD bless you!

  2. casticad says:

    Very well, thank you !!!!

  3. holger says:

    Amazing! Works like a charm.
    Thank you very much!

  4. Clergeot M. says:

    Big thanx, it will be very usefull for me in and my students to create plans to make foldings of plates of plastics 🙂

  5. harpat949 says:

    I get a McAfee malware warning when I try to download the sheetmetal workbench. Anyone knows about this?

  6. DAC says:

    Use Ubuntu 0.15 FreeCAD (4671 Revision Number). I copied the directory /usr/share/freecad/Mod/ but FreeCAD does not load the module. What you could be happening?

    • shaise says:

      Not sure about Linux as I use Windows, but I think you should create a directory path: ~/.FreeCAD/Mod
      then extract the zip there. (so you have a directory ~/.FreeCAD/Mod/SheetMetal and under it all the source files)

  7. Adam says:

    Thanks for making this workbench!

    I’m getting this error: revAxisV referenced before assignment. I made a few bends, then made a cut and tried to make a bend from the cut surface. Is there some inherent limitation that I am running into?

    Thanks,
    Adam

  8. Ian says:

    This appears to be just what I am looking for. I’m investigating FreeCAD as a starting point for models to go to G-Code for engraving/milling on brass sheet using a Shapeoko, Stepcraft or similar. The models are for 7mm/1ft scale railway locomotives.
    The intention is to engrave/mill brass sheet to achieve the same results as chemical etching but with much shorter lead times on minimal production runs.
    Any information about the ability of the Sheet Metal add-on to cope with intersecting tubes? These would be tubes of differing diameters and offset centres which then need to be reduced to flat sheet for milling.

    • shaise says:

      Sorry, but I can’t really tell. You should try some simple models to find out if it works for you. You can use the FreeCAD forum to ask others for their experience / tips.

  9. rmu75 says:

    Nice work, works fine. But I would change two things: For one, the angle specified should be the angle inside the two legs, i.e. 45° should specify a sharp bend and 180° should be no bending at all. Length should specify the length on the “outside”, not the length of the straight piece that is added; to be correct, the originating piece will have to be made “shorter”.

    • shaise says:

      rmu75,

      In the case of 45 deg, I can see the logic, but then for a 180 deg bend, which now will be 0 deg, it can be a bit strange. I agree though, regarding the other remark.
      Anyway the problem is, as it is a parametric feature, any changes to that will not be backward compatible and will mess with existing saved files. So since it is not that critical, I tend to leave it as is.

      shai

      • rmu75 says:

        The sheet bending machines I know are programmed like this (angle between legs, distances measured to the virtual point where legs would cross, on the outside of the bent part), it is a convention, but probably the only one that makes sense.

        The radius and elongation of the sheet metal depends on the specifics of the bending tool used to manufacture it; while modelling, I don’t want to bother about elongation-faktor and so on. Like it is now, you have to explicitly compensate for elongation.

        I don’t know FreeCAD well enough, but there has to be some mechanism in place to deal with backwards compatibility and saving.

        Didn’t find english version:
        https://de.wikipedia.org/wiki/Biegeverk%C3%BCrzung

  10. Nick says:

    A very handy little add-on, thanks

  11. Ben says:

    Hi

    Having a struggle getting this mod to work. I’m using Linux Mint 17 – apparently one has to install PySide manually on this platform.

    OS: Linux Mint 17.3 Rosa
    Platform: 64-bit
    Version: 0.14.2935 (Git)
    Branch: master
    Hash: eab159b6ee675012bf79de838c206a311e911d85
    Python version: 2.7.6
    Qt version: 4.8.6
    Coin version: 4.0.0a
    SoQt version: 1.6.0a
    OCC version: 6.7.0

    I installed python-pyside3 (and all its dependencies). That got the the workbench to display.

    Then I found that installing the older python-pyside (etc…) got the three icons to display.

    Now, for the life of me, I cannot figure out how to get those tools active. They’re greyed out.

    I have a simple extrusion of a sketch (i.e. rectangular prism), and no ammount of clicking can bring those tool buttons to life.

    Uninstalled anything python3-pyside. Added anything else left in SYnaptic with python-pyside.

    No change on extrusion. Tried it on a box.

    They lit up!

    Now they light up for the extrusion.

    And nothing happens. Trying to add a bend to either object juts fails. There is data on it in the property view, but that’s all – no bend displayed.

    Its very disappointing – it looks like a great tool!

    Any ideas?

    B

    • shaise says:

      Hi Ben,

      The tools are grayed until you click on a single face of your object. Try doing it on a simple 10x10x2 box created in the Part workbench.
      I have no Linux to debug it, so if it still not working, try asking at the freecadweb forum.

      shai

      • Ben says:

        hiya, thanks for the response.

        Turns out Linux Mint’s default repository provides an old FreeCAD version (13.something).

        Update to 15 and it works well – many thanks.

        B

  12. Colin says:

    installed the extension it’s in the Mod directory but’s it’s not appearing in the menu I must not be holding my tongue in the correct direction. Any help would be fantastic

    • shaise says:

      What operating system do you use?

      • Colin says:

        windows 7

        • shaise says:

          In Windows 7 it should work without any issues. Make sure that under the Mod folder you see a SheetMetal Folder. Then run FreeCad, and look at the main tool bar, there is a drop down menu, you should see there a SheetMetel option. Only when you select it, you will see the new SheetMetal buttons.

          • Colin says:

            Many thanks for the reply But it was Me not holding my tongue correctly I was creating the folder then unzipping to that folder which was creating a folder within a folder. Now it works just fine thanks again

  13. John says:

    Thank you so much. Wow!

  14. John says:

    Is there an option anywhere to add a stiffener to a flat side? That would be great.

  15. Simon says:

    Awesome piece of work! I need to model a cabinet made entirely of bent sheet steel so I can add components to it.

    I don’t know where I would be without this… well actually I do. I’d not be doing the model and I’d be getting my mods wrong.

    Many thanks

  16. Mo says:

    Hi,

    I have unzipped your file and copied to mod folder. After launching FreeCAD and selecting Sheet Metal Workbench all icons are disabled, any clue?

    Thanks

    • Mo says:

      Hi,

      I have unzipped your file and copied to mod folder. After launching FreeCAD and selecting Sheet Metal Workbench all icons are disabled, any clue?

      Thanks

      Never mind, it is working. Thanks for your great work.
      Mo

  17. Thanh says:

    Hi,

    I am new to FreeCAD and Sheet Metal WB. I just downloaded the 64-bit Windows FreeCAD version 0.16 and worked through the examples on this webpage using the Bend and Extrude tools. I hope someone will help me with the following questions:

    1). How do I delete just the rear extruded part of the left bend?. I have tried different ways but it seems I can only delete the last added part and have to backtrack all the way. Is that right?.

    2). Let’s say I want to model a U-shaped bracket with two bends (material thickness = 0.050″, inside bend radius = 0.050″ both at 90 angle) and the outside dimension between two bends is 1″ (width). Is there a way to use the bend tool so that I can keep the width fixed at 1″ while I change the bend radius without having to calculate and edit the cube width everytime?.

    3). What measuring tool and how do I use it to accurately measure the width?. I have tried the Measure Distance tool and it does not seem to snap to two lines perpendicularly; e.g. returning close values but not exact 0.05 for material thickness (more like cursor point to point distance).

    I appreciate all the efforts that developers have put into making these great tools and sharing them. Thanks.

    Thanh

    • shaise says:

      Hi Thanh,

      Welcome to FreeCad.
      1. The way freecad is built, you cant delete just the rear bend. It is all model over model based and you can backtrack only from the last action (similar to undo). Changing sizes of the rear bend can be done at anytime, tough, so if you need to change it, its possible. You can even try to set bend angle and bend length to 0 as a hacked way do delete it, but in most cases it can lead to destroying the other bends.

      2. Sorry, but yo cant set a fixed outside width, so you can play with parameters without changing the overall width. This is not FreeCad this time, this is a limitation of my workbench. I had already get some requests regarding that, but had not the time ywet to implement it.

      3. Yes, the measuring tool of FreeCad is not that friendly, but I not aware of a better solution. Try asking at the FreeCad forum: http://forum.freecadweb.org/

      shai

      • Thanh says:

        Hi Shai,

        Thanks for your quick reply, very much appreciated.

        1). Understood. I guess one would have to replicate an object to be deleted and use Boolean function to make a cut somehow?.

        2). I think you need something like an offset parameter; for examples:

        – Full extension… bend adds full extension as you now have
        – No extension… bend adds no extension to the surface (outside bend surface is at the original surface)
        – User-defined extension…user can enter any distance from original surface to outside bend surface (in cases like 1 or 1/2 material thickness, etc…)

        3). Yes, I did look up in the FreeCAD help forum and someone suggested Part WB/Measure Linear tool. It works for what I wanted to do. It would be great to have something like a Universal Measuring WB that can measure anything in any work space and conveniently turn into dimensions, if required to save time.

        So far I like your Sheet Metal WB very much. I am not so sure how to quickly design a metal case for electronics using FreeCAD without your WB. Thanks again.

        Thanh

  18. Brock says:

    Hi, I’m new to both freecad and I have no idea how to mod. I do not understand how to download to freecad. Is there a more detailed explanation? I have windows 10 64bit Thank you

    • shaise says:

      Hi Brock

      Just go to http://freecadweb.org/wiki/?title=Download and click “Windows 64 bits” download option. Then run it as any other installation.

      • Brock says:

        Thank you sir. I already have it downloaded, I do not understand how to mod and extract the file on this page.

        • shaise says:

          Hi Brock,

          For Windows 10, do the following:
          Make sure FreeCAD is not running.
          Download the file from this site. Double click on the file to enter the zip. Right-Click on “SheetMetal” folder and select “Copy”.
          Using the file explorer go to C: -> “Program Files” -> “FreeCAD 0.16”
          Right click on “Mod” folder, select “Paste”.
          If Windows asks you for permissions, grant them.
          Run FreeCAD. You should now see the new workbench in the list.

  19. Ralph says:

    How do I make a bend at a negative angle? I would like to make a “dovetail” feature, with a 120deg bend, then a -120deg bend, another -120deg bend, followed by a final
    120deg bend. Is this possible with the SheetMetal module?

  20. Ralph says:

    Never mind… I didn’t try “invert”, which does what I want when set to true.

  21. Francois says:

    I followed the guidelines to install SheetMetal_V0.0.16 in the Mod directory but it doesn’t show up in the WB-dropdown list.
    I cannot figure out why FreeCAD does not load the module, I got no error, no warnings.

    OS: Windows 7
    Word size of OS: 64-bit
    Word size of FreeCAD: 64-bit
    Version: 0.16.6704 (Git)
    Build type: Release
    Branch: releases/FreeCAD-0-16
    Hash: 0c449d7e8f9b2b1fb93e3f8d1865e2f59d7ed253
    Python version: 2.7.8
    Qt version: 4.8.7
    Coin version: 4.0.0a
    OCC version: 6.8.0.oce-0.17

  22. Satheesh says:

    Hi shaise,

    Your work is great. And it is working fine. But is there any way to do projected shapes in sheet metal.

    Thanks & Regards

    Satheesh

  23. JB says:

    I am trying to use your 0.0.17 with FreeCAD 0.16 on Windows. Love that you no longer nest objects differently from FreeCAD itself.

    However unfold keeps failing with error messages like the following that doesn’t name the objects involved:

    Running the Python command ‘SMUnfold’ failed:
    Traceback (most recent call last):
    File “C:\Program Files\FreeCAD 0.16\Mod\SheetMetal\SheetMetalUnfolder.py”, line 1557, in Activated
    s = PerformUnfold()
    File “C:\Program Files\FreeCAD 0.16\Mod\SheetMetal\SheetMetalUnfolder.py”, line 1478, in PerformUnfold
    TheTree.Bend_analysis(f_number, None) # traverses the shape builds the tree-structure
    File “C:\Program Files\FreeCAD 0.16\Mod\SheetMetal\SheetMetalUnfolder.py”, line 967, in Bend_analysis
    SMLog(“counterface on otherSeamNode: Face”, otherSeamNode.c_face_idx+1)

    ‘NoneType’ object has no attribute ‘c_face_idx’

    How to proceed?

    P.S. Google captchas are horrible.

  24. Jan Zumwalt says:

    After flattening a part, is it possible to get the proper dimensions from the flat piece so the part can be fabricated?

  25. Fabrizio says:

    Excellent tool, thank you for you’re work.

    Feature request:
    In real live, we have static correction factors for situations, where the inner bending radius and the sheet metal type and thickness is defined.
    If no static correction value is entered the implemented k_factor calculation takes place when flatening, otherwise the static correction factor will be taken for the calculation of the ‘flaten lenght’.

    fm

  26. PS says:

    Hello,
    I was working on my project when I came across Sheet_metal addon. Its remarkably great tool!
    I have tried using it according to above tutorial, workds like charm even with Freecad 0.17pre. However, I was wondering if it can also be used to bend objects, that are already fully sketched in flat form and includes pockets on both flat and (yet to be) bent side.
    Basically, I would like to bend the structure as marked on this picture by red lines:
    https://files.fm/u/eyp8kt47
    Could you please tell me, if that is possible?

    Thaks, PS

  27. Jin says:

    Hi,

    thanks a lot! I have been looking for something like that for a while now! Tried it on FreeCAD 0.16 on Fedora 25 and it worked without any problems.

    One question though, I could not see any release tags on github, is v0.0.18 the git master head or where does the development take place?

    Greetings,
    Jin

  28. Tomas says:

    Hello,

    Thank you for a great contribution!

    I have found a strange behaviour in the latest version at this date. If interested, please give me your email-address so that I may send you an example.

    Best regards,
    Tomas

  29. Altus says:

    What is the K-factor set at? Could it be possible to add a K-factor parameter so that the K-factor can be changed for different materials. Only a suggestion.

    • shaise says:

      Hi Altus,

      The unfold function was not done by me, so I can only answer you from picking the code. It uses the following formula: K = 0.65 + 0.5 * log (radius / thickness).
      I had intended to make the K factor selectable, however, as said it is not my code and I could not get in touch with the guy who did it.
      You can try playing with it yourself, by changing the lines 845 and 849 in the SheetMetalUnfolder.py

      shai

  30. Mark says:

    Hello

    Many thank for the great extension!!
    Its works very well.
    But I have found a small error:
    I hope this is a good place to make a small bug report.
    The extensions dont like angels from exaktly 60°.
    59.9 or 60.1 are working well.
    Beginning at the second bending and 60°:
    The flatningtool is forgot the parts behind the bending.
    Freecad 0.16, Ubuntu Linux.
    Sorry for my horrible englisch!
    If you want more informations please send me an email.

    • shaise says:

      Hi Mark,

      Thanks for your message. The flattening tool is not mine, hence it is difficult for me to fix it. Try leaving a message in the frecad forum (forum.freecadweb.org) under “sheet metal unfolder tool”

  31. Edy says:

    Hello,

    Does anyone has an idea how to install this workbench on Mac OS? I do not have separate directories to store those files; except for Macros

    Thank you for your comments

  32. steelman says:

    Very useful. I need to test it with foamboard designs. Especially FliteTest’s a-folds and b-folds.

  33. HighStrengthSteel says:

    Superb work, many thanks indeed!

  34. Eric says:

    The Undo function does not seem to work for me. Anyone else have the same issue?

    Thanks

  35. Partick says:

    Very nice and useful ! Nice job !
    Thanks a million.

Trackbacks/Pingbacks

Leave a Reply

Your email address will not be published. Required fields are marked *

*