Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
robotran
mbsysc
Commits
a64132db
Commit
a64132db
authored
Feb 15, 2021
by
Olivier Lantsoght
Browse files
[MBsysPy][Debug] add missing EoL due to pass from print to mbs_msg
parent
f46db470
Changes
2
Show whitespace changes
Inline
Side-by-side
MBsysC/mbs_interface/MBsysPy/mbsyspy/mbs_data.py
View file @
a64132db
...
...
@@ -438,20 +438,20 @@ class MbsData(object):
"
\n
--------------------------------------------------
\n
"
)
raise
RuntimeError
(
"MbsData loading failed, read previous messages."
)
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> mbs_infos structure loaded"
)
mbs_msg
(
"DEBUG>> mbs_infos structure loaded
\n
"
)
# Preparing loader and its options for loading
loader
=
libloadXML
.
mbs_new_loader
()
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
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
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> mbs_infos assigned to loader"
)
mbs_msg
(
"DEBUG>> mbs_infos assigned to loader
\n
"
)
# Load and retrieve MbsData structure
self
.
mbs_data_ptr
=
libloadXML
.
mbs_load_with_loader
(
name_c
,
prj_lib_path
,
loader
)
...
...
@@ -470,13 +470,13 @@ class MbsData(object):
libloadXML
.
mbs_delete_loader
(
loader
)
raise
RuntimeError
(
"MbsData loading failed, read previous messages."
)
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> MbsData loaded"
)
mbs_msg
(
"DEBUG>> MbsData loaded
\n
"
)
# Project with link3D are not (yet) compatible
if
self
.
mbs_data_ptr
.
contents
.
Nlink3D
:
print
(
"The Project contains 3Dlinks which are an advanced feature not"
" yet supported in MBsysPy.
\n
Uncheck 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."
)
libloadXML
.
mbs_delete_loader
(
loader
)
...
...
@@ -508,7 +508,7 @@ class MbsData(object):
# Exposing some memory
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> Exposing MbsData fields"
)
mbs_msg
(
"DEBUG>> Exposing MbsData fields
\n
"
)
# Geometric and dynamic datas
self
.
__dpt
=
None
...
...
@@ -599,7 +599,7 @@ class MbsData(object):
# Loading user function
if
self
.
opt_load_c
<
2
:
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> Loading user functions"
)
mbs_msg
(
"DEBUG>> Loading user functions
\n
"
)
project_path
=
self
.
project_path
...
...
@@ -617,7 +617,7 @@ class MbsData(object):
# Loading symbolic function
if
self
.
opt_load_c
<
1
:
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> Loading symbolic functions"
)
mbs_msg
(
"DEBUG>> Loading symbolic functions
\n
"
)
project_path
=
self
.
project_path
# Creating user path
...
...
@@ -634,11 +634,11 @@ class MbsData(object):
def
__str__
(
self
):
"""Return str(self)."""
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> start of __str"
)
mbs_msg
(
"DEBUG>> start of __str
\n
"
)
libutilities
.
mbs_print_data
(
self
.
mbs_data_ptr
)
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> MbsData printed"
)
mbs_msg
(
"DEBUG>> MbsData printed
\n
"
)
return
''
...
...
@@ -823,7 +823,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
user_path
,
user_file
))
if
not
os
.
path
.
isfile
(
path
):
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
))
spec
=
importlib
.
util
.
spec_from_file_location
(
user_file
[:
-
3
],
path
)
...
...
@@ -838,7 +838,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
user_path
,
user_file
))
if
not
os
.
path
.
isfile
(
path
):
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
))
spec
=
importlib
.
util
.
spec_from_file_location
(
user_file
[:
-
3
],
path
)
...
...
@@ -853,7 +853,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
user_path
,
user_file
))
if
not
os
.
path
.
isfile
(
path
):
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
))
spec
=
importlib
.
util
.
spec_from_file_location
(
user_file
[:
-
3
],
path
)
...
...
@@ -868,7 +868,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
user_path
,
user_file
))
if
not
os
.
path
.
isfile
(
path
):
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
))
spec
=
importlib
.
util
.
spec_from_file_location
(
user_file
[:
-
3
],
path
)
...
...
@@ -883,7 +883,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
user_path
,
user_file
))
if
not
os
.
path
.
isfile
(
path
):
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
))
spec
=
importlib
.
util
.
spec_from_file_location
(
user_file
[:
-
3
],
path
)
...
...
@@ -898,7 +898,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
user_path
,
user_file
))
if
not
os
.
path
.
isfile
(
path
):
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
))
spec
=
importlib
.
util
.
spec_from_file_location
(
user_file
[:
-
3
],
path
)
...
...
@@ -913,7 +913,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
user_path
,
user_file
))
if
not
os
.
path
.
isfile
(
path
):
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
))
spec
=
importlib
.
util
.
spec_from_file_location
(
user_file
[:
-
3
],
path
)
...
...
@@ -928,7 +928,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
user_path
,
user_file
))
if
not
os
.
path
.
isfile
(
path
):
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
))
spec
=
importlib
.
util
.
spec_from_file_location
(
user_file
[:
-
3
],
path
)
...
...
@@ -946,7 +946,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
user_file
))
else
:
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
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
@@ -963,7 +963,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
user_file
))
else
:
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
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
@@ -980,7 +980,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
user_file
))
else
:
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
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
@@ -996,7 +996,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
user_file
))
else
:
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
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
@@ -1012,7 +1012,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
user_file
))
else
:
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
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
@@ -1028,7 +1028,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
user_file
))
else
:
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
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
@@ -1044,7 +1044,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
user_file
))
else
:
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
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
@@ -1069,7 +1069,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
user_file
))
else
:
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
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
@@ -1086,7 +1086,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
user_file
))
else
:
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
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
@@ -1103,7 +1103,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
user_file
))
else
:
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
)
module
=
importlib
.
util
.
module_from_spec
(
spec
)
...
...
@@ -1157,7 +1157,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
symbolic_path
,
symb_file
))
if
not
os
.
path
.
isfile
(
path
):
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"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
symb_file
))
...
...
@@ -1170,7 +1170,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
symbolic_path
,
symb_file
))
if
not
os
.
path
.
isfile
(
path
):
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"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
symb_file
))
...
...
@@ -1183,7 +1183,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
symbolic_path
,
symb_file
))
if
not
os
.
path
.
isfile
(
path
):
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"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
symb_file
))
...
...
@@ -1196,7 +1196,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
symbolic_path
,
symb_file
))
if
not
os
.
path
.
isfile
(
path
):
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"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
symb_file
))
...
...
@@ -1209,7 +1209,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
symbolic_path
,
symb_file
))
if
not
os
.
path
.
isfile
(
path
):
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"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
symb_file
))
...
...
@@ -1222,7 +1222,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
symbolic_path
,
symb_file
))
if
not
os
.
path
.
isfile
(
path
):
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"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
symb_file
))
...
...
@@ -1235,7 +1235,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
symbolic_path
,
symb_file
))
if
not
os
.
path
.
isfile
(
path
):
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"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
symb_file
))
...
...
@@ -1248,7 +1248,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
symbolic_path
,
symb_file
))
if
not
os
.
path
.
isfile
(
path
):
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"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
symb_file
))
...
...
@@ -1261,7 +1261,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
symbolic_path
,
symb_file
))
if
not
os
.
path
.
isfile
(
path
):
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"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
symb_file
))
...
...
@@ -1274,7 +1274,7 @@ class MbsData(object):
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
symbolic_path
,
symb_file
))
if
not
os
.
path
.
isfile
(
path
):
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"
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
template_path
,
symb_file
))
...
...
@@ -1668,7 +1668,7 @@ class MbsData(object):
def
__callback_mbs_cons_hJ_part
(
self
,
fun
,
h
,
Jac
):
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
,))
__Jac
=
np
.
ctypeslib
.
as_array
(
Jac
[
0
],
(
self
.
Ncons
+
1
,
self
.
njoint
+
1
))
...
...
@@ -2436,7 +2436,7 @@ class MbsData(object):
libloadXML
.
mbs_delete_infos
(
self
.
mbs_infos_ptr
)
libloadXML
.
mbs_delete_data
(
self
.
mbs_data_ptr
)
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> MbsData pointer deleted."
)
mbs_msg
(
"DEBUG>> MbsData pointer deleted.
\n
"
)
def
reset
(
self
,
verbose
=
False
):
"""
...
...
MBsysC/mbs_interface/MBsysPy/mbsyspy/mbs_part.py
View file @
a64132db
...
...
@@ -83,11 +83,11 @@ class MbsPart(object):
A MbsPart instance.
"""
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
)
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> MbsPartmbs_ structure loaded"
)
mbs_msg
(
"DEBUG>> MbsPartmbs_ structure loaded
\n
"
)
self
.
mbs
=
mbs
...
...
@@ -129,14 +129,14 @@ class MbsPart(object):
# Exposing some memory
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
,))
def
__str__
(
self
):
"""Return str(self)."""
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> start of __str"
)
mbs_msg
(
"DEBUG>> start of __str
\n
"
)
return
"MbsPart instance has nothing to be printed from C library!"
...
...
@@ -144,7 +144,7 @@ class MbsPart(object):
"""Delete the object by freeing the C-related memory."""
libmodules
.
mbs_delete_part
(
self
.
mbs_part_ptr
)
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> MbsPart pointer deleted"
)
mbs_msg
(
"DEBUG>> MbsPart pointer deleted
\n
"
)
def
run
(
self
,
**
kwargs
):
"""Run a coordinate partitioning.
...
...
@@ -155,7 +155,7 @@ class MbsPart(object):
# Assign required user functions
if
self
.
mbs
.
opt_load_c
<
2
:
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> Loading user functions"
)
mbs_msg
(
"DEBUG>> Loading user functions
\n
"
)
self
.
mbs
.
__load_user_fct__
(
__MODULE_DIR__
,
self
.
user_fun_list
,
self
.
user_path
)
self
.
mbs
.
__assign_user_fct__
(
self
.
user_fun_list
,
self
)
...
...
@@ -164,7 +164,7 @@ class MbsPart(object):
if
self
.
mbs
.
opt_load_c
<
1
:
# Loading symbolic function
if
__DEBUG__
:
mbs_msg
(
"DEBUG>> Loading symbolic functions"
)
mbs_msg
(
"DEBUG>> Loading symbolic functions
\n
"
)
self
.
mbs
.
__load_symbolic_fct__
(
__MODULE_DIR__
,
self
.
symb_fun_list
,
self
.
symbolic_path
)
self
.
mbs
.
__assign_symb_fct__
(
self
.
symb_fun_list
,
self
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment