#debug "\nCreation des Plinthes .......\n"
#declare Piece_Plinthes_Droite =

//***** Mur Droite *****
#declare X_Position = X_Piece;
#declare Z_Position = Z_Piece;
#declare Bas  = Hau_Parquet;
#declare Haut = Hau_Parquet + Hau_Plinthe ;
union{
   difference{
      union{
      box{<X_Position,Bas,Z_Position + E_Papier>,<X_Position - Lon_Plinthe_2 - E_Papier + 0.5,Haut,Z_Position + E_Papier - Lar_Plinthe>}
      cylinder{<X_Position,Haut,Z_Position + E_Papier>,<X_Position - Lon_Plinthe_2 - E_Papier + 0.5,Haut,Z_Position + E_Papier>,Lar_Plinthe}
         texture{Tex_Plinthes rotate 90 * y}
           }
      box{<X_Position ,Hau_Parquet,Z_Position + E_Papier>,<X_Position - Lon_Plinthe_2 - E_Papier,Hau_Parquet + Hau_Plinthe + Lar_Plinthe,Z_Position + E_Papier + E_Platre>pigment{color<1,1,1> filter 1}}
             }
#declare X_Position = X_Position - Lon_Plinthe_2 - E_Papier;
   difference{
      union{
         box{<X_Position ,Bas,Z_Position + E_Papier>,<X_Position + 0.5,Haut,Z_Position + E_Papier - Lar_Plinthe>texture{Tex_Noire}}
         cylinder{<X_Position ,Haut,Z_Position + E_Papier>,<X_Position + 0.5,Haut,Z_Position + E_Papier>,Lar_Plinthe texture{Tex_Noire}}

         box{<X_Position,Bas,Z_Position + E_Papier>,<X_Position - Lon_Plinthe_1 + 0.5,Haut,Z_Position + E_Papier - Lar_Plinthe>}
         cylinder{<X_Position,Haut,Z_Position + E_Papier>,<X_Position - Lon_Plinthe_1 + 0.5,Haut,Z_Position + E_Papier>,Lar_Plinthe}
            texture{Tex_Plinthes rotate 89 * y}
           }
      box{<X_Position ,Hau_Parquet,Z_Position + E_Papier>,<X_Position - Lon_Plinthe_1,Hau_Parquet + Hau_Plinthe + Lar_Plinthe,Z_Position + E_Papier + E_Platre>texture{Tex_Invisible}}
             }
#declare X_Position = X_Position - Lon_Plinthe_1;
   difference{
      union{
         box{<X_Position ,Bas,Z_Position + E_Papier>,<X_Position + 0.5,Haut,Z_Position + E_Papier - Lar_Plinthe>texture{Tex_Noire}}
         cylinder{<X_Position ,Haut,Z_Position + E_Papier>,<X_Position + 0.5,Haut,Z_Position + E_Papier>,Lar_Plinthe texture{Tex_Noire}}

         box{<X_Position,Bas,Z_Position + E_Papier>,<X_Position - Lon_Plinthe_1,Haut,Z_Position + E_Papier - Lar_Plinthe>}
         cylinder{<X_Position,Haut,Z_Position + E_Papier>,<X_Position - Lon_Plinthe_1,Haut,Z_Position + E_Papier>,Lar_Plinthe}
            texture{Tex_Plinthes rotate 91 * y}
           }
      union{
         box{<X_Position ,Hau_Parquet,Z_Position + E_Papier>,<X_Position - Lon_Plinthe_1,Hau_Parquet + Hau_Plinthe + Lar_Plinthe,Z_Position + E_Papier + E_Platre>texture{Tex_Invisible}}
         box{<-4,Bas,4>,<2,Haut+100,0> texture{Tex_Invisible} rotate 45*y translate <X_Position - Lon_Plinthe_1,0,Z_Position - E_Papier - E_Platre+.5>}
           }
              }
     }

#declare Piece_Plinthes_Gauche =


//***** Mur Gauche *****
#declare X_Position = X_Piece - 2 * Lon_Plinthe_1 - Lon_Plinthe_2 - E_Papier;
#declare Z_Position = Z_Piece;
union{
   difference{
      union{
         box{<X_Position,Bas, Z_Position + E_Papier>,<X_Position + Lar_Plinthe,Haut,Z_Position - Lon_Plinthe_2 + 0.5>}
         cylinder{<X_Position,Haut,Z_Position + E_Papier>,<X_Position,Haut,Z_Position - Lon_Plinthe_2 + 0.5>,Lar_Plinthe}
            texture{Tex_Plinthes rotate 0.5 * y}
           }
         box{<X_Position ,Hau_Parquet,Z_Position + E_Papier>,<X_Position - Lar_Plinthe,Hau_Parquet + Hau_Plinthe + Lar_Plinthe,Z_Position  - Lon_Plinthe_2>texture{Tex_Invisible}}
         box{<-4,Bas,4>,<2,Haut+100,0> texture{Tex_Invisible} rotate 45*y translate <X_Position + 2.75,0,Z_Position + 2 * E_Papier - E_Platre >}
             }
#declare Z_Position = Z_Position - Lon_Plinthe_2;
   difference{
      union{
         box{<X_Position,Bas, Z_Position + 0.5>,<X_Position + Lar_Plinthe,Haut,Z_Position> texture{Tex_Noire}}
         cylinder{<X_Position,Haut,Z_Position + 0.5>,<X_Position,Haut,Z_Position>,Lar_Plinthe texture{Tex_Noire}}

         box{<X_Position,Bas, Z_Position>,<X_Position + Lar_Plinthe,Haut,Z_Position - Lon_Plinthe_1 + 0.5>}
         cylinder{<X_Position,Haut,Z_Position>,<X_Position,Haut,Z_Position - Lon_Plinthe_1 + 0.5>,Lar_Plinthe}
            texture{Tex_Plinthes rotate 1 * y}
           }
         box{<X_Position ,Hau_Parquet,Z_Position>,<X_Position - Lar_Plinthe,Hau_Parquet + Hau_Plinthe + Lar_Plinthe,Z_Position  - Lon_Plinthe_1>texture{Tex_Invisible}}
             }
#declare Z_Position = Z_Position - Lon_Plinthe_1;
   difference{
      union{
         box{<X_Position,Bas, Z_Position + 0.5>,<X_Position + Lar_Plinthe,Haut,Z_Position> texture{Tex_Noire}}
         cylinder{<X_Position,Haut,Z_Position + 0.5>,<X_Position,Haut,Z_Position>,Lar_Plinthe texture{Tex_Noire}}

         box{<X_Position,Bas, Z_Position>,<X_Position + Lar_Plinthe,Haut,Z_Position - Lon_Plinthe_1>}
         cylinder{<X_Position,Haut,Z_Position>,<X_Position,Haut,Z_Position - Lon_Plinthe_1>,Lar_Plinthe}
            texture{Tex_Plinthes rotate 1 * y}
           }
         box{<X_Position ,Hau_Parquet,Z_Position>,<X_Position - Lar_Plinthe,Hau_Parquet + Hau_Plinthe + Lar_Plinthe,Z_Position  - Lon_Plinthe_1>texture{Tex_Invisible}}
             }


     }

 //***** Plinthes *****
 #declare Piece_Plinthes =
 union{
 object{Piece_Plinthes_Droite}
 object{Piece_Plinthes_Gauche}
     }
