help on sheet metal script

Need help, or want to share a macro? Post here!
User avatar
shaise
Posts: 372
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Postby shaise » Tue Jun 19, 2018 5:18 am

jaisejames,

Perhaps I did not explain myself,
Yes, I know the edit is only to rescue model - and this is a great feature, because it happens quite often when you do changes to the base.
But I was talking about the following scenario:
1. start with a flat square sheet.
2. select 2 side faces (using <control> to select more then one)
3. press the bend button. (2 bends will be shown together)
Now double click on the bend, only one face is shown in the edit box.

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

Re: help on sheet metal script

Postby jaisejames » Tue Jun 19, 2018 8:55 am

Now only, I knew that it can do multiple bends. :)

Just change line 369 from tuple to list

Code: Select all

			if isinstance(f[1],tuple):
to

Code: Select all

			if isinstance(f[1],list):
to work with multiple bends
jaisejames
Posts: 319
Joined: Sat Sep 24, 2016 6:51 am

Re: help on sheet metal script

Postby jaisejames » Tue Jun 19, 2018 9:52 am

double click edit code is from draft facebinder in case you want to refer.
User avatar
shaise
Posts: 372
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Postby shaise » Tue Jun 19, 2018 2:46 pm

Hi jaisejames,
I have commited all your features to the official WB.
The "Faces" dialog now works both in Part WB and in Part Design WB.
Thanks a lot, great job!

Summary of all changes:
Add bend extension to make the bended wall wider
Add relief shape selection (rounded or flat)
Double clicking on a bend in the tree view, brings a dialog to select different faces (good when editing the base object breaks the bend, and new faces need to be selected)
Setting miter angle now works with unfold command
UR_
Posts: 1189
Joined: Tue Jan 03, 2017 8:42 pm

Re: help on sheet metal script

Postby UR_ » Tue Jun 19, 2018 8:34 pm

Found some glitches :(

#1 - make a bend and edit bend angle to -90°:

negative bend angle.png
negative bend angle.png (10.08 KiB) Viewed 632 times

#2 - make a bend and edit miter angle to 90°:

FreeCAD freezes
User avatar
shaise
Posts: 372
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Postby shaise » Tue Jun 19, 2018 9:23 pm

there is no reason to use negative bend angles. use positive and select invert=true.
I will check regarding crash.
jaisejames
Posts: 319
Joined: Sat Sep 24, 2016 6:51 am

Re: help on sheet metal script

Postby jaisejames » Wed Jun 20, 2018 2:25 pm

Miterangle calculation is tan based. So 90 degree goes to infinity. We need to restrict between -80 to 80.

About -90 bend, I removed 3 line you added. can you add it back?
User avatar
shaise
Posts: 372
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Postby shaise » Wed Jun 20, 2018 4:41 pm

can you tell me what lines?
User avatar
shaise
Posts: 372
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Postby shaise » Wed Jun 20, 2018 5:01 pm

Never mind, I found it and fixed.
I have also restricted miter to +/- 80 degrees
jaisejames
Posts: 319
Joined: Sat Sep 24, 2016 6:51 am

Re: help on sheet metal script

Postby jaisejames » Thu Jun 21, 2018 5:30 am

Nice to see everything in main.

One suggestion or Idea. During unfold, bend is created. we can also create a bend line & append it to new compound. show it as another item. [see the screenshot]
unfold with benline.png
unfold with benline.png (14.33 KiB) Viewed 557 times
bendline-layer.png
bendline-layer.png (7.48 KiB) Viewed 557 times