X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Prism.cpp;h=eae39590229d4909691e4df9cdf40fc9f8b3093f;hb=HEAD;hp=50b2ef2b16cc004b3d1c5d3b197f87962958cd21;hpb=380f01e1fce1a012267d604a1190d04bf4659447;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp index 50b2ef2b1..eae395902 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp @@ -1,4 +1,4 @@ -// 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 @@ -184,11 +184,11 @@ GeomAlgoAPI_Prism::GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape, 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; } @@ -416,6 +416,8 @@ void GeomAlgoAPI_Prism::buildByPlanes(const GeomShapePtr theBaseShap TopoDS_Shape aResult = aPrismBuilder->Shape(); BRepBndLib::Add(aResult, aBndBox); + aBndBox.Add(aFromPnt->impl()); + aBndBox.Add(aToPnt->impl()); Standard_Real aBndBoxSize = aBndBox.CornerMin().Distance(aBndBox.CornerMax()); // Orienting bounding planes.