Sequential Curving Program- Printable Version +- RoboDK Forum (//m.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//m.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//m.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Sequential Curving Program (/Thread-Sequential-Curving-Program) |
Sequential Curving Program-DavidPH-08-21-2020 Hello, I have a CSV file with a series of points for a series of curves. I have been able to create a Python script to import these points and make curves based on the proximity of the points. The curves have a specific order. Since I can only select one item for my program I have then merged the curves (Merged_Crv) (based on a list of ordered curves) and set these as the input into the program setup below: curve_follow = RDK.AddMachiningProject("Motion Plan") prog, status = curve_follow.setMachiningParameters(part=Merged_Crv) Unfortunately the index of each curve seems to have been discarded as the program does not move through the curves sequentially, instead doing the motion to reduce the travel distance between curves. I was wondering if there is a way to do this, so that the toolpath generated goes through the list of curves in the correct order? Thanks in advance, David RE:连续弯曲的公关ogram-Albert-08-21-2020 Hi David, If you set the link directly using setLink it will prevent this automatic reordering: curve_follow.setLink(Merged_Crv) Also, there's an undocumented flag to prevent RoboDK automatically reordering the order of the curves. You can pass ReorderAuto=NO in the parameters. For example:
Code:
curve_follow.setMachiningParameters(part=Merged_Crv, params="ReorderAuto=NO")
This was implemented recently so make sure you are using a recent version of RoboDK. Albert RE:连续弯曲的公关ogram-DavidPH-08-22-2020 Hi Albert, Thanks for getting back to me so promptly. I tried your code and unfortunately it did not work. I am running on RoboDK v5.0.1 - I believe I implemented your code incorrectly. I have attached my project along with the CSV data I am using (the code prompts you to open it). I would be really grateful if you could take a look! Best wishes, David Edit: It appears my files did not attach - here's a link to them:https://imperialcollegelondon.box.com/s/9m6m1ed0hgcgieme5seei0hayyz5t9ag RE:连续弯曲的公关ogram-Albert-08-24-2020 Hi David, I'm unable to download your project from the link provided. You should be able to attach it as a ZIP file. Can you try again with the latest version? (RoboDK 5.0.2) Albert RE:连续弯曲的公关ogram-DavidPH-08-25-2020 ![]() I installed v5.0.2 however the issue persists. I will try again to attach my project. David |