Forum Replies Created
-
AuthorPosts
-
HugoKeymaster
Dear forum users,
Following the process of migration, posting new replies will be prevented very soon in March.
Make sure you moved on GitHub Discussions and join the user-dev community!
See you there!HugoKeymasterGreat, thanks @scheikl! That’s awesome!
Best wishes,
Hugo
—
NOTE: we are now moving the forum to GitHub Discussions. Do not hesitate to start using it already!
More information on the migration process can be found online.HugoKeymasterThanks @akthetimes for taking time to support others.
As you know we now moved to GitHub Discussions, we would be glad to have your input there 😉Best wishes,
Hugo
—
NOTE: we are now moving the forum to GitHub Discussions. Do not hesitate to start using it already!
More information on the migration process can be found online.HugoKeymasterHey @vanisri
Could you please test changing the lines using the TransformEngine:
# WALL: childw=node.addChild('child wall') childw.addObject('MeshGmshLoader', name='wall', filename='E:\Softwares\GmSH\gmsh-4.8.4-Windows64\gmsh-4.8.4-Windows64\wallbig') childw.addObject('MeshTopology', name='topology-w', src='@wall') childw.addObject('TransformEngine', name='transfengine', template="Vec3d", translation=[-2, 0, 0], input_position='@topology-w.position') childw.addObject('MechanicalObject', name='mechobj-w', position="@transfengine.output_position", template='Vec3d', showObject='1') childw.addObject('UniformMass', totalMass='1') childw.addObject('TriangleFEMForceField', youngModulus='10000000') childw.addObject('TriangleCollisionModel') childw.addObject('LineCollisionModel') childw.addObject('PointCollisionModel')
Two remarks:
– always put the collision models in subnodes for each object and use a mapping to connect the physics to the collision model
– we usually apply forces or enforce the position of few points of a deformable object. Why would you like to apply rigid motion to your deformable body?Best wishes,
Hugo
—
NOTE: we are now moving the forum to GitHub Discussions. Do not hesitate to start using it already!
More information on the migration process can be found online.HugoKeymasterHugoKeymasterDear @thegreatludini
I just created a similar reply on our new “forum” which is GitHub Discussions here.
Let me know whether this reply helps.
Best wishes,Hugo
—
NOTE: we are now moving the forum to GitHub Discussions. Do not hesitate to start using it already!
More information on the migration process can be found online.HugoKeymasterHey @akthetimes
Correct. Starting from this week:
– new registration on the Forum will be prevented and redirected towards GitHub Discussions
– Users will not be able to create new topics
– All admin replies will include the footer your noticedThe issue #2591 has been opened for you to follow the migration process.
Any feedback is most welcome.
Best wishes,Hugo
—
NOTE: we are now moving the forum to GitHub Discussions. Do not hesitate to start using it already!
More information on the migration process can be found online.HugoKeymasterHey @akthetimes
Great that OscillatorConstraint does the job!
Regarding a later implementation as a controller, all you would need in your controller is a link to the MechanicalObject of your object so that you can write in it the new position at each time step.The MechanicalStateController (C++ class in SOFA) could be worth looking at.
Best wishes,
Hugo
—
NOTE: we are now moving the forum to GitHub Discussions. Do not hesitate to start using it already!
More information on the migration process can be found online.HugoKeymasterDear SOFA Forum,
Most of you asked for it: this forum will be moving to GitHub Discussions in the next months. The Discussions feature is already active on GitHub, feel free to start using it.
A dedicated issue #2591 has been opened to present the migration process.
Key dates for the forum:
end of January:
– new registration will be redirected to Discussions
– creating new topics will be blocked
– replying to existing topic remains possible
end of February:
– posting is not possible anymore
by May, the forum will be fully de-activatedBest wishes,
The SOFA staff.
HugoKeymasterHey @akthetimes
Thanks for posting it on the forum.
The way I would recreate a desired motion of an object would be to implement this change of position (dofs) as a controller, whether a python or a C++ one, which would overwrite the new positions of your object at each time step.For oscillatory motion, we also have a projective constraint (similar to what I wrote just previously, projecting at the end of the time step the new positions) named: OscillatorConstraint.
Would this suit you?
Is a whole object moving or would you like just to impose an oscillatory motion of a part of an object?Best,
Hugo
HugoKeymasterHey @abdelrahman2010
Strange, you are using the binary and tough, the problem seems to come from python/SofaPython3. Let me poke @guillaumeparan our release manager here.
Hugo
HugoKeymasterHey @ztjsofa
It may be related that you are on MacOS (12). MacOS 11.6 works well though,or are you maybe running SOFA in a virtual machine?
Best,
Hugo
HugoKeymasterHey @dabou
This error simply means that you did not load the SofaPython3 plugin.
To load python scripts, this plugin is needed.Best wishes,
Hugo
HugoKeymasterHey @dabou
I think the binaries available on the project.inria are not the latest one.
You can pick :
– the SOFA binaryDownload aside all needed plugins, e.g.:
– the SoftRobots plugin binary
– the STLIB plugin binaryand them place these plugins in:
– (Linux/MacOS) the folder SOFA/install/plugins/
– (Win) the folder SOFA/install/binThen for python, the explanations are given here.
Let me know if this helps
Best wishes,
Hugo
HugoKeymasterHey @abdelrahman2010
Indeed the plugin was developed years ago by an indie dev.
Now the trend is more to go through python as explained here.Let me know if this helps.
Best wishes,
Hugo
HugoKeymasterDear @thegreatludini
Welcome on the SOFA forum and thanks for your patience.
As you noticed all information
strain
,stress
,principalStressDirection
etc. cannot be accessed (in python or in the GUI). This is due to the fact that these are attribute of the class, and not Data. Data are the attributes which are highlighted to the users and available in python/GUI.To access them, you need to update the TriangularFEMForceField and make these traditional C++ attributed becoming SOFA Data.
All component data are then automatically bound for python.
I hope this helps.Best wishes,
Hugo
10 January 2022 at 17:18 in reply to: SOFA scene with imposed displacements and Von Mises stress computation in 2D #21350HugoKeymasterhey @vanisri
Rayan is not the area anymore, he was an intern.
You can get inspired from the C++ and translate it into python.All you need is to have an access to the topology and the mechanical object (mstate).
Then compute at init the shapeVectors.When you want it, compute the strain as it is done by the function
strainplaceholder
(itself calling thestrain()
) function in Rayan’s code.Best wishes,
Hugo
HugoKeymasterHey @vanisri
This information is indeed needed for FE computation. However, SOFA FE codes usually keep this information internally, therefore not visible in a data field.
Using the topology + geometry information, you should be able to retrieve though. Else, you would need to create a new data in your FE code to make this volume info available in the simulation.
I hope this helps.
Best,Hugo
HugoKeymasterand a happy new and healthy year to you Paul!
HugoKeymasterHey @scheikl
Did you solved your issue? It sounds more a right issue on your machine.
Was it? you are trying to install SOFA in a repo where you are not allowed to write (/lib/
)You should be able to define the install dir yourself.
Let me know if this helps.Best wishes,
Hugo
HugoKeymasterHey @vanisri
Good point, it’s an old notation still working though.
[-1] means the previous component (above in the graph).In the above example of the TransformeEngine.scn,
input_position="@[-1].position"
in the TransformEngine means that it gets the position data field from the SparseGridTopology which is defined just before in the node.I hope this clarifies the example scene.
Best wishes,Hugo
10 January 2022 at 17:02 in reply to: Error: couldn’t import objects from stlib3.physics.rigid #21344HugoKeymasterHey @qwe12050
Thanks for noticing us, let me poke @damien-marchaluniv-lille1-fr he should be able to answer this.
All my apologies for our delay, and not being able to help straightaway.Best wishes,
Hugo
HugoKeymasterHey @dlouis
I apologize for the delay of my reply.
This sounds more like a python env/compilation issue. Which version of SOFA, SofaPython3 are you using? Is this the binary / a compiled version ?
Regarding your last point to assign dynamically a position, you can take a look at this post. Let us know if it helps.
Best wishes,
Hugo
-
AuthorPosts