Forum Replies Created
-
AuthorPosts
-
AnnaBlocked
Thanks for your answer Ugo,
Working with a thinner resolution of my hexa might be a trick then.
AnnaBlockedHi @noura,
I actually implemented the same thing using my own component but I then came across collision issues. Indeed, in a simple scene with a deformable object and an moving obstacle, collisions are not handled correctly but they are if my obstacle is fixed.
Did you came across such a problem?
11 October 2017 at 16:27 in reply to: [SOLVED] Translating mechanical objects (not working c++) #10065AnnaBlockedHi,
Regarding the source, applyTranslation and applyRotation seem to apply your delta directly to the positions so that should work in your case.
AnnaBlockedHi Hugo,
Thanks for you answer.
Here is an example using the sphere.obj found in the share/mesh/ directory.
<?xml version="1.0"?> <Node name="root" gravity="0 -10 0" animate="0" > <VisualStyle displayFlags="showBehaviorModels showForceFields showCollisionModels" /> <DefaultPipeline name="Collision Pipeline" /> <BruteForceDetection name="Detection" /> <MinProximityIntersection name="Proximity" alarmDistance="0.3" contactDistance="0.2" /> <DefaultContactManager name="Contact Manager" response="default" /> <DefaultCollisionGroupManager name="Collision Group Manager" /> <DefaultAnimationLoop name="defaultAnimationLoop" /> <Node name="Simulation" gravity="0 -10 0" dt="0.01" time="0" animate="0" > <EulerImplicitSolver name="Euler Implicit" /> <CGLinearSolver template="GraphScattered" name="Conjugate Gradient" iterations="25" tolerance="1e-05" threshold="1e-05" /> <MeshObjLoader name="loader" filename="/tmp/sphere.obj" /> <SparseGridTopology name="SparseGrid Topology" fileTopology="/tmp/sphere.obj" n="5 5 5" /> <MechanicalObject template="Vec3d" name="Particles"/> <UniformMass template="Vec3d" mass="1" /> <HexahedronFEMForceField template="Vec3d" name="HexahedronFEM Forcefield" poissonRatio="0.45" youngModulus="200" gatherPt=" " gatherBsize=" " /> <FixedConstraint template="Vec3d" name="BehaviorConstraints" indices="72 73 97 98" /> <Node name="Collision" gravity="0 -10 0" dt="0.01" time="0" animate="0" > <MeshTopology position="@../loader.position"triangles="@loader.triangles" quads="@loader.quads" tetrahedra="@loader.tetras" hexahedra="@loader.hexas" /> <MechanicalObject template="Vec3d" name="CollisionObject" /> <TTriangleModel template="Vec3d" name="TriangleCollision" moving="1" simulated="1" color="1 0.5 0 1" /> <TLineModel template="Vec3d" name="LineCollision" moving="1" simulated="1" color="1 0.5 0 1" /> <TPointModel template="Vec3d" name="PointCollision" moving="1" simulated="1" color="1 0.5 0 1" /> <BarycentricMapping template="Vec3d,Vec3d" name="MechanicalMapping" input="@/Simulation/Particles" output="@CollisionObject" /> <!-- <FixedConstraint template="Vec3d" name="CollisionConstraints" indices= "317 335 336 337 338 339 340 355 356 357 358 359 360 375 376 377 378 379 380 382 " /> --> </Node> </Node> </Node>
If you uncomment the CollisionConstraints fixed constraint and comment the BehaviorConstraints, you’ll get the difference. I was expecting that the fixed points of the collision model remain fixed.
Am I missing something?
-
AuthorPosts