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!
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Sheet Metal Workbench

Post by jaisejames »

new feature added
Corner relief feature
https://github.com/shaise/FreeCAD_SheetMetal/pull/147

select two of edges of a face where corner relief required
corner relief 1.png
corner relief 1.png (30.47 KiB) Viewed 3033 times
select relief to create the feature.
then adjust other parameters
corner relief 2.png
corner relief 2.png (31.26 KiB) Viewed 3033 times
Limitation : size should greater than corner to neutral radius size

Testing required.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Sheet Metal Workbench

Post by Kunda1 »

Awesome!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
shaise
Posts: 486
Joined: Thu Jun 11, 2015 8:11 am

Re: Sheet Metal Workbench

Post by shaise »

Great feature jaisejames!

I have no time to test it, if people here can do some tests, I will then merge it. (at least test if nothing else is broken)
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Sheet Metal Workbench

Post by -alex- »

Thanks a lot for this great feature!
Works fine for me, I was not able to get any error while modeling or modifying those test models:
CornerRelief_test.png
CornerRelief_test.png (93.91 KiB) Viewed 2951 times
CornerRelief_test.FCStd
(158.21 KiB) Downloaded 55 times
CornerRelief_test_none_nativeSMWB.png
CornerRelief_test_none_nativeSMWB.png (93.54 KiB) Viewed 2951 times
CornerRelief_test_none_native_SMWB.FCStd
(208.08 KiB) Downloaded 62 times

OS: Debian GNU/Linux 10 (buster) (LXDE/LXDE-pi)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23069 (Git)
Build type: Unknown
Branch: master
Hash: 20649ec5292a31279f5593eccee2c5cd106bb099
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Sheet Metal Workbench

Post by -alex- »

-------------------------------
Disclaimer: comments here are related to FreeCAD Linkstage3 branch of @realthunder.
-------------------------------
realthunder wrote:ping
JFYI

Those above test parts doesn't unfold in Linkstage3 branch of FC.
CornerRelief feature works fine, but unfolding fails with warning
Unfold is failing.
Please try to select a different face to unfold your object
and error:

Code: Select all

18:55:36  Engineering mode is not enabled.
18:55:39  Manual K-factor is being used: 0.40 (din)
18:55:39  15StdFail_NotDone BRep_API: command not done
18:55:39  exception at line 2876('15StdFail_NotDone BRep_API: command not done',)
18:55:39  ('15StdFail_NotDone BRep_API: command not done',)
18:55:39  Traceback (most recent call last):
18:55:39    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1688, in unbendFace
    theFace = Part.Face(myWire)
18:55:39  Part.OCCError: Failed to create face from wire
18:55:39  
During handling of the above exception, another exception occurred:

18:55:40  Traceback (most recent call last):
18:55:40    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2876, in accept
    s, foldComp, norm, thename, err_cd, fSel, obN  = getUnfold(k_factor_lookup)
18:55:40    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2180, in getUnfold
    theFaceList, foldLines = TheTree.unfold_tree2(TheTree.root) # traverses the tree-structure
18:55:40    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2049, in unfold_tree2
    shell, foldLines = self.unfold_tree2(n_node)
18:55:40    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2049, in unfold_tree2
    shell, foldLines = self.unfold_tree2(n_node)
18:55:40    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2049, in unfold_tree2
    shell, foldLines = self.unfold_tree2(n_node)
18:55:40    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2062, in unfold_tree2
    nodeShell, nodeFoldLines = self.generateBendShell2(node)
18:55:40    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1938, in generateBendShell2
    bFace = self.unbendFace(i, bend_node, nullVec)
18:55:40    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1699, in unbendFace
    theFace = Part.makeFilledFace(thirdWireList)
18:55:40  Part.OCCError: 15StdFail_NotDone BRep_API: command not done
18:55:40  


Tests performed on both parts above in previous post (recomputation for FC_link migration accepted).
Same error on a similar part modeled from scratch with FC_link.
Thanks for your attention.

