Commit a64132db authored by Olivier Lantsoght's avatar Olivier Lantsoght
Browse files

[MBsysPy][Debug] add missing EoL due to pass from print to mbs_msg

parent f46db470
...@@ -438,20 +438,20 @@ class MbsData(object): ...@@ -438,20 +438,20 @@ class MbsData(object):
"\n--------------------------------------------------\n") "\n--------------------------------------------------\n")
raise RuntimeError("MbsData loading failed, read previous messages.") raise RuntimeError("MbsData loading failed, read previous messages.")
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> mbs_infos structure loaded") mbs_msg("DEBUG>> mbs_infos structure loaded\n")
# Preparing loader and its options for loading # Preparing loader and its options for loading
loader = libloadXML.mbs_new_loader() loader = libloadXML.mbs_new_loader()
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> Loader structure created") mbs_msg("DEBUG>> Loader structure created\n")
loader.contents.opts.contents.no_project_fct = self.opt_load_c loader.contents.opts.contents.no_project_fct = self.opt_load_c
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> flag ignoring project function set") mbs_msg("DEBUG>> flag ignoring project function set\n")
loader.contents.mbs_infos = self.mbs_infos_ptr loader.contents.mbs_infos = self.mbs_infos_ptr
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> mbs_infos assigned to loader") mbs_msg("DEBUG>> mbs_infos assigned to loader\n")
# Load and retrieve MbsData structure # Load and retrieve MbsData structure
self.mbs_data_ptr = libloadXML.mbs_load_with_loader(name_c, prj_lib_path, loader) self.mbs_data_ptr = libloadXML.mbs_load_with_loader(name_c, prj_lib_path, loader)
...@@ -470,13 +470,13 @@ class MbsData(object): ...@@ -470,13 +470,13 @@ class MbsData(object):
libloadXML.mbs_delete_loader(loader) libloadXML.mbs_delete_loader(loader)
raise RuntimeError("MbsData loading failed, read previous messages.") raise RuntimeError("MbsData loading failed, read previous messages.")
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> MbsData loaded") mbs_msg("DEBUG>> MbsData loaded\n")
# Project with link3D are not (yet) compatible # Project with link3D are not (yet) compatible
if self.mbs_data_ptr.contents.Nlink3D: if self.mbs_data_ptr.contents.Nlink3D:
print("The Project contains 3Dlinks which are an advanced feature not" print("The Project contains 3Dlinks which are an advanced feature not"
" yet supported in MBsysPy.\nUncheck the 'Link 3D' box in " " yet supported in MBsysPy.\nUncheck the 'Link 3D' box in "
"MBsysPAD, or migrate to MBsysC/MBsysLab.") "MBsysPAD, or migrate to MBsysC/MBsysLab.\n")
raise RuntimeError("ERROR: 3Dlinks are not yet supported in MBsysPy, modify your project.") raise RuntimeError("ERROR: 3Dlinks are not yet supported in MBsysPy, modify your project.")
libloadXML.mbs_delete_loader(loader) libloadXML.mbs_delete_loader(loader)
...@@ -508,7 +508,7 @@ class MbsData(object): ...@@ -508,7 +508,7 @@ class MbsData(object):
# Exposing some memory # Exposing some memory
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> Exposing MbsData fields") mbs_msg("DEBUG>> Exposing MbsData fields\n")
# Geometric and dynamic datas # Geometric and dynamic datas
self.__dpt = None self.__dpt = None
...@@ -599,7 +599,7 @@ class MbsData(object): ...@@ -599,7 +599,7 @@ class MbsData(object):
# Loading user function # Loading user function
if self.opt_load_c < 2: if self.opt_load_c < 2:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> Loading user functions") mbs_msg("DEBUG>> Loading user functions\n")
project_path = self.project_path project_path = self.project_path
...@@ -617,7 +617,7 @@ class MbsData(object): ...@@ -617,7 +617,7 @@ class MbsData(object):
# Loading symbolic function # Loading symbolic function
if self.opt_load_c < 1: if self.opt_load_c < 1:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> Loading symbolic functions") mbs_msg("DEBUG>> Loading symbolic functions\n")
project_path = self.project_path project_path = self.project_path
# Creating user path # Creating user path
...@@ -634,11 +634,11 @@ class MbsData(object): ...@@ -634,11 +634,11 @@ class MbsData(object):
def __str__(self): def __str__(self):
"""Return str(self).""" """Return str(self)."""
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> start of __str") mbs_msg("DEBUG>> start of __str\n")
libutilities.mbs_print_data(self.mbs_data_ptr) libutilities.mbs_print_data(self.mbs_data_ptr)
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> MbsData printed") mbs_msg("DEBUG>> MbsData printed\n")
return '' return ''
...@@ -823,7 +823,7 @@ class MbsData(object): ...@@ -823,7 +823,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(user_path, user_file)) path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path) + '\n')
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
...@@ -838,7 +838,7 @@ class MbsData(object): ...@@ -838,7 +838,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(user_path, user_file)) path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path) + '\n')
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
...@@ -853,7 +853,7 @@ class MbsData(object): ...@@ -853,7 +853,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(user_path, user_file)) path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path) + '\n')
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
...@@ -868,7 +868,7 @@ class MbsData(object): ...@@ -868,7 +868,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(user_path, user_file)) path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path) + '\n')
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
...@@ -883,7 +883,7 @@ class MbsData(object): ...@@ -883,7 +883,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(user_path, user_file)) path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path) + '\n')
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
...@@ -898,7 +898,7 @@ class MbsData(object): ...@@ -898,7 +898,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(user_path, user_file)) path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path) + '\n')
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
...@@ -913,7 +913,7 @@ class MbsData(object): ...@@ -913,7 +913,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(user_path, user_file)) path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path) + '\n')
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
...@@ -928,7 +928,7 @@ class MbsData(object): ...@@ -928,7 +928,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(user_path, user_file)) path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + user_file + "' not found in folder '" + os.path.dirname(path) + '\n')
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
...@@ -946,7 +946,7 @@ class MbsData(object): ...@@ -946,7 +946,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
else: else:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path) + '\n')
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
...@@ -963,7 +963,7 @@ class MbsData(object): ...@@ -963,7 +963,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
else: else:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path) + '\n')
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
...@@ -980,7 +980,7 @@ class MbsData(object): ...@@ -980,7 +980,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
else: else:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path) + '\n')
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
...@@ -996,7 +996,7 @@ class MbsData(object): ...@@ -996,7 +996,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
else: else:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path) + '\n')
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
...@@ -1012,7 +1012,7 @@ class MbsData(object): ...@@ -1012,7 +1012,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
else: else:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path) + '\n')
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
...@@ -1028,7 +1028,7 @@ class MbsData(object): ...@@ -1028,7 +1028,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
else: else:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path) + '\n')
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
...@@ -1044,7 +1044,7 @@ class MbsData(object): ...@@ -1044,7 +1044,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
else: else:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path) + '\n')
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
...@@ -1069,7 +1069,7 @@ class MbsData(object): ...@@ -1069,7 +1069,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
else: else:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path) + '\n')
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
...@@ -1086,7 +1086,7 @@ class MbsData(object): ...@@ -1086,7 +1086,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
else: else:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path) + '\n')
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
...@@ -1103,7 +1103,7 @@ class MbsData(object): ...@@ -1103,7 +1103,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(template_path, user_file)) path = os.path.abspath(os.path.join(template_path, user_file))
else: else:
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> loading file '" + user_file + "' in folder '" + os.path.dirname(path) + '\n')
spec = importlib.util.spec_from_file_location(user_file[:-3], path) spec = importlib.util.spec_from_file_location(user_file[:-3], path)
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
...@@ -1157,7 +1157,7 @@ class MbsData(object): ...@@ -1157,7 +1157,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(symbolic_path, symb_file)) path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path) + '\n')
symb_file = "mbs_accelred_PRJ.py" symb_file = "mbs_accelred_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file)) path = os.path.abspath(os.path.join(template_path, symb_file))
...@@ -1170,7 +1170,7 @@ class MbsData(object): ...@@ -1170,7 +1170,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(symbolic_path, symb_file)) path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path) + '\n')
symb_file = "mbs_cons_hJ_PRJ.py" symb_file = "mbs_cons_hJ_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file)) path = os.path.abspath(os.path.join(template_path, symb_file))
...@@ -1183,7 +1183,7 @@ class MbsData(object): ...@@ -1183,7 +1183,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(symbolic_path, symb_file)) path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path) + '\n')
symb_file = "mbs_cons_jdqd_PRJ.py" symb_file = "mbs_cons_jdqd_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file)) path = os.path.abspath(os.path.join(template_path, symb_file))
...@@ -1196,7 +1196,7 @@ class MbsData(object): ...@@ -1196,7 +1196,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(symbolic_path, symb_file)) path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path) + '\n')
symb_file = "mbs_dirdyna_PRJ.py" symb_file = "mbs_dirdyna_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file)) path = os.path.abspath(os.path.join(template_path, symb_file))
...@@ -1209,7 +1209,7 @@ class MbsData(object): ...@@ -1209,7 +1209,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(symbolic_path, symb_file)) path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path) + '\n')
symb_file = "mbs_extforces_PRJ.py" symb_file = "mbs_extforces_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file)) path = os.path.abspath(os.path.join(template_path, symb_file))
...@@ -1222,7 +1222,7 @@ class MbsData(object): ...@@ -1222,7 +1222,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(symbolic_path, symb_file)) path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path) + '\n')
symb_file = "mbs_gensensor_PRJ.py" symb_file = "mbs_gensensor_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file)) path = os.path.abspath(os.path.join(template_path, symb_file))
...@@ -1235,7 +1235,7 @@ class MbsData(object): ...@@ -1235,7 +1235,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(symbolic_path, symb_file)) path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path) + '\n')
symb_file = "mbs_invdyna_PRJ.py" symb_file = "mbs_invdyna_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file)) path = os.path.abspath(os.path.join(template_path, symb_file))
...@@ -1248,7 +1248,7 @@ class MbsData(object): ...@@ -1248,7 +1248,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(symbolic_path, symb_file)) path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path) + '\n')
symb_file = "mbs_link_PRJ.py" symb_file = "mbs_link_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file)) path = os.path.abspath(os.path.join(template_path, symb_file))
...@@ -1261,7 +1261,7 @@ class MbsData(object): ...@@ -1261,7 +1261,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(symbolic_path, symb_file)) path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path) + '\n')
symb_file = "mbs_link3D_PRJ.py" symb_file = "mbs_link3D_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file)) path = os.path.abspath(os.path.join(template_path, symb_file))
...@@ -1274,7 +1274,7 @@ class MbsData(object): ...@@ -1274,7 +1274,7 @@ class MbsData(object):
path = os.path.abspath(os.path.join(symbolic_path, symb_file)) path = os.path.abspath(os.path.join(symbolic_path, symb_file))
if not os.path.isfile(path): if not os.path.isfile(path):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path)) mbs_msg("DEBUG>> file '" + symb_file + "' not found in folder '" + os.path.dirname(path) + '\n')
symb_file = "mbs_sensor_PRJ.py" symb_file = "mbs_sensor_PRJ.py"
path = os.path.abspath(os.path.join(template_path, symb_file)) path = os.path.abspath(os.path.join(template_path, symb_file))
...@@ -1668,7 +1668,7 @@ class MbsData(object): ...@@ -1668,7 +1668,7 @@ class MbsData(object):
def __callback_mbs_cons_hJ_part(self, fun, h, Jac): def __callback_mbs_cons_hJ_part(self, fun, h, Jac):
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> callback_mbs_cons_hJ") mbs_msg("DEBUG>> callback_mbs_cons_hJ\n")
__h = np.ctypeslib.as_array(h, (self.Ncons + 1,)) __h = np.ctypeslib.as_array(h, (self.Ncons + 1,))
__Jac = np.ctypeslib.as_array(Jac[0], (self.Ncons + 1, self.njoint + 1)) __Jac = np.ctypeslib.as_array(Jac[0], (self.Ncons + 1, self.njoint + 1))
...@@ -2436,7 +2436,7 @@ class MbsData(object): ...@@ -2436,7 +2436,7 @@ class MbsData(object):
libloadXML.mbs_delete_infos(self.mbs_infos_ptr) libloadXML.mbs_delete_infos(self.mbs_infos_ptr)
libloadXML.mbs_delete_data(self.mbs_data_ptr) libloadXML.mbs_delete_data(self.mbs_data_ptr)
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> MbsData pointer deleted.") mbs_msg("DEBUG>> MbsData pointer deleted.\n")
def reset(self, verbose=False): def reset(self, verbose=False):
""" """
......
...@@ -83,11 +83,11 @@ class MbsPart(object): ...@@ -83,11 +83,11 @@ class MbsPart(object):
A MbsPart instance. A MbsPart instance.
""" """
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> Creating MbsPart struct for " + mbs.mbs_name + "' MBS.") mbs_msg("DEBUG>> Creating MbsPart struct for " + mbs.mbs_name + "' MBS.\n")
self.mbs_part_ptr = libmodules.mbs_new_part(mbs.mbs_data_ptr) self.mbs_part_ptr = libmodules.mbs_new_part(mbs.mbs_data_ptr)
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> MbsPartmbs_ structure loaded") mbs_msg("DEBUG>> MbsPartmbs_ structure loaded\n")
self.mbs = mbs self.mbs = mbs
...@@ -129,14 +129,14 @@ class MbsPart(object): ...@@ -129,14 +129,14 @@ class MbsPart(object):
# Exposing some memory # Exposing some memory
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> Exposing MbsPart fields") mbs_msg("DEBUG>> Exposing MbsPart fields\n")
self.__q_closed = np.ctypeslib.as_array(self.mbs_part_ptr.contents.q_closed, (self.mbs.njoint,)) self.__q_closed = np.ctypeslib.as_array(self.mbs_part_ptr.contents.q_closed, (self.mbs.njoint,))
def __str__(self): def __str__(self):
"""Return str(self).""" """Return str(self)."""
if __DEBUG__: if __DEBUG__:
mbs_msg("DEBUG>> start of __str") mbs_msg("DEBUG>> start of __str\n")