I am very new to FreeCAD, so I'm sure I'm making some very basic mistake, but when I try the simple Arch.addComponents scripting example from the doc, I get an error. For this example, I started a new session (FreeCAD 0.14, MacOSX, 64 bit, python version 2.7.5), created a new document, and then copied the example code into the console (line by line):
Code: Select all
import FreeCAD,Arch,Draft,Part
line = Draft.makeWire([FreeCAD.Vector(0,0,0),FreeCAD.Vector(2,2,0)])
wall = Arch.makeWall(line)
box = Part.makeBox(1,1,1)
Arch.addComponents(box,wall)
I have tried various other flavors of this (add width and depth to the wall, making sure everything executes and shows up in the gui first), but get the same response. If I make the wall and the box visible in the gui by double clicking on the wall and hitting the OK button, then calling Part.show(box), I can run the addComponents method manually through the gui and it works. Is there another step that needs to be taken in the script to turn the box into something with a Shape attribute before adding it to the wall?Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/FreeCAD.app/Contents/Mod/Arch/ArchCommands.py", line 90, in addComponents
if DraftGeomUtils.isValidPath(o.Shape) and (hostType == "Structure"):
AttributeError: 'Part.TopoShape' object has no attribute 'Shape'
Thank you for your time!