re : "Exception (Wed Mar 14 13:43:34 2018): type must be list of 'DocumentObject', not NoneType"
While reading the wiki PartDesign_Boolean my set of steps (that seems to be extremely simple) has resulted in an unexpected pop-up error-message dialog-box.
Using PartDesign workbench, I clicked the toolbar icon "Create a new empty document (Ctrl+N)" and the new empty window appeared.
I clicked the toolbar icon "Create a new body and make it active" then the icon "Create an additive box by its width, height and length" and accepted the default settings. It created Body.
I clicked the toolbar icon "Create a new body and make it active" then the icon "Create an additive sphere by its radius and various angles" and accepted all default settings except for the radius which was reduced. It created Body001.
I clicked the toolbar icon "Create a new body and make it active" then the icon "Create an additive cylinder by its radius, height and angle" and accepted all default settings except for the radius which was reduced. It created Body002.
I selected Body002 (the cylinder) in the Combo View model-tree, and then below in the Data tab I changed its placement, position, x to 10 mm.
I selected Body (the box) in the Combo View model-tree and right-clicked to "Toggle active body" then clicked the toolbar icon "Boolean operation with two or more bodies" . . . at which moment the error-message dialog-box appeared.
The message from the Report View window is copied/pasted above, at the beginning of this post.
The entire Python Console output is copied/pasted below. File attached too.
I believe I'm following the Wiki's instructions for doing Booleans. So, another bug, or between keyboard and chair?
Thanks.
.
Code: Select all
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> App.newDocument("Unnamed")
>>> App.setActiveDocument("Unnamed2")
>>> App.ActiveDocument=App.getDocument("Unnamed2")
>>> Gui.ActiveDocument=Gui.getDocument("Unnamed2")
>>> App.activeDocument().addObject('PartDesign::Body','Body')
>>> Gui.activeView().setActiveObject('pdbody', App.activeDocument().Body)
>>> Gui.Selection.clearSelection()
>>> Gui.Selection.addSelection(App.ActiveDocument.Body)
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.addObject('PartDesign::AdditiveBox','Box')
>>> App.ActiveDocument.Body.addObject(App.activeDocument().Box)
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().setEdit('Box')
>>> App.ActiveDocument.Box.Length=10.00
>>> App.ActiveDocument.Box.Width=10.00
>>> App.ActiveDocument.Box.Height=10.00
>>>
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().resetEdit()
>>> App.activeDocument().addObject('PartDesign::Body','Body001')
>>> Gui.activeView().setActiveObject('pdbody', App.activeDocument().Body001)
>>> Gui.Selection.clearSelection()
>>> Gui.Selection.addSelection(App.ActiveDocument.Body001)
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.addObject('PartDesign::AdditiveSphere','Sphere')
>>> App.ActiveDocument.Body001.addObject(App.activeDocument().Sphere)
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().setEdit('Sphere')
>>> App.ActiveDocument.Sphere.Radius=3.00
>>> App.ActiveDocument.Sphere.Angle1=-90.00
>>> App.ActiveDocument.Sphere.Angle2=90.00
>>> App.ActiveDocument.Sphere.Angle3=360.00
>>>
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().resetEdit()
>>> App.activeDocument().addObject('PartDesign::Body','Body002')
>>> Gui.activeView().setActiveObject('pdbody', App.activeDocument().Body002)
>>> Gui.Selection.clearSelection()
>>> Gui.Selection.addSelection(App.ActiveDocument.Body002)
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.addObject('PartDesign::AdditiveCylinder','Cylinder')
>>> App.ActiveDocument.Body002.addObject(App.activeDocument().Cylinder)
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().setEdit('Cylinder')
>>> App.ActiveDocument.Cylinder.Radius=3.00
>>> App.ActiveDocument.Cylinder.Height=3.00
>>> App.ActiveDocument.Cylinder.Angle=360.00
>>>
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().resetEdit()
>>> FreeCAD.getDocument("Unnamed2").getObject("Body002").Placement = App.Placement(App.Vector(1,0,0),App.Rotation(App.Vector(0,0,1),0))
>>> FreeCAD.getDocument("Unnamed2").getObject("Body002").Placement = App.Placement(App.Vector(10,0,0),App.Rotation(App.Vector(0,0,1),0))
>>> Gui.getDocument('Unnamed2').ActiveView.setActiveObject('pdbody', App.getDocument('Unnamed2').getObject('Body'))
>>> App.activeDocument().Body.newObject('PartDesign::Boolean','Boolean')
>>> App.activeDocument().Boolean.addObjects(None)
>>> Gui.SendMsgToActiveView("Save")
>>> App.getDocument("Unnamed2").saveAs(u"/stuff/weird-buggy-boolean.fcstd")
>>>
Code: Select all
OS: Linux Mint 18.1 Serena
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13387 (Git)
Build type: None
Branch: master
Hash: c5f4079252b11e3c54cd603be7d3697fa9f9d922
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedKingdom (en_GB)