Displaying 2 DXF-Files (scaling and position)

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Megapit
Posts: 6
Joined: 31 Jul 2007, 11:25

Displaying 2 DXF-Files (scaling and position)

Post by Megapit » 22 Nov 2007, 14:04

I'm writing a software in witch i create an new CADimage myself by adding entitys. This cad-image will be moved with the mouse. So far i have no problems.
But now i must also display another CADimage with has the same scale like the first one. But this Image should always be on the same position. Wenn moving the first CADimage with the mouse the second one should not move!
Doing this by using AddScalesDXF is a slow solution for this. My output always flickers (I have Doublebuffered the output)
Is there another way to control the displaying of images with the CadImage.draw method?

How can I do this (i'm using VB.NET)

Thanks
Peter Kuhn
http://www.AFS-Federhenn.de

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

Post by support » 27 Nov 2007, 17:20

Dear Peter Kuhn,

We do not recommend to use <b>AddScaledDXF</b> for thus purpose. We suggest the following way:
- draw first CADImage to a bitmap;
- use this bitmap as a background for second CADImage.

Sergey.

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

Megapit
Posts: 6
Joined: 31 Jul 2007, 11:25

Post by Megapit » 29 Nov 2007, 10:44

Hello

i'm already tryed to draw both CADImages to one bitmap.
My problem is, that the CadImage.AbsHeight and CadImage.AbsWidth propertys dont give me the real size of the CAd-File. For Example my CAD-File is 600mm in height but AbsHeight gives me 750mm.
Without the right information of the size of the first CADImage i cant't calculate the correct size of the second one. Youve got an suggestion for that?

Peter Kuhn

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

Post by support » 29 Nov 2007, 17:55

Dear Peter Kuhn,
<ol type="1">
<li>CAD files themselves contain absolute values. Neither millimeters nor inches. Thus CadImage.AbsHeight and CadImage.AbsWidth contain absolute values which may be interpreted like millimeters or inches.</li>
<li>CadImage.AbsHeight and CadImage.AbsWidth contain values counted on the maximum and minimum coordinates of entities. It is taken the rightmost and the leftmost coordinates and CadImage.AbsWidth is calculated. The same way CadImage.AbsHeight is received.</li>
<li>To give exact answer why AbsHeight gives 750 instead of 600 for your file, we must test it.</li></ol id="1">
Sergey.


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

Post Reply