Move Geometry (Apply move through python code?)- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Move Geometry (Apply move through python code?) (/Thread-Move-Geometry-Apply-move-through-python-code) |
Move Geometry (Apply move through python code?)-Martin.K-03-08-2022 Hello, 我building this program to make it easier for our operators to use RoboDK. But I get the following problems. The object I import has an incorrect orientation so I use (setPoseAbs and setGeometryPose) to change the orientation and position to make it automaticly get the right position.But with the geometry you have to press the "Apply move" button to get changes to the geometry and I want to make it as simple as possible and therefore remove this extra navigation to the "Apply move" button if possible. So is there some method to apply the move from the python program? Best regards Martin.K RE: Move Geometry (Apply move through python code?)-Alex-03-08-2022 You can use item.setGeometryPose() //www.sinclairbody.com/doc/en/PythonAPI/robodk.html#robodk.robolink.Item.setGeometryPose RE: Move Geometry (Apply move through python code?)-Martin.K-03-09-2022 (03-08-2022, 07:04 PM)Alex Wrote:You can use item.setGeometryPose() Sorry but i might have been a litle unclear in my sentence. But I'm using the setGeometryPose() The problem is that it won't apply the move untill i have pressed the "apply move" button. Since i have not pressed "apply move" when i simulate the metal coating program it looks like a ghost shape of the object is geting the coating and no coating on the visible object. But if i press this butten before simulation everything is fine. But i would like for the operator to not have to navigate to this button every time we are using a new item. Best regards Martin.K RE: Move Geometry (Apply move through python code?)-Albert-03-09-2022 This is officially not supported right now using the API but there is a workaround you can do by following these steps:
Code:
def setGeometryPose(self, pose, apply=False):
We'll add this by default with new versions of RoboDK. RE: Move Geometry (Apply move through python code?)-Oxbown-03-17-2022 (03-09-2022, 07:41 AM)Albert Wrote:This is officially not supported right now using the API but there is a workaround you can do by following these steps: This works fine! Yesterday I had to make the change. |