Code: Select all
if indexofface1 == -1 or indexofface2 == -1:continue
RevolveAxis = RevolveAxisList[indexofface1]
LineRevolve = LinesRevolveList[indexofface1]
angle = FinalAngleList[indexofface1]
FreeCAD.ActiveDocument.addObject("Part::Revolution","Revolve")
FreeCAD.ActiveDocument.Revolve.Source = LineRevolve
revolve_axis_unit_vector = RevolveAxisDirList[indexofface1]
axispt = [0.0,0.0,0.0]
axispt[0] = revolve_axis_unit_vector[0]
axispt[1] = revolve_axis_unit_vector[1]
axispt[2] = revolve_axis_unit_vector[2]
FreeCAD.ActiveDocument.Revolve.Axis = (axispt[0],axispt[1],axispt[2])
FreeCAD.ActiveDocument.Revolve.Base = (1.43,40.24,-2)
FreeCAD.ActiveDocument.Revolve.Angle = angle
FreeCAD.ActiveDocument.Revolve.Solid = False
FreeCAD.ActiveDocument.Revolve.AxisLink = (LineRevolve, "Edge1")
FreeCAD.ActiveDocument.Revolve.Symmetric = False
FreeCADGui.ActiveDocument.Line.Visibility = False
FreeCADGui.ActiveDocument.recompute()
except:
print("Exception in RevolveFaces")
Error -->
Code: Select all
<Exception> type of first element in tuple must be 'DocumentObject', not NoneType
https://imgur.com/EPoSuLN this is how it looks because of error
https://imgur.com/rou0FGS this is how it is supposed to look
I've attached the FreeCAD file and the content from the report view.
It stops at 3.5(refer report view file) and throws error