Forum Replies Created
I could think off 2 .pyscn files:
-create part of my scne with the roi
-animate for on time step
-get my indices, save them somehow
-import indices somehow
-continue/finish my createscene process
Or is there already some more clever approach to this?
I understand. But if I need the the list of indices in the creation of my scene how can I do this?
Is there something possible like:
– createScene() (until I need initialization)
– continue with createScene() ?31 March 2020 at 18:31 in reply to: [SOLVED] How to import numpy in python scripting of SOFA? #1561030 March 2020 at 14:46 in reply to: [SOLVED] How to import numpy in python scripting of SOFA? #15583
thanks for the fast reply, in the meantime I have installed python 2.7 and pip installed numpy into that.
sys.prefixis the one I needed to check.
Output in the runSofa console window:
[INFO] [SceneCheckerVisitor] Finished validating node “root”.
C:\Python27 C:\Users\swtouch\SOFA\v19.12.00\bin\runSofa.exe ['', 'C:/Users/swtouch/SOFA/v19.12.00/plugins/SofaPython/lib/python2.7/site-packages', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Users\\swtouch\\Anaconda2\\Lib', 'C:\\Users\\swtouch\\Anaconda2\\DLLs', 'C:\\Python27\\Lib', 'C:\\Python27\\DLLs', 'C:\\Python27\\Lib\\lib-tk', 'C:\\Users\\swtouch\\SOFA\\v19.12.00', 'C:\\Users\\swtouch\\SOFA\\v19.12.00\\bin', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages'] [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckAPIChange, SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias]
Simon30 March 2020 at 11:45 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #15581
now it is working. I have forgotten to get a python27 + numpy for the DeFrost SOFA version to work.
Now I can progress.
Thanks30 March 2020 at 10:24 in reply to: [SOLVED] How to import numpy in python scripting of SOFA? #15580
I am having the same problem as you had. Good to see you have solved that.
– What do you mean by the default python? I have Anaconda2, Anaconda3 and a clean python 2.7, which one is the default? How do I find out?
– How can I find out which python my SOFA is using? I am so far using the precompiled SOFA binaries.
– How to change the default python? Has this something to do with building SOFA or is this some system setting. I am using Windows 10.
Thanks in advance
Simon25 March 2020 at 13:06 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #15554
I assume what I need to change in my use of TransformEngine is something from that post:
In my case Rigid at (2,0,0). I have to adopt my .py to get a local rotation, as this is what I want.
Question: The TransformEngine is always a transformation referring to the global reference frame at (0,0,0)?
This is what I assume from the behaviour of:
rigid_frame_rotation.pyscn in:25 March 2020 at 10:32 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #15553
okay cool, can I see your corresponding .pyscn file + .py(for the rotation, if you do so)?
I prepare another question because I’ve come up with something where my problem originates. maybe…
Thank you25 March 2020 at 08:20 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #15548
maybe I’ve messed up my TransformEngine I’ll have to check that first…25 March 2020 at 08:12 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #15547
aha ok, I understand it is not an error it’s a warning. So what I’ve build so far is the right way for my needs? And the fixedConstraint is not working properly in this case? Or have I done something wrong?
Maybe the TransFormEngine and the Constraint don’t work together well. I’ll try something in this direction, but in general I will need a way to prescribe the rotation of the Rigid3D in a time dependent manner, while its position is fixed.
I can’t see the picture, but I know the behaviour is strange.
Simon24 March 2020 at 13:52 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #15535
again I’ve Problems with the forum, I’ve written a reply but it’s not listed in this post. But I get an E-mail, that Simon has posted a new reply. And in this mail I see my post. So I try again with this reply.
I’ve adopted your suggested MechanicalMatrixMapper.pyscn example to my needs.
But I don’t get the fixedConstraint to work now. I get the error:
[WARNING] [FixedConstraint(Fix)] Can not find the topology, wont be able to handle topological changes23 March 2020 at 20:01 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #1552923 March 2020 at 20:00 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #15528
sorry for the delay…
with the precompiled “DeFrost” Version of SOFA I get following erros, when running your example code. The “plugins/SoftRobots/docs/tutorials/FirstSteps” Tutorial however runs with no problem. What could be the problem?
[ERROR] [PythonScript] ImportError: cannot import name _distributor_init File "stlib_example_damien.pyscn", line 8, in createScene from stlib.physics.mixedmaterial import Rigidify File "C:/Users/swtouch/SOFA/SOFA_v19.06.99_custom_Win64_v8.1/plugins/STLIB/python\stlib\physics\mixedmaterial\__init__.py", line 17, in <module> from rigidification import Rigidify File "C:/Users/swtouch/SOFA/SOFA_v19.06.99_custom_Win64_v8.1/plugins/STLIB/python\stlib\physics\mixedmaterial\rigidification.py", line 25, in <module> from splib.numerics import Vec3, Quat, sdiv File "C:/Users/swtouch/SOFA/SOFA_v19.06.99_custom_Win64_v8.1/plugins/STLIB/python\splib\numerics\__init__.py", line 38, in <module> import numpy File "C:\Users\swtouch\Anaconda2\lib\site-packages\numpy\__init__.py", line 140, in <module> from . import _distributor_init6 March 2020 at 18:37 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #153014 March 2020 at 22:32 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #15284
it’s going in the right direction. Sadly my earlier have not been posted (somehow the FORUM and me having some digitial issues) but this is not a problem because we have skipped alot of bad scenes from my side I think.
So I am saying it again now. Good to have you back in the forum, without you it’s not the same.
And on goes the journey.
I modified the scene:
And I am seeing too much movement/flexibility in the constraint:
I want to make the constraint stiffer or somehow reduce this violation. Which parameters can be adjusted?4 March 2020 at 14:38 in reply to: [SOLVED] RigidMapping from Rigid3d to only some particles of FEMbody #15277
maybe I had an overall solver missing.
Looks much better now. Now I guess I have to adjust my rotation speed.