protected override List <IEntity3D> GetFinalPreview() { var rslt = new List <IEntity2D>(); var zMax = InizioZ + Sovrametallo; var zMin = InizioZ; var l1 = new Line2D { Start = new Point2D(zMax, DiametroMax), End = new Point2D(zMin, DiametroMax) }; var l2 = new Line2D { Start = l1.End, End = new Point2D(zMin, DiametroMin) }; var l3 = new Line2D { Start = l2.End, End = new Point2D(zMax, DiametroMin) }; var l4 = new Line2D { Start = l3.End, End = l1.Start }; rslt.Add(l1); rslt.Add(l2); rslt.Add(l3); rslt.Add(l4); var d = Entity3DHelper.Get3DProfile(rslt); Entity3DHelper.SetPlotStyle(d); return(new List <IEntity3D>(d)); }
protected override List <IEntity3D> GetFinalPreview() { try { return(Entity3DHelper.Get3DProfile(Profile.GetProfileResult(false).Source).ToList()); } catch (Exception ex) { } return(null); }
/// <summary> /// Ritorna anteprima della lavorazione /// </summary> /// <returns></returns> protected override List <IEntity3D> GetFinalPreview() { try { if (Pattern != null) { var preview = Pattern.GetClosedProfile().Source; return(Entity3DHelper.Get3DProfile(preview).ToList()); } } catch (Exception ex) { } return(null); }
public IEnumerable <IEntity3D> GetPreview() { try { _rawProfile.Syncronize(GetProfile()); var prof2d = _rawProfile.GetProfileResult(true).Source; return(Entity3DHelper.Get3DProfile(prof2d).ToList()); } catch (Exception ex) { throw new Exception("ProfileEditorViewModel.GetPreview"); } return(null); }
/// <summary> /// Ritorna anteprima della lavorazione /// </summary> /// <returns></returns> protected override List <IEntity3D> GetFinalPreview() { var p = GetTextProfiles(); var preview = new List <IEntity3D>(); foreach (var profile2D in p) { profile2D.SetPlotStyle(); var pp = Entity3DHelper.Get3DProfile(profile2D.Source).ToList(); preview.AddRange(pp); } return(preview); }
/// <summary> /// Ritorna anteprima della lavorazione /// </summary> /// <returns></returns> protected override List <IEntity3D> GetFinalPreview() { if (Pattern != null) { /* * qui magari fare ovverride per schermo profilo .. * oppure quando width รจ 0 creo solo un profilo orginale * * per sbocciare magari fare la 3d wirewframe * */ var preview = Pattern.GetClosedProfile(); /* * faccio offset esterno e uno interno */ var offsetValue = Larghezza / 2; var profileExt = preview.Offset(offsetValue, true); var profileInt = preview.Offset(-offsetValue, true); if ((profileExt != null && profileExt.Count > 0) && (profileInt != null && profileInt.Count > 0)) { var rslt = new List <IEntity2D>(); profileExt[0].SetPlotStyle(); profileInt[0].SetPlotStyle(); rslt.AddRange(profileExt[0].Source); rslt.AddRange(profileInt[0].Source); return(Entity3DHelper.Get3DProfile(rslt).ToList()); } } return(null); }
protected override List <IEntity3D> GetFinalPreview() { var rslt = new List <IEntity2D>(); for (int i = 0; i < NumeroGole; i++) { switch (ScanalaturaType) { case GrooveDirection.Intern: case GrooveDirection.Extern: { var step = i * DistanzaGole; var startZ = StartZ - step; var endZ = startZ + Larghezza; var p = new Line2D { Start = { X = startZ, Y = DiameterIniziale }, End = { X = startZ, Y = DiameterFinale } }; var p1 = new Line2D { Start = p.End, End = { X = endZ, Y = p.End.Y } }; var p2 = new Line2D { Start = p1.End, End = { X = p1.End.X, Y = DiameterIniziale } }; rslt.Add(p); rslt.Add(p1); rslt.Add(p2); } break; case GrooveDirection.Face: { var step = i * DistanzaGole; var startD = DiameterIniziale + step; var endD = DiameterFinale + step; var endZ = StartZ - Larghezza; var p = new Line2D { Start = { X = StartZ, Y = startD }, End = { X = endZ, Y = startD } }; var p1 = new Line2D { Start = p.End, End = { X = endZ, Y = endD } }; var p2 = new Line2D { Start = p1.End, End = { X = StartZ, Y = endD } }; rslt.Add(p); rslt.Add(p1); rslt.Add(p2); } break; } } var l = Entity3DHelper.Get3DProfile(rslt); Entity3DHelper.SetPlotStyle(l); return(new List <IEntity3D>(l)); }
/// <summary> /// Come anteprima creo rettangolo.. /// </summary> /// <returns></returns> protected override List <IEntity3D> GetFinalPreview() { var diaExt = MaschiaturaSelezionata.DiametroMetrico; var passo = MaschiaturaSelezionata.Passo; var diaMin = diaExt - passo; var zIni = ZIniziale; var zEnd = ZIniziale - LunghezzaFiletto; var p = new Profile2D(); var l1 = new Line2D { Start = new Point2D { X = zIni, Y = diaExt, }, End = new Point2D { X = zEnd, Y = diaExt, } }; var l2 = new Line2D { Start = l1.End, End = new Point2D { X = zEnd, Y = diaMin, } }; var l3 = new Line2D { Start = l2.End, End = new Point2D { X = zIni, Y = diaMin, } }; var l4 = new Line2D { Start = l3.End, End = l1.Start, }; p.AddEntity(l1); p.AddEntity(l2); p.AddEntity(l3); p.AddEntity(l4); p.SetPlotStyle(); var l = Entity3DHelper.Get3DProfile(p.Source); return(new List <IEntity3D>(l)); }