Пример #1
0
 def __init__(self, obj, attachTo):
   '''"Add Metric Hex nut" '''
   FSBaseObject.__init__(self, obj, attachTo)
   self.itemText = "Nut"
   
   obj.addProperty("App::PropertyEnumeration","diameter","Parameters","Press nut thread diameter").diameter = NutDiamCodes
   obj.Proxy = self
Пример #2
0
    def __init__(self, obj, attachTo):
        '''"Add IUT[A/B/C] Heat Set Insert fastener" '''
        FSBaseObject.__init__(self, obj, attachTo)
        self.itemText = "HeatSet"

        obj.addProperty("App::PropertyEnumeration", "diameter", "Parameters",
                        "Heat set thread diameter").diameter = IUTDiamCodes
        obj.invert = FastenerBase.FSLastInvert
        obj.Proxy = self
 def __init__(self, obj, attachTo):
   '''"Add Stud (self clinching) type fastener" '''
   FSBaseObject.__init__(self, obj, attachTo)
   self.itemText = "Stud"
   #self.Proxy = obj.Name
   
   obj.addProperty("App::PropertyEnumeration","diameter","Parameters","Standoff thread diameter").diameter = FHDiameters
   obj.addProperty("App::PropertyEnumeration","length","Parameters","Standoff length").length = fhGetAllLengths(FHDiameters[1])
   obj.invert = FastenerBase.FSLastInvert
   obj.Proxy = self
 def __init__(self, obj, attachTo):
   '''"Add StandOff (self clinching) type fastener" '''
   FSBaseObject.__init__(self, obj, attachTo)
   self.itemText = "StandOff"
   #self.Proxy = obj.Name
   
   obj.addProperty("App::PropertyEnumeration","diameter","Parameters","Standoff thread diameter").diameter = SODiameters
   obj.addProperty("App::PropertyBool", "blind", "Parameters", "Blind Standoff type").blind = False
   obj.addProperty("App::PropertyEnumeration","length","Parameters","Standoff length").length = soGetAllLengths(SODiameters[1], False)
   obj.invert = FastenerBase.FSLastInvert
   obj.Proxy = self
 def __init__(self, obj, attachTo):
   '''"Add Press nut (self clinching) type fastener" '''
   FSBaseObject.__init__(self, obj, attachTo)
   self.itemText = "PressNut"
   #self.Proxy = obj.Name
   
   obj.addProperty("App::PropertyEnumeration","tcode","Parameters","Thickness code").tcode = CLSSizeCodes
   obj.addProperty("App::PropertyEnumeration","diameter","Parameters","Press nut thread diameter").diameter = CLSDiamCodes
   obj.invert = FastenerBase.FSLastInvert
   obj.tcode = '1'
   obj.Proxy = self
Пример #6
0
 def __init__(self, obj, type, attachTo):
   '''"Add washer / nut type fastener" '''
   FSBaseObject.__init__(self, obj, attachTo)
   self.itemText = screwMaker.GetTypeName(type)
   diameters = screwMaker.GetAllDiams(type)
   diameters.insert(0, 'Auto')
   #self.Proxy = obj.Name
   
   obj.addProperty("App::PropertyEnumeration","type","Parameters","Screw type").type = screwMaker.GetAllTypes(self.itemText)
   obj.addProperty("App::PropertyEnumeration","diameter","Parameters","Screw diameter standard").diameter = diameters
   obj.type = type
   obj.Proxy = self
Пример #7
0
 def __init__(self, obj, attachTo):
   '''"Add screw rod" '''
   FSBaseObject.__init__(self, obj, attachTo)
   self.itemText = "ScrewTap"
   self.type = 'ScrewTap'
   diameters = screwMaker.GetAllDiams(self.type)
   diameters.insert(0, 'Auto')
   #self.Proxy = obj.Name
   
   obj.addProperty("App::PropertyEnumeration","diameter","Parameters","Screw diameter standard").diameter = diameters
   obj.addProperty("App::PropertyLength","length","Parameters","Screw length").length = 20.0
   self.VerifyCreateMatchOuter(obj)
   obj.addProperty("App::PropertyBool", "thread", "Parameters", "Generate real thread").thread = False
   obj.Proxy = self
Пример #8
0
    def __init__(self, obj, attachTo):
        '''"Add PCB StandOff type fastener" '''
        FSBaseObject.__init__(self, obj, attachTo)
        self.itemText = "PcbStandOff"
        #self.Proxy = obj.Name

        obj.addProperty("App::PropertyEnumeration", "diameter", "Parameters",
                        "Standoff thread diameter").diameter = PSDiameters
        widths = psGetAllWidths(PSMTable, PSDiameters[1])
        obj.addProperty("App::PropertyEnumeration", "width", "Parameters",
                        "Standoff body width").width = widths
        self.VerifyMissingAttrs(obj, PSDiameters[1], widths[0])
        #obj.addProperty("App::PropertyEnumeration","length","Parameters","Standoff length").length = psGetAllLengths(PSMTable, PSLengths ,PSDiameters[1], widths[0])
        obj.invert = FastenerBase.FSLastInvert
        obj.Proxy = self
Пример #9
0
 def __init__(self, obj, type, attachTo):
   '''"Add screw type fastener" '''
   FSBaseObject.__init__(self, obj, attachTo)
   self.itemText = screwMaker.GetTypeName(type)
   diameters = screwMaker.GetAllDiams(type)
   diameters.insert(0, 'Auto')
   #self.Proxy = obj.Name
   
   obj.addProperty("App::PropertyEnumeration","type","Parameters","Screw type").type = screwMaker.GetAllTypes(self.itemText)
   obj.addProperty("App::PropertyEnumeration","diameter","Parameters","Screw diameter standard").diameter = diameters
   self.VerifyCreateMatchOuter(obj)
   if (self.itemText == "Screw"):
     obj.addProperty("App::PropertyEnumeration","length","Parameters","Screw length").length = screwMaker.GetAllLengths(type, diameters[1])
   if (self.itemText != "Washer"):
     obj.addProperty("App::PropertyBool", "thread", "Parameters", "Generate real thread").thread = False
   obj.type = type
   obj.Proxy = self
 def __init__(self, obj, attachTo, typeStr):
     '''"Add screw rod" '''
     FSBaseObject.__init__(self, obj, attachTo)
     self.itemText = "ScrewTap"
     self.type = typeStr
     diameters = screwMaker.GetAllDiams(self.type) + ["Custom"]
     diameters.insert(0, 'Auto')
     obj.addProperty("App::PropertyEnumeration", "diameter", "Parameters",
                     "Screw diameter standard").diameter = diameters
     obj.addProperty("App::PropertyLength", "diameterCustom", "Parameters",
                     "Screw major diameter custom").diameterCustom = 6
     obj.addProperty("App::PropertyLength", "pitchCustom", "Parameters",
                     "Screw pitch custom").pitchCustom = 1.0
     obj.addProperty("App::PropertyLength", "length", "Parameters",
                     "Screw length").length = 20.0
     self.VerifyMissingAttrs(obj)
     obj.addProperty("App::PropertyBool", "thread", "Parameters",
                     "Generate real thread").thread = False
     obj.Proxy = self