App.newDocument("Unnamed")
Gui.activateWorkbench("PartWorkbench")
App.ActiveDocument.addObject("Part::Sphere","Sphere")
App.ActiveDocument.ActiveObject.Label = "Sphere"
App.ActiveDocument.recompute()
Gui.SendMsgToActiveView("ViewFit")
f=App.ActiveDocument.Sphere.Shape.Faces[0]
Part.makeShell(f)
print('This is giving an Error on a single face')
Part.makeShell([f])
print('This is fine in all cases :)')
sh=Part.makeShell([f])
s=Part.Solid(sh)
Part.show(s)
Gui.getDocument("Unnamed").getObject("Sphere").Visibility=False
Part.makeShell(f) is failing if there is only one face (like in a Sphere)
but if you put a list within only one face, the result will be just fine
Part.makeShell([f])
I have made a new PR280 @devel branch accordingly... please do some testing...
Maurice
A_Bearing is the assembly with two drafts of parts.
After modification of its geometry, nut flange isn't updated, for example.
Why both source file *and* part displayed into the tree ? I would expect only the first one.
fcaduser wrote: ↑Fri May 10, 2019 9:18 am
I may found a reproducible yet simple example.
A_Bearing is the assembly with two drafts of parts.
After modification of its geometry, nut flange isn't updated, for example.
Why both source file *and* part displayed into the tree ? I would expect only the first one.
Hi @fcaduser
your issue is there because you have mixed an A2 part with an A2p part. NEVER create assemblies using old A2 workbench parts, if you want a fully working assembly in A2p
-
easyw-fc wrote: ↑Fri May 10, 2019 9:03 am
Part.makeShell(f) is failing if there is only one face (like in a Sphere)
but if you put a list within only one face, the result will be just fine
Part.makeShell([f])
I have made a new PR280 @devel branch accordingly... please do some testing...
Maurice
Hi Maurice,
that sounds very good. I will test it.
Yes, I suspected some "legacy" problems. A2+ was introduced as an extension work of A2. I started my project with A2 then shifted (and never reverted to it), so I have a bunch of old parts and assemblies made of A2. Can I convert my old parts/assemblies to A2+ ?
easyw-fc wrote: ↑Fri May 10, 2019 9:29 am
Hi @fcaduser
your issue is there because you have mixed an A2 part with an A2p part. NEVER create assemblies using old A2 workbench parts, if you want a fully working assembly in A2p
Unfortunately this is not quite correct. The "Ball_joint"-object within the assembly "A_Bearing.fcstd" is in fact of A2plus type, but a very old one. Even the property "subAssemblyImport" is missing. It seems to be created with a very old A2plus version from projects beginning.
For sure it is better, to replace such old objects by a fresh A2plus import. But i will have look whether i can prevent this problem somehow.
Can I safely use the convert function (the icon with red and yellow part) and apply it to each problematic old part ? I mean, I don't know which one will be the future assembly module, so I may have to do again my assemblies from zero, but I definitely don't want my parts irreversibly altered (there is a lot of work), making it specific. A2+ save zero information into a part, exact ? Just to be sure.
Heterogeneity brings problem indeed breaking the import mechanism. So I manually re-import each old part (fortunately the icons lead me because they have changed) and then things seem working again. Fastidious but doable.
App.newDocument("Unnamed")
Gui.activateWorkbench("PartWorkbench")
App.ActiveDocument.addObject("Part::Sphere","Sphere")
App.ActiveDocument.ActiveObject.Label = "Sphere"
App.ActiveDocument.recompute()
Gui.SendMsgToActiveView("ViewFit")
f=App.ActiveDocument.Sphere.Shape.Faces[0]
Part.makeShell(f)
print('This is giving an Error on a single face')
Part.makeShell([f])
print('This is fine in all cases :)')
sh=Part.makeShell([f])
s=Part.Solid(sh)
Part.show(s)
Gui.getDocument("Unnamed").getObject("Sphere").Visibility=False
Part.makeShell(f) is failing if there is only one face (like in a Sphere)
but if you put a list within only one face, the result will be just fine
Part.makeShell([f])
I have made a new PR280 @devel branch accordingly... please do some testing...
Maurice
Hi Maurice,
also using this code the spheres vanish without using my fallback mechanism using a shell instead of a solid.