public ClassCouple(UltraProbe pro, UltraWedge wed, UTPosition pos, Groove gro, int startele, int skewflag) { probe = pro; wedge = wed; groove = gro; position = pos; grooveheight = groove.height.Sum(); beamfile = CoupleDelay(startele, skewflag); }
public Product() { sample = new Sample(); //subregions=new List<Subregion>(); groove = new Groove(); name = ""; length = 0; thickness = 0; outsize = 0; weldingMaterial = ""; }
public FormFocus(MainForm mainform, Groove gro, UltraWedge wed, UltraProbe pro, UTPosition pos) { InitializeComponent(); MultiLanguage.getNames(this); SetDefaultGate(); formgatesetting = new FormGateSetting(this, gateB); //Getpara(); this.mainform = mainform; groove = gro; wedge = wed; probe = pro; position = pos; grooveheight = groove.height.Sum(); AutoSetpara(); }
public BeamPara(ClassChanpara chanpara, Groove gro, UltraWedge wed, UltraProbe pro, UTPosition pos, GateInformation gate) { this.gate = gate; xd = chanpara.defectX; yd = chanpara.defectY; groove = gro; wedge = wed; probe = pro; position = pos; grooveheight = groove.height.Sum(); skewflag = GetSkewflag(chanpara.skew); if (chanpara.method == (int)PathMethod.Direct) { activele[0] = chanpara.activenb[0]; linepoint[0] = Direct(xd, yd, chanpara.interfaceAngle[0]); index = linepoint[0].x[1]; centerele[0] = Centerelement(index, chanpara.interfaceAngle[0], activele[0]); } else if (chanpara.method == (int)PathMethod.Reflect) { activele[0] = chanpara.activenb[0]; linepoint[0] = Reflect(xd, yd, chanpara.interfaceAngle[0]); index = linepoint[0].x[2]; centerele[0] = Centerelement(index, chanpara.interfaceAngle[0], activele[0]); } else if (chanpara.method == (int)PathMethod.Series) { activele[0] = chanpara.activenb[0]; activele[1] = chanpara.activenb[1]; linepoint[0] = Reflect(xd, yd, chanpara.interfaceAngle[0]); index = linepoint[0].x[2]; centerele[0] = Centerelement(index, chanpara.interfaceAngle[0], activele[0]); linepoint[1] = DoubleReflect(xd, yd, chanpara.interfaceAngle[1]); index = linepoint[1].x[3]; centerele[1] = Centerelement(index, chanpara.interfaceAngle[1], activele[1]); } CaculateFocuspoint(); beamfile = GetBeamfile(xd, yd, centerele, chanpara.interfaceAngle, chanpara.method); arrowpoint = GetArrow(linepoint, chanpara.method); GetPathtime(chanpara.method); }
/**Set Vgroove Defect.*/ private void VGroove(Groove groove, double zonestep) { int i = 0; double prehigh = 0; Defectpoint defectpoint = new Defectpoint(); double reflecthigh = 0; double directhigh = 0; double reflectangle = 0; double[] reflectzone; double[] directzone; reflecthigh = groove.height[0]; directhigh = groove.height[1]; reflectangle = 90 - groove.angle[0]; reflectzone = Getzone(reflecthigh, zonestep, ref reflectcount); directzone = Getzone(directhigh, zonestep, ref directcount); seriescount = 0; //direct for (i = 0; i < reflectcount; i++) { defectpoint = new Defectpoint(); defectpoint.defectY = prehigh + reflectzone[i] / 2; defectpoint.defectX = (reflecthigh - defectpoint.defectY) / Math.Tan(BeamPara.TurntoRadian(reflectangle)); defectpoint.defectangle = 90; defectlist.Add(defectpoint); prehigh += reflectzone[i]; } prehigh = 0; for (i = 0; i < directcount; i++) { defectpoint = new Defectpoint(); defectpoint.defectY = reflecthigh + prehigh + directzone[i] / 2; defectpoint.defectX = 0; defectpoint.defectangle = 70; defectlist.Add(defectpoint); prehigh += directzone[i]; } }
public FormModify(FormFocus fromFocus, int flag, Groove gro, int meth) { InitializeComponent(); MultiLanguage.getNames(this); this.formFocus = fromFocus; modifyflag = flag; groove = gro; method = meth; if (modifyflag == 0) { methodlabel.Visible = false; methodbox.Visible = false; } Yrange.Text = ""; Anglerange.Text = ""; if (modifyflag == 0) { Setrange(); } }
public AutoSet(Groove groove, double zonestep) { switch (groove.type) { case GrooveType.V: VGroove(groove, zonestep); break; case GrooveType.X: XGroove(groove, zonestep); break; case GrooveType.CRC: CRCGroove(groove, zonestep); break; default: MessageShow.show("testblock type error", "坡口类型错误"); break; } }
/**Set CRCgroove Defect.*/ private void CRCGroove(Groove groove, double zonestep) { double h = groove.height.Sum(); //manual set CRC para int i = 0; int direct1count = 0; int direct2count = 0; double prehigh = 0; Defectpoint defectpoint = new Defectpoint(); double serieshigh = groove.height[0]; double reflecthigh = groove.height[1]; double direct1high = groove.height[2]; double direct2high = groove.height[3]; double seriesangle = BeamPara.TurntoRadian(groove.angle[0]); double reflectangle = BeamPara.TurntoRadian(groove.angle[1]); double directangle = BeamPara.TurntoRadian(groove.angle[2]); double[] reflectzone; double[] serieszone; double[] direct1zone; double[] direct2zone; reflectzone = Getzone(reflecthigh, zonestep, ref reflectcount); serieszone = Getzone(serieshigh, zonestep, ref seriescount); direct1zone = Getzone(direct1high, zonestep, ref direct1count); direct2zone = Getzone(direct2high, zonestep, ref direct2count); directcount = direct1count + direct2count; for (i = 0; i < seriescount; i++) { defectpoint = new Defectpoint(); defectpoint.defectY = prehigh + serieszone[i] / 2; defectpoint.defectX = reflecthigh * Math.Tan(reflectangle) + (serieshigh - defectpoint.defectY) * Math.Tan(seriesangle); defectpoint.defectangle = 45; defectlist.Add(defectpoint); prehigh += serieszone[i]; } prehigh = 0; for (i = 0; i < reflectcount; i++) { defectpoint = new Defectpoint(); defectpoint.defectY = serieshigh + prehigh + reflectzone[i] / 2; defectpoint.defectX = (reflecthigh + serieshigh - defectpoint.defectY) * Math.Tan(reflectangle); defectpoint.defectangle = 90; defectlist.Add(defectpoint); prehigh += reflectzone[i]; } prehigh = 0; for (i = 0; i < direct1count; i++) { defectpoint = new Defectpoint(); defectpoint.defectY = serieshigh + reflecthigh + prehigh + direct1zone[i] / 2; defectpoint.defectX = 0; defectpoint.defectangle = 70; defectlist.Add(defectpoint); prehigh += direct1zone[i]; } prehigh = 0; for (i = 0; i < direct2count; i++) { defectpoint = new Defectpoint(); defectpoint.defectY = serieshigh + reflecthigh + direct1high + prehigh + direct2zone[i] / 2; defectpoint.defectX = (defectpoint.defectY - (h - direct2high)) * Math.Tan(directangle); defectpoint.defectangle = 90; defectlist.Add(defectpoint); prehigh += direct2zone[i]; } }