Skip to content

[Mapping] Introduce SubsetTopologicalMultiMapping with multiple topology inputs and one output#5952

Open
th-skam wants to merge 6 commits intosofa-framework:masterfrom
th-skam:th-topomultimap
Open

[Mapping] Introduce SubsetTopologicalMultiMapping with multiple topology inputs and one output#5952
th-skam wants to merge 6 commits intosofa-framework:masterfrom
th-skam:th-topomultimap

Conversation

@th-skam
Copy link
Contributor

@th-skam th-skam commented Feb 11, 2026

A new SubsetTopologicalMultiMapping component that works with the SubsetMultiMapping, similar to the existing SubsetTopologicalMapping - SubsetMapping relationship.

There can be multiple inputs which are mapped/merged into a unified topology. This is done by offsetting the index addressing list of the mapped topological elements.

In addition, it generates an indexPairs array that can be linked to a SubsetMultiMapping component so that mechanical information can be propagated from and to subset nodes.

For triangles/quads, I added the option to flip normal vector orientation.

I also added a scene to demonstrate this.

[with-all-tests]

@th-skam th-skam added pr: status to review To notify reviewers to review this pull-request pr: new feature Implement a new feature labels Feb 11, 2026
@fredroy
Copy link
Contributor

fredroy commented Feb 19, 2026

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

@bakpaul bakpaul requested a review from alxbilger February 19, 2026 09:30
Copy link
Contributor

@alxbilger alxbilger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I am not mistaken, the code corresponds more to IdentityTopologicalMultiMapping than SubsetTopologicalMultiMapping. For me, Subset means that you filter part of the input topologies. What do you think?

d_indexPairs(initData(&d_indexPairs, sofa::type::vector<unsigned>(), "indexPairs",
"Output: flat array of (source_index, coord_in_source) pairs"))
{
d_indexPairs.setReadOnly(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can eventually add d_indexPairs to the group "Outputs"

@th-skam th-skam added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: new feature Implement a new feature pr: status wip Development in the pull-request is still in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants