Page 1 of 1

How to get point on sgImage from point in drawing

Posted: 14 Mar 2007, 12:32
by avimms
Hi There,

How can I get the point on TsgImage for a given point in DXF drawing. I want to get the coordinates (X, Y) similar to that returned by TsgImage's mouse move event, programmatically. I tried to use method GetRealImagePoint of TsgDXFImage, but it seems to return the same TFPoint structure, that was passed to it as an argument. Please help.

Thanks & Regards,
Avinash

Posted: 15 Mar 2007, 12:21
by support
Hello, Avinash.

It is necessary to use function TsgDXFImage.GetPoint(const P: TFPoint): TPoint;

It ransforms point in CAD 3D coordinate system into point in 2D coordinate system base on the current rotate angle and the scale.

Sergey.

Please post questions to the forum or write to support@cadsofttools.com

Posted: 16 Mar 2007, 08:53
by avimms
Hi Sergey,

Thanks for the information. I have seen the same documentation in your help file. But it is not clear, it does not specify what 2D coordinate system, whether dxf drawing or sgImage window.

Regards,
Avinash

Posted: 16 Mar 2007, 09:58
by support
Of course sgImage window. It has plain coordinate system in contrast to CAD drawings, which have 3D coordinate system.

Sergey.

Please post questions to the forum or write to support@cadsofttools.com