1. Part Cube.
2. Part Offset the Cube.
3. Run this:
Code: Select all
App.ActiveDocument.Offset.Source.hasExtension("App::GroupExtension")
Code: Select all
App.ActiveDocument.Offset.Source.hasExtension("App::GroupExtension")
Code: Select all
App.ActiveDocument.Offset.Source # doesn't do anything, huh? But it makes Cylinder think its parent object is Offset!
Code: Select all
App.ActiveDocument.Offset.Source = App.ActiveDocument.Box # move offset over to Box
App.ActiveDocument.recompute()
Code: Select all
App.ActiveDocument.getObject("Cylinder").Placement = App.Placement()
App.ActiveDocument.recompute()
Fixed in git commit 34a3039Result: Offset becomes touched. It shouldn't.
Thanks! That was a minor thing, and I wouldn't ever have noticed it if not for the second, more serious one.wmayer wrote:Fixed in git commit 34a3039
Code: Select all
App.ActiveDocument.Offset.Source = App.ActiveDocument.Box # move offset over to Box
App.ActiveDocument.recompute()
Code: Select all
App.ActiveDocument.getObject("Cylinder").Placement = App.Placement()
App.ActiveDocument.recompute()
Done. issue #2902.wmayer wrote:It's best to file a bug report and set it to high priority.
Code: Select all
App.ActiveDocument.Offset.Source
Code: Select all
doc=App.newDocument()
cyl = doc.addObject("Part::Cylinder","Cylinder")
doc.recompute()
plm = cyl.Placement
cyl.Placement = FreeCAD.Placement()
plm.Base.x = 5
cyl.Placement.Base.x
Identifying the problem was the easiest part but what took me nearly a day was to find a solution. First I thought that git commit b72aa9f3 was enough but my gut feeling told me it's not, and it was right.Thank you very much for fixing. This issue was also very tricky to find, because it was a complex interplay of python and c++ code, and I don't know how can one debug C++ and python at the same time.