Profile Picture

Adding Points to a 3D Graph - Coordinate Transformation Question

Posted By Marcus McCallum 8 Years Ago

Adding Points to a 3D Graph - Coordinate Transformation Question

Author
Message
Marcus McCallum
Posted 8 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 29, Visits: 61
Hi,

I am adding points to a 3D graph. I use the data cursor to select the point, click and then the points get added to the graph.

I use the same coordinate transformation as detailed in the documentation, however when the points are plotted on the graph the centre point is not where I click. Probably best by showing some figures of what I mean.

Figure 1. Cursor is where I want to add a point, note that I have positioned it at the corner of a previous point so as to highlight that the new point centre will not be at this corner.
Figure 2. The new point centre is clearly skewed to the left of where I clicked.

Any idea why this has happened?
This has a knock on effect, when I come to modify the graph, as I then use hittesting to modify certain points, but what happens is that when the mouse is directly over the point, it comes as nothing selected (see Figure 3), however if we move just to the right of the point it picks up the point (see Figure 4). This all points to the actual point being more to the right and the actual label being used not being in the correct position.

Thoughts?
Thanks for looking.

Marcushttps://www.nevron.com/forum/uploads/images/55020a52-2de4-4421-a5f5-553e.pnghttps://www.nevron.com/forum/uploads/images/12b76383-1607-461a-a89b-db2f.pnghttps://www.nevron.com/forum/uploads/images/dd81ec4c-9762-4b8f-aaea-3a1e.pnghttps://www.nevron.com/forum/uploads/images/1bc70ae1-42a9-4d27-bc7a-d45a.png




Nevron Support
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hi Marcus,

Can you send us an example replicating this problem? It's kind of hard to tell why it's not working without having the actual code that interacts with the control...


Best Regards,
Nevron Support Team



Marcus McCallum
Posted 8 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 29, Visits: 61
Hi,
Thanks for the reply.
I have attempted to create a form that recreates the problem.

Please note that you need to zoom in so as to be able to recreate the problem.
At first it appears that there is no problem, as when you click on the screen the point goes where expected.

However, it appears that the problem starts to appear when you use the offset to move the chart left and right, specifically at the extremes of the chart the problem occurs. This seems to pointing to an issue with the offset that I have coded in.

So to recreate the problem, I zoomed in and then used the offset to move to the left of the chart, you will see that clicking on mouse will cause the cursor to jump ever so slightly to the left, thus giving the problem that I initially described.

Hope you can recreate it.

Regards,
Marcus

Attachments
frmNevronProblem.Designer.txt (382 views, 11.00 KB)
frmNevronProblem.txt (503 views, 20.00 KB)
Marcus McCallum
Posted 8 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 29, Visits: 61
Hi,
As a follow up to this. I have used the following grid:
xmin=272000, xmax=417000, ymin=679000, ymax=863000
This is due to type of application I am trying to create.
When you make the grid smaller, i.e. [0,100], [0,100] then the behaviour is not as obvious (if at all sometimes), so clearly the grid size is something to do with it?
You will notice if you recreate it, that when you click on the screen with the data cursor, the mouse position stays the same, but the cursor shifts to the left and the point is placed at the centre of the cursor position, however, it is clear that the point "thinks" it has a centre at the mouse position, hence why you get the "Nothing Selected" when you hover over the mouse at certain points (see figures in initial post).

Things I looked at included the following:
1. Was it due to being a 3D graph? I tried plotting the X, Y, Z points but that didn't make any difference.
2. I have reduced the grid size and this made a difference as noted above, so this may point to an accuracy issue, but I don't understand why this makes the cursor move when I thought that this was based on position of mouse?

Now, I have read this back and I appreciate it looks a bit of a ramble, but if you can recreate it then you will see what I mean.

Regards,
Marcus

Nevron Support
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hi Marcus,

We just tested the control coordinate transformations and they were working Ok (even if there is panel offset / zoom). It's hard to tell what's the problem when there is so much code (that does not compile right away), however the first thing to check is what is the version of the control you're currently using. If it's not the latest can you please try to check whether that issue is present with the current release?
You can also send us a small app that replicates the problem for review/testing.


Best Regards,
Nevron Support Team



Marcus McCallum
Posted 8 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 29, Visits: 61
Hi,

I am using VS 2010 and previously had installed 12.2.25.12. In order to check the latest version I downloaded so I now have 16.4.15.12.

It appears that the problem has been solved, so my question I suppose would be what has happened to this control for this issue to have been corrected? Has there been any updated to it between the above releases?

I'll need to run some more tests on my main application to check this has been fully solved.

Thanks,

Marcus

Marcus McCallum
Posted 8 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 29, Visits: 61
Hi All,

I have attached two sample projects, one using the version of Nevron I have (12.2.25.12) (Nevron problem - Old Nevron) and one using the latest version of Nevron (16.4.15.12). I am using VS 2010 as stated in previous post.

In order to recreate the problem (on the old Nevron example), follow the following steps:

1. Run Model
2. Zoom in a few times using "Zoom In" Button (original, eh?)
3. Move to the extreme left of the chart using the "Right" button (odd I know, takes a bit of getting used to that one!)
4. Click on the image and square will appear.
5. Move the cursor and click again.
6. You will see that the cursor "jumps" ever so slightly to the left. This is where I am getting my problem. Now it may not sound a lot, but this jump corresponds to 100m on the application I am trying to create and this creates a whole heap of problems!!!

Try on the new version and you will see that this doesn't happen and there is no movement of the cursor.

I guess what I would like to know is, what exactly is the problem here and how was it solved and is there any workaround in the version that I currently have? 

Thanks for looking.
Regards,
Marcus

Attachments
Nevron Problem.zip (325 views, 119.00 KB)
Nevron Problem - Old Nevron.zip (315 views, 120.00 KB)
Nevron Support
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hi Marcus,

We looked at the examples and quite frankly could not see a problem with the old version - the cursor did not update well dynamically if that is what you mean by jumping which is most likely caused by redraw of the whole chart (cursors are supposed to render in overlay for performance reasons however in the case of the older version it's probably not working well). Let's schedule a web meeting - maybe it will be more productive to see the problem on your machine...


Best Regards,
Nevron Support Team



Marcus McCallum
Posted 8 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 29, Visits: 61
Hi,

That would be good. Just let me know what I need to do.

Thanks,

Marcus



Similar Topics


Reading This Topic