\section{Controlling the bounding box}
From the \tkzimp{PgfManual}: 

"When you add the clip option, the current path is used for clipping subsequent drawings. Clipping never enlarges the clipping area. Thus, when you clip against a certain path and then clip again against another path, you clip against the intersection of both.
The only way to enlarge the clipping path is to end the {pgfscope} in which the clipping was done. At the end of a {pgfscope} the clipping path that was in force at the beginning of the scope is reinstalled."


First of all, with \TIKZ\ you don't have to deal with the size of the bounding box. Early versions of \tkzNamePack{tkz-euclide} did not control it; since version 4, the size of the bounding box is limited.

The initial bounding box after using the macro \tkzcname{tkzInit} is defined by the rectangle based on the points $(0,0)$ and $(10,10)$. The macro \tkzcname{tkzInit} modifies this initial bounding box with the arguments \tkzname{xmin}, \tkzname{xmax}, \tkzname{ymin} and \tkzname{ymax}. Of course, anything drawn outside modifies the bounding box, which \TIKZ\ maintains. You can influence this behavior with \TIKZ\ commands or options, such as \tkzcname{useasboundingbox} or the option \tkzname{use as bounding box}. You can then reserve a box for a figure, but the figure may overflow the box and spread over the main text.
The command \tkzcname{pgfresetboundingbox} clears the bounding box and starts a new one.

\subsection{Utility of \tkzcname{tkzInit}} 
 However, it is sometimes necessary to control the size of what is displayed.
 To do this, you need to prepare the bounding box you are going to work in: this is the role of the macro \tkzNameMacro{tkzInit}. For some drawings, it is useful to fix the extreme values (xmin, xmax, ymin and ymax) and to \code{clip} this rectangle, in order to control the size of the figure as well as possible.

Two macros are useful to control the bounding box:
\begin{itemize}
   \item \tkzcname{tkzInit}
   \item \tkzcname{tkzClip}
\end{itemize}
\vspace{20pt}

I have also added macros directly linked to the bounding box: you can display it or clip it (see below).

\subsection{\tkzcname{tkzInit}}

\begin{NewMacroBox}{tkzInit}{\oarg{local options}}\hypertarget{init}{}%
\begin{tabular}{lll}%    
options  & default & definition             \\
\midrule    
\TOline{xmin} {0} {minimum value of the abscissae in cm}
\TOline{xmax} {10} {maximum value of the abscissae in cm}
\TOline{xstep}{1} {difference between two graduations in $x$}
\TOline{ymin} {0} {minimum y-axis value in cm }
\TOline{ymax} {10} {maximum y-axis value in cm}
\TOline{ystep}{1} {difference between two graduations in $y$}  
\bottomrule    
\end{tabular}

\medskip 

The role of \tkzcname{tkzInit} is to define an \textcolor{red}{orthogonal} coordinate system and a rectangular part of the plane, in which you place your drawings with Cartesian coordinates.
This macro defines your working area, as on a graphing calculator. Since version 4 of \tkzname{\tkznameofpack}, \tkzcname{xstep} and \tkzcname{ystep} are always 1, so \tkzcname{tkzInit} is mostly useful for actions such as \code{clipping out}.
\end{NewMacroBox}


\subsection{\tkzcname{tkzClip}}

\begin{NewMacroBox}{tkzClip}{\oarg{local options}}
This macro hides everything outside the rectangle defined by (xmin~;~ymin) and (xmax~;~ymax).

\medskip
\begin{tabular}{lll}
\hline
options  & default & definition             \\
\midrule
\TOline{space} {1} {added value on the right, left, bottom and top of the background}
\bottomrule
\end{tabular}

\medskip

The option \tkzname{space} enlarges the visible part of the drawing, which becomes the rectangle defined by (xmin-space~;~ymin-space) and (xmax+space~;~ymax+space). \tkzname{space} can be negative! The unit is the cm and must not be written.
\end{NewMacroBox}



This macro \code{clips} the initial rectangle, so that only the paths inside this rectangle are drawn.

\begin{tkzexample}[latex=8cm,small]
\begin{tikzpicture}
 \tkzInit[xmax=4, ymax=3]
 \tkzDefPoints{-1/-1/A,5/2/B}
 \tkzDrawX \tkzDrawY 
 \tkzGrid
 \tkzClip
 \tkzDrawSegment(A,B)
\end{tikzpicture}
\end{tkzexample} 

You can add a bit of space:
\begin{tkzltxexample}[]
  \tkzClip[space=1]
\end{tkzltxexample} 

\subsection{\tkzcname{tkzClip} and the option \tkzname{space}} 
This option adds some space around the \code{clipped} rectangle.
\begin{tkzexample}[latex=8cm,small]
\begin{tikzpicture}
 \tkzInit[xmax=4, ymax=3]
 \tkzDefPoints{-1/-1/A,5/2/B}
 \tkzDrawX \tkzDrawY 
 \tkzGrid
 \tkzClip[space=1]
 \tkzDrawSegment(A,B)
