## drilling code

Typically: "How do I... ", "How can I... " questions
Mohamed Magdy
Posts: 43
Joined: 02 Sep 2019, 18:32

### drilling code

hey ,
I'm doing milling in a work-piece and want the drill tool to move between holes smoothly (i.e make a hole then get up and move to the other hole exactly ) so I wrote a code in a script .

Code: Select all

path1=sim.getObjectHandle('Path1')
Target1=sim.getObjectAssociatedWithScript(sim.handle_self)
P1=sim.getPositionOnPath(path1,0)
O1=sim.getOrientationOnPath(path1,0)
sim.moveToPosition(Target1,-1,P1,O1,0.5,0)
sim.followPath(Target1,path1,3,0,0.5,0)
P1[3]=P1[3]+0.03
Target2=sim.getObjectHandle('Spindle_target')
sim.moveToPosition(Target2,-1,P1,O1,0.01,0)
-----------
path2=sim.getObjectHandle('Path2')
Target2=sim.getObjectHandle('Spindle_target')
P2=sim.getPositionOnPath(path2,0)
O2=sim.getOrientationOnPath(path2,0)
sim.moveToPosition(Target00,-1,P2,O2,0.01,0)
sim.followPath(Target2,path2,3,0,0.5,0)

but still it drilles the before the next hole also , what should i modify ? can you share the code of milling of https://www.youtube.com/watch?v=7pKyPNpYsr8