Proposed fixes to 'Incorrect scale of created bolts' #10

Merged
Nika Kutsniashvili merged 1 commits from linux_dr/add_mesh_BoltFactory:losborn_PR5_FIXUP_scale into main 2024-08-20 16:24:27 +02:00
2 changed files with 7 additions and 7 deletions
Showing only changes of commit a2241a2dcd - Show all commits

View File

@ -26,7 +26,7 @@ class add_mesh_bolt(Operator, AddObjectHelper):
bl_options = {'REGISTER', 'UNDO', 'PRESET'}
bl_description = "Construct many types of Bolts"
MAX_INPUT_NUMBER = 50 # mm
MAX_INPUT_NUMBER = 250 # mm
Bolt: BoolProperty(name="Bolt",
default=True,
@ -264,16 +264,16 @@ class add_mesh_bolt(Operator, AddObjectHelper):
description='Inside diameter of the Thread',
unit='LENGTH',
)
bf_Crest_Percent: IntProperty(
bf_Crest_Percent: FloatProperty(
attr='bf_Crest_Percent',
name='Crest Percent', default=10,
name='Crest Percent', default=12.5,
min=1, soft_min=1,
max=90,
description='Percent of the pitch that makes up the Crest',
)
bf_Root_Percent: IntProperty(
bf_Root_Percent: FloatProperty(
attr='bf_Root_Percent',
name='Root Percent', default=10,
name='Root Percent', default=25,
min=1, soft_min=1,
max=90,
description='Percent of the pitch that makes up the Root',

View File

@ -2396,7 +2396,7 @@ def Bolt_Mesh(props, context):
elif props.bf_Head_Type == 'bf_Head_Cap':
Head_Verts, Head_Faces, Head_Height = Create_Cap_Head(
Bit_Dia, props.bf_Cap_Head_Dia / GLOBAL_SCALE,
props.bf_Shank_Dia, props.bf_Cap_Head_Height / GLOBAL_SCALE,
props.bf_Shank_Dia / GLOBAL_SCALE, props.bf_Cap_Head_Height / GLOBAL_SCALE,
props.bf_Cap_Head_Dia / GLOBAL_SCALE * (1.0 / 19.0),
props.bf_Cap_Head_Dia / GLOBAL_SCALE * (1.0 / 19.0),
props.bf_Div_Count
@ -2418,7 +2418,7 @@ def Bolt_Mesh(props, context):
elif props.bf_Head_Type == 'bf_Head_CounterSink':
Head_Verts, Head_Faces, Head_Height = Create_CounterSink_Head(
Bit_Dia, props.bf_CounterSink_Head_Dia / GLOBAL_SCALE,
props.bf_Shank_Dia, props.bf_CounterSink_Head_Dia / GLOBAL_SCALE,
props.bf_Shank_Dia / GLOBAL_SCALE, props.bf_CounterSink_Head_Dia / GLOBAL_SCALE,
props.bf_CounterSink_Head_Dia / GLOBAL_SCALE * (0.09 / 6.31),
props.bf_Div_Count
)