Home › Forum › SOFA › Using SOFA › Rotation problem with AffineMovementConstraint and BeamFEMForceField
- This topic has 2 replies, 2 voices, and was last updated 6 years, 1 month ago by Hugo.
-
AuthorPosts
-
11 October 2018 at 20:00 #12169ChristianeBlocked
Hello everyone,
I’ve been working on a model where I need curved beams, amongst other things. I managed to simulate those curved beams with the BeamFEMForceField and apply a force at one end while clamping the other. This worked fine and the results were consistent with an equivalent FEM of the same beam.
I’ve also been trying to apply a displacement to a curved beam… and I’m not having as much success there. I use the AffineMovementConstraint to apply a translation at one end of my beam; it does translate as I want it to, however it also reorients the constrained DOF of my MechanicalObject to 0 0 0 1… which is not the behavior I need for the beam. If I constrain all beam DOFs, the beam will translate properly along its length, but all DOFs will be rotated to 0 0 0 1 until the end of the move. Below is the code for my scene:
<?xml version=”1.0″ ?> <Node name=”root” gravity=”0 0 0″ dt=”0.1″ time=”0″ > <APIVersion name=”versionAPI” level=”18.06″ /> <VisualStyle name=”ColonneVisualStyle” displayFlags=”showVisual showBehavior hideCollision hideMappings showMechanicalMappings hideOptions” /> <BruteForceDetection name=”delfault40″ /> <DefaultContactManager name=”delfault41″ response=”default” /> <DefaultPipeline name=”delfault42″ /> <MinProximityIntersection name=”delfault43″ alarmDistance=”1″ contactDistance=”0.5″ /> <EulerImplicitSolver name=”cg_odesolver” printLog=”0″ rayleighStiffness=”0.100000″ rayleighMass=”0.100000″ /> <CGLinearSolver name=”linear solver” template=”” iterations=”” tolerance=”” threshold=”” /> <UncoupledConstraintCorrection /> <!– Tige gauche –> <Node name=”RodPL” > <MechanicalObject template=”Rigid” name=”RodPLDOFs” position=” -283.4066 19.6884 157.8560 0.643344 0.382393 -0.338876 0.570130 -279.0498 20.6510 149.9200 0.643738 0.381965 -0.338373 0.570271 -274.6478 21.6228 141.9314 0.644131 0.381518 -0.337864 0.570428 -270.2004 22.6035 133.8906 0.644512 0.381063 -0.337362 0.570598 -265.7766 23.5775 125.9224 0.644878 0.380598 -0.336870 0.570786 -261.3422 24.5519 117.9647 0.645230 0.380124 -0.336386 0.570989 -256.8971 25.5264 110.0176 0.645572 0.379644 -0.335909 0.571203 -252.4416 26.5006 102.0814 0.645901 0.379145 -0.335436 0.571439 -247.9406 27.4816 94.0943 0.646219 0.378643 -0.334971 0.571686 -243.4642 28.4540 86.1804 0.646526 0.378127 -0.334510 0.571950 -238.9774 29.4248 78.2780 0.646820 0.377597 -0.334056 0.572234 -234.4803 30.3937 70.3873 0.647100 0.377059 -0.333609 0.572532 -229.9729 31.3602 62.5085 0.647375 0.376497 -0.333157 0.572854 -225.4198 32.3315 54.5807 0.647641 0.375927 -0.332710 0.573188 -220.8917 33.2921 46.7269 0.647890 0.375337 -0.332270 0.573548 -216.3532 34.2490 38.8859 0.648131 0.374733 -0.331829 0.573925 -211.8044 35.2019 31.0583 0.648366 0.374113 -0.331388 0.574320 -207.2451 36.1503 23.2443 0.648589 0.373466 -0.330945 0.574744 -202.6396 37.1011 15.3835 0.648805 0.372803 -0.330501 0.575185 -198.0592 38.0391 7.5983 0.649008 0.372117 -0.330059 0.575655 -193.4685 38.9711 -0.1718 0.649196 0.371420 -0.329624 0.576142 -188.8674 39.8967 -7.9261 0.649382 0.370694 -0.329178 0.576655 -184.2201 40.8226 -15.7245 0.649549 0.369961 -0.328745 0.577185 -179.5989 41.7339 -23.4454 0.649705 0.369207 -0.328311 0.577738 -174.9683 42.6374 -31.1485 0.649843 0.368453 -0.327891 0.578302 -170.3288 43.5326 -38.8333 0.649962 0.367696 -0.327484 0.578881 -165.6813 44.4191 -46.4989 0.650063 0.366941 -0.327093 0.579468 -160.9903 45.3034 -54.2045 0.650138 0.366195 -0.326725 0.580063 -156.3295 46.1713 -61.8299 0.650191 0.365463 -0.326380 0.580659 -151.6640 47.0296 -69.4344 0.650216 0.364767 -0.326072 0.581241 -146.9951 47.8779 -77.0176 0.650211 0.364092 -0.325798 0.581823 -142.3241 48.7161 -84.5792 0.650185 0.363450 -0.325553 0.582390 -137.6161 49.5506 -92.1777 0.650124 0.362854 -0.325356 0.582940 -132.9455 50.3682 -99.6955 0.650033 0.362285 -0.325195 0.583484 -128.2770 51.1754 -107.1913 0.649926 0.361761 -0.325066 0.584001 -123.6119 51.9723 -114.6654 0.649785 0.361271 -0.324978 0.584510 -118.9511 52.7586 -122.1180 0.649627 0.360804 -0.324915 0.585009 -114.2592 53.5406 -129.6071 0.649449 0.360367 -0.324880 0.585495 -109.6096 54.3058 -137.0169 0.649245 0.359941 -0.324871 0.585988 -104.9665 55.0605 -144.4058 0.649046 0.359559 -0.324876 0.586440″ velocity=”0 0 0 0 0 0″ force=”0 0 0 0 0 0″ externalForce=”0 0 0 0 0 0″ derivX=”0 0 0 0 0 0″ restScale=”1″ /> <MeshTopology name=”RodPLLines” lines=”0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39″ /> <BeamFEMForceField name=”RodPLFEM” radius=”2.75″ youngModulus=”197000″ poissonRatio=”0.301189″ /> <WriteState name=”RodPLState” filename=”RodPL.data” writeX=”1″ writeX0=”1″ writeF=”1″ DOFsX=”0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39″ /> <!– Deplacement de la tige gauche –> <BoxROI name=”Box1″ box=”-100000 -100000 -100000 100000 100000 100000 100000″/> <!AffineMovementConstraint name=”deplacementTige” indices=”0″ meshIndices=”@Box1.indices” translation=”10 0 0″ quaternion=”0 0 0 1″ drawConstrainedPoints=”1″ /> <!AffineMovementConstraint name=”deplacementTige” indices=”0″ translation=”10 0 0″ quaternion=”0 0 0 1″ drawConstrainedPoints=”1″ /> <AffineMovementConstraint name=”deplacementTige” indices=”@Box1.indices” translation=”10 0 0″ quaternion=”0 0 0 1″ rotation=”[1 0 0, 0 1 0, 0 0 1]” drawConstrainedPoints=”1″ /> <!AffineMovementConstraint name=”deplacementTige” indices=”0″ translation=”10 0 0″ quaternion=”0.643344 0.382393 -0.338876 0.570130″ drawConstrainedPoints=”1″ /> <!– Modele visuel –> <Node name=”RodPLVisuel” > <Node name=”RodPLVisu1″ > <OglModel name=”RodPLVisual1″ fileMesh=”cylinder.stl” translation=”-0 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 4.55215″ /> <RigidMapping name=”RodPLVisualMapping1″ input=”@RodPLDOFs” output=”@RodPLVisual1″ index=”0″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu2″ > <OglModel name=”RodPLVisual2″ fileMesh=”cylinder.stl” translation=”-4.55215 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.13854″ /> <RigidMapping name=”RodPLVisualMapping2″ input=”@RodPLDOFs” output=”@RodPLVisual2″ index=”1″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu3″ > <OglModel name=”RodPLVisual3″ fileMesh=”cylinder.stl” translation=”-4.58639 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.20687″ /> <RigidMapping name=”RodPLVisualMapping3″ input=”@RodPLDOFs” output=”@RodPLVisual3″ index=”2″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu4″ > <OglModel name=”RodPLVisual4″ fileMesh=”cylinder.stl” translation=”-4.62049 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.20336″ /> <RigidMapping name=”RodPLVisualMapping4″ input=”@RodPLDOFs” output=”@RodPLVisual4″ index=”3″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu5″ > <OglModel name=”RodPLVisual5″ fileMesh=”cylinder.stl” translation=”-4.58287 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.16377″ /> <RigidMapping name=”RodPLVisualMapping5″ input=”@RodPLDOFs” output=”@RodPLVisual5″ index=”4″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu6″ > <OglModel name=”RodPLVisual6″ fileMesh=”cylinder.stl” translation=”-4.58089 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.15978″ /> <RigidMapping name=”RodPLVisualMapping6″ input=”@RodPLDOFs” output=”@RodPLVisual6″ index=”5″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu7″ > <OglModel name=”RodPLVisual7″ fileMesh=”cylinder.stl” translation=”-4.57889 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.15557″ /> <RigidMapping name=”RodPLVisualMapping7″ input=”@RodPLDOFs” output=”@RodPLVisual7″ index=”6″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu8″ > <OglModel name=”RodPLVisual8″ fileMesh=”cylinder.stl” translation=”-4.57668 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.18686″ /> <RigidMapping name=”RodPLVisualMapping8″ input=”@RodPLDOFs” output=”@RodPLVisual8″ index=”7″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu9″ > <OglModel name=”RodPLVisual9″ fileMesh=”cylinder.stl” translation=”-4.61018 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.1822″ /> <RigidMapping name=”RodPLVisualMapping9″ input=”@RodPLDOFs” output=”@RodPLVisual9″ index=”8″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu10″ > <OglModel name=”RodPLVisual10″ fileMesh=”cylinder.stl” translation=”-4.57202 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.14153″ /> <RigidMapping name=”RodPLVisualMapping10″ input=”@RodPLDOFs” output=”@RodPLVisual10″ index=”9″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu11″ > <OglModel name=”RodPLVisual11″ fileMesh=”cylinder.stl” translation=”-4.56951 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.1364″ /> <RigidMapping name=”RodPLVisualMapping11″ input=”@RodPLDOFs” output=”@RodPLVisual11″ index=”10″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu12″ > <OglModel name=”RodPLVisual12″ fileMesh=”cylinder.stl” translation=”-4.56689 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.13105″ /> <RigidMapping name=”RodPLVisualMapping12″ input=”@RodPLDOFs” output=”@RodPLVisual12″ index=”11″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu13″ > <OglModel name=”RodPLVisual13″ fileMesh=”cylinder.stl” translation=”-4.56416 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.16101″ /> <RigidMapping name=”RodPLVisualMapping13″ input=”@RodPLDOFs” output=”@RodPLVisual13″ index=”12″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu14″ > <OglModel name=”RodPLVisual14″ fileMesh=”cylinder.stl” translation=”-4.59685 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.15505″ /> <RigidMapping name=”RodPLVisualMapping14″ input=”@RodPLDOFs” output=”@RodPLVisual14″ index=”13″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu15″ > <OglModel name=”RodPLVisual15″ fileMesh=”cylinder.stl” translation=”-4.5582 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.11327″ /> <RigidMapping name=”RodPLVisualMapping15″ input=”@RodPLDOFs” output=”@RodPLVisual15″ index=”14″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu16″ > <OglModel name=”RodPLVisual16″ fileMesh=”cylinder.stl” translation=”-4.55508 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.10675″ /> <RigidMapping name=”RodPLVisualMapping16″ input=”@RodPLDOFs” output=”@RodPLVisual16″ index=”15″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu17″ > <OglModel name=”RodPLVisual17″ fileMesh=”cylinder.stl” translation=”-4.55167 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.09989″ /> <RigidMapping name=”RodPLVisualMapping17″ input=”@RodPLDOFs” output=”@RodPLVisual17″ index=”16″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu18″ > <OglModel name=”RodPLVisual18″ fileMesh=”cylinder.stl” translation=”-4.54822 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.12825″ /> <RigidMapping name=”RodPLVisualMapping18″ input=”@RodPLDOFs” output=”@RodPLVisual18″ index=”17″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu19″ > <OglModel name=”RodPLVisual19″ fileMesh=”cylinder.stl” translation=”-4.58003 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.12066″ /> <RigidMapping name=”RodPLVisualMapping19″ input=”@RodPLDOFs” output=”@RodPLVisual19″ index=”18″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu20″ > <OglModel name=”RodPLVisual20″ fileMesh=”cylinder.stl” translation=”-4.54063 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.07708″ /> <RigidMapping name=”RodPLVisualMapping20″ input=”@RodPLDOFs” output=”@RodPLVisual20″ index=”19″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu21″ > <OglModel name=”RodPLVisual21″ fileMesh=”cylinder.stl” translation=”-4.53645 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.06845″ /> <RigidMapping name=”RodPLVisualMapping21″ input=”@RodPLDOFs” output=”@RodPLVisual21″ index=”20″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu22″ > <OglModel name=”RodPLVisual22″ fileMesh=”cylinder.stl” translation=”-4.532 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.09461″ /> <RigidMapping name=”RodPLVisualMapping22″ input=”@RodPLDOFs” output=”@RodPLVisual22″ index=”21″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu23″ > <OglModel name=”RodPLVisual23″ fileMesh=”cylinder.stl” translation=”-4.56261 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.08473″ /> <RigidMapping name=”RodPLVisualMapping23″ input=”@RodPLDOFs” output=”@RodPLVisual23″ index=”22″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu24″ > <OglModel name=”RodPLVisual24″ fileMesh=”cylinder.stl” translation=”-4.52212 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.03866″ /> <RigidMapping name=”RodPLVisualMapping24″ input=”@RodPLDOFs” output=”@RodPLVisual24″ index=”23″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu25″ > <OglModel name=”RodPLVisual25″ fileMesh=”cylinder.stl” translation=”-4.51654 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.02715″ /> <RigidMapping name=”RodPLVisualMapping25″ input=”@RodPLDOFs” output=”@RodPLVisual25″ index=”24″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu26″ > <OglModel name=”RodPLVisual26″ fileMesh=”cylinder.stl” translation=”-4.51061 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.01468″ /> <RigidMapping name=”RodPLVisualMapping26″ input=”@RodPLDOFs” output=”@RodPLVisual26″ index=”25″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu27″ > <OglModel name=”RodPLVisual27″ fileMesh=”cylinder.stl” translation=”-4.50407 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.03628″ /> <RigidMapping name=”RodPLVisualMapping27″ input=”@RodPLDOFs” output=”@RodPLVisual27″ index=”26″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu28″ > <OglModel name=”RodPLVisual28″ fileMesh=”cylinder.stl” translation=”-4.53221 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 9.02173″ /> <RigidMapping name=”RodPLVisualMapping28″ input=”@RodPLDOFs” output=”@RodPLVisual28″ index=”27″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu29″ > <OglModel name=”RodPLVisual29″ fileMesh=”cylinder.stl” translation=”-4.48952 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.97092″ /> <RigidMapping name=”RodPLVisualMapping29″ input=”@RodPLDOFs” output=”@RodPLVisual29″ index=”28″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu30″ > <OglModel name=”RodPLVisual30″ fileMesh=”cylinder.stl” translation=”-4.48141 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.95419″ /> <RigidMapping name=”RodPLVisualMapping30″ input=”@RodPLDOFs” output=”@RodPLVisual30″ index=”29″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu31″ > <OglModel name=”RodPLVisual31″ fileMesh=”cylinder.stl” translation=”-4.47278 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.93649″ /> <RigidMapping name=”RodPLVisualMapping31″ input=”@RodPLDOFs” output=”@RodPLVisual31″ index=”30″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu32″ > <OglModel name=”RodPLVisual32″ fileMesh=”cylinder.stl” translation=”-4.4637 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.95255″ /> <RigidMapping name=”RodPLVisualMapping32″ input=”@RodPLDOFs” output=”@RodPLVisual32″ index=”31″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu33″ > <OglModel name=”RodPLVisual33″ fileMesh=”cylinder.stl” translation=”-4.48884 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.93295″ /> <RigidMapping name=”RodPLVisualMapping33″ input=”@RodPLDOFs” output=”@RodPLVisual33″ index=”32″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu34″ > <OglModel name=”RodPLVisual34″ fileMesh=”cylinder.stl” translation=”-4.44411 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.87788″ /> <RigidMapping name=”RodPLVisualMapping34″ input=”@RodPLDOFs” output=”@RodPLVisual34″ index=”33″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu35″ > <OglModel name=”RodPLVisual35″ fileMesh=”cylinder.stl” translation=”-4.43378 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.85702″ /> <RigidMapping name=”RodPLVisualMapping35″ input=”@RodPLDOFs” output=”@RodPLVisual35″ index=”34″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu36″ > <OglModel name=”RodPLVisual36″ fileMesh=”cylinder.stl” translation=”-4.42324 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.8358″ /> <RigidMapping name=”RodPLVisualMapping36″ input=”@RodPLDOFs” output=”@RodPLVisual36″ index=”35″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu37″ > <OglModel name=”RodPLVisual37″ fileMesh=”cylinder.stl” translation=”-4.41256 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.84855″ /> <RigidMapping name=”RodPLVisualMapping37″ input=”@RodPLDOFs” output=”@RodPLVisual37″ index=”36″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu38″ > <OglModel name=”RodPLVisual38″ fileMesh=”cylinder.stl” translation=”-4.43599 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.82659″ /> <RigidMapping name=”RodPLVisualMapping38″ input=”@RodPLDOFs” output=”@RodPLVisual38″ index=”37″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu39″ > <OglModel name=”RodPLVisual39″ fileMesh=”cylinder.stl” translation=”-4.3906 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 8.77021″ /> <RigidMapping name=”RodPLVisualMapping39″ input=”@RodPLDOFs” output=”@RodPLVisual39″ index=”38″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> <Node name=”RodPLVisu40″ > <OglModel name=”RodPLVisual40″ fileMesh=”cylinder.stl” translation=”-4.37961 0 0″ rotation=”0 90 0″ scale3d=”2.75 2.75 4.37961″ /> <RigidMapping name=”RodPLVisualMapping40″ input=”@RodPLDOFs” output=”@RodPLVisual40″ index=”39″ mapForces=”0″ mapConstraints=”0″ mapMasses=”0″ /> </Node> </Node> </Node> </Node>
So how can I control the DOFs rotations when I apply an AffineMovementConstraint? I do not want to apply a rotation at this point, just have the DOFs remain in their preset orientation.
Regards,
Christiane11 October 2018 at 22:36 #12170ChristianeBlockedHello again,
I believe I found the problem, however I’m unable to correct it myself…
On line 288 of AffineMovementConstraint.inl, the rotation is calculated using quaternions. The final rotation is obtained by adding the initial orientation quaternion and the rotation quaternion. Normally, combining rotations is done by multiplying quaternions, not by adding them; in fact, a quaternion addition will not yield a unity quaternion, hence the result is not a rotation. There’s probably a check on the Rigid3Types which prevents keeping this non-unity quaternion as the orientation, and the end result is that I see my properly oriented beam segments go back to not being oriented until the end of the displacement, when they are reset to their original orientation.
Not being a progammer, this is beyond my meager c++ skills to correct.
Regards,
Christiane12 October 2018 at 12:24 #12174HugoKeymasterThank you very much for you notice and for daring taking a look into the c++ code!
That’s brave and that’s a good reflex.We noticed this week (on master branch) that some check of unity on the quaternion (for Rigid3Types) disappeared. However, the addition instead of multiplication might be an error. I need to check this part.
Thanks again for updating us: I created an issue to follow the prob here.
Best
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.