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