\end{tikzpicture}
\end{tkzexample}   
The dimensions of the \code{clipped} rectangle are \tkzname{xmin-1}, \tkzname{ymin-1}, \tkzname{xmax+1} and \tkzname{ymax+1}. 

%<--------------------------------------------------------------------------->
%              tkzShowBB
%<--------------------------------------------------------------------------->
\subsection{\tkzcname{tkzShowBB}}
The simplest macro.
\begin{NewMacroBox}{tkzShowBB}{\oarg{local options}}% 
This macro displays the bounding box as a rectangular frame. It accepts \TIKZ\ options.
\end{NewMacroBox} 


\subsubsection{Example with \tkzcname{tkzShowBB}}
\begin{tkzexample}[latex=8cm,small]
\begin{tikzpicture}[scale=.5]
  \tkzInit[ymax=5,xmax=8]
  \tkzGrid  
  \tkzDefPoint(3,0){A}
   \begin{scope}
    \tkzClipBB
    \tkzDefCircle[R](A,5) \tkzGetPoint{a}
    \tkzDrawCircle(A,a)
    \tkzShowBB[line width = 4pt,fill=teal!10,%
              opacity=.4]
   \end{scope}
\tkzDefCircle[R](A,4) \tkzGetPoint{b}
\tkzDrawCircle[red](A,b)
\end{tikzpicture}
\end{tkzexample}
%<--------------------------------------------------------------------------->
%         tkzClipBB
%<--------------------------------------------------------------------------->
\subsection{\tkzcname{tkzClipBB}}
\begin{NewMacroBox}{tkzClipBB}{}%
The idea is to limit the next constructions to the current bounding box.
\end{NewMacroBox}

\subsubsection{Example with \tkzcname{tkzClipBB} and the bisectors}

\begin{tkzexample}[latex=6cm,small]
  \begin{tikzpicture}
  \tkzInit[xmin=-3,xmax=6, ymin=-1,ymax=6]
  \tkzDefPoint(0,0){O}\tkzDefPoint(3,1){I}
  \tkzDefPoint(1,4){J}
  \tkzDefLine[bisector](I,O,J) \tkzGetPoint{i}
  \tkzDefLine[bisector out](I,O,J) \tkzGetPoint{j}
  \tkzDrawPoints(O,I,J,i,j)
  \tkzClipBB
  \tkzDrawLines[add = 1 and 2,color=orange](O,I O,J)
  \tkzDrawLines[add = 1 and 2](O,i O,j)
  \tkzShowBB
  \end{tikzpicture}
\end{tkzexample}


\newpage

\section{Clipping different objects}

\subsection{Clipping a polygon} 
 \begin{NewMacroBox}{tkzClipPolygon}{\oarg{local options}\parg{points list}}%
This macro restricts the drawings to the given polygon.

\medskip
\begin{tabular}{lll}%
\toprule
arguments       & example & explanation     \\ 
\midrule
\TAline{\parg{pt1,pt2,pt3,\dots}}{\parg{A,B,C}}{}
\midrule
options  & default & definition             \\
\midrule    
\TOline{out} {} {clips the outside of the object}
 \end{tabular}
\end{NewMacroBox}

\subsubsection{\tkzcname{tkzClipPolygon}}

\begin{tkzexample}[latex=7cm,small]
  \begin{tikzpicture}[scale=1.25] 
  \tkzDefPoint(0,0){A} 
  \tkzDefPoint(4,0){B} 
  \tkzDefPoint(1,3){C} 
  \tkzDrawPolygon(A,B,C) 
  \tkzDefPoint(0,2){D} 
  \tkzDefPoint(2,0){E} 
  \tkzDrawPoints(D,E) 
  \tkzLabelPoints(D,E) 
  \tkzClipPolygon(A,B,C) 
  \tkzDrawLine[new](D,E)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{\tkzcname{tkzClipPolygon[out]}}

\begin{tkzexample}[latex=7cm,small]
  \begin{tikzpicture}[scale=1]
  \tkzDefPoint(0,0){P1}
  \tkzDefPoint(4,0){P2}
  \tkzDefPoint(4,4){P3}
  \tkzDefPoint(0,4){P4}
  \tkzDefPoint(1,1){Q1}
  \tkzDefPoint(3,1){Q2}
  \tkzDefPoint(3,3){Q3}
  \tkzDefPoint(1,3){Q4}
  \tkzDrawPolygon(P1,P2,P3,P4)
  \begin{scope}
     \tkzClipPolygon[out](Q1,Q2,Q3,Q4)
    \tkzFillPolygon[teal!20](P1,P2,P3,P4)
  \end{scope}
  \tkzDrawPolygon(Q1,Q2,Q3,Q4)
  \end{tikzpicture}
