Silverfrost Forums

Welcome to our forums

Location a value in one dimensional vector and its display

23 Feb 2021 10:25 #27165

Martin, I don’t see any reason why you could not add to the output another line that contains the Point ID (Point name), if it is just a string of characters in a character array, identified by the same index as the double precision X, Y, and Z data.

Try running the example code with 10000 data points + Checkmate - it's fast, and that's due to Mecej4's suggested binary search. Much larger data set than I ever use - there's only about 800 transmission nodes in the whole of Scotland (and that's the whole transmission network from 400 kV down to 33 kV).

24 Feb 2021 8:32 #27167

Ken

Your modified program works well for me. I think the problem with the tooltip appearing over the scrollbar has gone or at least it is so rare as not to be significant.

I changed the tooltip delay from 0 to 500 and, for personal preference, I remove [topmost] from %ww. You might consider using the %th on/off control to advantage. At the moment you use the constant 1 so it is always on.

I will send you a link to a new set of DLLs so you won't need the initial char(10) or time delay fix.

The small unwanted square is a puzzle. It is not a control, just a filled rectangle in the background.

24 Feb 2021 9:55 #27168

Thanks Paul, I shall download the new DLL later.

Restoring the %pl[full_mouse_input], and adding the following to the callback causes the tooltip to follow the mouse, and there is no delay in the re-appearance of the tooltip after moving beyond the %pl region, i.e. it's the continuous update to the tooltip text which causes it to follow the mouse.

    if ( clearwin_string@('callback_reason') .eq. 'MOUSE_MOVE' ) then
      if (point_selected) call SET_TOOLTIP_TEXT@(pl_handle,height_string)
    end if

Example:- https://www.dropbox.com/s/mq48eq43s1wf1o3/pl_scroll_zoom_th_3.f95?dl=0

PS With my 'personalisation' settings the small square appears to be the same colour as the named system colours 'menu' or 'btnface', so in my case I can hide the square by setting the background colour to one these named colours.

25 Feb 2021 6:10 #27175

Ken,

this is the answer to your post of February 23, 10.44pm.

Yes, you are right. I made a formal error in the FMT statement, which is used to write the character string into an output string which displays it. Now, it works fine - see my last post of February 24, 1.17am in the topic FMT problem or wrong code with FMT?

Now, one question to your last version (ver.3) of the code showing the 3D point data. I started to look at it, ran it and the question is:

When I deselect the option SHOW HEIGHT AT CURSOR and then I click on a point in the graph, no data are displayed at all (I expected that after deselecting the option only height info will be omitted and the horizontal 2D values will still be showed). Is it so or deselecting means no data for display?

Martin

25 Feb 2021 10:07 #27176

Martin, that’s correct as the earlier version was only displaying the height value and then I added X and Y into the output tooltip string, but did not change the label in the %rb. If you want to display a smaller subset of values, say just X and Y, then you need to set appropriate control flags, and use these flags to construct the output tooltip string with just the required output

26 Feb 2021 7:54 #27179

Allows the user to select any combination of X, Y, and Z, but not when a point is currently selected.

https://www.dropbox.com/s/brwjhhqkmz66yvv/pl_ideas.f95?dl=0

26 Feb 2021 9:36 #27181

Excellent Ken - thanks!

I will try to implement it, plus I will add to show also the Point ID, since it is important to identify on which point could be a possible problem (from geodetical point of view - for example, its horizontal and vertical accuracy could be problematic, will exceed the defined threshold, so - its re-surveying would be needed, etc.).

Moreover, when I create an input file containing also 3D precision information (horizontal + vertical) for each point, it will also be useful to display them (sigma_X, sigma_Y, sigma_H), so final box (when all checked) would display 7 different values.

Please login to reply.