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

Re: help on sheet metal script

Post by jaisejames »

First thank you for the sheet metal work bench. If it is working properly, definitely you can add. :)
User avatar
shaise
Posts: 486
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

@jaisejames, your script works great, but it is not backward compatible. If you try to load old files with sheetmetal, and try to modify old bends, it will throw an error. I have fixed that so it will work, and commited the changes.
See line 193, if you want to know what I added.
Thanks!

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

Re: help on sheet metal script

Post by jaisejames »

Another option added "Simple Fold". please check & tell me, it will be useful or not.
Selection face is same as bend.
Attachments
SimpleFold.py
(8.6 KiB) Downloaded 63 times
User avatar
shaise
Posts: 486
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

Can you explain what it does and how you integrated it?
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: help on sheet metal script

Post by jaisejames »

I added simple edit option to bend.
Double click on sheet metal to open. Useful to rescue for some cases model is broken due to topological name changing
SheetMetalCmd.py
(18.5 KiB) Downloaded 64 times
Attachments
sheetmetal edit.png
sheetmetal edit.png (8.26 KiB) Viewed 1638 times
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: help on sheet metal script

Post by jaisejames »

I modified sheetmetalCmd.py[attached]

* Rectified miter-angle code work with unfold
* Added Round Relief
sheetmetal1.png
sheetmetal1.png (85.7 KiB) Viewed 1570 times
* Added extend wall to add corner relief [manual process]
* double click to edit face selected [ work if base created part workbench, not working in PartDesign Exception : getEditDialog() not implemented ]
sheetmetal3.png
sheetmetal3.png (27.24 KiB) Viewed 1570 times
sheetmetal4.png
sheetmetal4.png (16.75 KiB) Viewed 1570 times
Attachments
SheetMetalCmd.py
(19.76 KiB) Downloaded 63 times
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: help on sheet metal script

Post by chrisb »

Good stuff, thanks. Do I have to exchange the attached file manually or is it sufficient to update via Addon Manager?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: help on sheet metal script

Post by jaisejames »

Backup your exsisting sheetmetalCmd.py, then copy & replace.
User avatar
shaise
Posts: 486
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

Hi Jaisejams,

I like your changes!
I want to add it officially to the WB. It looks like the round relief option works good and also backward compatible, so this is very good.
But I have some issues with the edit window.
1. If there are more then one face bended, I can see only one in the list. Pressing the add, actualy replace the current face, not adding. Is it intended?
2. Pressing Add without selecting anything generates an error.
3. a bit related to 1: selecting more then one face and pressing add, again shows only one face, even though actually when pressing OK, both faces will be bended.
4. If you find a way to make it work on "Part Design" as well, this will be great. If not, maybe just show a message that it works only on "Part".

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

Re: help on sheet metal script

Post by jaisejames »

Edit is implemented to rescue model as no of face changes during adding gap or extend, selected bend face will shift to another face than required. Currently We do not any Gui or data tab editing like property-link method to change face.

It will do for current selected bend only.

We hope that somebody experienced like yorik or wmayer implement editing for selected face like they implemented for propertylink and liklist.

Example it is possible like our expression editor, on click, it will be in observe mode & clik OK or Disard will exit.
example.png
example.png (3.38 KiB) Viewed 1504 times
Post Reply