function [srf, T] = Free2srf(freemodel, DOF)

ind(freemodel.Nodes(:,1)) = 1:size(freemodel.Nodes,1);
srf.points = freemodel.Nodes(:,2:4);
srf.elements(:,2:5) = ind(freemodel.Elements(freemodel.Elements(:,2) == 22,4:7));
srf.elements(:,1) = 4;
srf.dirs = zeros(size(freemodel.Nodes,1),3);

[ind, sig] = room2room(freemodel.Nodes(:,2:4), DOF, srf.points, 1);

T = zeros(length(ind), length(DOF));
for i = 1 : length(ind)
    if ind(i) > 0 
        T(i,ind(i)) = sig(i);
    end
end