public BeamPara(ClassChanpara chanpara, testBlock block, wedge wed, probe pro, position pos) { double xd = 0; double yd = 0; testblock = block; Wedge = wed; Probe = pro; Position = pos; activele = chanpara.activenb[0]; skewflag = GetSkewflag(chanpara.skew); if (chanpara.method == 0) { xd = chanpara.defectX; yd = chanpara.defectY; point = Direct(xd, yd, chanpara.interfaceAngle[0]); index = point.x[1]; } else if (chanpara.method == 1) { xd = chanpara.defectX; yd = 2 * testblock.BlockHeight - chanpara.defectY; point = Reflect(chanpara.defectX, chanpara.defectY, chanpara.interfaceAngle[0]); index = point.x[2]; } centerele = Centerelement(index, chanpara.interfaceAngle[0]); beamfile = Dealytime(xd, yd, centerele, chanpara.interfaceAngle[0]); }
public DrawPoint Reflect(double defectX, double defectY, double angle) { DrawPoint point = new DrawPoint(); double xc = 0; double yc = 0; double xi = 0; double xr = 0; double radioangle = 0; radioangle = TurntoRadian(angle); xc = defectX; yc = 2 * testblock.BlockHeight - defectY; xi = (xc + yc * Math.Tan(radioangle)); xr = (xc + (yc - testblock.BlockHeight) * Math.Tan(radioangle)); point.x[0] = defectX; point.y[0] = defectY; point.x[1] = xr; point.y[1] = testblock.BlockHeight; point.x[2] = xi; point.y[2] = 0; point.count = 3; return(point); }
public static DrawPoint Reflect(float defectX, float defectY, float height, float angle) { DrawPoint point = new DrawPoint(); float xc = 0; float yc = 0; float xi = 0; float xr = 0; float radioangle = 0; radioangle = TurntoRadian(angle); xc = defectX; yc = 2 * height - defectY; xi = (float)(xc + yc * Math.Tan(radioangle)); xr = (float)(xc + (yc - height) * Math.Tan(radioangle)); point.x[0] = defectX; point.y[0] = defectY; point.x[1] = xr; point.y[1] = height; point.x[2] = xi; point.y[2] = 0; point.count = 3; return(point); }
/**Draw the Vgroove.*/ private void Vgroovedraw() { DrawPoint point = new DrawPoint(); double yv = testblock.BlockHeight - testblock.BottomLength; double Vangle = BeamPara.TurntoRadian(testblock.VAngle); double xv = (yv / Math.Tan(Vangle)); wavepath.Series.Clear(); wavepath.Axes.Left.Maximum = testblock.BlockHeight + 1; point.x[0] = LEFTBORDER; point.y[0] = 0; point.x[1] = -xv; point.y[1] = 0; point.x[2] = 0; point.y[2] = yv; point.x[3] = 0; point.y[3] = testblock.BlockHeight; point.x[4] = 0; point.y[4] = yv; point.x[5] = xv; point.y[5] = 0; point.x[6] = RIGHTBORDER; point.y[6] = 0; point.count = 7; Draw.testline(point, Color.Black, wavepath); point = new DrawPoint(); point.x[0] = LEFTBORDER; point.y[0] = testblock.BlockHeight; point.x[1] = RIGHTBORDER; point.y[1] = testblock.BlockHeight; point.count = 2; Draw.testline(point, Color.Black, wavepath); }
public static void testline(DrawPoint point, Color color, TChart chart) { int i = 0; Steema.TeeChart.Styles.Line Tmpline = new Steema.TeeChart.Styles.Line(chart.Chart); for (i = 0; i < point.count; i++) { Tmpline.Add(point.x[i], point.y[i]); } Tmpline.Color = color; //LineSeries bounding lines colour }
/**Draw the CRCgroove.*/ private void CRCgroovedraw() { wavepath.Series.Clear(); double h0 = 6.27; double h1 = 2.82; double h2 = 1; double h3 = 1.91; double h = h0 + h1 + h2 + h3; double angle0 = BeamPara.TurntoRadian(5); double angle1 = BeamPara.TurntoRadian(45); double angle2 = BeamPara.TurntoRadian(37.5); DrawPoint point = new DrawPoint(); wavepath.Axes[0].Maximum = h + 1; point.x[0] = LEFTBORDER; point.y[0] = 0; point.x[1] = -(h0 * Math.Tan(angle0) + h1 * Math.Tan(angle1)); point.y[1] = 0; point.x[2] = -h1 *Math.Tan(angle1); point.y[2] = h0; point.x[3] = 0; point.y[3] = h0 + h1; point.x[4] = 0; point.y[4] = h0 + h1 + h2; point.x[5] = 0; point.y[5] = h0 + h1; point.x[6] = h1 * Math.Tan(angle1); point.y[6] = h0; point.x[7] = h0 * Math.Tan(angle0) + h1 * Math.Tan(angle1); point.y[7] = 0; point.x[8] = RIGHTBORDER; point.y[8] = 0; point.count = 9; Draw.testline(point, Color.Green, wavepath); point = new DrawPoint(); point.x[0] = LEFTBORDER; point.y[0] = h; point.x[1] = -h3 *Math.Tan(angle2); point.y[1] = h; point.x[2] = 0; point.y[2] = h - h3; point.x[3] = h3 * Math.Tan(angle2); point.y[3] = h; point.x[4] = RIGHTBORDER; point.y[4] = h; point.count = 5; Draw.testline(point, Color.Green, wavepath); }
public DrawPoint Direct(double defectX, double defectY, double angle) { DrawPoint point = new DrawPoint(); double xi = 0; double radioangle = 0; radioangle = TurntoRadian(angle); xi = defectX + defectY * Math.Tan(radioangle); point.x[0] = defectX; point.y[0] = defectY; point.x[1] = xi; point.y[1] = 0; point.count = 2; return(point); }
/**Draw the reflectpath.*/ private void ReflectPathdraw(DrawPoint point) { Draw.testline(point, Color.Red, wavepath); }