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
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

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

Re: help on sheet metal script

Post by jaisejames »

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

Re: help on sheet metal script

Post by jaisejames »

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

Re: help on sheet metal script

Post by shaise »

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_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: help on sheet metal script

Post by UR_ »

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 1380 times

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

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

Re: help on sheet metal script

Post by shaise »

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

Re: help on sheet metal script

Post by jaisejames »

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: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

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

Re: help on sheet metal script

Post by shaise »

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

Re: help on sheet metal script

Post by jaisejames »

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 1305 times
bendline-layer.png
bendline-layer.png (7.48 KiB) Viewed 1305 times
Post Reply