def execute(self, obj): if isDerivedFrom(obj, "Part::FeaturePython"): obj.Shape = Shapes.common(outobj.Shape for outobj in obj.Sources) obj.Placement = FreeCAD.Placement() obj.Outfaces = trace(obj) if P.autotrace else [] elif isDerivedFrom(obj, "Mesh::FeaturePython"): obj.Mesh = Meshes.common(meshOf(s) for s in obj.Sources) obj.Placement = FreeCAD.Placement() else: raise TypeError
def execute(self, obj): if isDerivedFrom(obj, "Part::FeaturePython"): obj.Shape = Shapes.common([obj.Origin.Shape, obj.Masker.Shape]) obj.Placement = FreeCAD.Placement() obj.Outfaces = trace(obj) if P.autotrace else [] elif isDerivedFrom(obj, "Mesh::FeaturePython"): obj.Mesh = Meshes.common([meshOf(obj.Origin), meshOf(obj.Masker)]) obj.Placement = FreeCAD.Placement() else: raise TypeError