Page 1 of 1
Plt files bounds
Posted: 22 Dec 2009, 18:37
by Razzo
I have a plt file with this content:
IN;
VS32,1;
VS32,2;
VS32,3;
VS32,4;
VS32,5;
VS32,6;
VS32,7;
VS32,8;
WU0;
PW0.350,1;
PW0.350,2;
PW0.350,3;
PW0.350,4;
PW0.350,5;
PW0.350,6;
PW0.350,7;
PW0.350,8;
LT;
SP1;
PU-108 -2377;
PD270 -2377;
PD270 2917;
PD-108 3917;
PD-108 -2377;
SP0;
I like to have the maximum bounds of a rectangle that contains all shapes in this file (and future others).
In this case:
top-left: -108,+3917
top-right: +270,+3917
bottom-left: -108,-2377
bottom-right: +270, -2377
How can i do that?
Re: Plt files bounds
Posted: 23 Dec 2009, 13:27
by Razzo
If i load this file PLT
Why Extents are:
bottom -79.09375 double
Height -196.6875 double
left -3.8812500000000001 double
right 7.9312500000000004 double
top 117.59375000000001 double
Width 11.8125 double
I expect that the values are:
bottom -2377 double
Height 6294 double
left -180 double
right 270.2917 double
top 3917 double
Width 378 double
I check the scaling between the plt file values and your data have 1:32 scaling factor WHY?
Re: Plt files bounds
Posted: 24 Dec 2009, 14:16
by support
Hello.
Please use CADImage.GetExtents method to receive the maximum bounds of a rectangle that contains all entities. Calculated results for current layout will be stored in CADImage.Extents.
To answer your second question we need to test your PLT file. Please send it to
support@cadsofttools.com
Alexander.
Re: Plt files bounds
Posted: 24 Dec 2009, 14:38
by Razzo
Attached my plt file
Re: Plt files bounds
Posted: 04 Jan 2010, 13:30
by support
Hello.
PU-108 -2377;
PD270 -2377;
PD270 2917;
PD-108 3917;
PD-108 -2377;
as other lines in plt file is the instructions for plotting device. CAD Import .NET uses its own scale constants for image visualization.
Alexander.
Re: Plt files bounds
Posted: 07 Jan 2010, 11:32
by Razzo
Can i calculate this scale with standard method? Or it is always 1:32 ?
Re: Plt files bounds
Posted: 11 Jan 2010, 14:13
by support
Hello.
The contents of PLT are instructions for plotting device. You can calculate the scale using coordinates of the last points of the drawing from demo application. The scale is 1:40, not 1:32. But the extents of the CADImage object are calculated by other method.
Alexander.