We present the 3D Trajectory-based Stress Visualizer (3D-TSV), a visual analysis tool for the exploration of the principal stress directions in 3D solids under load. 3D-TSV provides a modular and generic implementation of key algorithms required for a trajectory-based visual analysis of principal stress directions, including the automatic seeding of space-filling stress lines, their extraction using numerical schemes, their mapping to an effective renderable representation, and rendering options to convey structures with special mechanical properties. In the design of 3D-TSV, several perceptual challenges have been addressed when simultaneously visualizing three mutually orthogonal stress directions via lines. We present a novel algorithm for generating a space-filling and evenly spaced set of mutually orthogonal lines. The algorithm further considers the locations of lines to obtain a more regular pattern repetition, and enables the extraction of a Focus+Context representation with user-selected levels of detail for individual stress directions. To further reduce visual clutter, the system provides the combined visualization of two selected principal directions via appropriately oriented ribbons. The rendering uses depth cues to better convey the spatial relationships between trajectories and improves ribbon rendering on steep angles. 3D-TSV is accessible to end users via a C++-and OpenGL-based rendering frontend that is seamlessly connected to a MATLAB-based extraction backend. A TCP/IP-based communication interface supports the flexible integration of alternative rendering frontends. The code (BSD license) of 3D-TSV is made publicly available.