Skip to content

[Example] Convert Torusfall XML scene to SofaPython3 scene#6089

Open
fredroy wants to merge 2 commits intosofa-framework:masterfrom
fredroy:torusfall_rewrite_py
Open

[Example] Convert Torusfall XML scene to SofaPython3 scene#6089
fredroy wants to merge 2 commits intosofa-framework:masterfrom
fredroy:torusfall_rewrite_py

Conversation

@fredroy
Copy link
Copy Markdown
Contributor

@fredroy fredroy commented Apr 22, 2026

I wanted to test different solver or model for each torus but it was a pain in the xml file to apply to all the toruses.
Moreover it was quite unreadable because of the length of the scene, the long strings, etc.

So I ask Claude to rewrite and refactor in python

The cylinders part can be customized (increasing/decreasing the numbers).
I wanted to do the same with the toruses but it was a pain to find a programmatically way to compute them so I let as it is for now.

[with-all-tests]


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).

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI labels Apr 22, 2026
@bakpaul
Copy link
Copy Markdown
Contributor

bakpaul commented Apr 23, 2026

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

@hugtalbot
Copy link
Copy Markdown
Contributor

I am sorry to intervene on this PR after the SOFA dev meeting.
I would have advocated for keeping the XML version.
Else, we should define that we aim at replacing all XML scenes in the main SOFA repository.

@hugtalbot
Copy link
Copy Markdown
Contributor

@bakpaul how to add it in the PerformanceRegressionTests?

@bakpaul
Copy link
Copy Markdown
Contributor

bakpaul commented Apr 30, 2026

To add it to the perf tests, we first need to enable running python scripts, which is not an issue. And then we will only need to add the filename inside the .performance-tests file inside of the repo. I'll do it one this PR is ready to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI pr: clean Cleaning the code pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants