Open
Conversation
damienmarchal
commented
Jul 12, 2024
| class Test(unittest.TestCase): | ||
| def test_example_scene(self): | ||
|
|
||
| scene = Sofa.import_sofa_python_scene("/home/dmarchal/projects/dev/sofa1/plugins/Cosserat/docs/testScene/tuto_1.py") |
Member
Author
There was a problem hiding this comment.
I wonder how to replace the hard coded path... a DataRepository for Cosserat ?
It looks like it is a controller... (but in that cas why exposing it to python ?) Further refactoring should be added.
They are un-needed and bloat the namespace.
It is important to always keep only the neededs includes. Having un-needed includes: - slow down compilation time - increase (non linearly) the amount of file to recompile on change - make the code appears more complex and entangled that it is actually.
Refactor STEP3
adagolodjo
reviewed
Jul 25, 2024
| namespace cosserat::controller | ||
| { | ||
| namespace { | ||
| using sofa::component::topology::container::dynamic::PointSetTopologyModifier; |
Collaborator
There was a problem hiding this comment.
Need #include <sofa/component/topology/container/dynamic/PointSetTopologyModifier.h>
| @@ -95,7 +95,7 @@ class DiscreteCosseratMapping : public BaseCosseratMapping<TIn1, TIn2, TOut> { | |||
|
|
|||
| public: | |||
| ////////////////////////////////////////////////////////////////////// | |||
Collaborator
There was a problem hiding this comment.
Can't do this any more using typename Inherit1::In1VecCoord;
| #include <sofa/helper/ColorMap.h> | ||
|
|
||
| #include <boost/math/special_functions/legendre.hpp> | ||
| #include <sofa/core/trait/DataTypes.h> |
Collaborator
There was a problem hiding this comment.
Is not compiling. Maybe miss something ?
Member
Author
There was a problem hiding this comment.
This is something that was merge 4 days ago: sofa-framework/sofa#4788 so maybe you need a fresher sofa version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tests are splitted in two set.
The c++ tests are implemented in Cosserat.Core.Tests
The python tests are implemented in Cosserat.Scene.Tests
To add extra test please do: