wmayer wrote: ↑Sun Sep 14, 2014 1:24 pm
The cleanest way is to apply the placement on the children and use the method replaceShape.
I know I'm on an old thread, but the issue has came out only on FC 0.20 releases and above and I discover it only recently...
Importing a multi object STEP model, using the
'Enable STEP compound merge' option, and trying to reset the placement of the imported shape, FC will trig an error in the console.
Here the code and the testing file:
Code: Select all
import ImportGui
ImportGui.open(u"D:/Temp/User Library-LTST-S270KGKT.step")
s=App.ActiveDocument.ActiveObject.Shape
r=[]
t=s.copy()
for i in t.childShapes():
c=i.copy()
c.Placement=t.Placement.multiply(c.Placement)
r.append((i,c))
w=t.replaceShape(r)
w.Placement=App.Placement()
Part.show(w)
and the error in the panel:
Code: Select all
15:49:24 <Part> ViewProviderExt.cpp(1268): Cannot compute Inventor representation for the shape of Unnamed#Shape: BRepAdaptor_Curve::No geometry
15:49:24 <Part> ViewProviderExt.cpp(1268): Cannot compute Inventor representation for the shape of Unnamed#Shape: BRepAdaptor_Curve::No geometry
This behavior is not appearing in FC 0.19.4 or in FC Link Daily 2022.1128.
Here my FC release version info:
Code: Select all
OS: Windows 10 Version 1909
Word size of FreeCAD: 64-bit
Version: 0.21.0.31513 (Git)
Build type: Release
Branch: master
Hash: b2ab8edba4bfd71681e639f8c3f1105066bed4c7
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3