Robots in Architecture Forum

KUKA|prc - parametric robot control for Grasshopper => Support => Topic started by: daniel.auer on August 20, 2024, 01:05:08 PM

Title: Setting Tool and Base via Code
Post by: daniel.auer on August 20, 2024, 01:05:08 PM
Hi,

is there an option to set the $TOOL and $BASE via code?
https://imgur.com/ArmwCWF


I found something like this in the forum, which hints that this is possible.
https://imgur.com/a/zg6SIs1
Title: Re: Setting Tool and Base via Code
Post by: Johannes @ Robots in Architecture on August 20, 2024, 01:07:06 PM
Hello,
Sure, it's just regular KRL, so you can use the Custom KRL command. Just note that it won't be simulated if it's only text in KRL.
Or are you referring by "via code" to something like Python within Grasshopper?
Best,
Johannes
Title: Re: Setting Tool and Base via Code
Post by: daniel.auer on August 20, 2024, 01:09:51 PM
Hi Johannes,

thanks for your quick reply. Yes, by code I mean creating a TOOL and a BASE which i can simulate and use for reachability analysis. So either by Python or C# node.
Title: Re: Setting Tool and Base via Code
Post by: Johannes @ Robots in Architecture on August 20, 2024, 01:22:27 PM
I think the most straightforward approach would be to set the XYZABC values via your script and then use them as in the example!
You need to enable the Base option via right-clicking the core component, same goes for switching the Custom Tool - Plane component to accept XYZABC input.
Best,
Johannes