How to get point on sgImage from point in drawing

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
avimms
Posts: 13
Joined: 06 Dec 2005, 09:57
Location: India

How to get point on sgImage from point in drawing

Post by avimms » 14 Mar 2007, 12:32

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

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 15 Mar 2007, 12:21

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

avimms
Posts: 13
Joined: 06 Dec 2005, 09:57
Location: India

Post by avimms » 16 Mar 2007, 08:53

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

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 16 Mar 2007, 09:58

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

Post Reply