I use OpenCascade V7.4.0 for windows 32bit.
I want to know the maximum and minimum X, Y, Z coordinates of the model,
I tried to find the coordinates using BRepBndLib as below source.
BRepBndLib::Add( shape, bb );
bb.SetGap( 0.0 );
gp_Pnt pntMin = bb.CornerMin();
gp_Pnt pntMax = bb.CornerMax();
However, the output may be 15mm larger than the actual size.
checking, the coordinates are displayed correctly when the model is displayed once.
However, I do not want to display it due to the processing.
As a result of referring to the forums in the past, we changed BRepBndLib :: Add to BRepBndLib :: Add Optimal.
As a result, the 15mm error is gone.
I used it for a while with that modification.
But after cutting another model, I rotated it and acquired the maximum and minimum XYZ coordinates, and an error of 0.0001 occurred.
In this case, changing to BRepBndLib :: Add did not raise an error.
Even in the above two cases, I would like to be able to get the maximum, minimum X, Y, Z coordinates.
Is there any good way?