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!
l3VGV
Posts: 47
Joined: Sat Oct 12, 2019 11:04 am

Re: Sheet Metal Workbench

Post by l3VGV »

"Corner relief" do not work for me.

version info

Sheet metal wb version 0.2.49

FreeCad
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Russian/Russia (ru_RU)


I made simple part as a example, when i select 2 edges(why cant i select bend itself btw? its so annoying to hunt edges) and press "Cornel relief", it gave me alot of errors and part disappear

Code: Select all

09:30:28  Traceback (most recent call last):
  File "C:\Users\l3VGV\AppData\Roaming\FreeCAD\Mod\sheetmetal\SheetMetalCornerReliefCmd.py", line 447, in execute
    s = smCornerR(reliefsketch = fp.ReliefSketch, ratio = fp.SizeRatio, size = fp.Size.Value, kfactor = fp.kfactor,
  File "C:\Users\l3VGV\AppData\Roaming\FreeCAD\Mod\sheetmetal\SheetMetalCornerReliefCmd.py", line 262, in smCornerR
    DetailList = getBendDetail(resultSolid, REdgelist[0], REdgelist[1], kfactor)
  File "C:\Users\l3VGV\AppData\Roaming\FreeCAD\Mod\sheetmetal\SheetMetalCornerReliefCmd.py", line 225, in getBendDetail
    bendR = cylface.Surface.Radius
<class 'AttributeError'>: 'Part.Plane' object has no attribute 'Radius'
Attachments
Screenshot 2021-11-22 093111.jpg
Screenshot 2021-11-22 093111.jpg (57.19 KiB) Viewed 3135 times
corner.FCStd
(14.96 KiB) Downloaded 49 times
l3VGV
Posts: 47
Joined: Sat Oct 12, 2019 11:04 am

Re: Sheet Metal Workbench

Post by l3VGV »

I've found that if "Relief Sketch" is changed from "Circle" to "Circle-scaled", and then back to "Circle", then it works(Size must be x2 from bend radius, or other red errors will ocure).

(but only sometimes)

:shock:


also turns out it will work if order of edge selection is "correct", if edg1 then edge2 give error, then selecting them edge2 first and edge1 will work.
User avatar
-alex-
Veteran
Posts: 1856
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Sheet Metal Workbench

Post by -alex- »

l3VGV wrote: Mon Nov 22, 2021 6:32 am I made simple part as a example, when i select 2 edges(why cant i select bend itself btw? its so annoying to hunt edges) and press "Cornel relief", it gave me alot of errors and part disappear
That's because the corner relief feature needs a.... corner :!:
There is no corner on your simple L square part. With an additional bend you'll get a corner, then it works like a charm ;)
2bends_corner_relief_.png
2bends_corner_relief_.png (17 KiB) Viewed 2935 times
User avatar
-alex-
Veteran
Posts: 1856
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Sheet Metal Workbench

Post by -alex- »

jaisejames wrote:ping
Hi, it seems there is a bug to unfold this part:
Image
The original thread: https://forum.freecadweb.org/viewtopic. ... 80#p549380

Here linked is my attempt to this part, with 3DOffset workflow to get a normal cut in wedge area. It fails as well.

It fails to unfold on this system with SM 0.2.49:

OS: Debian GNU/Linux 10 (buster) (LXDE/LXDE-pi)
Word size of FreeCAD: 64-bit
Version: 0.20.26427 (Git)
Build type: Unknown
Branch: master
Hash: 751227402db14aad83f5aa87d63e514109bd438f
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)

with this error:

Code: Select all

00:12:56  Engineering mode is not enabled.
00:12:59  Manual K-factor is being used: 0.50 (din)
00:12:59  exception at line 2865('NCollection_BaseList::PRemove',)
00:12:59  ('NCollection_BaseList::PRemove',)
00:12:59  Traceback (most recent call last):
00:12:59    File "/home/pi/.local/share/FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1687, in unbendFace
    theFace = Part.Face(myWire)
00:12:59  Part.OCCError: Failed to create face from wire
00:12:59  
During handling of the above exception, another exception occurred:

00:12:59  Traceback (most recent call last):
00:12:59    File "/home/pi/.local/share/FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2865, in accept
    s, foldComp, norm, thename, err_cd, fSel, obN  = getUnfold(k_factor_lookup)
00:12:59    File "/home/pi/.local/share/FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2179, in getUnfold
    theFaceList, foldLines = TheTree.unfold_tree2(TheTree.root) # traverses the tree-structure
00:12:59    File "/home/pi/.local/share/FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2048, in unfold_tree2
    shell, foldLines = self.unfold_tree2(n_node)
00:12:59    File "/home/pi/.local/share/FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2048, in unfold_tree2
    shell, foldLines = self.unfold_tree2(n_node)
00:12:59    File "/home/pi/.local/share/FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2061, in unfold_tree2
    nodeShell, nodeFoldLines = self.generateBendShell2(node)
