Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MS0102: open a .osim file and load its elements to the navigator. #2

Closed
idhamari opened this issue Jan 24, 2020 · 11 comments
Closed

MS0102: open a .osim file and load its elements to the navigator. #2

idhamari opened this issue Jan 24, 2020 · 11 comments

Comments

@idhamari
Copy link
Contributor

idhamari commented Jan 24, 2020

  • xml parsing for different model elements and add them to the navigator with an explanatory icon
  • multiple models can be uploaded at the same time
  • the parser should be flexible to be used later for different purposes e.g. create or modify new elements.
@idhamari
Copy link
Contributor Author

How is the progress so far? are there some difficulties?

It would be nice if we can close this milestone before the end of this month.

Some tips:

  • No need to worry about the visualizer or the visualization part for now.
  • It is recommended to use the same code from java after converting it to cpp. I think there is some parsers available in opensim-core and opensim-gui. This also helps to keep the compatibility between the java and cpp interface and gives us more understanding about the current java gui.

@yasseerr
Copy link
Contributor

yasseerr commented Feb 12, 2020

@idhamari Hi !

  • sorry for the late respense the notification didnt reach me .

  • the model is fully loaded to the navigator with icons and multiple models at once
    see if something is missing before merging this commit 22e30f5

  • for the vtk ,i download it and run the draft and im gonna try and integrate it next in the project
    2020-02-12_19-06-06

  • some error that can throw contributors off and make you run in cercles are:
    -- use the same Qt Kit as the one you build OpenSim/Vtk with like Msvc2017 == Msvc2017 and not MinGW
    -- when building the project use the same building configuration off OpenSim/Vtk
    ---like when you build in ReleaseWithDebInfo it should be the same in Qt not Debug or Release

@idhamari
Copy link
Contributor Author

Looks very good, well done!

If needed, I will provide a feedback after I test it.

For now, please merge the commit, close this issue and proceed to the next task.

@idhamari
Copy link
Contributor Author

@yasseerr

Ok, I just checked the files. Do we really need all these files? Since they are all doing the same things, can't we just create only one file for this e.g. vsNavigator.h vsNavigator.cpp

Anything related to the navigator we add to this file.

@idhamari
Copy link
Contributor Author

@yasseerr

another comment:

please add vs to all classes files and classes names and use standard naming ( capitalize first letters of the words) e.g.:

   simulationtoolswidget  should be vsSimulationToolsWidget

Also in the navigator use consistent naming for the nodes e.g.

   Bodies or BodySet
   Forces or ForceSet

I would use one word e.g. Bodies, Forces, Markers..etc. Please also pay attention to the first letters, it should be capitalized e.g. Offset instead of offset and ContactGeomtries instead of contactgeometryset

@idhamari
Copy link
Contributor Author

one more comment, please use a cross-platform code e.g. using cmake variables e.g. in CMakeLists.txt

use

       add_executable(OpensimQtGUI
                main.cpp
                ${CMAKE_CURRENT_SOURCE_DIR}/Modeling/oneprobnode.h

instead of

       add_executable(OpensimQtGUI
               main.cpp
               Modeling/oneprobnode.h

the second one may work in Windows but in Linux it produces a configuration error

@idhamari
Copy link
Contributor Author

@yasseerr

I just built the source and tried to run it. It seems the open model action is not working. Am I missing something?

@yasseerr
Copy link
Contributor

yasseerr commented Feb 12, 2020

@idhamari

  • the different files will be used later to add specific fonctions/actions/properties for each node
  • the naming of the files(not the classes inside the file) follow Qt notation when you add ClassNam the correspendente file will be named classname automaticly by QtCreator (just for the file name) if you like i will change them to visual studio notation if you are using vs
  • when you open bodiesnode the class inside is BodiesNode and most of the class naming is taken from the OpenSim_gui project
  • i will add {Source dir} to all codes afterwork

@yasseerr
Copy link
Contributor

yasseerr commented Feb 12, 2020

@idhamari
for the error it happend to me and to fix it :
are you running the project in Debug Release or ReleaseWithDebugInfo?
is it the same as the Configuration for the active OpenSim binary ( the build) ?
What kit are you using in Qt Project MSVC2017 MinGw?
make sure the kit is the same as the one you selected in Cmake to build OpenSim Core?
if none of this helped send me screenshots or we can use teamviewer

@idhamari
Copy link
Contributor Author

@yasseerr

Thanks for the info. I still think it is better to use one file with a flexible code as most of the node actions are the same. We can discuss this more in a skype meeting if you like.

The error was related to cmake, it is already fixed using CMAKE_CURRENT_SOURCE_DIR.

The current problem is I can not open a model. When I click on open model nothing happens. Did you implement the action?

@idhamari
Copy link
Contributor Author

idhamari commented Feb 13, 2020

I removed the contents of the build folder then rebuild it again. The gui now working as expected and the model is loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants