diff --git a/src/Mod/Part/App/modelRefine.cpp b/src/Mod/Part/App/modelRefine.cpp index 29f07d9d32..da82cb0888 100644 --- a/src/Mod/Part/App/modelRefine.cpp +++ b/src/Mod/Part/App/modelRefine.cpp @@ -62,6 +62,9 @@ #include #include #include +#include +#include +#include #include #include "modelRefine.h" @@ -1181,6 +1184,16 @@ void Part::BRepBuilderAPI_RefineModel::Build() } } myShape = mkSolid.Solid(); + +#if OCC_VERSION_HEX <= 0x060700 + // With occ 6.7 and older it can happen that a solid is flipped. + // In this case it must be reversed + GProp_GProps props; + BRepGProp::VolumeProperties(myShape, props); + if (props.Mass() < 0) { + myShape.Reverse(); + } +#endif } else if (myShape.ShapeType() == TopAbs_SHELL) { const TopoDS_Shell& shell = TopoDS::Shell(myShape);