Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Part: [skip ci] fixes #4117: Crash during extrusion
  • Loading branch information
wwmayer committed Aug 13, 2020
1 parent 77dc31d commit 9c17fe3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Mod/Part/App/FaceMakerBullseye.cpp
Expand Up @@ -41,6 +41,7 @@
# include <ShapeExtend_Explorer.hxx>
# include <ShapeFix_Shape.hxx>
# include <ShapeFix_Wire.hxx>
# include <Standard_Failure.hxx>
# include <TopoDS.hxx>
# include <TopExp_Explorer.hxx>
# include <TopTools_IndexedMapOfShape.hxx>
Expand Down Expand Up @@ -191,6 +192,10 @@ int FaceMakerBullseye::FaceDriller::getWireDirection(const gp_Pln& plane, const
//make a test face
BRepBuilderAPI_MakeFace mkFace(wire, /*onlyplane=*/Standard_True);
TopoDS_Face tmpFace = mkFace.Face();
if (tmpFace.IsNull()) {
throw Standard_Failure("getWireDirection: Failed to create face from wire");
}

//compare face surface normal with our plane's one
BRepAdaptor_Surface surf(tmpFace);
bool normal_co = surf.Plane().Axis().Direction().Dot(plane.Axis().Direction()) > 0;
Expand Down

0 comments on commit 9c17fe3

Please sign in to comment.