Forum Replies Created
-
AuthorPosts
-
22 March 2021 at 20:37 in reply to: [SOLVED] visualizing the difference between two models as a hot plot #18942ZahraBlocked
Hi Alex,
Your suggestions solved the issue, thank you very much.
Best,
Zahra21 March 2021 at 13:10 in reply to: [SOLVED] visualizing the difference between two models as a hot plot #18932ZahraBlockedDear Alex,
There is a problem with the scene you recommended: the surface of the grid is colorful on one side and black on the other side. This is problematic because When I apply the method on a 3D object like a liver, the color of the outer side of liver is black and its inside is colorful. I have investigated options of the DataDisplay and OglColorMap components to fix this but the problem persists. Do you have any suggestion for this?
Zahra
19 March 2021 at 15:01 in reply to: [SOLVED] visualizing the difference between two models as a hot plot #18928ZahraBlockedHi Alex,
Your comment saved me lots of time, thank you. This is exactly what I needed (Sorry for the delayed feedback).
Best,
ZahraZahraBlockedI sent you the emails.
I hope you can attend SOFA, I myself couldn’t succeed due to poor internet connection.
Best,
ZahraZahraBlockedHi Julien,
The link is sent via email. Have you checked promotion or spam folder? I’m not sure if it is OK to share the link here. If you give me your contact email, I can forward the email to you.
Best,
ZahraZahraBlockedDear Hugo,
Thank you for the explanation on “MeshLoader being a passive class in the scene”. I now understand the necessity of using the master branch to solve this issue.
Best,
ZahraZahraBlockedIt is currently 17.06 stable version (I tried it using 18.06 and it didn’t work either). Is it working on the newest versions?
ZahraBlockedDear Hugo,
Thank you for your reply. I tried your suggestion at first and it didn’t work (In struggling to find a solution, I wrote it as a string and forgot to correct it before uploading).
ZahraBlockedHi Hugo,
Thank you for reminding, I registered for the event.
Regarding the question, I tried a similar approach that you suggested, but it doesn’t work. Please find the codes and gmsh files in the link below:
https://gist.github.com/zbounik/3ac0ad45dd48bce88a1b45210e7eef28
I uploaded three gmsh files, but in my work I need to load a large number of gmsh files during the animation.
Best,
Zahra13 June 2020 at 22:19 in reply to: [SOLVED] reversing the direction of mesh normals and changing their color #16620ZahraBlockedDear Hugo,
Thank you for your kind explanation. I’m looking forward for the working flipNormals Gmsh loader. Meanwhile I will try to use Obj loader for the representation of Normals.Best,
Zahra3 June 2020 at 16:49 in reply to: [SOLVED] reversing the direction of mesh normals and changing their color #16529ZahraBlockedDear Hugo,
Setting the option “flipNormals” in MeshLoaders and TetrahedronSetGeometryAlgorithms and TriangleSetGeometryAlgorithms to 1 didn’t change the direction of normals. What do you mean that it depends on the code?
As an example, here is my code and mesh files:
https://gist.github.com/zbounik/c2c78c87de97d7ad0d7b1cc983d72f6dThank you for your guidance in advance,
Zahra31 March 2020 at 22:48 in reply to: [SOLVED] How to import numpy in python scripting of SOFA? #15615ZahraBlockedNice to hear that your problem is solved, and thanks for your explanation.
31 March 2020 at 11:35 in reply to: [SOLVED] How to import numpy in python scripting of SOFA? #15595ZahraBlockedHi @Simon,
Regarding the problem I encountered at that time, I solved it with so much trial and error. This is my final understanding of the process:
When I simply imported numpy in anaconda or in the Terminal without using SOFA, I had no problem. But when I imported SOFA and numpy, there was a conflict between different versions of numpy (although there seemed to be just one version of it). Uninstalling and reinstalling numpy didn’t work for me. So I guessed that there is a conflict here between numpy versions in the version of python that SOFA is using, and the default python that my system is using. Changing the default python of my system from python 2.7 to python 3.7 solved the issue.1- I also had Anaconda2, Anaconda3 and a clean python 2.7 on my system (Linux Ubuntu) that I encountered this problem. To find out which python is the default of the system, in the Linux Terminal simply type python (I guess “command prompt” in Windows is working similar to terminal in linux).
This is the result I get which shows the default python of my system is now Python 3.7.6:
$ python
Python 3.7.6 (default, Jan 8 2020, 19:59:22)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>>You can also try this:
In terminal (or in command prompt of windows) type:
which pythonThis gives you the folder of the default python:
/home/zahra/anaconda3/bin/python2- I didn’t deal with this directly.
3- I do not exactly remember the command for changing default python of the system, but there are some commands in the web (I’m not sure but I think it was this: alias python=python3). In my experience, it had nothing to do with building SOFA (I remember I rebuilt it but that didn’t solve the issue).
Hope this helps,
ZahraZahraBlockedHi @Binesh,
Thank you for willing to help me, jnbrunet’s reply solved the issue.
For your information on what I was trying to do: I wanted to put a marker on a specific node, in order to make it more recognizable among other nodes in the mesh.
Best,
ZahraZahraBlocked22 September 2019 at 15:18 in reply to: Activating twoWay option in attachConstraint component or not #14271ZahraBlockedDear Hugo,
Thank you for your kind invitation on joining SOFA Symposium. I really hope I have the opportunity to attend this professional event.
Regarding oneWay attachConstraint component, I think there is a problem with the definition as “the selected nodes (indices1) of object1 follow the associcated nodes (indices2) in object2.” (I also found the same definition in Modeler in the old versions of SOFA). I think the reverse is true, i.e. “the selected nodes (indices2) of object2 follow the associcated nodes (indices1) in object1.”
You can test this in the code below:https://gist.github.com/zbounik/85522f802309ca2c132ac17bc419d312
The meshes:
https://gist.github.com/zbounik/5a5c4105cbe7d98c6120c584bb7b6a13
https://gist.github.com/zbounik/1264c9cafe37b83438e854cd44881bd9I want the Fine mesh follow the coarse one. Based on your definition, I chose object1=’@Fine’, object2=’@Coarse’ in the attachConstraint.
In this case if I try different constant forces applying on the coarse one, the deformed models are not changing accordingly (you can see the position of node 76 in the exported meshes remains fixed for different forces). I guess that’s because the coarse mesh is following the fine mesh which is nearly unchanged.
When I change object1=’@Coarse’, object2=’@Fine’, the results are reasonable.
Do you confirm this or I might miss a point here?Best,
Zahra18 September 2019 at 16:49 in reply to: Activating twoWay option in attachConstraint component or not #14263ZahraBlockedThank you 🙂
18 September 2019 at 15:10 in reply to: Activating twoWay option in attachConstraint component or not #14261ZahraBlockedHi @Binesh, Hi @Hugo,
Thank you very much for your explanation.
To make sure, based on what you mentioned if I want Obj2 to simulate independently, and Obj1 to follow it, then I think I should set twoWays=false. Is it true?
Best,
ZahraZahraBlockedHi,
My problem with importing numpy has been solved. In my case, the problem was that the default python in my system wasn’t the one that SOFA is using. Changing the default python fixed the error.Best,
Zahra24 August 2019 at 15:42 in reply to: [SOLVED] How to import numpy in python scripting of SOFA? #14155ZahraBlockedMy problem with importing numpy has solved. In my case, the problem was that the default python in my system wasn’t the one that SOFA is using. Changing the default python removed the error.
Best,
Zahra24 August 2019 at 15:35 in reply to: [SOLVED] How to import numpy in python scripting of SOFA? #14154ZahraBlockedDear @Damien,
Thank you for your explanations on SofaPython3. It looks great!Best,
ZahraZahraBlockedZahraBlockedDear @Hugo,
The object I’m currently working with is a liver. The range of the values of the current mesh file is 8.5*5.1*2.3
Best,
ZahraZahraBlockedDear @Hugo.
I’m not sure if it is OK to ask my question here, but as it is directly related, I’am asking it here.
In reply to Noura, you have mentioned that “If the file mesh you load has values between 0 and 40, then your file is in mm.” This confused me. So why 40? What if the dimension of the loaded mesh be around 70?
I have another question here, is applying a constant force of 60 Newton to a node of a soft tissue realistic and reasonable?
Thanks for your guidance,
Zahra -
AuthorPosts