\end{tkzexample}

\subsubsection{Example: use of \code{Clip} for Sangaku in a square} 
\begin{tkzexample}[latex=7cm, small]  
\begin{tikzpicture}[scale=.75]
 \tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B}
 \tkzDefSquare(A,B)   \tkzGetPoints{C}{D}
 \tkzDefPoint(4,8){F}
 \tkzDefTriangle[equilateral](C,D) 
 \tkzGetPoint{I}
 \tkzDefPointBy[projection=onto B--C](I) 
 \tkzGetPoint{J}
 \tkzInterLL(D,B)(I,J)  \tkzGetPoint{K}
 \tkzDefPointBy[symmetry=center K](B)  
 \tkzGetPoint{M}
 \tkzClipPolygon(B,C,D,A)
 \tkzFillPolygon[color = orange](A,B,C,D)
 \tkzFillCircle[color = yellow](M,I)
 \tkzFillCircle[color = blue!50!black](F,D)
\end{tikzpicture}
\end{tkzexample}

\subsection{Clipping a disc}

\begin{NewMacroBox}{tkzClipCircle}{\oarg{local options}\parg{A,B}}%
\begin{tabular}{lll}%
\toprule
arguments           & example & explanation                         \\
\midrule
\TAline{\parg{A,B}}{\parg{A,B}} {AB radius}
\bottomrule
\end{tabular}  
 
\medskip
\begin{tabular}{lll}%
options             & default & definition                         \\ 
\midrule
\TOline{out} {} {clips the outside of the object}
 \bottomrule
\end{tabular}

\medskip
You don't need to write \tkzname{radius}, because it is the default option.
\end{NewMacroBox}

 \subsubsection{Simple clip} 
\begin{tkzexample}[latex=6cm,small] 
\begin{tikzpicture}[scale=.5]
  \tkzDefPoint(0,0){A} \tkzDefPoint(2,2){O}
  \tkzDefPoint(4,4){B} \tkzDefPoint(5,5){C}
  \tkzDrawPoints(O,A,B,C) 
  \tkzLabelPoints(O,A,B,C)
  \tkzDrawCircle(O,A) 
  \tkzClipCircle(O,A)
  \tkzDrawLine(A,C)
  \tkzDrawCircle[fill=teal!10,opacity=.5](C,O)
\end{tikzpicture} 
\end{tkzexample}

\subsection{Clip out}

\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}
  \tkzInit[xmin=-3,ymin=-2,xmax=4,ymax=3]
   \tkzDefPoint(0,0){O}
   \tkzDefPoint(-4,-2){A}
   \tkzDefPoint(3,1){B}
   \tkzDefCircle[R](O,2) \tkzGetPoint{o}
   \tkzDrawPoints(A,B) % to have a good bounding box
   \begin{scope}
    \tkzClipCircle[out](O,o)
    \tkzDrawLines(A,B)
   \end{scope}
\end{tikzpicture}  
\end{tkzexample} 

\subsection{Intersection of disks}

\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}
\tkzDefPoints{0/0/O,4/0/A,0/4/B}
\tkzDrawPolygon[fill=teal](O,A,B)
\tkzClipPolygon(O,A,B)
\tkzClipCircle(A,O)
\tkzClipCircle(B,O)
\tkzFillPolygon[white](O,A,B)
\end{tikzpicture}
\end{tkzexample} 

See a more complex example of clipping in section \ref{About clipping circles}.

\subsection{Clipping a sector}
\tkzHandBomb\  Note that the arguments depend on the options.
\begin{NewMacroBox}{tkzClipSector}{\oarg{local options}\parg{O,\dots}\parg{\dots}}%
\begin{tabular}{lll}%
options             & default & definition                         \\ 
\midrule
\TOline{towards}{towards}{$O$ is the center and the sector starts from $A$ to $(OB)$}
\TOline{rotate} {towards}{The sector starts from $A$ and the angle determines its amplitude. } 
\TOline{R}{towards}{We give the radius and two angles} 
\bottomrule
\end{tabular} 

\medskip
Of course, you can add all the \TIKZ\ styles for the drawings.

\medskip   
\begin{tabular}{lll}%
\toprule
options             & arguments & example                         \\ 
\midrule
\TOline{towards}{\parg{pt,pt}\parg{pt}}{\tkzcname{tkzClipSector(O,A)(B)}}
\TOline{rotate} {\parg{pt,pt}\parg{angle}}{\tkzcname{tkzClipSector[rotate](O,A)(90)}} 
\TOline{R}{\parg{pt,$r$}\parg{angle 1,angle 2}}{\tkzcname{tkzClipSector[R](O,2)(30,90)}}
\end{tabular}
\end{NewMacroBox}

