diff --git a/src/Mod/Drawing/App/PreCompiled.h b/src/Mod/Drawing/App/PreCompiled.h index 2bffecf1d..bb3d325c9 100644 --- a/src/Mod/Drawing/App/PreCompiled.h +++ b/src/Mod/Drawing/App/PreCompiled.h @@ -104,7 +104,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Mod/Fem/App/AppFemPy.cpp b/src/Mod/Fem/App/AppFemPy.cpp index 551e07eb6..838a5aeab 100644 --- a/src/Mod/Fem/App/AppFemPy.cpp +++ b/src/Mod/Fem/App/AppFemPy.cpp @@ -28,6 +28,7 @@ #endif #include +#include #include #include #include @@ -498,12 +499,12 @@ static PyObject * minBoundingBox(PyObject *self, PyObject *args) //Do a Monte Carlo approach and start from the Principal Axis System //and rotate +/- 60° around each axis in a first iteration - double angle_range_min_x=-PI/3.0,angle_range_max_x=PI/3.0, - angle_range_min_y=-PI/3.0,angle_range_max_y=PI/3.0, - angle_range_min_z=-PI/3.0,angle_range_max_z=PI/3.0; + double angle_range_min_x=-M_PI/3.0,angle_range_max_x=M_PI/3.0, + angle_range_min_y=-M_PI/3.0,angle_range_max_y=M_PI/3.0, + angle_range_min_z=-M_PI/3.0,angle_range_max_z=M_PI/3.0; //We rotate until we are 0.1° sure to be in the right position - for (step_size = (2.0*PI/it_steps);step_size>(2.0*PI/3600.0);step_size=(2.0*PI/it_steps)) + for (step_size = (2.0*M_PI/it_steps);step_size>(2.0*M_PI/3600.0);step_size=(2.0*M_PI/it_steps)) { for(alpha_x=angle_range_min_x;alpha_x(2.0*PI/360.0);step_size=(2.0*PI/it_steps)) + for (step_size = (2.0*M_PI/it_steps);step_size>(2.0*M_PI/360.0);step_size=(2.0*M_PI/it_steps)) { for(alpha_x=angle_range_min_x;alpha_x using namespace Part; @@ -72,7 +72,7 @@ App::DocumentObjectExecReturn *Revolution::execute(void) try { // Now, let's get the TopoDS_Shape TopoDS_Shape revolve = base->Shape.getShape().revolve(gp_Ax1(pnt, dir), - Angle.getValue()/180.0f*Standard_PI); + Angle.getValue()/180.0f*M_PI); if (revolve.IsNull()) return new App::DocumentObjectExecReturn("Resulting shape is null"); this->Shape.setValue(revolve); diff --git a/src/Mod/Part/App/PrimitiveFeature.cpp b/src/Mod/Part/App/PrimitiveFeature.cpp index 5673ddd42..c2e818a52 100644 --- a/src/Mod/Part/App/PrimitiveFeature.cpp +++ b/src/Mod/Part/App/PrimitiveFeature.cpp @@ -333,9 +333,9 @@ App::DocumentObjectExecReturn *Sphere::execute(void) return new App::DocumentObjectExecReturn("Radius of sphere too small"); try { BRepPrimAPI_MakeSphere mkSphere(Radius.getValue(), - Angle1.getValue()/180.0f*Standard_PI, - Angle2.getValue()/180.0f*Standard_PI, - Angle3.getValue()/180.0f*Standard_PI); + Angle1.getValue()/180.0f*M_PI, + Angle2.getValue()/180.0f*M_PI, + Angle3.getValue()/180.0f*M_PI); TopoDS_Shape ResultShape = mkSphere.Shape(); this->Shape.setValue(ResultShape); } @@ -391,9 +391,9 @@ App::DocumentObjectExecReturn *Ellipsoid::execute(void) gp_Ax2 ax2(pnt,dir); BRepPrimAPI_MakeSphere mkSphere(ax2, Radius2.getValue(), - Angle1.getValue()/180.0f*Standard_PI, - Angle2.getValue()/180.0f*Standard_PI, - Angle3.getValue()/180.0f*Standard_PI); + Angle1.getValue()/180.0f*M_PI, + Angle2.getValue()/180.0f*M_PI, + Angle3.getValue()/180.0f*M_PI); Standard_Real scale = Radius1.getValue()/Radius2.getValue(); gp_Dir xDir = ax2.XDirection(); gp_Dir yDir = ax2.YDirection(); @@ -450,7 +450,7 @@ App::DocumentObjectExecReturn *Cylinder::execute(void) try { BRepPrimAPI_MakeCylinder mkCylr(Radius.getValue(), Height.getValue(), - Angle.getValue()/180.0f*Standard_PI); + Angle.getValue()/180.0f*M_PI); TopoDS_Shape ResultShape = mkCylr.Shape(); this->Shape.setValue(ResultShape); } @@ -499,7 +499,7 @@ App::DocumentObjectExecReturn *Cone::execute(void) BRepPrimAPI_MakeCone mkCone(Radius1.getValue(), Radius2.getValue(), Height.getValue(), - Angle.getValue()/180.0f*Standard_PI); + Angle.getValue()/180.0f*M_PI); TopoDS_Shape ResultShape = mkCone.Shape(); this->Shape.setValue(ResultShape); } diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index f40916e5b..a42a3ec08 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -1432,7 +1432,7 @@ TopoDS_Shape TopoShape::makeTube(double radius, double tol, int cont, int maxdeg //circular profile Handle(Geom_Circle) aCirc = new Geom_Circle (gp::XOY(), radius); - aCirc->Rotate (gp::OZ(), Standard_PI/2.); + aCirc->Rotate (gp::OZ(), M_PI/2.); //perpendicular section Handle(Law_Function) myEvol = ::CreateBsFunction (myPath->FirstParameter(), myPath->LastParameter(), radius); @@ -1540,18 +1540,18 @@ TopoDS_Shape TopoShape::makeHelix(Standard_Real pitch, Standard_Real height, } gp_Pnt2d aPnt(0, 0); - gp_Dir2d aDir(2. * PI, pitch); + gp_Dir2d aDir(2. * M_PI, pitch); if (leftHanded) { //aPnt.SetCoord(0.0, height); //aDir.SetCoord(2.0 * PI, -pitch); - aPnt.SetCoord(2. * PI, 0.0); - aDir.SetCoord(-2. * PI, pitch); + aPnt.SetCoord(2. * M_PI, 0.0); + aDir.SetCoord(-2. * M_PI, pitch); } gp_Ax2d aAx2d(aPnt, aDir); Handle(Geom2d_Line) line = new Geom2d_Line(aAx2d); gp_Pnt2d beg = line->Value(0); - gp_Pnt2d end = line->Value(sqrt(4.0*PI*PI+pitch*pitch)*(height/pitch)); + gp_Pnt2d end = line->Value(sqrt(4.0*M_PI*M_PI+pitch*pitch)*(height/pitch)); Handle(Geom2d_TrimmedCurve) segm = GCE2d_MakeSegment(beg , end); TopoDS_Edge edgeOnSurf = BRepBuilderAPI_MakeEdge(segm , surf); @@ -1944,7 +1944,11 @@ void TopoShape::getFaces(std::vector &aPoints, Standard_Real x3, y3, z3; Handle_StlMesh_Mesh aMesh = new StlMesh_Mesh(); - StlTransfer::BuildIncrementalMesh(this->_Shape, accuracy, aMesh); + StlTransfer::BuildIncrementalMesh(this->_Shape, accuracy, +#if OCC_VERSION_HEX >= 0x060503 + Standard_True, +#endif + aMesh); StlMesh_MeshExplorer xp(aMesh); for (Standard_Integer nbd=1;nbd<=aMesh->NbDomains();nbd++) { for (xp.InitTriangle (nbd); xp.MoreTriangle (); xp.NextTriangle ()) { diff --git a/src/Mod/Part/Gui/DlgSettingsGeneral.ui b/src/Mod/Part/Gui/DlgSettingsGeneral.ui index 4ea3f5222..535d0f1d3 100644 --- a/src/Mod/Part/Gui/DlgSettingsGeneral.ui +++ b/src/Mod/Part/Gui/DlgSettingsGeneral.ui @@ -71,7 +71,7 @@ - Boolean operation + Model refinement