OS: Debian GNU/Linux 10 (buster) (LXDE/LXDE-pi)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.25935 (Git)
Build type: Unknown
Branch: LinkStage3
Hash: a491be7f04516e65647d77ceb2547fbd0adac1df
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Sheet Metal Workbench

Post by realthunder »

-alex- wrote: Tue Dec 01, 2020 6:03 pm Those above test parts doesn't unfold in Linkstage3 branch of FC.
I have just made a new release. Fixed a few problems related to this. I also found out a more reliable way solve this face orientation problem. With this PR, sheetmetal can now unfold your previous offset shape with hole.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Sheet Metal Workbench

Post by -alex- »

realthunder wrote: Wed Dec 02, 2020 2:11 pm Fixed a few problems related to this. I also found out a more reliable way solve this face orientation problem. With this PR, sheetmetal can now unfold your previous offset shape with hole.
wow thank you very much, can't wait to try this :D
I've sync ur branch, now it's compiling, then upgrade sheetmetal WB, then I'll report here.

Edit: test done but unfolding still fails. Something is broken for me, on both master and Linkstage3 branches
I synchronized your branch:
OS: Debian GNU/Linux 10 (buster) (LXDE/LXDE-pi)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.25950 (Git)
Build type: Unknown
Branch: LinkStage3
Hash: f45215c049a756a8d5f072535eafbb308113f2b1
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
I've updated sheetmetal WB with SheetMetalUnfolder.py file up to date:
SheetMetalUnfolder.py
(130.58 KiB) Downloaded 87 times


While unfolding this part:
FC_link_CornerRelief_test_none_native_SMWB.FCStd
(157.88 KiB) Downloaded 69 times
I get following warnings and error:
Analysis: Type of surface not supported for sheet metal parts
Unfold is failing.
Please try to select a different face to unfold your object

Code: Select all

Engineering mode is not enabled.
01:07:30  Manual K-factor is being used: 0.30 (din)
01:07:30  got error code: 17 at Face23
01:07:30  got error code: 17 at Face23
01:07:30  got error code: 17 at Face23
01:07:30  Error Analysis: Type of surface not supported for sheet metal parts at Face23
01:07:49  exception at line 2872("'NoneType' object has no attribute 'Edges'",)
01:07:49  ("'NoneType' object has no attribute 'Edges'",)
01:07:49  Traceback (most recent call last):
01:07:49    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2872, in accept
    foldLines = foldComp.Edges
01:07:49  AttributeError: 'NoneType' object has no attribute 'Edges'
01:07:49  
I get similar error while unfolding native sheetmetal part:
FC_Link_CornerRelief_test.FCStd
(117.51 KiB) Downloaded 67 times

Code: Select all

01:23:06  Manual K-factor is being used: 0.30 (din)
01:23:06  got error code: 17 at Face11
01:23:06  got error code: 17 at Face11
01:23:06  got error code: 17 at Face11
01:23:06  got error code: 17 at Face11
01:23:06  Error Analysis: Type of surface not supported for sheet metal parts at Face11
01:23:09  exception at line 2872("'NoneType' object has no attribute 'Edges'",)
01:23:09  ("'NoneType' object has no attribute 'Edges'",)
01:23:09  Traceback (most recent call last):
01:23:09    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2872, in accept
    foldLines = foldComp.Edges
01:23:09  AttributeError: 'NoneType' object has no attribute 'Edges'
01:23:09  

On master branch:
OS: Debian GNU/Linux 10 (buster) (LXDE/LXDE-pi)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23069 (Git)
Build type: Unknown
Branch: master
Hash: 20649ec5292a31279f5593eccee2c5cd106bb099
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)

While unfolding none native SMWB part I get following warnings and error:
Unfold is failing.
Please try to select a different face to unfold your object

Code: Select all

Engineering mode is not enabled.
01:14:58  Manual K-factor is being used: 0.30 (din)
01:14:58  exception at line 2871('list indices must be integers or slices, not NoneType',)
01:14:58  ('list indices must be integers or slices, not NoneType',)
01:14:58  Traceback (most recent call last):
01:14:58    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2871, in accept
    s, foldComp, norm, thename, err_cd, fSel, obN  = getUnfold(k_factor_lookup)
