private void button1_Click(object sender, EventArgs e) { FloatInput imput = new FloatInput((TextBoxImputable)this.textBoxTest1); float strenght = imput.getValue(); if (imput.getConvertionStatus()) { Figure figure = new Figure(); figure.Add(new Point2(0, 0)); figure.Add(new Point2(2000, 0)); RDMengine engine = new RDMengine(figure, 1, 1); Figure results = engine.calculateDeformation(figure[0], figure[1], null, new Screw(new float[] { 0, strenght, 0, 0, 0, 0 }, figure[0].toVector()), false); show(results); } }
private void button2_Click(object sender, EventArgs e) { FloatInput imput = new FloatInput((TextBoxImputable)this.textBoxTest2); float strenght = imput.getValue(); if (imput.getConvertionStatus()) { Figure figure = new Figure(); figure.Add(new Point2(0, 0)); figure.Add(new Point2(2000, 0)); figure.Add(new Point2(2000, 2000)); figure.Add(new Point2(0, 2000)); RDMengine engine = new RDMengine(figure, 1, 1); Screw screw = new Screw(new float[] { 0, strenght, 0, 0, 0, 0 }, new Point2(0, 1000).toVector()); /*Assert.AreEqual( * engine.getDeformationFunctionY(2000, 1000, 0, (float)(-5.0 * Math.Pow(10, -8)), true, 2).calcY(1000), * engine.getDeformationFunctionY(2000, 1000, 0, (float)(-5.0 * Math.Pow(10, -8)), false, 2).calcY(1000) * );*/ Figure results1 = engine.calculateDeformation(figure[0], figure[1], screw, null, true); show(results1); } }