Thanx i finally wrote the code now im facing another issue.
code is fine but calculations arent showing correct.
Private Sub Form1_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged
Dim Diametral_Pitch As Double
Dim Velocity_Ratio As Double
Dim gear As Double
Dim Pressure_Angle As Double
Dim Pressure_Angle_Result As Double
Dim Pressure_angle_Radian As Double
Dim addendum, addendum1, dedendum, dedendum1 As Double
Dim Clearance, Clearance1 As Double
'Pinion Parameteres
Dim Pinion1, Pitch_Radiusp1, Pitch_Radiusp2 As Double
Dim Base_Circlep1, Base_Circlep2 As Double
Dim Outer_Circlep1, Outer_Circlep2 As Double
Dim Working_Depthp1, Working_Depthp2 As Double
Dim root_radiusp1, root_radiusp2 As Double
Dim Whole_depthp1, Whole_depthp2 As Double
'Gear Dimmed parameters
Dim Pitch_radiusg1, Pitch_radiusg2 As Double
Dim Base_Circleg1, Base_Circleg2 As Double
Dim Outer_Circleg1, Outer_Circleg2 As Double
Dim Working_Depthg1, Working_Depthg2 As Double
Dim root_Circleg1, root_Circleg2 As Double
Dim Whole_depthg1, Whole_depthg2 As Double
Dim toolg1, toolg2 As Double
Dim rotation_angleg1, rotation_angleg2 As Double
gear = CDbl(gearteeth1.Text)
Pressure_Angle = CDbl(dp.Text)
Pressure_angle_Radian = CDbl(Pa.Text)
Pressure_Angle_Result = ((Pressure_angle_Radian * Math.PI) / 180)
Pitch_radiusg1 = (gear / Pressure_Angle) / 2
Gear_Features.Pitch_radiusg1.Text = Pitch_radiusg1.ToString
Pitch_radiusg2 = Pitch_radiusg1 * 25.4
Gear_Features.Pitch_radiusg2.Text = Pitch_radiusg2.ToString
Base_Circleg1 = Pitch_radiusg1 * Math.Cos(Pressure_Angle_Result)
Gear_Features.Base_Circleg1.Text = Base_Circleg1.ToString
Base_Circleg2 = Base_Circleg1 * 25.4
Gear_Features.Base_Circleg2.Text = Base_Circleg2.ToString
Outer_Circleg1 = Pitch_radiusg1 + addendum
Gear_Features.Outer_Circleg1.Text = Outer_Circleg1.ToString
Outer_Circleg2 = Outer_Circleg1 * 25.4
Gear_Features.Outer_Circleg2.Text = Outer_Circleg2.ToString
root_Circleg1 = Pitch_radiusg1 - dedendum
Gear_Features.Root_Circleg1.Text = root_Circleg1.ToString
root_Circleg2 = root_Circleg1 * 25.4
Gear_Features.Root_Circleg2.Text = root_Circleg2.ToString
Whole_depthg1 = addendum + dedendum
Gear_Features.Whole_depthg1.Text = Whole_depthg1.ToString
Whole_depthg2 = Whole_depthg1 * 25.4
Gear_Features.Whole_depthg2.Text = Whole_depthg2.ToString
Working_Depthg1 = 2 * addendum
Gear_Features.Working_Depthg1.Text = Working_Depthg1.ToString
Working_Depthg2 = Working_Depthg1 * 25.4
Gear_Features.Working_depthg2.Text = Working_Depthg2.ToString
toolg1 = Math.PI / (2 * Diametral_Pitch)
Gear_Features.Toolg1.Text = toolg1.ToString
toolg2 = toolg1 * 25.4
Gear_Features.Toolg2.Text = toolg2.ToString
Rotation_angleg1 = (toolg1 * (Pitch_radiusg1 / Base_Circleg1)) / Base_Circleg1
Gear_Features.Rotation_angleg1.Text = rotation_angleg1.ToString
rotation_angleg2 = (toolg1 * (Pitch_radiusg1 / Base_Circleg1)) / Base_Circleg1
Gear_Features.Rotation_angleg2.Text = rotation_angleg2.ToString
Pressure_angle_Radian = CDbl(Pa.Text)
Pressure_Angle_Result = ((Pressure_angle_Radian * Math.PI) / 180)
Diametral_Pitch = CDbl(dp.Text)
addendum = 1 / Diametral_Pitch
Common_Features.Addendum.Text = addendum.ToString
addendum1 = (addendum * 25.4)
Common_Features.Addendum1.Text = addendum1.ToString
If Diametral_Pitch < 20 Then
dedendum = (1.25 / Diametral_Pitch)
ElseIf Diametral_Pitch > 20 Then
dedendum = ((1.2 / Diametral_Pitch) + 0.002)
End If
Common_Features.Dedendum.Text = dedendum.ToString
dedendum1 = dedendum * 25.4
Common_Features.Dedendum1.Text = dedendum1.ToString
If Diametral_Pitch < 20 Then
Clearance = (0.25 / Diametral_Pitch)
ElseIf Diametral_Pitch > 20 Then
Clearance = ((0.2 / Diametral_Pitch) + 0.002)
End If
Common_Features.clearance.Text = Clearance.ToString
Clearance1 = Clearance * 25.4
Common_Features.clearance1.Text = Clearance1.ToString
Velocity_Ratio = CDbl(vr.Text)
Pinion1 = Math.Floor(Velocity_Ratio * gear)
Pinion_Features.pinion1.Text = Pinion1.ToString
Pitch_Radiusp1 = (Pinion1 / Diametral_Pitch) / 2
Pinion_Features.Pitch_Radiusp1.Text = Pitch_Radiusp1.ToString
Pitch_Radiusp2 = Pitch_Radiusp1 * 25.4
Pinion_Features.Pitch_Radiusp2.Text = Pitch_Radiusp2.ToString
Base_Circlep1 = Pitch_Radiusp1 * Math.Cos(Pressure_Angle_Result)
Pinion_Features.Base_Circlep1.Text = Base_Circlep1.ToString
Base_Circlep2 = Base_Circlep1 * 25.4
Pinion_Features.Base_Circlep2.Text = Base_Circlep2.ToString
Outer_Circlep1 = dedendum + Pitch_Radiusp1
Pinion_Features.Outer_Circlep1.Text = Outer_Circlep1.ToString
Outer_Circlep2 = Outer_Circlep1 * 25.4
Pinion_Features.Outer_Circlep2.Text = Outer_Circlep2.ToString
root_radiusp1 = (Pitch_Radiusp1 - dedendum)
Pinion_Features.Root_Radiusp1.Text = root_radiusp1.ToString
root_radiusp2 = root_radiusp1 * 25.4
Pinion_Features.Root_Radiusp2.Text = root_radiusp2.ToString
Whole_depthp1 = addendum + dedendum
Pinion_Features.Whole_Depthp1.Text = Whole_depthp1.ToString
Whole_depthp2 = Whole_depthp1 * 25.4
Pinion_Features.Whole_Depthp2.Text = Whole_depthp2.ToString
Working_Depthp1 = addendum * 2
Pinion_Features.Working_Depthp1.Text = Working_Depthp1.ToString
Working_Depthp2 = Working_Depthp1 * 25.4
Pinion_Features.Working_Depthp2.Text = Working_Depthp2.ToString
End Sub
End Class