CompoundFilter: temporary fix for placement problems

Strangely, but when outputting the child directly when only one shape
makes it through the filter, its placement is totally messed up, so it
causes viewer errors. That's funny.
This commit is contained in:
DeepSOIC 2015-10-18 14:36:35 +03:00
parent 20455b6116
commit 80f6ac3879

View File

@ -139,7 +139,7 @@ class _CompoundFilter:
obj.Shape = markers.getNullShapeShape(scale) obj.Shape = markers.getNullShapeShape(scale)
raise ValueError('Nothing passes through the filter') #Feeding empty compounds to FreeCAD seems to cause rendering issues, otherwise it would have been a good idea to output nothing. raise ValueError('Nothing passes through the filter') #Feeding empty compounds to FreeCAD seems to cause rendering issues, otherwise it would have been a good idea to output nothing.
if len(rst) > 1: if len(rst) > 1 or True:
obj.Shape = Part.makeCompound(rst) obj.Shape = Part.makeCompound(rst)
else: # don't make compound of one shape, output it directly else: # don't make compound of one shape, output it directly
obj.Shape = rst[0] obj.Shape = rst[0]