We would like to set the active TCP by refering to the names assigned to TCPs set from Polyscope. We ideally would not like to hardcode TCP values with
set_ctp() but simply refer to the names listed in Polyscope, because we are using tools constantly being re-measured by the 3-4 points method, so we dont want to have to copy-past manually the XYZABC values into our program.
Essentially we want to be able to reference TCPs as we can reference Features like measured Planes by using simple variable names for coordinate transformes like
From our research we have not found out how to change TCP directly by name? Something like
You can use urscript pose variables. Currently Polyscope doe not create a variable for each TCP instance. You can do it by yourself by iterating the TCP list and create a variable for reach.
By iterating the TCP list you mean manually do that in Polyscope and create global variables right? There is no way to get the TCP list via urscript directly and iterate it from the script manual no?
So every time I measure the TCP pose I must copy-paste the values to a global variable? I think it should be possible to reference directly TCPs by calling their name, like Features. It is prone to errors if having to copy-paste the pose into a variable manually, and it feels like that is something quite basic no? I am new to the forum, is there some sort of feature request process?
No, sorry for not being specific. You need to gain the TCP list trough the Java URCap API. And then register a variable for each instance.
Changing Polyscopes behavior so, it meat your requirement will raise some questions. Since the value of the TCP is now exposed to be changed be the running program.
Shall each Polyscope set_tcp instance now be done by value or refence? Doing it by refence might affected the behavior, since the running program is now able to modify the TCP. But I agree that having the variable available in the script would be nice.
You can go to the feature request section and make your request. If it is prioritized, it will take some time before it is implemented. So for now your only options is to do it by your self.
Ah ok, I am not knowledgeable enough of the URCap API yet, will have a look then.
Yes I totally understand
set_tcp by value makes total sense, but being able to use measured TCPs like you can reference measured features would be very helpful yes. I will make a feature request then, thanks.
I am not sure by what you mean by “Doing it by refence might affected the behavior, since the running program is now able to modify the TCP.”. Technically any program can already manipulate the active TCP programmatically with
set_tcp no? So it’s more a matter of being able to reference existing TCPs, not change them.
Will check the URCap API then in the meantime, thanks!