diff options
Diffstat (limited to 'add_mesh_BoltFactory/Boltfactory.py')
-rw-r--r-- | add_mesh_BoltFactory/Boltfactory.py | 72 |
1 files changed, 68 insertions, 4 deletions
diff --git a/add_mesh_BoltFactory/Boltfactory.py b/add_mesh_BoltFactory/Boltfactory.py index 4ade3da0..acfe5886 100644 --- a/add_mesh_BoltFactory/Boltfactory.py +++ b/add_mesh_BoltFactory/Boltfactory.py @@ -60,6 +60,7 @@ class add_mesh_bolt(Operator, AddObjectHelper): ) # Head Types Model_Type_List = [('bf_Head_Hex', 'HEX', 'Hex Head'), + ('bf_Head_12Pnt', '12 POINT', '12 Point Head'), ('bf_Head_Cap', 'CAP', 'Cap Head'), ('bf_Head_Dome', 'DOME', 'Dome Head'), ('bf_Head_Pan', 'PAN', 'Pan Head'), @@ -83,7 +84,8 @@ class add_mesh_bolt(Operator, AddObjectHelper): ) # Nut Types Nut_Type_List = [('bf_Nut_Hex', 'HEX', 'Hex Nut'), - ('bf_Nut_Lock', 'LOCK', 'Lock Nut')] + ('bf_Nut_Lock', 'LOCK', 'Lock Nut'), + ('bf_Nut_12Pnt', '12 POINT', '12 Point Nut')] bf_Nut_Type: EnumProperty( attr='bf_Nut_Type', name='Nut Type', @@ -169,6 +171,29 @@ class add_mesh_bolt(Operator, AddObjectHelper): description='Flat Distance of the Hex Head', unit='LENGTH', ) + bf_12_Point_Head_Height: FloatProperty( + attr='bf_12_Point_Head_Height', + name='Head Height', default=3.0, + min=0, soft_min=0, max=MAX_INPUT_NUMBER, + description='Height of the 12 Point Head', + unit='LENGTH', + ) + bf_12_Point_Head_Flat_Distance: FloatProperty( + attr='bf_12_Point_Head_Flat_Distance', + name='Flat Dist', default=3.0, + min=0.001, soft_min=0, #limit to 0.001 to avoid calculation error + max=MAX_INPUT_NUMBER, + description='Flat Distance of the 12 Point Head', + unit='LENGTH', + ) + bf_12_Point_Head_Flange_Dia: FloatProperty( + attr='bf_12_Point_Head_Flange_Dia', + name='12 Point Head Flange Dia', default=5.5, + min=0, soft_min=0, + max=MAX_INPUT_NUMBER, + description='Flange diameter of the 12 point Head', + unit='LENGTH', + ) bf_CounterSink_Head_Dia: FloatProperty( attr='bf_CounterSink_Head_Dia', name='Head Dia', default=6.300000190734863, @@ -290,7 +315,31 @@ class add_mesh_bolt(Operator, AddObjectHelper): description='Flat distance of the Hex Nut', unit='LENGTH', ) - + bf_12_Point_Nut_Height: FloatProperty( + attr='bf_12_Point_Nut_Height', + name='12 Point Nut Height', default=2.4000000953674316, + min=0, soft_min=0, + max=MAX_INPUT_NUMBER, + description='Height of the 12 Point Nut', + unit='LENGTH', + ) + + bf_12_Point_Nut_Flat_Distance: FloatProperty( + attr='bf_12_Point_Nut_Flat_Distance', + name='12 Point Nut Flat Dist', default=3.0, + min=0.001, soft_min=0, #limit to 0.001 to avoid calculation error + max=MAX_INPUT_NUMBER, + description='Flat distance of the 12 point Nut', + unit='LENGTH', + ) + bf_12_Point_Nut_Flange_Dia: FloatProperty( + attr='bf_12_Point_Nut_Flange_Dia', + name='12 Point Nut Flange Dia', default=5.5, + min=0, soft_min=0, + max=MAX_INPUT_NUMBER, + description='Flange diameter of the 12 point Nut', + unit='LENGTH', + ) def draw(self, context): layout = self.layout col = layout.column() @@ -307,6 +356,9 @@ class add_mesh_bolt(Operator, AddObjectHelper): elif self.bf_Bit_Type == 'bf_Bit_Allen': col.prop(self, 'bf_Allen_Bit_Depth') col.prop(self, 'bf_Allen_Bit_Flat_Distance') + elif self.bf_Bit_Type == 'bf_Bit_Torx': + col.prop(self, 'bf_Torx_Bit_Depth') + col.prop(self, 'bf_Torx_Size_Type') elif self.bf_Bit_Type == 'bf_Bit_Philips': col.prop(self, 'bf_Phillips_Bit_Depth') col.prop(self, 'bf_Philips_Bit_Dia') @@ -317,6 +369,10 @@ class add_mesh_bolt(Operator, AddObjectHelper): if self.bf_Head_Type == 'bf_Head_Hex': col.prop(self, 'bf_Hex_Head_Height') col.prop(self, 'bf_Hex_Head_Flat_Distance') + elif self.bf_Head_Type == 'bf_Head_12Pnt': + col.prop(self, 'bf_12_Point_Head_Height') + col.prop(self, 'bf_12_Point_Head_Flat_Distance') + col.prop(self, 'bf_12_Point_Head_Flange_Dia') elif self.bf_Head_Type == 'bf_Head_Cap': col.prop(self, 'bf_Cap_Head_Height') col.prop(self, 'bf_Cap_Head_Dia') @@ -336,8 +392,16 @@ class add_mesh_bolt(Operator, AddObjectHelper): # Nut if self.bf_Model_Type == 'bf_Model_Nut': col.prop(self, 'bf_Nut_Type') - col.prop(self, 'bf_Hex_Nut_Height') - col.prop(self, 'bf_Hex_Nut_Flat_Distance') + if self.bf_Nut_Type == "bf_Nut_12Pnt": + col.prop(self, 'bf_12_Point_Nut_Height') + col.prop(self, 'bf_12_Point_Nut_Flat_Distance') + col.prop(self, 'bf_12_Point_Nut_Flange_Dia') + else: + col.prop(self, 'bf_Hex_Nut_Height') + col.prop(self, 'bf_Hex_Nut_Flat_Distance') + + + # Thread col.label(text='Thread') if self.bf_Model_Type == 'bf_Model_Bolt': |