+ Fix compiler warnings with OCC 6.6
This commit is contained in:
parent
eb5cc8ed6c
commit
d62ed23068
|
@ -78,12 +78,12 @@ int ArcOfCirclePy::PyInit(PyObject* args, PyObject* kwds)
|
|||
{
|
||||
PyObject* o;
|
||||
double u1, u2;
|
||||
int sense=1;
|
||||
if (PyArg_ParseTuple(args, "O!dd|i", &(Part::CirclePy::Type), &o, &u1, &u2, &sense)) {
|
||||
PyObject *sense=Py_True;
|
||||
if (PyArg_ParseTuple(args, "O!dd|O!", &(Part::CirclePy::Type), &o, &u1, &u2, &PyBool_Type, &sense)) {
|
||||
try {
|
||||
Handle_Geom_Circle circle = Handle_Geom_Circle::DownCast
|
||||
(static_cast<CirclePy*>(o)->getGeomCirclePtr()->handle());
|
||||
GC_MakeArcOfCircle arc(circle->Circ(), u1, u2, sense);
|
||||
GC_MakeArcOfCircle arc(circle->Circ(), u1, u2, PyObject_IsTrue(sense) ? Standard_True : Standard_False);
|
||||
if (!arc.IsDone()) {
|
||||
PyErr_SetString(PyExc_Exception, gce_ErrorStatusText(arc.Status()));
|
||||
return -1;
|
||||
|
|
|
@ -61,12 +61,12 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
|||
{
|
||||
PyObject* o;
|
||||
double u1, u2;
|
||||
int sense=1;
|
||||
if (PyArg_ParseTuple(args, "O!dd|i", &(Part::CirclePy::Type), &o, &u1, &u2, &sense)) {
|
||||
PyObject *sense=Py_True;
|
||||
if (PyArg_ParseTuple(args, "O!dd|O!", &(Part::CirclePy::Type), &o, &u1, &u2, &PyBool_Type, &sense)) {
|
||||
try {
|
||||
Handle_Geom_Circle circle = Handle_Geom_Circle::DownCast
|
||||
(static_cast<CirclePy*>(o)->getGeomCirclePtr()->handle());
|
||||
GC_MakeArcOfCircle arc(circle->Circ(), u1, u2, sense);
|
||||
GC_MakeArcOfCircle arc(circle->Circ(), u1, u2, PyObject_IsTrue(sense) ? Standard_True : Standard_False);
|
||||
if (!arc.IsDone()) {
|
||||
PyErr_SetString(PyExc_Exception, gce_ErrorStatusText(arc.Status()));
|
||||
return -1;
|
||||
|
@ -108,11 +108,11 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
|||
}
|
||||
|
||||
PyErr_Clear();
|
||||
if (PyArg_ParseTuple(args, "O!dd|i", &(Part::EllipsePy::Type), &o, &u1, &u2, &sense)) {
|
||||
if (PyArg_ParseTuple(args, "O!dd|O!", &(Part::EllipsePy::Type), &o, &u1, &u2, &PyBool_Type, &sense)) {
|
||||
try {
|
||||
Handle_Geom_Ellipse ellipse = Handle_Geom_Ellipse::DownCast
|
||||
(static_cast<EllipsePy*>(o)->getGeomEllipsePtr()->handle());
|
||||
GC_MakeArcOfEllipse arc(ellipse->Elips(), u1, u2, sense);
|
||||
GC_MakeArcOfEllipse arc(ellipse->Elips(), u1, u2, PyObject_IsTrue(sense) ? Standard_True : Standard_False);
|
||||
if (!arc.IsDone()) {
|
||||
PyErr_SetString(PyExc_Exception, gce_ErrorStatusText(arc.Status()));
|
||||
return -1;
|
||||
|
|
|
@ -121,7 +121,11 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
|
|||
PyErr_SetString(PyExc_TypeError, "spine is not a wire");
|
||||
return 0;
|
||||
}
|
||||
this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode(TopoDS::Wire(s), PyObject_IsTrue(curv), PyObject_IsTrue(keep));
|
||||
|
||||
this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode(
|
||||
TopoDS::Wire(s),
|
||||
PyObject_IsTrue(curv) ? Standard_True : Standard_False,
|
||||
PyObject_IsTrue(keep) ? Standard_True : Standard_False);
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
|
@ -133,7 +137,9 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args)
|
|||
,&PyBool_Type,&keep))
|
||||
return 0;
|
||||
const TopoDS_Shape& s = static_cast<Part::TopoShapePy*>(prof)->getTopoShapePtr()->_Shape;
|
||||
this->getBRepOffsetAPI_MakePipeShellPtr()->Add(s, PyObject_IsTrue(curv), PyObject_IsTrue(keep));
|
||||
this->getBRepOffsetAPI_MakePipeShellPtr()->Add(s,
|
||||
PyObject_IsTrue(curv) ? Standard_True : Standard_False,
|
||||
PyObject_IsTrue(keep) ? Standard_True : Standard_False);
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ PyObject* BSplineCurvePy::insertKnot(PyObject * args)
|
|||
try {
|
||||
Handle_Geom_BSplineCurve curve = Handle_Geom_BSplineCurve::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
curve->InsertKnot(U,M,tol,PyObject_IsTrue(add));
|
||||
curve->InsertKnot(U,M,tol,PyObject_IsTrue(add) ? Standard_True : Standard_False);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle_Standard_Failure e = Standard_Failure::Caught();
|
||||
|
@ -223,7 +223,7 @@ PyObject* BSplineCurvePy::insertKnots(PyObject * args)
|
|||
|
||||
Handle_Geom_BSplineCurve curve = Handle_Geom_BSplineCurve::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
curve->InsertKnots(k,m,tol,PyObject_IsTrue(add));
|
||||
curve->InsertKnots(k,m,tol,PyObject_IsTrue(add) ? Standard_True : Standard_False);
|
||||
Py_Return;
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
|
@ -763,7 +763,8 @@ PyObject* BSplineCurvePy::interpolate(PyObject *args)
|
|||
Standard_Failure::Raise("not enough points given");
|
||||
}
|
||||
|
||||
GeomAPI_Interpolate aBSplineInterpolation(interpolationPoints, PyObject_IsTrue(periodic), tol3d);
|
||||
GeomAPI_Interpolate aBSplineInterpolation(interpolationPoints,
|
||||
PyObject_IsTrue(periodic) ? Standard_True : Standard_False, tol3d);
|
||||
if (t1 && t2) {
|
||||
Base::Vector3d v1 = Py::Vector(t1,false).toVector();
|
||||
Base::Vector3d v2 = Py::Vector(t2,false).toVector();
|
||||
|
@ -991,7 +992,10 @@ PyObject* BSplineCurvePy::buildFromPolesMultsKnots(PyObject *args, PyObject *key
|
|||
Standard_Failure::Raise("number of poles and sum of mults mismatch");
|
||||
return(0);
|
||||
}
|
||||
Handle_Geom_BSplineCurve spline = new Geom_BSplineCurve(occpoles,occweights,occknots,occmults,degree,PyObject_IsTrue(periodic),PyObject_IsTrue(CheckRational));
|
||||
|
||||
Handle_Geom_BSplineCurve spline = new Geom_BSplineCurve(occpoles,occweights,occknots,occmults,degree,
|
||||
PyObject_IsTrue(periodic) ? Standard_True : Standard_False,
|
||||
PyObject_IsTrue(CheckRational) ? Standard_True : Standard_False);
|
||||
if (!spline.IsNull()) {
|
||||
this->getGeomBSplineCurvePtr()->setHandle(spline);
|
||||
Py_Return;
|
||||
|
|
|
@ -293,7 +293,7 @@ PyObject* BSplineSurfacePy::insertUKnot(PyObject *args)
|
|||
try {
|
||||
Handle_Geom_BSplineSurface surf = Handle_Geom_BSplineSurface::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
surf->InsertUKnot(U,M,tol,PyObject_IsTrue(add));
|
||||
surf->InsertUKnot(U,M,tol,PyObject_IsTrue(add) ? Standard_True : Standard_False);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle_Standard_Failure e = Standard_Failure::Caught();
|
||||
|
@ -333,7 +333,7 @@ PyObject* BSplineSurfacePy::insertUKnots(PyObject *args)
|
|||
|
||||
Handle_Geom_BSplineSurface surf = Handle_Geom_BSplineSurface::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
surf->InsertUKnots(k,m,tol,PyObject_IsTrue(add));
|
||||
surf->InsertUKnots(k,m,tol,PyObject_IsTrue(add) ? Standard_True : Standard_False);
|
||||
Py_Return;
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
|
@ -356,7 +356,7 @@ PyObject* BSplineSurfacePy::insertVKnot(PyObject *args)
|
|||
try {
|
||||
Handle_Geom_BSplineSurface surf = Handle_Geom_BSplineSurface::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
surf->InsertVKnot(V,M,tol,PyObject_IsTrue(add));
|
||||
surf->InsertVKnot(V,M,tol,PyObject_IsTrue(add) ? Standard_True : Standard_False);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle_Standard_Failure e = Standard_Failure::Caught();
|
||||
|
@ -396,7 +396,7 @@ PyObject* BSplineSurfacePy::insertVKnots(PyObject *args)
|
|||
|
||||
Handle_Geom_BSplineSurface surf = Handle_Geom_BSplineSurface::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
surf->InsertVKnots(k,m,tol,PyObject_IsTrue(add));
|
||||
surf->InsertVKnots(k,m,tol,PyObject_IsTrue(add) ? Standard_True : Standard_False);
|
||||
Py_Return;
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
|
@ -1429,7 +1429,7 @@ PyObject* BSplineSurfacePy::buildFromPolesMultsKnots(PyObject *args, PyObject *k
|
|||
Standard_Integer lv = col.size();
|
||||
TColgp_Array2OfPnt occpoles(1, lu, 1, lv);
|
||||
TColStd_Array2OfReal occweights(1, lu, 1, lv);
|
||||
Standard_Boolean genweights = PyObject_Not(weights) ; //cache
|
||||
Standard_Boolean genweights = PyObject_Not(weights) ? Standard_True : Standard_False; //cache
|
||||
Standard_Integer index1 = 0;
|
||||
Standard_Integer index2 = 0;
|
||||
for (Py::Sequence::iterator it1 = list.begin(); it1 != list.end(); ++it1) {
|
||||
|
@ -1532,7 +1532,8 @@ PyObject* BSplineSurfacePy::buildFromPolesMultsKnots(PyObject *args, PyObject *k
|
|||
}
|
||||
Handle_Geom_BSplineSurface spline = new Geom_BSplineSurface(occpoles,occweights,
|
||||
occuknots,occvknots,occumults,occvmults,udegree,vdegree,
|
||||
PyObject_IsTrue(uperiodic),PyObject_IsTrue(vperiodic));
|
||||
PyObject_IsTrue(uperiodic) ? Standard_True : Standard_False,
|
||||
PyObject_IsTrue(vperiodic) ? Standard_True : Standard_False);
|
||||
if (!spline.IsNull()) {
|
||||
this->getGeomBSplineSurfacePtr()->setHandle(spline);
|
||||
Py_Return;
|
||||
|
|
|
@ -59,7 +59,9 @@ int RectangularTrimmedSurfacePy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
|||
getGeomTrimmedSurfacePtr()->setHandle(new Geom_RectangularTrimmedSurface(
|
||||
Handle_Geom_Surface::DownCast(static_cast<GeometrySurfacePy*>(surf)->
|
||||
getGeomSurfacePtr()->handle()),
|
||||
u1, u2, v1, v2, PyObject_IsTrue(usense), PyObject_IsTrue(vsense)
|
||||
u1, u2, v1, v2,
|
||||
PyObject_IsTrue(usense) ? Standard_True : Standard_False,
|
||||
PyObject_IsTrue(vsense) ? Standard_True : Standard_False
|
||||
));
|
||||
return 0;
|
||||
}
|
||||
|
@ -69,8 +71,8 @@ int RectangularTrimmedSurfacePy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
|||
PyObject *utrim=Py_False, *sense=Py_True;
|
||||
if (PyArg_ParseTuple(args, "O!ddO!|O!",&(Part::GeometrySurfacePy::Type),&surf,
|
||||
¶m1,¶m2,&PyBool_Type,&utrim,&PyBool_Type,&sense)) {
|
||||
Standard_Boolean UTrim = PyObject_IsTrue(utrim);
|
||||
Standard_Boolean Sense = PyObject_IsTrue(sense);
|
||||
Standard_Boolean UTrim = PyObject_IsTrue(utrim) ? Standard_True : Standard_False;
|
||||
Standard_Boolean Sense = PyObject_IsTrue(sense) ? Standard_True : Standard_False;
|
||||
getGeomTrimmedSurfacePtr()->setHandle(new Geom_RectangularTrimmedSurface(
|
||||
Handle_Geom_Surface::DownCast(static_cast<GeometrySurfacePy*>(surf)->
|
||||
getGeomSurfacePtr()->handle()),
|
||||
|
|
|
@ -122,7 +122,7 @@ PyObject* TopoShapeCompoundPy::connectEdgesToWires(PyObject *args)
|
|||
for (TopExp_Explorer xp(s, TopAbs_EDGE); xp.More(); xp.Next())
|
||||
hEdges->Append(xp.Current());
|
||||
|
||||
ShapeAnalysis_FreeBounds::ConnectEdgesToWires(hEdges, tol, PyObject_IsTrue(shared), hWires);
|
||||
ShapeAnalysis_FreeBounds::ConnectEdgesToWires(hEdges, tol, PyObject_IsTrue(shared) ? Standard_True : Standard_False, hWires);
|
||||
|
||||
TopoDS_Compound comp;
|
||||
BRep_Builder builder;
|
||||
|
|
|
@ -242,11 +242,14 @@ PyObject* TopoShapeWirePy::makePipe(PyObject *args)
|
|||
PyObject* TopoShapeWirePy::makePipeShell(PyObject *args)
|
||||
{
|
||||
PyObject *obj;
|
||||
int make_solid = 0;
|
||||
int is_Frenet = 0;
|
||||
int transition = 0;
|
||||
PyObject *make_solid = Py_False;
|
||||
PyObject *is_Frenet = Py_False;
|
||||
PyObject *transition = Py_False;
|
||||
|
||||
if (PyArg_ParseTuple(args, "O|iii", &obj, &make_solid, &is_Frenet, &transition)) {
|
||||
if (PyArg_ParseTuple(args, "O|O!O!O!", &obj,
|
||||
&PyBool_Type, &make_solid,
|
||||
&PyBool_Type, &is_Frenet,
|
||||
&PyBool_Type, &transition)) {
|
||||
try {
|
||||
TopTools_ListOfShape sections;
|
||||
Py::Sequence list(obj);
|
||||
|
@ -256,7 +259,10 @@ PyObject* TopoShapeWirePy::makePipeShell(PyObject *args)
|
|||
sections.Append(shape);
|
||||
}
|
||||
}
|
||||
TopoDS_Shape shape = this->getTopoShapePtr()->makePipeShell(sections, make_solid, is_Frenet, transition);
|
||||
TopoDS_Shape shape = this->getTopoShapePtr()->makePipeShell(sections,
|
||||
PyObject_IsTrue(make_solid) ? Standard_True : Standard_False,
|
||||
PyObject_IsTrue(is_Frenet) ? Standard_True : Standard_False,
|
||||
PyObject_IsTrue(transition) ? Standard_True : Standard_False);
|
||||
return new TopoShapePy(new TopoShape(shape));
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<property name="windowTitle">
|
||||
<string>Raytracing</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<layout class="QGridLayout" name="gridLayout1">
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
|
@ -110,7 +110,7 @@
|
|||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QGridLayout" name="gridLayout2">
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefFileChooser" name="prefFileChooser2">
|
||||
<property name="toolTip">
|
||||
|
@ -240,7 +240,7 @@
|
|||
<property name="title">
|
||||
<string>Directories</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<layout class="QGridLayout" name="gridLayout3">
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
|
@ -248,7 +248,7 @@
|
|||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<layout class="QGridLayout" name="gridLayout4">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
|
Loading…
Reference in New Issue
Block a user