+ fix bug in revolve feature
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5070 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
parent
8285c1d4e5
commit
a2cd64d17e
|
@ -36,6 +36,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <Base/Placement.h>
|
#include <Base/Placement.h>
|
||||||
|
#include <Base/Tools.h>
|
||||||
#include <Mod/Part/App/Part2DObject.h>
|
#include <Mod/Part/App/Part2DObject.h>
|
||||||
|
|
||||||
#include "FeatureRevolution.h"
|
#include "FeatureRevolution.h"
|
||||||
|
@ -111,7 +112,7 @@ App::DocumentObjectExecReturn *Revolution::execute(void)
|
||||||
SketchOrientation.multVec(SketchOrientationVector,SketchOrientationVector);
|
SketchOrientation.multVec(SketchOrientationVector,SketchOrientationVector);
|
||||||
|
|
||||||
|
|
||||||
Base::Vector3f b(0,0,0);
|
Base::Vector3f b = Base.getValue();
|
||||||
gp_Pnt pnt(b.x,b.y,b.z);
|
gp_Pnt pnt(b.x,b.y,b.z);
|
||||||
gp_Dir dir(SketchOrientationVector.x,SketchOrientationVector.y,SketchOrientationVector.z);
|
gp_Dir dir(SketchOrientationVector.x,SketchOrientationVector.y,SketchOrientationVector.z);
|
||||||
|
|
||||||
|
@ -126,7 +127,7 @@ App::DocumentObjectExecReturn *Revolution::execute(void)
|
||||||
return new App::DocumentObjectExecReturn("Creating a face from sketch failed");
|
return new App::DocumentObjectExecReturn("Creating a face from sketch failed");
|
||||||
|
|
||||||
// revolve the face to a solid
|
// revolve the face to a solid
|
||||||
BRepPrimAPI_MakeRevol RevolMaker(aFace,gp_Ax1(pnt, dir),Angle.getValue()/180.0f*Standard_PI);
|
BRepPrimAPI_MakeRevol RevolMaker(aFace,gp_Ax1(pnt, dir), Base::toRadians<double>(Angle.getValue()));
|
||||||
|
|
||||||
if (RevolMaker.IsDone()) {
|
if (RevolMaker.IsDone()) {
|
||||||
TopoDS_Shape result = RevolMaker.Shape();
|
TopoDS_Shape result = RevolMaker.Shape();
|
||||||
|
@ -146,7 +147,7 @@ App::DocumentObjectExecReturn *Revolution::execute(void)
|
||||||
this->Shape.setValue(result);
|
this->Shape.setValue(result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return new App::DocumentObjectExecReturn("Could not extrude the sketch!");
|
return new App::DocumentObjectExecReturn("Could not revolve the sketch!");
|
||||||
|
|
||||||
return App::DocumentObject::StdReturn;
|
return App::DocumentObject::StdReturn;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user