19 September 2018 at 17 h 33 min #11961
Hello, I am working on a cloth simulation problem and in my framework I plan to manipulate the cloth with a point object, now to pick up the object, in a manner similar to SHIFT+LeftMouseClick, is there a function in python to do the same? If not, is there anything similar to that?19 September 2018 at 17 h 42 min #11962
I didnot get what you are looking for exactly, could you please elaborate more with more details?.19 September 2018 at 17 h 51 min #11963
Hello ElDiwiny, thanks for your quick response.
So, in the way that we can use SHIFT+LeftMouseClick in GUI to pick up objects, is there a functionality in SofaPython Plugin which allows us to pick up objects in a similar manner?
For example, if I have a cloth lying on a table and I wish to pick it up by attaching its vertex to a small point object, just like you would do it with the mouse arrow in the GUI
Please let me know if it’s still unclear, I could upload a video/image to show what I mean20 September 2018 at 21 h 32 min #11974
Sorry for the late reply! Could you please check these files that I have uploaded and see whether this could answer your question. If that doesnot answer your question, I will try to help you as much as I can.21 September 2018 at 11 h 51 min #11982
Hello ElDiwiny, that was a good illustration of what my simulation looks like! and now assume that rather than using the mouse to move the cloth points, I want an automated python script to move a pointer object, a red sphere in this case, please have a look at this video
Here, the sphere can be moved from within a python script, and made to go at an part of the cloth that we want, now, If we want to stick the cloth to this sphere, so that the cloth moves with this sphere, how can we do it?
To make it easier to comprehend, I am looking for a method that would attach this sphere to a point on the cloth and release it afterwards.
Thanks a lot24 September 2018 at 23 h 30 min #12001
Sorry for my late reply! I understand you question, it is related to RigidMapping probably, however, I cannot guarantee that I can solve, but I will try to do my best, would be able to share the scene script.24 September 2018 at 23 h 30 min #12002
.25 September 2018 at 18 h 09 min #12020
Hello, yes sure, here is my script, https://gist.github.com/jangirrishabh/20ac603134528219a8b3a2c2667172f51 October 2018 at 15 h 34 min #12072
Hello ElDwiniy, if you would be able to give me a hint towards how to go about doing it with RigidMapping, I might be able to help as well! any minor directions would be appreciated 😀2 October 2018 at 18 h 03 min #12078EleonoraParticipant
5 October 2018 at 16 h 22 min #12117
- University of Verona
- You must be logged in to reply to this topic.