diff --git a/src/Mod/PartDesign/App/FeaturePrimitive.cpp b/src/Mod/PartDesign/App/FeaturePrimitive.cpp index b2a57c627f..f8f79bfea2 100644 --- a/src/Mod/PartDesign/App/FeaturePrimitive.cpp +++ b/src/Mod/PartDesign/App/FeaturePrimitive.cpp @@ -502,16 +502,24 @@ App::DocumentObjectExecReturn* Torus::execute(void) if (Radius2.getValue() < Precision::Confusion()) return new App::DocumentObjectExecReturn("Radius of torus too small"); try { - + // https://forum.freecadweb.org/viewtopic.php?f=3&t=52719 +#if 0 BRepPrimAPI_MakeTorus mkTorus(Radius1.getValue(), Radius2.getValue(), Angle1.getValue()/180.0f*M_PI, Angle2.getValue()/180.0f*M_PI, Angle3.getValue()/180.0f*M_PI); return FeaturePrimitive::execute(mkTorus.Solid()); +#else + Part::TopoShape shape; + return FeaturePrimitive::execute(shape.makeTorus(Radius1.getValue(), + Radius2.getValue(), + Angle1.getValue(), + Angle2.getValue(), + Angle3.getValue())); +#endif } catch (Standard_Failure& e) { - return new App::DocumentObjectExecReturn(e.GetMessageString()); }