Plt files bounds
Moderators: SDS, support, admin
Plt files bounds
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?
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
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?
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
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.
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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: Plt files bounds
Hello.
Alexander.
as other lines in plt file is the instructions for plotting device. CAD Import .NET uses its own scale constants for image visualization.PU-108 -2377;
PD270 -2377;
PD270 2917;
PD-108 3917;
PD-108 -2377;
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: Plt files bounds
Can i calculate this scale with standard method? Or it is always 1:32 ?
Re: Plt files bounds
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.
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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support