help on sheet metal script

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: help on sheet metal script

Post by f3nix »

Hi.
Could someone check if this is reproducible? Or am I missing something?

I'm using 4mm steel in this example.

It should be a 90x90 L-bracket.

1. kfactor set to 0,86 and unfold parameter set to true
Total unfolded length is 172,98mm
This is right for a cnc press I will be using.

2. kfactor set to 0,86 and unfold parameter set to false.
Select a face and click unfold. Leave the checkboxes unchecked.
Total unfolded length is 172,33mm

3. kfactor set to 0,86 and unfold parameter set to false.
Select a face and click unfold. Set manual k-factor to 0,86.
Total unfolded length is 175,69mm.

Thanks for your great work! :)

Cheers,
Mateusz

FreeCAD SheetMetal - 557a8fb67d903ffb8b8f6a640d192da5b56a7501
---
OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15592 (Git)
Build type: Debug
Branch: master
Hash: a7c0f4bc5b62ec304a5855796ca3d10a42c7a46e
Python version: 2.7.15+
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Polish/Poland (pl_PL)
---
Attachments
L-bracket-test.FCStd
(20.55 KiB) Downloaded 59 times
User avatar
bavariaSHAPE
Posts: 406
Joined: Tue Jun 10, 2014 8:31 am
Contact:

Re: help on sheet metal script

Post by bavariaSHAPE »

Hello dear FreeCAD forum friends,

while working into the Sheet Metal WB I noticed the following:

1. relief Type set to round
2. relief factor set to true

Result: »relief Type« is displayed »rectangle«, not »round«. The »relief factor« is used correctly.

If I switch the »Use Relief factor« to false again, the »relief Type« is »round« again.
sheetmetal_relief-factor.jpg
sheetmetal_relief-factor.jpg (43.65 KiB) Viewed 2016 times
Can anyone reproduce that?

:idea: Achim

Sheet Metal: V0.2.20 10 Jan 2019

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13509 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 0258808ccb6ba3bd5ea9312f79cd023f1a8671b7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
Attachments
Parameter.FCStd
(27.72 KiB) Downloaded 55 times
… for a happy FreeCAD-World … JM2C …
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: help on sheet metal script

Post by jaisejames »

Round relief is with half circle. It work only if depth is greater width of relief.

Reason - no of face created in rectangle is three. no of face created need to be three in round also. If not whatever features created after that keep jumping due to face number change during toggling rectangle to round.
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: help on sheet metal script

Post by jaisejames »

f3nix wrote: Fri Jan 11, 2019 8:40 pm Hi.
Could someone check if this is reproducible? Or am I missing something?

I'm using 4mm steel in this example.

It should be a 90x90 L-bracket.

1. kfactor set to 0,86 and unfold parameter set to true
Total unfolded length is 172,98mm
This is right for a cnc press I will be using.

2. kfactor set to 0,86 and unfold parameter set to false.
Select a face and click unfold. Leave the checkboxes unchecked.
Total unfolded length is 172,33mm

3. kfactor set to 0,86 and unfold parameter set to false.
Select a face and click unfold. Set manual k-factor to 0,86.
Total unfolded length is 175,69mm.

Thanks for your great work! :)

Cheers,
Mateusz

FreeCAD SheetMetal - 557a8fb67d903ffb8b8f6a640d192da5b56a7501
---
OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15592 (Git)
Build type: Debug
Branch: master
Hash: a7c0f4bc5b62ec304a5855796ca3d10a42c7a46e
Python version: 2.7.15+
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Polish/Poland (pl_PL)
---
Thank for reporting issue. I request Shaise to correct it.
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

Hi f3nix,

The problem is difference between European and American standard of k_facror (one of them is 1/2 the other). I have now changed the unfold system to European standard (which is compatible with Ulrich's original unfolder script). Now both unfolding from the properties, and the unfolding button match.
Please update.

shai
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: help on sheet metal script

Post by jaisejames »

Solid Shape to Sheet metal Tutorial.

Steps:
[example created using 70 x 50 x 30 cube ]

Step 1 - Fillet all Object to (thickness + radius ). say thk = 1.0 & Radius = 1.0 .So fillet radius = 1.0 +1.0 = 2.0
solid_to_sheetmetal_1.png
solid_to_sheetmetal_1.png (15.04 KiB) Viewed 1869 times
Step 2 - Change to draft workbench, select faces required & select facebinder tool
solid_to_sheetmetal_2.png
solid_to_sheetmetal_2.png (34.23 KiB) Viewed 1869 times
Step 3 - Change to Part work Bench, use 3d offset & set -1mm for inside one.
solid_to_sheetmetal_3.png
solid_to_sheetmetal_3.png (11.23 KiB) Viewed 1869 times
unfolding view
solid_to_sheetmetal_4.png
solid_to_sheetmetal_4.png (3.99 KiB) Viewed 1869 times
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: help on sheet metal script

Post by f3nix »

jaisejames wrote: Wed Jan 23, 2019 11:58 am Thank for reporting issue. I request Shaise to correct it.
shaise wrote: Thu Jan 24, 2019 9:23 am Hi f3nix,

The problem is difference between European and American standard of k_facror (one of them is 1/2 the other). I have now changed the unfold system to European standard (which is compatible with Ulrich's original unfolder script). Now both unfolding from the properties, and the unfolding button match.
Please update.

shai
Hi!
Thank you both! :)
Discussion continued on GitHub.

Cheers,
Mateusz
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: help on sheet metal script

Post by jaisejames »

A simple Solid shape to sheet metal tool
solid model.png
solid model.png (7.33 KiB) Viewed 1808 times
solid to sheetmetal.png
solid to sheetmetal.png (14.72 KiB) Viewed 1808 times
Code attached.
Attachments
SheetMetalSolidtoSMCmd.py
(11.82 KiB) Downloaded 68 times
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: help on sheet metal script

Post by chrisb »

Interesting extension. Will it be integrated in SheetMetal?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

jaisejames wrote: Fri Feb 01, 2019 11:53 am A simple Solid shape to sheet metal tool
Great feature!

However I found out that the order of selecting the edges sometimes generate error.
For example in the attached file, if you select the edges in the following order, it makes an error:
solidsm1.png
solidsm1.png (26.06 KiB) Viewed 1756 times
The error:
Traceback (most recent call last):
File "D:\Downloads\download\freecad\FreeCAD_0.18\Mod\FreeCAD_SheetMetal\SheetMetalSolidtoSMCmd.py", line 150, in execute
selFaceNames = fp.baseObject[1], MainObject = fp.baseObject[0])
File "D:\Downloads\download\freecad\FreeCAD_0.18\Mod\FreeCAD_SheetMetal\SheetMetalSolidtoSMCmd.py", line 129, in smShape
base_solid = base_shell.makeOffsetShape(thk, 0.001, inter = False, self_inter = False, offsetMode = 0, join = 0, fill = True)
<class 'Part.OCCError'>: Geom_RectangularTrimmedSurface::U1==U2

But if you select in different order, it can work.
Attachments
testsolidsm.FCStd
(3.39 KiB) Downloaded 49 times
Post Reply