PVS: V560 A part of conditional expression is always true
This commit is contained in:
@@ -235,7 +235,7 @@ Base::Placement AttachEngine::placementFactory(const gp_Dir &ZAxis,
|
||||
gp_Ax3 ax3;//OCC representation of the final placement
|
||||
if (!makeYVertical) {
|
||||
ax3 = gp_Ax3(Origin, ZAxis, XAxis);
|
||||
} else if (makeYVertical && !makeLegacyFlatFaceOrientation) {
|
||||
} else if (!makeLegacyFlatFaceOrientation) {
|
||||
//align Y along Z, if possible
|
||||
gp_Vec YAxis(0.0,0.0,1.0);
|
||||
XAxis = YAxis.Crossed(gp_Vec(ZAxis));
|
||||
@@ -1163,7 +1163,7 @@ Base::Placement AttachEngine3D::calculateAttachedPlacement(Base::Placement origP
|
||||
throw Base::ValueError("AttachEngine3D::calculateAttachedPlacement: not enough subshapes (need one false and one vertex).");
|
||||
|
||||
bool bThruVertex = false;
|
||||
if (shapes[0]->ShapeType() == TopAbs_VERTEX && shapes.size()>=2) {
|
||||
if (shapes[0]->ShapeType() == TopAbs_VERTEX) {
|
||||
std::swap(shapes[0],shapes[1]);
|
||||
bThruVertex = true;
|
||||
}
|
||||
|
||||
@@ -2507,8 +2507,10 @@ TopoDS_Shape TopoShape::makeOffset2D(double offset, short joinType, bool fill, b
|
||||
{
|
||||
if (_Shape.IsNull())
|
||||
throw Base::ValueError("makeOffset2D: input shape is null!");
|
||||
if (allowOpenResult && OCC_VERSION_HEX < 0x060900)
|
||||
#if OCC_VERSION_HEX < 0x060900
|
||||
if (allowOpenResult)
|
||||
throw Base::AttributeError("openResult argument is not supported on OCC < 6.9.0.");
|
||||
#endif
|
||||
|
||||
// OUTLINE OF MAKEOFFSET2D
|
||||
// * Prepare shapes to process
|
||||
|
||||
@@ -281,7 +281,7 @@ PyObject* TopoShapeSolidPy::offsetFaces(PyObject *args)
|
||||
}
|
||||
|
||||
bool paramOK = false;
|
||||
if (!paramOK && PyArg_ParseTuple(args, "Od", &obj,&offset)) {
|
||||
if (PyArg_ParseTuple(args, "Od", &obj,&offset)) {
|
||||
paramOK = true;
|
||||
Py::Sequence list(obj);
|
||||
for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) {
|
||||
|
||||
Reference in New Issue
Block a user