public CamToAlibre(HypocycloidCam cam) { this.cam = cam; PinHeight = 10; BaseThickness = 5; motor = new Motor() { motorMountBore = 22, mountingHoles = 4, mountingHolePitchCircle = 2.0 * Math.Sqrt(Math.Pow(31.0 / 2.0, 2) * 2), mountingHoleDia = 3.2, mountingHoleCSDia = 7, shaftDia = 5 }; }
public CamToDxf(HypocycloidCam cam) { this.cam = cam; }
public HypoCycloidCamForm() { InitializeComponent(); this.camPanel = new CycloidDisplay(); this.camPanel.Anchor = panelPlaceHolder.Anchor; this.camPanel.BackColor = System.Drawing.SystemColors.Window; this.camPanel.Cam = null; this.camPanel.Location = panelPlaceHolder.Location; this.camPanel.Name = "camPanel"; this.camPanel.Size = panelPlaceHolder.Size; this.camPanel.TabIndex = 0; this.Controls.Add(this.camPanel); cam = new HypocycloidCam(); this.camPanel.Cam = cam; this.panelPlaceHolder.Visible = false; this.AutoScaleMode = AutoScaleMode.Dpi; cam.TeethInCAM = Properties.Settings.Default.TeethInCam; cam.RollerDiameter = Properties.Settings.Default.RollerDiameter; cam.PinBoltCircleDiameter = Properties.Settings.Default.PinBoltCircleDiameter; cam.Eccentricity = Properties.Settings.Default.Eccentricity; cam.ToothPitch = Properties.Settings.Default.ToothPitch; cam.PressureAngleLimit = Properties.Settings.Default.PressureAngleLimit; cam.OffsetInPressureAngle = Properties.Settings.Default.OffsetInPressureAngle; cam.OutputBearings = Properties.Settings.Default.OutputBearings; cam.OutputBearingsDia = Properties.Settings.Default.OutputBearingsDia; cam.OutputPitchCircleDia = Properties.Settings.Default.OutputPitchCircleDia; cam.EccentricBearingInnerDia = Properties.Settings.Default.EccentricBearingInnerDia; cam.EccentricBearingOuterDia = Properties.Settings.Default.EccentricBearingOuterDia; cam.CamThickness = Properties.Settings.Default.CamThickness; cam.CamPair = Properties.Settings.Default.CamPair; spinTeethInCam.Value = cam.TeethInCAM; spinRollerDiameter.Value = (decimal)cam.RollerDiameter; spinPinBoltCircleDiameter.Value = (decimal)cam.PinBoltCircleDiameter; spinEccentricity.Value = (decimal)cam.Eccentricity; spinToothPitch.Value = (decimal)cam.ToothPitch; spinPressureAngleLimit.Value = (decimal)cam.PressureAngleLimit; spinOffsetInPressureAngle.Value = (decimal)cam.OffsetInPressureAngle; spinOutputBearings.Value = cam.OutputBearings; spinOutputBearingsDia.Value = (decimal)cam.OutputBearingsDia; spinOutputPitchCircleDia.Value = (decimal)cam.OutputPitchCircleDia; spinEccentricBearingInnerDia.Value = (decimal)cam.EccentricBearingInnerDia; spinEccentricBearingOuterDia.Value = (decimal)cam.EccentricBearingOuterDia; spinCamThickness.Value = (decimal)cam.CamThickness; chkCamPair.Checked = cam.CamPair; spinTeethInCam.ValueChanged += SpinTeethInCam_ValueChanged; spinRollerDiameter.ValueChanged += SpinRollerDiameter_ValueChanged; spinPinBoltCircleDiameter.ValueChanged += SpinPinBoltCircleDiameter_ValueChanged; spinEccentricity.ValueChanged += SpinEccentricity_ValueChanged; spinToothPitch.ValueChanged += SpinToothPitch_ValueChanged; spinPressureAngleLimit.ValueChanged += SpinPressureAngleLimit_ValueChanged; spinOffsetInPressureAngle.ValueChanged += SpinOffsetInPressureAngle_ValueChanged; spinOutputBearings.ValueChanged += OtherValues_Changed; spinOutputBearingsDia.ValueChanged += OtherValues_Changed; spinOutputPitchCircleDia.ValueChanged += OtherValues_Changed; spinEccentricBearingInnerDia.ValueChanged += OtherValues_Changed; spinEccentricBearingOuterDia.ValueChanged += OtherValues_Changed; spinCamThickness.ValueChanged += OtherValues_Changed; chkCamPair.Click += OtherValues_Changed; Regen(); }