00:12:59    File "/home/pi/.local/share/FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1937, in generateBendShell2
    bFace = self.unbendFace(i, bend_node, nullVec)
00:12:59    File "/home/pi/.local/share/FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 1698, in unbendFace
    theFace = Part.makeFilledFace(thirdWireList)
00:12:59  Part.OCCError: NCollection_BaseList::PRemove

Then it unfolds on this system with SM 0.2.49 as well, but leads to a weird unfold pattern:

OS: Debian GNU/Linux 11 (bullseye) (LXDE/LXDE-pi)
Word size of FreeCAD: 64-bit
Version: 0.20.26485 (Git)
Build type: Unknown
Branch: master
Hash: 36489487113f5b65be52279165b28150323748a3
Python version: 3.9.2
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.1
Locale: French/France (fr_FR)
clamping_pipe.png
clamping_pipe.png (23.44 KiB) Viewed 2913 times

Code: Select all

00:38:05  Engineering mode is not enabled.
00:38:17  Manual K-factor is being used: 0.40 (din)
00:38:18  <Exception> Wire is not closed.
00:38:18  Exception at line 2916: Outline Sketch failed, re-trying after tidying up
00:38:18  check to sanitize
00:38:18  sanitizing Unfold_Sketch
00:38:19  <Exception> Wire is not closed.
00:38:19  tidying up Unfold_Sketch_Outline
00:38:19  check to sanitize
00:38:19  sanitizing Unfold_Sketch_Outline
oslona1-alex-.FCStd
(189.43 KiB) Downloaded 46 times

Thanks for your kind attention, hope you can find a fix.
l3VGV
Posts: 47
Joined: Sat Oct 12, 2019 11:04 am

Re: Sheet Metal Workbench

Post by l3VGV »

-alex- wrote: Thu Nov 25, 2021 11:08 pm
That's because the corner relief feature needs a.... corner :!:
There is no corner on your simple L square part. With an additional bend you'll get a corner, then it works like a charm ;)
I see, that sure make sense.

But i wanted to make relief in that L shape actualy :oops: . And a way was found! it works, first select any 2 edges, press Relief , if it give error about radius, then delete and select same edges in reverse order, (erorr should become "<class 'UnboundLocalError'>: local variable 'BendEdge' referenced before assignment"), increase Size to atleast 2*tickness and here it is! 8-)
Screenshot 2021-11-26 134928.png
Screenshot 2021-11-26 134928.png (30.5 KiB) Viewed 2872 times
Screenshot 2021-11-26 134319.png
Screenshot 2021-11-26 134319.png (95.74 KiB) Viewed 2873 times
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: Sheet Metal Workbench

Post by FBXL5 »

-alex- wrote: Thu Nov 25, 2021 11:25 pm Hi, it seems there is a bug to unfold this part:
Have tried a similar part, an arc + 2 flanges. It unfolds for arcs up to about 50mm radius. For larger radii it fails to unfold, no matter what the flanges are shaped.

Such a Part with a diameter of 300 mm unfolds if the gap between the flanges is larger than about 50mm or the angle between them is larger than about 20°.

It seems to be a weakness of the solver for large radii combined with small gaps.
User avatar
-alex-
Veteran
Posts: 1856
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Sheet Metal Workbench

Post by -alex- »

Interesting, thanks for your feedback. Hope this could be fixed someday :)
DenysKovalenko
Posts: 12
Joined: Thu Oct 14, 2021 3:34 pm

Re: Sheet Metal Workbench

Post by DenysKovalenko »

Hello, i have problem with unfonding this STEP file.
In report view i have error:

Code: Select all

14:51:27  exception at line 2865("'NoneType' object has no attribute 'c_face_idx'",)
14:51:27  ("'NoneType' object has no attribute 'c_face_idx'",)
Anyone know what's the issue of this error and how i could fix that?

STEP file: https://www.dropbox.com/s/qxkx0suka0a2t ... .STEP?dl=0

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Attachments
Screenshot 2021-11-29 151404.png
Screenshot 2021-11-29 151404.png (33.95 KiB) Viewed 2639 times
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: Sheet Metal Workbench

Post by FBXL5 »

DenysKovalenko wrote: Mon Nov 29, 2021 2:16 pm Anyone know what's the issue of this error and how i could fix that?
It seems like the STEP data is not compatible with the SheetMetal unfolder. It could be fixed by creating your object with FreeCAD and especially with tools of the SheetMetal workbench.

Even if you pad one face of the main plate and add two flanges with the Make Wall tool it still does not unfold.
User avatar
papyblaise
Veteran
Posts: 7870
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Sheet Metal Workbench

Post by papyblaise »

I do not know if the protocol which was used to create the original is compatible with that of Sheetmetal, nor if a STEP can become a compatible Sheetmetal object
I see that all the angles are not bent with the same k factor: the hinges are at mid-thickness and without gap, also for the cut of the fenetre which cuts half of the radius
Attachments
unfold fail.PNG
unfold fail.PNG (16.3 KiB) Viewed 2517 times
Post Reply