private void GetDowBaseModel() { List <MoldBaseModel> down = analysis.GetDownModel(this.moldbase); if (down.Count > 0) { if (down[down.Count - 1].DisPt.Z * 2 <= 10 && down.Count != 1) { down.RemoveAt(down.Count - 1); } if (UMathUtils.IsEqual(down[0].CenterPt.Z + down[0].DisPt.Z, this.BMoldBase.CenterPt.Z - this.BMoldBase.DisPt.Z) && UMathUtils.IsEqual(down[0].CenterPt.X, 0) && UMathUtils.IsEqual(down[0].CenterPt.Y, 0)) { this.SupportPlate = down[0]; this.SupportPlate.Name = "托板"; } if (down.Count > 1) { this.Baseplate = down[down.Count - 1]; this.Baseplate.Name = "底板"; } MoldBaseModel kon = this.analysis.GetKnockoutPlate(this.moldbase); if (kon != null) { this.PushPlate = kon; this.PushPlate.Name = "推板"; } List <MoldBaseModel> spa = this.analysis.GetSpacer(down); //方铁 if (spa.Count > 0) { this.Spacer.AddRange(spa); List <MoldBaseModel> eiec = this.analysis.GetEiectorPlates(this.moldbase, spa); if (eiec.Count != 0) { double max = eiec.Max(a => a.CenterPt.Z); foreach (MoldBaseModel mm in eiec) { if (UMathUtils.IsEqual(mm.CenterPt.Z, max)) { mm.Name = "面针板"; FaceEiectorPlates.Add(mm); } else { mm.Name = "底针板"; DowEiectorPlates.Add(mm); } } } } } foreach (MoldBaseModel mm in down) //无名板 { if (mm.Name == null || mm.Name.Equals("")) { this.OtherBaseModel.Add(mm); } } }
/// <summary> /// 获取上模板 /// </summary> protected override void GetUpBaseModel() { List <MoldBaseModel> up = analysis.GetUpModel(this.moldbase); if (up.Count > 0) { if (up[up.Count - 1].DisPt.Z <= 5 && up.Count != 1) { up.RemoveAt(up.Count - 1); } if (up.Count == 1) { this.UpBaseplate = up[0]; this.UpBaseplate.Name = "水口板"; } else { if (UMathUtils.IsEqual(up[0].CenterPt.Z - up[0].DisPt.Z, this.AMoldBase.CenterPt.Z + this.AMoldBase.DisPt.Z)) { this.ShuiSupportPlate = up[0]; this.ShuiSupportPlate.Name = "水口推板"; } this.UpBaseplate = up[up.Count - 1]; this.UpBaseplate.Name = "水口板"; } List <MoldBaseModel> spa = this.analysis.GetSpacer(up); //方铁 if (spa.Count > 0) { this.Spacer.AddRange(spa); List <MoldBaseModel> eiec = this.analysis.GetEiectorPlates(this.moldbase, spa); if (eiec.Count > 0) { double max = eiec.Max(a => a.CenterPt.Z); foreach (MoldBaseModel mm in eiec) { if (UMathUtils.IsEqual(mm.CenterPt.Z, max)) { mm.Name = "底针板"; DowEiectorPlates.Add(mm); } else { mm.Name = "面针板"; this.FaceEiectorPlates.Add(mm); } } } } } foreach (MoldBaseModel mm in up) //无名板 { if (mm.Name == null || mm.Name.Equals("")) { this.OtherBaseModel.Add(mm); } } }