Calculate Width Height Using BoundsCalculator/GetBounds
![]() 1/27/2024 2:55 AM
|
---|
Trying to Calculate the Width & Height Using BoundsCalculator/GetBounds of a DWG file - but GetBounds is not returning correct value.
Currently using the Trial version.
DxfModel modelsource = DwgReader.Read("D:\\123\\New-Image\\GreenMax.dwg");
BoundsCalculator bc = new BoundsCalculator();
bc.GetBounds(modelsource);
Bounds3D bounds = bc.Bounds;
var C1B0X = bc.Bounds.Corner1.X;
var C1B0Y = bc.Bounds.Corner1.Y;
var C2B0X = bc.Bounds.Corner2.X;
var C2B0Y = bc.Bounds.Corners.Length;
var distanceVal = DistanceValue(C1B0X, C2B0X, 0, 0);
|
![]() 1/27/2024 9:01 AM
|
---|
The values calculated by CadLib look correct to me, bounds calculated by CadLib are: {Min: -6.14114259445131E-10, -2.22044604925031E-16, 0, max: 1.20000000050542, 2.49103600352194, 0}. This is exactly the same as the EXTMIN and EXTMAX values in AutoCAD.
It would be helpful if you post the values you are getting and the values you are expecting in your future forum posts.
- Wout
|