Arch: Added edit mode task panel to arch profiles + added American Wide Flange (W) profiles

This commit is contained in:
Yorik van Havre
2018-07-21 22:50:07 -03:00
parent a7e865ecb0
commit ff21c1b95d
5 changed files with 771 additions and 10 deletions

View File

@@ -238,7 +238,7 @@ class _CommandStructure:
else:
# metal profile
FreeCADGui.doCommand('p = Arch.makeProfile('+str(self.Profile)+')')
if self.Length == self.Profile[4]:
if abs(self.Length - self.Profile[4]) < 0.1: # forgive rounding errors
# vertical
FreeCADGui.doCommand('s = Arch.makeStructure(p,height='+str(self.Height)+')')
else:
@@ -269,7 +269,12 @@ class _CommandStructure:
ilist=[]
for p in baselist:
ilist.append(p[2]+" ("+str(p[4])+"x"+str(p[5])+"mm)")
f = FreeCAD.Units.Quantity(p[4],FreeCAD.Units.Length).getUserPreferred()
d = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units").GetInt("Decimals",2)
s1 = str(round(p[4]/f[1],d))
s2 = str(round(p[5]/f[1],d))
s3 = str(f[2])
ilist.append(p[2]+" ("+s1+"x"+s2+s3+")")
return ilist
def taskbox(self):