Hello Robin,
Thanks.
Now I think that I used it in the past ... but yesterday I did not found it again.
OK for the "IsVisible" property. I tested it yesterday.
Now I understand the use. It does not mean "visible" on the screen, but if it is a real reticule.
Regards,
Jean-Francois
Script for saving the position and rotation of the reticules
-
Jean-Francois
- Posts: 822
- Joined: Sun Oct 13, 2019 10:52 am
- Location: Germany
-
Jean-Francois
- Posts: 822
- Joined: Sun Oct 13, 2019 10:52 am
- Location: Germany
Re: Script for saving the position and rotation of the reticules
Hello Robin,
OK, I updated my "Reticule" script and I will soon upload it on the forum.
I code it as follow ...
Concerning the reticules and other tools ...
When I use a reticule (Single Crosshair), it disappears as soon as I select the "Pixel Value Readout" tool.
It would be nice if the reticule will reappear (at the same coordinate and angle) automatically after the closure of the tool.
Similar with the Deep Sky Annotation tool.
Regards,
Jean-Francois
OK, I updated my "Reticule" script and I will soon upload it on the forum.
I code it as follow ...
Code: Select all
print("N, Reticule ?, Name")
Reticule_List = {}
for n in range(SharpCap.Reticules.Count):
print(n, SharpCap.Reticules[n].IsVisible, SharpCap.Reticules[n].Name)
Reticule_List[n] = SharpCap.Reticules[n].Name
Reticule_List = dict((v,k) for k,v in Reticule_List.items())
print()
print(Reticule_List)
# Reticule "Circle"
ret = Reticule_List.get("Circle")
print(ret) # Not sorted !
SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[ret]Concerning the reticules and other tools ...
When I use a reticule (Single Crosshair), it disappears as soon as I select the "Pixel Value Readout" tool.
It would be nice if the reticule will reappear (at the same coordinate and angle) automatically after the closure of the tool.
Similar with the Deep Sky Annotation tool.
Regards,
Jean-Francois
- admin
- Site Admin
- Posts: 17342
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Script for saving the position and rotation of the reticules
Hi Jean-Francois,
glad to hear that you have the code sorted. To be honest, I'm not a big fan of the sort of logic needed to remember the state of something and put it back again when another task is finished - that sort of thing tends to be fragile and difficult to manage especially as things get more complex. Probably the right choice would be to enable more than one reticule type thing to be active at a time - it would work fairly well from the point of view of drawing 2 or more, but the mouse interaction would be more interesting!
cheers,
Robin
glad to hear that you have the code sorted. To be honest, I'm not a big fan of the sort of logic needed to remember the state of something and put it back again when another task is finished - that sort of thing tends to be fragile and difficult to manage especially as things get more complex. Probably the right choice would be to enable more than one reticule type thing to be active at a time - it would work fairly well from the point of view of drawing 2 or more, but the mouse interaction would be more interesting!
cheers,
Robin
-
Jean-Francois
- Posts: 822
- Joined: Sun Oct 13, 2019 10:52 am
- Location: Germany
Re: Script for saving the position and rotation of the reticules
Hello Robin,
OK, yes it would be interesting if several reticules are shown together.
Concerning the "remember" of the reticule ... good that a guy program a script to do exactly this ... oh wait, that's me
For the "Protractor" reticule ... do you plane to add some feature ? ... change size or rotation ?
SharpCap.Reticules.SelectedReticule.Angle can be changed and saved, but it has no effect.
Regards,
Jean-Francois
OK, yes it would be interesting if several reticules are shown together.
Concerning the "remember" of the reticule ... good that a guy program a script to do exactly this ... oh wait, that's me
For the "Protractor" reticule ... do you plane to add some feature ? ... change size or rotation ?
SharpCap.Reticules.SelectedReticule.Angle can be changed and saved, but it has no effect.
Regards,
Jean-Francois
-
Jean-Francois
- Posts: 822
- Joined: Sun Oct 13, 2019 10:52 am
- Location: Germany
- admin
- Site Admin
- Posts: 17342
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Script for saving the position and rotation of the reticules
Hi Jean-Francois,
I wasn't sure about rotating the protractor - it wouldn't be hard to do, but I was worried that it would make the usage more confusing rather than being helpful, so I left it out for now. I will wait to see if I get any feedback saying that people would like to be able to rotate it... I think I am unlikely to make the size adjustable, as that would easily get into difficulties with the font being too small to read or not being able to fit in the space.
cheers,
Robin
I wasn't sure about rotating the protractor - it wouldn't be hard to do, but I was worried that it would make the usage more confusing rather than being helpful, so I left it out for now. I will wait to see if I get any feedback saying that people would like to be able to rotate it... I think I am unlikely to make the size adjustable, as that would easily get into difficulties with the font being too small to read or not being able to fit in the space.
cheers,
Robin