Skip to content

[Mapping] new component : Visual Beam Mapping - #241

Open
fredroy wants to merge 7 commits into
sofa-framework:masterfrom
fredroy:create_beam_quad_mapping
Open

fredroy wants to merge 7 commits into
sofa-framework:masterfrom
fredroy:create_beam_quad_mapping

Conversation

@fredroy

@fredroy fredroy commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

For creating a visual model of the beam, the typical scene uses edge2quad, creating quads around the centerline, and then adaptivebeammapping, mapping the vertices of the quads with the interpolation

It makes much more sense to map first and then create the quads around the mapped centerline.

Benches on 3instru_collis.scn (launched with glfw and offscreen mode to make sure the visual path is executed)

  • edge2quad + mapping:
    5000 iterations done in 39.477 s ( 126.656 FPS)
  • new beam visual mapping:
    5000 iterations done in 30.995 s ( 161.316 FPS)

Bonus: it can also generate a second layer to add thickness (useful for fluoroscopic images)

wip

fix different xtip

wip

wip2

wip3

wip4

working mapping

optimize computations

add timer

remove bogus test

not setting a topology is not an error
The mapping only implements apply() (applyJ/applyJT are empty), so it must
never be treated as a mechanical mapping. Setting mapForces/mapConstraints/
mapMasses in the scene file is too late: Node::addObject categorizes the
mapping before parse() reads the attributes. With the defaults false, the
mapping can feed a MechanicalObject (e.g. an X-ray tube surface) without
the constraint pass emitting an applyJT error every step.
@fredroy fredroy added enhancement New feature or request pr: new feature pr: status to review To notify reviewers to review this pull-request labels Oct 19, 2026

This branch has not been deployed

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

Labels

enhancement New feature or request pr: new feature 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.

1 participant