The visual hull relates the shape of an object to its silhouettes. This paper develops the theory of the visual hull of piecewise smooth objects, as those used in CAD applications. We show that the surface of the visual hull can be constructed using patches of nine visual event surfaces of the aspect graph of the object. A detailed analysis allows to prune away many surfaces and patches that are not relevant to the construction. Examples of construction of visual hulls are presented.