osimInterface#
- class pyCGM2.Model.Opensim.interface.opensimInterface.osimInterface(data_path: str, osimFile: str)#
- Interface for interacting with OpenSim models. - Parameters:
- data_path (str) – Path to the data directory. 
- osimFile (str) – Filename of the OpenSim model file. 
 
 - xml#
- An instance of opensimXmlInterface to interact with OpenSim XML files. - Type:
 
 - __init__(data_path: str, osimFile: str)#
 - Methods - __init__(data_path, osimFile)- Retrieves the list of bodies from the OpenSim model. - Retrieves the list of joint coordinates from the OpenSim model. - Retrieves the list of muscles from the OpenSim model. - getMuscles_bySide([addToName])- Retrieves muscles categorized by their side (left or right). - getBodies() List[str]#
- Retrieves the list of bodies from the OpenSim model. - Returns:
- List[str] – A list of body names. 
 
 - getCoordinates() List[str]#
- Retrieves the list of joint coordinates from the OpenSim model. - Returns:
- List[str] – A list of joint coordinate names. 
 
 - getMuscles() List[str]#
- Retrieves the list of muscles from the OpenSim model. - Returns:
- List[str] – A list of muscle names. 
 
 - getMuscles_bySide(addToName: str = '') Dict[str, List[str]]#
- Retrieves muscles categorized by their side (left or right). - Parameters:
- addToName (str, optional) – Additional string to append to each muscle name. 
- Returns:
- Dict[str, List[str]] – A dictionary with keys ‘Left’ and ‘Right’ mapping to lists of muscle names. 
 
 
