Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

The Curve order in Curve follow project

#1
In my project, I selected multiple curves and imported them into RoboDK as a single curve follow project. It's all work fine in RoboDK and the robotic arm. However, using the code below, I noticed that the order of the selected curves was different from what I expected. This is a code example for illustration.
Code:
curve_project = RDK.Item("Settings", ITEM_TYPE_MACHINING)
curve = curve_project.getLink(ITEM_TYPE_OBJECT)
while True:
    # 從物件中獲取曲線點
    points, feature_name = curve_item.GetPoints(FEATURE_CURVE, curve_id)
    if not points:
        break
     
What I expected was that the curves retrieved by this script would be in the order 0, 1, 2, 3, 4. However, in order to match the order I actually selected, I had to expand the curve object in the order 3, 2, 1, 4, 0.

There is a function button to select the order in the curve set in curve follow project. I wonder if it's possible to reveal some details about how the curve order is stored in a Curve Follow Project. Is there a way to retrieve the correct order using the Python API?

Thanks.
Yen-Shuo


.jpg   螢幕擷取畫面 2025-06-20 125049.jpg (Size: 80.94 KB / Downloads: 36)
#2
The order of the curves you retrieve by using GetPoints is the same order of the curves when they were created.

The order when you selected in the curves in the curve follow project is different and it can't be retrieved using the API for now. However, you can create a program automatically using the API and the program should contain the robot toolpath along the curves you selected keeping the order you selected.
  




Users browsing this thread:
1 Guest(s)