-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurface);
aSurface = aTrimSurface->BasisSurface();
}
- if(aSurface->DynamicType() != STANDARD_TYPE(Geom_Plane)) {
- return;
- }
- aPlane = Handle(Geom_Plane)::DownCast(aSurface);
- } else {
+ if (aSurface->DynamicType() == STANDARD_TYPE(Geom_Plane))
+ aPlane = Handle(Geom_Plane)::DownCast(aSurface);
+ }
+
+ if (aPlane.IsNull()) {
aPlane = aFindPlane.Plane();
checkOrientation = true;
}
TopoDS_Shape aResult = aPrismBuilder->Shape();
BRepBndLib::Add(aResult, aBndBox);
+ aBndBox.Add(aFromPnt->impl<gp_Pnt>());
+ aBndBox.Add(aToPnt->impl<gp_Pnt>());
Standard_Real aBndBoxSize = aBndBox.CornerMin().Distance(aBndBox.CornerMax());
// Orienting bounding planes.