Skip to main content

buildGcpOsimx.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function converts the groundContact portion of a parsed .osimx file
% into a new .osimx struct to be printed with writeOsimxFile(). See
% buildOsimxFromOsimxStruct() for reference.
%
% (struct, struct) -> (struct)
% Adds groundContact to .osimxStruct


function osimx = buildGcpOsimx(osimx, groundContact)
osimx.NMSMPipelineDocument.OsimxModel.RCNLContactSurfaceSet.Comment = ...
'The set of contact surfaces modeled';
osimx.NMSMPipelineDocument.OsimxModel.RCNLContactSurfaceSet = '';
for i = 1:length(groundContact.contactSurface)
osimx = buildGcpContactSurface(osimx, groundContact.contactSurface{i});
end
end