Exemplo n.º 1
0
 /// <summary>
 /// Returns the distance of this PrintPoint to another.
 /// </summary>
 /// <param name="p"></param>
 /// <returns></returns>
 public double DistanceTo(V2GPrintPosition p)
 {
     return(Math.Sqrt(
                (this.X - p.X) * (this.X - p.X) +
                (this.Y - p.Y) * (this.Y - p.Y) +
                (this.Z - p.Z) * (this.Z - p.Z)
                ));
 }
Exemplo n.º 2
0
 public void AddPrintPosition(V2GPrintPosition printPosition)
 {
     this.Speed          = printPosition.Speed;
     this.MaterialAmount = printPosition.MaterialAmount;
     this.Head           = printPosition.Head;
     this.MixPercentage  = printPosition.MixPercentage;
     this.PrintPositions.Add(printPosition);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Substract the coordinates of specified V2GPrintPoint to this one.
 /// </summary>
 /// <param name="p"></param>
 public void Substract(V2GPrintPosition p)
 {
     this.X += -p.X;
     this.Y += -p.Y;
     this.Z += -p.Z;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Add the coordinates of specified V2GPrintPoint to this one.
 /// </summary>
 /// <param name="p"></param>
 public void Add(V2GPrintPosition p)
 {
     this.X += p.X;
     this.Y += p.Y;
     this.Z += p.Z;
 }