Skip to content

Conversation

@psomers3
Copy link
Contributor

Hopefully this is a better way to fix #113. I don't have the time right now to fill the objects with their class-specific properties/methods, but the groundwork is now there for someone to add them as needed.

The following now works in a python forcefield:

    def init(self):
        self.topology = self.getContext().getTopology()
        self.topology = self.getContext().getMeshTopology()
        self.topology = self.getContext().getMeshTopologyLink(Sofa.Core.BaseContext.SearchUp)
        print(self.topology.edges.array())

@jnbrunet
Copy link
Contributor

Hey @psomers3 ,

Indeed, this is a much better fix !

I don't have the time right now to fill the objects with their class-specific properties/methods

No one has. It won't be possible to bind every properties or methods for every SOFA components. But at some point, if more people come in and add the bindings they need, we will get a not so bad coverage. By adding these python components, you just made this task easier, while fixing your issue, so very nice :)

+1 for me

@hugtalbot @fredroy @guparan did one of you guys wanted to take a quick look?

@fredroy
Copy link
Contributor

fredroy commented Feb 17, 2021

Looks fine to me 👍

@jnbrunet jnbrunet merged commit a81a50f into sofa-framework:master Feb 18, 2021
@guparan guparan added this to the v21.06 milestone Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants