Exemple #1
0
def newProfile(prop):
  '''
  Auxiliary function to create profiles
  '''
  if prop['stype']=='C':
    profile=makeCircle(float(prop['H']))
  else:
    profile=ArchProfile.makeProfile([0,'SECTION',prop['SSize']+'-000',prop['stype'],float(prop['W']),float(prop['H']),float(prop['ta']),float(prop['tf'])])
  return profile
Exemple #2
0
def newProfile(prop):
  '''
  Auxiliary function to create profiles with ArchProfiles
  '''
  if prop['stype']=='C':
    profile=makeCircle(float(prop['H']))
  else:
    profile=ArchProfile.makeProfile([0,'SECTION',prop['SSize']+'-000',prop['stype'],float(prop['W']),float(prop['H']),float(prop['ta']),float(prop['tf'])])
  return profile
Exemple #3
0
 def insert(self):      # insert the section
   result=FreeCAD.ActiveDocument.findObjects("App::DocumentObjectGroup","Profiles_set")
   if result:
     group= result[0]
   else:
     group=FreeCAD.activeDocument().addObject("App::DocumentObjectGroup","Profiles_set")
   if self.sizeList.selectedItems():
     prop=self.sectDictList[self.sizeList.currentRow()]
     if prop['stype']=='C':
       s=makeCircle(float(prop['H']))
     else:
       s=ArchProfile.makeProfile([0,'SECTION',prop['SSize']+'-000',prop['stype'],float(prop['W']),float(prop['H']),float(prop['ta']),float(prop['tf'])])
     group.addObject(s)
   FreeCAD.activeDocument().recompute()
Exemple #4
0
 def insert(self):      # insert the section
   result=FreeCAD.ActiveDocument.findObjects("App::DocumentObjectGroup","Profiles_set")
   if result:
     group= result[0]
   else:
     group=FreeCAD.activeDocument().addObject("App::DocumentObjectGroup","Profiles_set")
   if self.sizeList.selectedItems():
     prop=self.sectDictList[self.sizeList.currentRow()]
     if prop['stype']=='C':
       s=makeCircle(float(prop['H']))
     else:
       s=ArchProfile.makeProfile([0,'SECTION',prop['SSize']+'-000',prop['stype'],float(prop['W']),float(prop['H']),float(prop['ta']),float(prop['tf'])])
     group.addObject(s)
   FreeCAD.activeDocument().recompute()