How to add force to a model? #155
Unanswered
zhang-qiang-github
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Q1: Generate a tet mesh of a cylinder (e.g. using tools like Tetgen) and load the vertices and tets using the command "addTetModel". |
Beta Was this translation helpful? Give feedback.
1 reply
-
Q1: if you use a triangle mesh, the object will be hollow. For volumetric objects you need a volumetric representation.
Q2: This is a generic parameter. You can get the value by
sim->getVecValue<Real>(Simulation::GRAVITATION)
and set it analogously.
Q3: First get the particle data from the model. Then call setAcceleration(particleIndex, accel).
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am learning the
pyPBD/examples/beam_model.py
, and I have several questions:Question1 How to add a cylinder?
Question2 The one end of the beam is fixed, and the other end of the beam is sway. Why the other end is sway? Is it affected by the gravity? Where set the gravity in the code?
Question3 How to apply a force to the beam? Please have a look for the following figure:
I expect to apply a force to a tube (the red arrow), and the tube turn to be bending. How can I apply a force to the tube?
Any suggestion is appreciated~~~
Beta Was this translation helpful? Give feedback.
All reactions