dcl_GetDwgMouseCoords

Started by velasquez, December 16, 2010, 05:17:09 AM

Previous topic - Next topic

velasquez

The return of the function dcl_GetDwgMouseCoords is not same the function grread 5 of AutoCAD? 
 
See (setq ptgrread (grread 5)) and (setq ptOpenDCL (dcl_GetDwgMouseCoords)) 
The very different healthy values. 
Should not the return be the position of the cursor of the mouse?

Velasquez

owenwengerd

I don't think there would be any need for a special function if it was identical to (grread), but I'm not quite sure how they are supposed to be different. I looked at the code, and I'm pretty sure the current implementation has a bug because it doesn't account for the document window client coordinate offset from screen coordinates, but even correcting for this, it looks like the results do not quite match (grread).
Owen Wengerd (Outside The Box) / ManuSoft

velasquez

Quote from: owenwengerd on December 16, 2010, 06:47:19 AM
I don't think there would be any need for a special function if it was identical to (grread), but I'm not quite sure how they are supposed to be different. I looked at the code, and I'm pretty sure the current implementation has a bug because it doesn't account for the document window client coordinate offset from screen coordinates, but even correcting for this, it looks like the results do not quite match (grread).

I didn't understand your answer. 
will dcl_GetDwgMouseCoords come back the correct position of the cursor of the mouse in the next version?

owenwengerd

I can't answer that because I don't know what you mean by "correct".
Owen Wengerd (Outside The Box) / ManuSoft

velasquez

Quote from: owenwengerd on December 16, 2010, 08:37:47 AM
I can't answer that because I don't know what you mean by "correct".

I think the correct return of dcl_GetDwgMouseCoords would be the position of the cursor of the mouse. 
See the image.

owenwengerd

Do you think it should return the same thing as (grread)?  If so, why not just use (grread)?
Owen Wengerd (Outside The Box) / ManuSoft

velasquez

Quote from: velasquez on December 16, 2010, 10:26:29 AM
Quote from: owenwengerd on December 16, 2010, 08:37:47 AM
I can't answer that because I don't know what you mean by "correct".

I think the correct return of dcl_GetDwgMouseCoords would be the position of the cursor of the mouse. 
See the image.

I don't use grread for the function it is very closed, while she is running. 
dcl_GetDwgMouseCoords would be very good to simulate an I drag for instance. 
So that it serves dcl_GetDwgMouseCoords as this today?

velasquez

Should I add a Feature request for dcl_GetDwgMouseCoords to return the coordinate of the position of the cursor of the mouse? 
Can this be assisted? 
Thanks

owenwengerd

Yes, but you have to define "position of the cursor" (i.e. what units of measure, and relative to what). Should it return the same coordinates as (grread)? Those are relative to the current viewport. For dragging, wouldn't you use (dcl_GetMouseCoords) instead? 
Owen Wengerd (Outside The Box) / ManuSoft

velasquez

Quote from: owenwengerd on December 20, 2010, 02:31:38 PM
Yes, but you have to define "position of the cursor" (i.e. what units of measure, and relative to what). Should it return the same coordinates as (grread)? Those are relative to the current viewport. For dragging, wouldn't you use (dcl_GetMouseCoords) instead? 

The function dcl_GetDwgMouseCoords is ideal to drag an object while a point is asked for. 
Should it return the same coordinates as (grread) relative to the current viewport. 
The problem is that (grread) it doesn't allow OSNAPS while this working.