This paper discusses the optimization of the disposition of residential structures in relation to the maximum privacy of the users in the building. An algorithm that makes this possible has been developed. The input parameters for the execution of the algorithm are the 3D geometry of the object, the dimensional environment of the surrounding buildings, and the parcel line. The output result is an optimized location and disposition of the building obtained using a specific algorithm and generative design. The technology implemented was Revit software and the Dynamo plugin. For the visual field model, the algorithm used values obtained from the literature on human senses.