help on sheet metal script

Need help, or want to share a macro? Post here!
User avatar
-alex-
Posts: 201
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: help on sheet metal script

Postby -alex- » Sat Apr 27, 2019 8:48 am

Please find below an additional picture of an exemple. For such kind of full 3D shaped part, the workflow I'm using (from faces with 3D offset) is more convenient compare with sheet metal WB features.
I mean, sheet metal WB features are really cool for pretty cartesian parts (more or less cartesian), i.e. boxes, sheet metal casing, etc...
Very convenient features and parametric furthermore: thanks to sheetmetal WB devellopers!
However, those feature are cumulative, I mean it is a way to modelise by serial features. That is no so easy to modelise a full 3D parametric model in this way, easy to modify by overall dimensions for eg.
So, the workflow by using offset feature from faces of 3D model allows to get quicly full parametric and full 3D sheetmetal parts.
The tiny problem I face with concerns only peripheral fillets, that's not so serious problem, but I would like to be able to complete the workflow without any bug in order to get a smouth unfold sketch, with all peripheral fillets on it.
If it's not possible to solve the error about "compound shell invalid tolerance value" from Part->fillet feature, then I will do as Maurice told me: https://forum.freecadweb.org/viewtopic. ... 90#p303828
Am I clear? I reach the limits of my skills in english sorry.

In this way I will share a tutorial to talk about:
- the native sheetmetal WB features: very convenient for most of sheet metal parts
- the alternative workflow I'm talking about here for full 3D parts (parametric or from 3D step file)

Please find below an additional picture of an exemple. For such kind of full 3D shaped part, the workflow I'm using (from faces with 3D offset) is more convenient compare with sheet metal WB features.
I mean, sheet metal WB features are really cool for pretty cartesian parts (more or less cartesian), i.e. boxes, sheet metal casing, etc...
Very convenient features and parametric furthermore: thanks to sheetmetal WB devellopers!
However, those feature are cumulative, I mean it is a way to modelise by serial features. That is no so easy to modelise a full 3D parametric model in this way, not so easy to modify it by overall dimensions for eg.
So, the workflow by using offset feature from faces of 3D model allows to get quicly full parametric and full 3D sheetmetal parts.
The tiny problem I face with concerns only peripheral fillets, that's not so serious problem, but I would like to be able to complete the workflow without any bug in order to get a smouth unfold sketch, with all peripheral fillets on it.
Am I clear? I reach the limits of my skills in english sorry
In this way I will share a tutorial to talk about:
- the native sheetmetal WB features: very convenient for most of sheet metal parts
- the alternative workflow I'm talking about here for full 3D parts (parametric or from 3D step file)
Such kind of tutorial should give various ways to users to get sheetmetal sub-parts from any 3D solid, and very well fitted (for MIG welding seams I mean)
3D-shell-sloped.png
3D-shell-sloped.png (98.19 KiB) Viewed 348 times


OS: Windows 10
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.19.16502 (Git)
Build type: Release
Branch: master
Hash: 06962535fa9ff348acca1b893cc4239908fb8bae
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: French/France (fr_FR)
User avatar
easyw-fc
Posts: 2625
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Postby easyw-fc » Sat Apr 27, 2019 10:32 am

-alex- wrote:
Sat Apr 27, 2019 8:48 am
Please find below an additional picture of an exemple.
Would you mind to attach the model?
User avatar
-alex-
Posts: 201
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: help on sheet metal script

Postby -alex- » Sun Apr 28, 2019 7:56 am

easyw-fc wrote:
Sat Apr 27, 2019 10:32 am
Would you mind to attach the model?
Sure Maurice, please find here the model. Below a picture witch shows that one of both sub-sheetmetal parts has not peripheral fillets.
So you can see the workflow:
- get the inner faces from the outer faces of a part: 2 steps
- get sheet metal: 3 or 4 steps for each subparts
Pretty fast IMHO.
Remain the problem with peripheral fillets and invalid tolerance values that break unfolding....
I'm in a hurry, have to go sorry.
See you


3D-shell-sloped-one-subsheetmetal-without-peripheral-fillets.png
3D-shell-sloped-one-subsheetmetal-without-peripheral-fillets.png (126.63 KiB) Viewed 310 times
Attachments
3D-shell-sloped-sheet-metal.FCStd
(276.45 KiB) Downloaded 19 times
Last edited by -alex- on Mon Apr 29, 2019 5:06 am, edited 1 time in total.
User avatar
easyw-fc
Posts: 2625
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Postby easyw-fc » Sun Apr 28, 2019 6:52 pm

-alex- wrote:
Sun Apr 28, 2019 7:56 am
please find here the model.
WIP with peripheral fillets and invalid tolerance values ;)

phpBB [video]


-
3D-shell-sloped-sheet-metal-v2.FCStd
(521.62 KiB) Downloaded 13 times
User avatar
-alex-
Posts: 201
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: help on sheet metal script

Postby -alex- » Mon Apr 29, 2019 4:15 pm

easyw-fc wrote:
Sun Apr 28, 2019 6:52 pm
WIP with peripheral fillets and invalid tolerance values
Hey that's pretty cool!
Why WIP? On your video the problem seems fixed rather 8-)
I have downloaded and tested your V2 file but I still get the same error warning when trying to unfold. Did you modify some part of code?
Waiting for your good news.
User avatar
easyw-fc
Posts: 2625
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Postby easyw-fc » Mon Apr 29, 2019 4:28 pm

-alex- wrote:
Mon Apr 29, 2019 4:15 pm
Hey that's pretty cool!
Why WIP? On your video the problem seems fixed rather 8-)
from the video you can see that the outline sketch is not generated, even if the unfold sketch is generated; this is requiring more fine tuning
-alex- wrote:
Mon Apr 29, 2019 4:15 pm
I have downloaded and tested your V2 file but I still get the same error warning when trying to unfold. Did you modify some part of code?
yes
User avatar
-alex-
Posts: 201
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: help on sheet metal script

Postby -alex- » Mon Apr 29, 2019 5:09 pm

Indeed, outline sketch is missing. Get both unfold and bend lines sketches is already a success as I'm concerned.
Very promissing,waiting for your future improvements. Thank you Maurice.
User avatar
easyw-fc
Posts: 2625
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Postby easyw-fc » Mon Apr 29, 2019 5:17 pm

-alex- wrote:
Mon Apr 29, 2019 5:09 pm
Indeed, outline sketch is missing. Get both unfold and bend lines sketches is already a success as I'm concerned.
Very promissing,waiting for your future improvements. Thank you Maurice.
sorry, you misunderstood me...
you have already the full outline sketch, which is called 'unfold sketch'.
But this sketch is not full usable; it has some double segments that atm don't allow to generate the 'real' clean outline sketch.
Anyway, it is doable withing some coding... the tolerance part was the real show stopper, but now it in the past :D
User avatar
-alex-
Posts: 201
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: help on sheet metal script

Postby -alex- » Mon Apr 29, 2019 5:37 pm

easyw-fc wrote:
Mon Apr 29, 2019 5:17 pm
you misunderstood me...
Yes i did. Indeed, some arcs (B-spline for this sketch) of the unfold outline sketch are duplicated twice or more. If you can fix it that would be great.
Please let me know when you will merge the code :D
User avatar
easyw-fc
Posts: 2625
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Postby easyw-fc » Tue May 14, 2019 9:14 pm

-alex- wrote:
Mon Apr 29, 2019 5:37 pm
Please let me know when you will merge the code :D
Here my PR 83
Last edited by easyw-fc on Tue May 14, 2019 10:15 pm, edited 1 time in total.