sofa icon indicating copy to clipboard operation
sofa copied to clipboard

[Topology.c.dynamic] Fix initTopology call chains for mesh without topology

Open epernod opened this issue 2 years ago • 2 comments

Method initTopology was not called if the topology is empty at start. For example if we start with a cloud of points.

And initTopology methods are chained called to initialize topology from lower level. For example Tetrahedron initTopology will call triangle version, then edge and finally pointTpology. Each initTopology is used to initialize buffers and cross buffer only if the topology is not empty.

Therefore in this special case the number of points was not well init for an empty topology.

This fix #3211


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

epernod avatar Aug 12 '22 09:08 epernod

[ci-build][with-all-tests]

epernod avatar Aug 12 '22 15:08 epernod

thanks @epernod for the fix :+1: @monkeygame do not hesitate to contribute a test corresponding to the failing case you had. Thanks for rising the issue :+1:

hugtalbot avatar Aug 17 '22 09:08 hugtalbot

Build OK. FIXME: 98 units, 111 scenes, 15 regressions 🙊

fredroy avatar Aug 19 '22 00:08 fredroy

[ci-build][force-full-build][with-all-tests]

fredroy avatar Aug 19 '22 02:08 fredroy

[ci-build][with-all-tests]

epernod avatar Aug 25 '22 13:08 epernod

Tests are still failing @epernod :

  • RegressionTests.Regression_test/Regression_test/TopologyRegression_test.sceneTest/AddingTriangle2EdgeProcess
  • UnitTests.Sofa_Component.Topology/AddTetrahedronProcessor_test.AddTetrahedra
  • UnitTests.Sofa_Component.Topology/AddTriangleProcessor_test.AddTriangles

hugtalbot avatar Aug 26 '22 07:08 hugtalbot

TopologicalChangeProcessor_test needs an update since the number of points is then known

@epernod

hugtalbot avatar Aug 31 '22 09:08 hugtalbot

[ci-build][with-all-tests]

epernod avatar Sep 01 '22 17:09 epernod

[ci-build][force-full-build][with-all-tests]

hugtalbot avatar Sep 07 '22 09:09 hugtalbot

[ci-build][force-full-build][with-all-tests]

hugtalbot avatar Sep 07 '22 09:09 hugtalbot

[ci-depends-on] detected during build #11.

To unlock the merge button, you must

  • Merge or close https://github.com/sofa-framework/Regression/pull/34 For this build, Regression/ExternalProjectConfig.cmake.in will be edited by builders with GIT_REPOSITORY https://github.com/sofa-framework/Regression GIT_TAG 8d35ce10069c2f7b220be31fa96c8039e767cd7d

sofabot avatar Sep 07 '22 09:09 sofabot

@damienmarchal @fredroy why is this PR both merged and postponed?

hugtalbot avatar Sep 23 '22 18:09 hugtalbot

@damienmarchal @fredroy why is this PR both merged and postponed?

it was ready and postponed because we wanted to wait for the CI to be back

epernod avatar Sep 23 '22 18:09 epernod