Exemple #1
0
 public void MergeFrom(Command other)
 {
     if (other == null)
     {
         return;
     }
     if (other.CommandCode != 0)
     {
         CommandCode = other.CommandCode;
     }
     positions_.Add(other.positions_);
     if (other.mesh_ != null)
     {
         if (mesh_ == null)
         {
             mesh_ = new global::FossFab.Mesh();
         }
         Mesh.MergeFrom(other.Mesh);
     }
     if (other.Extrude != false)
     {
         Extrude = other.Extrude;
     }
     slices_.Add(other.slices_);
 }
Exemple #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 8: {
                    commandCode_ = (global::FossFab.Command.Types.CommandCode)input.ReadEnum();
                    break;
                }

                case 18: {
                    positions_.AddEntriesFrom(input, _repeated_positions_codec);
                    break;
                }

                case 26: {
                    if (mesh_ == null)
                    {
                        mesh_ = new global::FossFab.Mesh();
                    }
                    input.ReadMessage(mesh_);
                    break;
                }

                case 32: {
                    Extrude = input.ReadBool();
                    break;
                }

                case 42: {
                    slices_.AddEntriesFrom(input, _repeated_slices_codec);
                    break;
                }
                }
            }
        }