Last active
November 2, 2017 21:17
-
-
Save reox/62f6172ab1244e360a421bb55af5803f to your computer and use it in GitHub Desktop.
FreeCAD Macro to replace all placements with Nullplacements. This is important when using Assembly2 Workbench, to allow correct placement there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Checking replacing all placements with default.") | |
print("===============================================") | |
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() | |
else: | |
print("Body {} looks fine...".format(b.Label)) | |
print("done...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment