-// 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;
}