1. A computer-implemented method for generating a foldable beam polyline for constructing a three-dimensional (3D) object, the method comprising: computing by at least one processor included in a computing device a first candidate foldable beam polyline that approximates a 3D curve included in the 3D object; verifying that the first candidate foldable beam polyline complies with a set of manufacturing constraints; computing by the at least one processor a second candidate foldable beam polyline that approximates the 3D curve; verifying that the second candidate foldable beam polyline complies with the set of manufacturing constraints; setting the foldable beam polyline equal to either the first candidate foldable beam polyline or the second candidate foldable beam polyline based on whether a difference between the first candidate foldable beam polyline and the 3D curve is less than a difference between the second candidate foldable beam polyline and the 3D curve; and after setting the foldable beam polyline equal to either the first candidate foldable beam polyline or the second candidate foldable beam polyline, causing the foldable beam polyline to be transmitted to a 3D printer for fabricating the 3D object.