  This paper presents a density-based topology optimization approach
considering additive manufacturing limitations. The presented method considers
the minimum size of parts, the minimum size of cavities, the inability of
printing overhanging parts without the use of sacrificial supporting
structures, and the printing directions. These constraints are geometrically
addressed and implemented. The minimum size on solid and void zones is imposed
through a well-known filtering technique. The sacrificial support material is
reduced using a constraint that limits the maximum overhang angle of parts by
comparing the structural gradient with a critical reference slope. Due to the
local nature of the gradient, the chosen restriction is prone to introduce
parts that meet the structural slope but that may not be self-supporting. The
restriction limits the maximum overhang angle for a user-defined printing
direction, which could reduce structural performance if the orientation is not
properly selected. To ease these challenges, a new approach to reduce the
introduction of such non-self-supporting parts and a novel method that includes
different printing directions in the maximum overhang angle constraint are
presented. The proposed strategy for considering the minimum size of solid and
void phases, maximum overhang angle, and printing direction, is illustrated by
solving a set of 2D benchmark design problems including stiff structures and
compliant mechanisms. We also provide MATLAB codes in the appendix for
educational purposes and for replication of the results.
