0000749: PI was not declared in this scope - compile error
This commit is contained in:
parent
02bbb1f12d
commit
f6cf5227ed
|
@ -104,7 +104,6 @@
|
|||
#include <Standard_Real.hxx>
|
||||
#include <Standard_ShortReal.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_Static.hxx>
|
||||
#include <Standard_Storable.hxx>
|
||||
#include <Standard_Stream.hxx>
|
||||
#include <Standard_String.hxx>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#endif
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <Base/VectorPy.h>
|
||||
#include <Base/PlacementPy.h>
|
||||
#include <App/Application.h>
|
||||
|
@ -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<angle_range_max_x;alpha_x=alpha_x+step_size)
|
||||
{
|
||||
|
@ -744,11 +745,11 @@ static PyObject * import_NASTRAN(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;
|
||||
|
||||
for (step_size = (2.0*PI/it_steps);step_size>(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<angle_range_max_x;alpha_x=alpha_x+step_size)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
#include "FeatureRevolution.h"
|
||||
|
||||
#include <Base/Tools.h>
|
||||
|
||||
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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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<Base::Vector3d> &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 ()) {
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Boolean operation</string>
|
||||
<string>Model refinement</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
|
|
Loading…
Reference in New Issue
Block a user