\subsubsection{Clipping a sector: first example}
\begin{tkzexample}[latex=7cm,small] 
\begin{tikzpicture}[scale=0.5]
\tkzDefPoint(0,0){a}
\tkzDefPoint(12,0){b}
\tkzDefPoint(4,10){c}
\tkzInterCC[R](a,6)(b,8) 
\tkzGetFirstPoint{AB1} \tkzGetSecondPoint{AB2}
\tkzInterCC[R](a,6)(c,6) 
\tkzGetFirstPoint{AC1} \tkzGetSecondPoint{AC2}
\tkzInterCC[R](b,8)(c,6) 
\tkzGetFirstPoint{BC1} \tkzGetSecondPoint{BC2}
\tkzDrawArc(a,AB2)(AB1)
\tkzDrawArc(b,AB1)(AB2)
\tkzDrawArc(a,AC2)(AC1)
\tkzDrawArc(c,AC1)(AC2)
\tkzDrawArc(b,BC2)(BC1)
\tkzDrawArc(c,BC1)(BC2)
\begin{scope}
\tkzClipSector(b,BC2)(BC1)
\tkzFillSector[teal!40!white](c,BC1)(BC2)
\end{scope}
\begin{scope}
\tkzClipSector(a,AB2)(AB1)
\tkzFillSector[teal!40!white](b,AB1)(AB2)
\end{scope}
\begin{scope}
\tkzClipSector(a,AC2)(AC1)
\tkzFillSector[teal!40!white](c,AC1)(AC2)
\end{scope}
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Clipping a sector: second example}
\begin{tkzexample}[latex=7cm,small] 
\begin{tikzpicture}[scale=1.5] 
  \tkzDefPoint(0,0){O}
  \tkzDefPoint(2,-1){A}
  \tkzDefPoint(1,1){B} 
  \tkzDrawSector[new,dashed](O,A)(B)
  \tkzDrawSector[new](O,B)(A)
\begin{scope}
\tkzClipSector(O,B)(A)
\tkzDefSquare(O,B) \tkzGetPoints{B'}{O'}
\tkzDrawPolygon[color=teal,fill=teal!20](O,B,B',O')
\end{scope}
\tkzDrawPoints(A,B,O) 
\end{tikzpicture} 
\end{tkzexample}


\subsection{\TIKZ\ options: trim left or trim right}
See the \tkzimp{pgfmanual}.

\subsection{\TIKZ\ Controls \tkzcname{pgfinterruptboundingbox} and \tkzcname{endpgfinterruptboundingbox}}
This command temporarily interrupts the calculation of the bounding box and starts a new one.
See the \tkzimp{pgfmanual}

\subsubsection{Controlling the bounding box} 
\begin{tkzexample}[latex=7cm,small] 
\begin{tikzpicture}
\tkzDefPoint(0,5){A}\tkzDefPoint(5,4){B}
\tkzDefPoint(0,0){C}\tkzDefPoint(5,1){D}
\tkzDrawSegments(A,B C,D A,C)
\pgfinterruptboundingbox
   \tkzInterLL(A,B)(C,D)\tkzGetPoint{I}
\endpgfinterruptboundingbox
\tkzClipBB
\tkzDrawCircle(I,B)
\end{tikzpicture}
\end{tkzexample}

\subsection{Reverse clip: \tkzname{tkzreverseclip}}

To use this option, a bounding box must be defined.

\begin{tkzltxexample}[]
  \tikzset{tkzreverseclip/.style={insert path={
     (current bounding box.south west) --(current bounding box.north west)
   --(current bounding box.north east) --  (current bounding box.south east)
   -- cycle} }}
\end{tkzltxexample}

\subsubsection{Example with \tkzcname{tkzClipPolygon[out]}}
\tkzcname{tkzClipPolygon[out]}, \tkzcname{tkzClipCircle[out]} use this option.
\begin{tkzexample}[vbox,small]
\begin{tikzpicture}[scale=1]
\tkzInit[xmin=-5,xmax=5,ymin=-4,ymax=6]
\tkzClip
\tkzDefPoints{-.5/0/P1,.5/0/P2}
\foreach \i [count=\j from 3] in {2,...,7}{%
    \tkzDefShiftPoint[P\i]({45*(\i-1)}:1){P\j}}  
\tkzClipPolygon[out](P1,P...,P8)
\tkzCalcLength(P1,P5)\tkzGetLength{r}
\begin{scope}[blend group=screen]
  \foreach \i in {1,...,8}{%
   \tkzDefCircle[R](P\i,\r) \tkzGetPoint{x}
   \tkzFillCircle[color=teal](P\i,x)}
  \end{scope}
\end{tikzpicture}
\end{tkzexample}

\endinput