zanoni-mbdyn / blendyn

MBDyn (https://www.mbdyn.org/) graphical post-processor for blender (https://www.blender.org/)
GNU General Public License v2.0
40 stars 8 forks source link

visualization offset error for both body and joint #54

Closed kuwt closed 11 months ago

kuwt commented 1 year ago

I downloaded the zip and I used blender 2.80. And I followed the pendulum tutorial second case(https://www.mbdyn.org/userfiles/documents/tutorials.pdf) so here is my mbd file. From the case, the body should be at the same position as the node while the joint should be at the origin. But in my blendyn, I have the joint at the node while the body somewhere below the node.

begin: data;
    problem: initial value; # the default
end: data;

begin: initial value;
    initial time: 0.;
    final time: 1.;
    time step: 1.e-3;
    max iterations: 10;
    tolerance: 1.e-6;
end: initial value;

begin: control data;
    structural nodes:
        +1 # node in the constraint
    ;
    rigid bodies:
        +1 # node in the constraint
    ;
    joints:
        +1 # node in the constraint: revolute
    ;
    gravity;
end: control data;

set: integer Pendulum = 1;
set: integer Mass = 2;
set: real M = 1.;
set: real L = .5;
set: real Omega0 = .2;

reference: Pendulum,
    reference, global, null,
    reference, global, eye,
    reference, global, null,
    reference, global, 0., Omega0, 0.;
reference: Mass,
    reference, Pendulum, 0., 0., -L,
    reference, Pendulum, eye,
    reference, Pendulum, null,
    reference, Pendulum, null;

begin: nodes;
    structural: 2000+Mass, dynamic,
        reference, Mass, null,
        reference, Mass, eye,
        reference, Mass, null,
        reference, Mass, null;
    # no dynamic dofs (it will be fully grounded)
end: nodes;

begin: elements;
    body: 2000+Mass, 2000+Mass,
        M,
        reference, Mass, null,
        null; 
        /* The problem is non-singular
        * because of the constraint */
    joint: 2000+Mass, revolute pin,
        2000+Mass,
        reference, Pendulum, null,
        hinge, reference, Pendulum,
        1, 1.,0.,0., 3, 0.,1.,0.,
        reference, Pendulum, null,
        hinge, reference, Pendulum,
        1, 1.,0.,0., 3, 0.,1.,0.;

    gravity: 0., 0., -1., const, 9.81;
end: elements;

image

zanoni-mbdyn commented 1 year ago

Hello @kuwt, can you please try with a more recent version of Blender? I have no issues with the lastest available in my distro, which is the 3.6.0.

Thanks!

image

kuwt commented 1 year ago

I have to find some time to try that again. Thank you for the advice.

zanoni-mbdyn commented 11 months ago

Closing (can't reproduce).