simulation 01

In Digital Fabrication, Python, Rhino by admin0 Comments

This is the first run of the self-made from scratch simulation code python/grasshopper/rhino applied to a real project.
As a first test, it shows the position of the work object is not optimal, as we see certain positions are not reachable (when the robot vanishes and you see a red bang instead), and the robot collides with the object.

next steps will be to test again repositioning the work object and approaching it for milling from the other side. A longer tool also would be good. When it works, build a suitable scaffolding to hold the piece in place, program the cut in steps with “bridges” to maintain the offcuts… well in 2 words, NOT READY, but on tracks.

 

 

 

Below start and end of the rapid code to feed the robot…

%%%
  VERSION:1
  LANGUAGE:ENGLISH
%%%

MODULE MOD_Program
    
    PERS tooldata someTool := [TRUE,[[0,0,0],[1,0,0,0]],[2,[0,0,15],[1,0,0,0],0,0,0.005]];
    PERS wobjdata someWObj := [FALSE, TRUE, "", [[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];

    ! -------------------------------
    ! Define your variables here
    ! ...

    ! -------------------------------
    ! Define your functions here
    ! ...
    
    PROC Program()
        ! Program generated by Marie
        someWObj := [FALSE, TRUE, "", [[0.000, 0.000, 0.000],[1.000000, 0.000000, 0.000000, 0.000000]],[[0,0,0],[1,0,0,0]]];
        someTool := [TRUE,[[412.000, 0.000, 56.500],[0.500000, 0.500000, 0.500000, 0.500000]],[20,[0,0,200],[1,0,0,0],0,0,0.005]];
        MoveAbsJ [[-56.241495,13.543445,46.089433,35.958378,-119.743355,241.473180],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z200,someTool,\WObj:=someWObj;
        MoveL [[523.087, -1504.688, 754.939],[0.427452, 0.884860, -0.166783, -0.080569],[-1,0,2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z200,someTool,\WObj:=someWObj;
        MoveL [[520.527, -1511.237, 749.359],[0.427452, 0.884860, -0.166783, -0.080569],[-1,0,2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z200,someTool,\WObj:=someWObj;
        MoveL [[496.732, -1554.799, 716.411],[-0.397109, -0.041316, 0.826375, -0.397118],[-1,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[491.205, -1552.952, 721.830],[-0.378054, -0.050412, 0.835264, -0.396066],[-1,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[485.325, -1551.385, 727.161],[-0.350754, -0.063236, 0.847090, -0.394222],[-1,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[478.454, -1550.173, 732.712],[-0.308587, -0.082585, 0.863345, -0.390627],[-1,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[470.947, -1549.690, 737.859],[-0.252206, -0.107631, 0.881466, -0.384480],[-1,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[465.513, -1549.892, 740.982],[-0.207650, -0.126792, 0.893013, -0.378594],[-1,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[457.444, -1550.986, 744.753],[-0.142954, -0.153664, 0.905624, -0.368506],[-1,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[448.929, -1553.027, 747.763],[-0.083700, -0.177326, 0.913009, -0.357722],[-1,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[443.676, -1554.659, 749.212],[-0.053484, -0.189050, 0.915276, -0.351667],[-1,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[438.515, -1556.490, 750.387],[-0.028631, -0.198522, 0.916390, -0.346408],[-1,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[433.442, -1558.474, 751.343],[-0.008433, -0.206106, 0.916798, -0.341950],[-1,-1,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        ...................................(more lines like this)        
        MoveL [[-307.691, -1569.349, 1195.516],[0.427452, 0.884860, -0.166783, -0.080569],[-2,0,2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[-304.952, -1562.342, 1201.485],[0.427452, 0.884860, -0.166783, -0.080569],[-2,0,2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
        MoveL [[-302.214, -1555.336, 1207.455],[0.427452, 0.884860, -0.166783, -0.080569],[-2,0,2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v5,z20,someTool,\WObj:=someWObj;
    ENDPROC
    
ENDMODULE