I open several text file (STL) and run several operation on them using two functions previously defined. Precisely, the function "point_stl" extract the coordinates of the points contained in an STL file while the function "point_cloud" extracts the points from the STL files without repetitions.
with open(folder+"bone_set1.stl", "r") as f1, open(folder+"bone_set2.stl", "r") as f2:
var1 = point_stl(f1,f2)
var2 = point_cloud(f1,f2)
Since you pass directly the file handlers, I assume that each function reads the files content.
Unfortunatly, after the first function has read the files, the read cursors are at the end of the files and the second function has nothing to read between the cursors and the end of the files.
My advice would be to:
An other solution would be to set back the read cursors at the files start after the first function call.