Ridges are extremal curves of principal curvatures on a surface that indicate salient intrinsic features of its shape. This paper presents a novel approach for extracting ridges of improved quality from isosurfaces of volumetric scalar-valued grids by converting them to implicit trivariate B-spline representations. A robust tracing approach demonstrated to extract ridges accurately from parametric Bspline surfaces is extended to extract ridges directly from the implicit representations resulting in accurate and hence smoother, connected ridge curves as compared to approaches that extract ridges directly from discrete representations. This approach can also be used to extract ridges directly from smooth representations such as isosurfaces of volumetric BSpline CAD models and algebraic functions, and extended to extract ridges from polygonal meshes, as demonstrated in the paper. Most of the existing approaches for ridge extraction address only crests, a certain subset of the ridges on a surface. The approach presented in this paper enables extraction of all types of generic ridges on a surface thereby presenting a complete solution.