  In this paper we propose a local projector for truncated hierarchical
B-splines (THB-splines). The local THB-spline projector is an adaptation of the
B\'ezier projector proposed by Thomas et al. (Comput Methods Appl Mech Eng 284,
2015) for B-splines and analysis-suitable T-splines (AS T-splines). For
THB-splines, there are elements on which the restrictions of THB-splines are
linearly dependent, contrary to B-splines and AS T-splines. Therefore, we
cluster certain local mesh elements together such that the THB-splines with
support over these clusters are linearly independent, and the B\'ezier
projector is adapted to use these clusters. We introduce general extensions for
which optimal convergence is shown theoretically and numerically. In addition,
a simple adaptive refinement scheme is introduced and compared to Giust et al.
(Comput. Aided Geom. Des. 80, 2020), where we find that our simple approach
shows promise.