01:14:58    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2169, in getUnfold
    TheTree.Bend_analysis(f_number, None) # traverses the shape and builds the tree-structure
01:14:58    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1324, in Bend_analysis
    self.Bend_analysis(child_info[0], t_node, child_info[1])
01:14:58    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1324, in Bend_analysis
    self.Bend_analysis(child_info[0], t_node, child_info[1])
01:14:58    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1324, in Bend_analysis
    self.Bend_analysis(child_info[0], t_node, child_info[1])
01:14:58    [Previous line repeated 1 more time]
01:14:58    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1315, in Bend_analysis
    t_node = self.make_new_face_node(face_idx, parent_node, parent_edge, wires_edge_lists)
01:14:58    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1098, in make_new_face_node
    oppVertIndexes = range(len(self.__Shape.Faces[newNode.c_face_idx].Vertexes))
01:14:58  TypeError: list indices must be integers or slices, not NoneType
01:14:58  

While unfolding native SMWB part I get following warnings and error:
Unfold is failing.
Please try to select a different face to unfold your object

Code: Select all

01:18:04  Manual K-factor is being used: 0.30 (din)
01:18:04  exception at line 2871("'SheetTree' object has no attribute '_SheetTree__thickness'",)
01:18:04  ("'SheetTree' object has no attribute '_SheetTree__thickness'",)
01:18:04  Traceback (most recent call last):
01:18:04    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2871, in accept
    s, foldComp, norm, thename, err_cd, fSel, obN  = getUnfold(k_factor_lookup)
01:18:04    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2167, in getUnfold
    TheTree = SheetTree(o.Object.Shape, f_number, k_factor_lookup) # initializes the tree-structure
01:18:04    File "/home/pi/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 523, in __init__
    if (self.__thickness < estimated_thickness) or (self.__thickness > 1.9 * estimated_thickness):
01:18:04  AttributeError: 'SheetTree' object has no attribute '_SheetTree__thickness'
01:18:04  

Thank you for your attention and your efforts, hope you can fix it.
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Sheet Metal Workbench

Post by jaisejames »

Wall extrude improved

https://github.com/shaise/FreeCAD_SheetMetal/pull/150

* added extrude with sketch.
* extrude if intersect we can cut it with a offset.
extend0.png
extend0.png (33.01 KiB) Viewed 2753 times
extend1.png
extend1.png (26.8 KiB) Viewed 2753 times
extend2.png
extend2.png (13.42 KiB) Viewed 2753 times
Testing needed.
User avatar
shaise
Posts: 486
Joined: Thu Jun 11, 2015 8:11 am

Re: Sheet Metal Workbench

Post by shaise »

Great new features!!!
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Sheet Metal Workbench

Post by -alex- »

jaisejames wrote: Thu Dec 03, 2020 2:12 pm Wall extrude improved
Thank you for this feature :)
Works fine here (except to unfold sometimes, but that's another issue, see next post):
WallExtrude_impoved_SMWB_test.gif
WallExtrude_impoved_SMWB_test.gif (676.53 KiB) Viewed 2541 times
WallExtrude_improved_SMWB_test.FCStd
(21.19 KiB) Downloaded 51 times

Just 2 comments:
- if the extend doesn't intersect the full thickness of the sheetmetal wall then the offset subtraction doesn't cut throught all the wall, then the unfold fails.
- the cut is colinear with the extend, so if the extend is not perpendicular to the intersected wall the cut is not normal to the sheetmetal neither.
Anyway, that's not a big deal. This feature is convenient as is.
Thank you again!

OS: Debian GNU/Linux 10 (buster) (LXDE/LXDE-pi)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23069 (Git)
Build type: Unknown
Branch: master
Hash: 20649ec5292a31279f5593eccee2c5cd106bb099
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Post Reply