Part: PR6497 move return statement to new line

This commit is contained in:
Chris Hennes
2022-03-29 12:37:00 -05:00
parent 3ecd16e0bd
commit 2ecc125497
21 changed files with 150 additions and 75 deletions

View File

@@ -433,7 +433,8 @@ eRefType AttachEngine::getShapeType(const TopoDS_Shape& sh)
case TopAbs_COMPOUND:{
const TopoDS_Compound &cmpd = TopoDS::Compound(sh);
TopoDS_Iterator it (cmpd, Standard_False, Standard_False);//don't mess with placements, to hopefully increase speed
if (! it.More()) return rtAnything;//empty compound
if (! it.More())//empty compound
return rtAnything;
const TopoDS_Shape &sh1 = it.Value();
it.Next();
if (it.More()){

View File

@@ -287,7 +287,8 @@ static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subna
{
TopoShape shape;
if(!obj) return shape;
if(!obj)
return shape;
PyObject *pyobj = nullptr;
Base::Matrix4D mat;
@@ -526,7 +527,8 @@ TopoShape Feature::getTopoShape(const App::DocumentObject *obj, const char *subn
App::DocumentObject *Feature::getShapeOwner(const App::DocumentObject *obj, const char *subname)
{
if(!obj) return nullptr;
if(!obj)
return nullptr;
auto owner = obj->getSubObject(subname);
if(owner) {
auto linked = owner->getLinkedObject(true);

View File

@@ -117,12 +117,14 @@ App::DocumentObjectExecReturn *RuledSurface::execute(void)
// get the first input shape
TopoDS_Shape S1;
ret = getShape(Curve1, S1);
if (ret) return ret;
if (ret)
return ret;
// get the second input shape
TopoDS_Shape S2;
ret = getShape(Curve2, S2);
if (ret) return ret;
if (ret)
return ret;
// check for expected type
if (S1.IsNull() || S2.IsNull())

View File

@@ -243,7 +243,8 @@ static Standard_Boolean BRepTools_Write(const TopoDS_Shape& Sh, const Standard_
#else
os.open(File, std::ios::out);
#endif
if (!os.rdbuf()->is_open()) return Standard_False;
if (!os.rdbuf()->is_open())
return Standard_False;
Standard_Boolean isGood = (os.good() && !os.eof());
if(!isGood)

View File

@@ -395,7 +395,8 @@ TopoDS_Shape TopoShape::getSubShape(TopAbs_ShapeEnum type, int index, bool silen
unsigned long TopoShape::countSubShapes(const char* Type) const
{
if(!Type) return 0;
if(!Type)
return 0;
if(strcmp(Type,"SubShape")==0)
return countSubShapes(TopAbs_SHAPE);
auto type = shapeType(Type,true);

View File

@@ -3245,7 +3245,8 @@ Py::Float TopoShapePy::getVolume(void) const
PyObject *TopoShapePy::getCustomAttributes(const char* attr) const
{
if (!attr) return nullptr;
if (!attr)
return nullptr;
PY_TRY {
TopoDS_Shape res = getTopoShapePtr()->getSubShape(attr,true);
if(!res.IsNull())

View File

@@ -826,14 +826,22 @@ bool FaceTypedBSpline::isEqual(const TopoDS_Face &faceOne, const TopoDS_Face &fa
if (surfaceOne.IsNull() || surfaceTwo.IsNull())
return false;
if (surfaceOne->IsURational() != surfaceTwo->IsURational()) return false;
if (surfaceOne->IsVRational() != surfaceTwo->IsVRational()) return false;
if (surfaceOne->IsUPeriodic() != surfaceTwo->IsUPeriodic()) return false;
if (surfaceOne->IsVPeriodic() != surfaceTwo->IsVPeriodic()) return false;
if (surfaceOne->IsUClosed() != surfaceTwo->IsUClosed()) return false;
if (surfaceOne->IsVClosed() != surfaceTwo->IsVClosed()) return false;
if (surfaceOne->UDegree() != surfaceTwo->UDegree()) return false;
if (surfaceOne->VDegree() != surfaceTwo->VDegree()) return false;
if (surfaceOne->IsURational() != surfaceTwo->IsURational())
return false;
if (surfaceOne->IsVRational() != surfaceTwo->IsVRational())
return false;
if (surfaceOne->IsUPeriodic() != surfaceTwo->IsUPeriodic())
return false;
if (surfaceOne->IsVPeriodic() != surfaceTwo->IsVPeriodic())
return false;
if (surfaceOne->IsUClosed() != surfaceTwo->IsUClosed())
return false;
if (surfaceOne->IsVClosed() != surfaceTwo->IsVClosed())
return false;
if (surfaceOne->UDegree() != surfaceTwo->UDegree())
return false;
if (surfaceOne->VDegree() != surfaceTwo->VDegree())
return false;
//pole test
int uPoleCountOne(surfaceOne->NbUPoles());