Skip to content

Commit

Permalink
[lgtm] Fix potentially uninitialized local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
tpaviot committed May 25, 2017
1 parent bf9024a commit 112318f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/core_topology_face.py
Expand Up @@ -71,8 +71,8 @@ def face():

##TopoDS_Wire YellowWire
MW1 = BRepBuilderAPI_MakeWire(Edge1.Edge(), Edge2.Edge(), Edge3.Edge())
if MW1.IsDone():
yellow_wire = MW1.Wire()
assert MW1.IsDone()
yellow_wire = MW1.Wire()
brown_face = BRepBuilderAPI_MakeFace(yellow_wire)

#The pink face
Expand Down
14 changes: 7 additions & 7 deletions examples/core_topology_fillet.py
Expand Up @@ -72,8 +72,8 @@ def variable_filleting(event=None):

Rake.Add(8, 50, next(ex))
Rake.Build()
if Rake.IsDone():
evolvedBox = Rake.Shape()
assert Rake.IsDone()
evolvedBox = Rake.Shape()
# Create Cylinder
Cylinder = BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(-300, 0, 0), gp_Dir(0, 0, 1)), 100, 200).Shape()
fillet = BRepFilletAPI_MakeFillet(Cylinder)
Expand All @@ -86,9 +86,9 @@ def variable_filleting(event=None):
exp2 = Topo(Cylinder).edges()
fillet.Add(TabPoint2, next(exp2))
fillet.Build()
if fillet.IsDone():
LawEvolvedCylinder = fillet.Shape()
display.DisplayShape(LawEvolvedCylinder)
assert fillet.IsDone()
LawEvolvedCylinder = fillet.Shape()
display.DisplayShape(LawEvolvedCylinder)

P = gp_Pnt(350, 0, 0)
Box2 = BRepPrimAPI_MakeBox(P, 200, 200, 200).Shape()
Expand All @@ -115,8 +115,8 @@ def variable_filleting(event=None):

afillet.Add(TabPoint, next(exp))
afillet.Build()
if afillet.IsDone():
LawEvolvedBox = afillet.Shape()
assert afillet.IsDone()
LawEvolvedBox = afillet.Shape()

display.EraseAll()
display.DisplayShape(Box)
Expand Down

0 comments on commit 112318f

Please sign in to comment.