Plt files bounds

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Razzo
Posts: 13
Joined: 22 Dec 2009, 17:51
Location: Udine, Italy
Contact:

Plt files bounds

Post by Razzo » 22 Dec 2009, 18:37

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?

Razzo
Posts: 13
Joined: 22 Dec 2009, 17:51
Location: Udine, Italy
Contact:

Re: Plt files bounds

Post by Razzo » 23 Dec 2009, 13:27

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?

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

Re: Plt files bounds

Post by support » 24 Dec 2009, 14:16

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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Razzo
Posts: 13
Joined: 22 Dec 2009, 17:51
Location: Udine, Italy
Contact:

Re: Plt files bounds

Post by Razzo » 24 Dec 2009, 14:38

Attached my plt file
Attachments
palo.zip
(218 Bytes) Downloaded 1248 times

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

Re: Plt files bounds

Post by support » 04 Jan 2010, 13:30

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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Razzo
Posts: 13
Joined: 22 Dec 2009, 17:51
Location: Udine, Italy
Contact:

Re: Plt files bounds

Post by Razzo » 07 Jan 2010, 11:32

Can i calculate this scale with standard method? Or it is always 1:32 ?

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

Re: Plt files bounds

Post by support » 11 Jan 2010, 14:13

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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply