Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
FreeCAD Macro to replace all placements with Nullplacements. This is important when using Assembly2 Workbench, to allow correct placement there.
print("Checking replacing all placements with default.")
for b in App.activeDocument().findObjects("PartDesign::Body"):
if not b.Placement.isNull():
print("!!! Body {} has a non null placement --> resetting!".format(b.Label))
b.Placement.Base = FreeCAD.Base.Vector()
b.Placement.Rotation = FreeCAD.Base.Rotation()
print("Body {} looks fine...".format(b.Label))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.