How to caculate the a b c towers for delta printer

I have a program I setup to calculate the corners for a delta printer, to move to the A B C tower centers.

but I don't think I am getting the correct results.

this is how I am doing the math

void modify(mStruct *v,double build_radius)
 {
  double x_theta = 210,y_theta = 330,z_theta = 90;
  v->A_towerx = build_radius * cos(x_theta);
  v->A_towery = build_radius * sin(x_theta);
  v->B_towerx = build_radius * cos(y_theta);
  v->B_towery = build_radius * sin(y_theta);
  v->C_towerx = build_radius * cos(z_theta);
  v->C_towery = build_radius * sin(z_theta);
 }

it seems to be off by a few mm's I suck at math so I assume I am going abut it wrong...

any suggestions?

Thanks gary

Comments

  • Not sure what you think tower centers are, but I think your build_radius i snot correct. Have you added effector radius from effector center to effector joints for diagonals? horizontal_radius does not account that value.
  • what I am trying to do is get the correct travel to the a b c towers to do the paper test in each corner.

    as far as I know I only needed the to know  that they are at 210 330 and 90 and than the, print radius or a little less than

    the actual print radius which should give me the x y distance for each tower to start the calibration..


    thanks gary  

  • Yes,if you use effective horitontal radius that would leave the diagonal vertical to tower if that position is possible on your delta.
  • an example is I think if I use 100 for the radius the z corner c tower should be x 0 y 100

    but with the math I entered in the c program the x 0 is coming out way off and so is the y.

    so I assume my math calculation is not correct just looking to see if anyone knows the correct way to

    do the math...


    thanks gary

  • Yes, you have x and y switched in your formula. 0° is pure x axis and cos(0)=1 so that must be x.
  •   double x_theta = 210,y_theta = 330,z_theta = 90;
      v->A_towerx = build_radius * cos(x_theta);
      v->A_towery = build_radius * sin(x_theta);
      v->B_towerx = build_radius * cos(y_theta);
      v->B_towery = build_radius * sin(y_theta);
      v->C_towerx = build_radius * cos(z_theta);
      v->C_towery = build_radius * sin(z_theta);

    when I cout<< the values with a radius of 100  I get

    A corner x= -88.3877
    A corner y= 46.7719
    B corner x= -99.1199
    B corner y= -13.2382
    C corner x= -44.8074
    C corner y= 89.3997

    there defiantly not right but I'm not  sure what your formula is ?

    thanks gary

  • I know what your error is:-)

    Programming languages take angles as radians and not degrees so multiply by pi/180 to convert to radians.
  • A corner x= -86.6025
    A corner y= -50
    B corner x= 86.6025
    B corner y= -50
    C corner x= 4.66906e-012
    C corner y= 100

    That worked fine I used a radius of 100 the only incorrect value was the C corner x should  = 0

    Thanks for you help

    gary

  • The error is just rounding error. 0.00000000000466 is nearly 0.
  • thanks got it working ended up using

    std::cout.precision(4); 
     cout <<"C corner x= "<<std::fixed<<towers.C_towerx<<endl;

    now I get 0 correct awnser


    Thanks gary


Sign In or Register to comment.