I think this used to work on FreeCAD 0.18 (or at least, I did not realize that it was failing) But now when I try to extract the only solid in the files and center them, the geometry "is invalid"
Code: Select all
p = "shaftcw_RAW.step"
# p = "lockplate_RAW.step"
solid = Part.read(p).Solids[0] # Get the only solid
# solid.tessellate(0.1) # Doesn't make a difference!
# Center it
solid.exportStep('/tmp/OK.step')
solid.translate(-solid.CenterOfMass) # <---- breaks
solid.exportStep('/tmp/BROKEN.step')
Code: Select all
T = Base.Placement()
T.translate(-solid.CenterOfMass)
solid.Placement = solid.Placement.multiply(T)
OS: Ubuntu 20.04.2 LTS (Regolith:GNOME-Flashback:GNOME/regolith)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 9e3b630bbfb6807e93eeffb655e6c20f218644fc
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United States (en_US)
The issue also appeared on my other computer:
OS: Ubuntu 18.04.5 LTS (Regolith:GNOME-Flashback:GNOME/regolith)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: c240777a7de9fbb69472e6cbf589e83559a9ef17
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.5.1
Locale: English/UnitedStates (en_US)