From 8d08382070d82c44d08013d9d8fa9dd7d63a56b1 Mon Sep 17 00:00:00 2001 From: Mathias Walter Date: Wed, 2 Jan 2019 01:48:32 +0100 Subject: [PATCH] remove duplicated function multiFuseObjs_wColors --- .../_tools/cq_cad_tools.py | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/cadquery/FCAD_script_generator/_tools/cq_cad_tools.py b/cadquery/FCAD_script_generator/_tools/cq_cad_tools.py index 39180d12..e746f4e5 100644 --- a/cadquery/FCAD_script_generator/_tools/cq_cad_tools.py +++ b/cadquery/FCAD_script_generator/_tools/cq_cad_tools.py @@ -253,44 +253,6 @@ def multiFuseObjs_wColors(App, Gui, docName, objs, keepOriginals=False): return fused_obj -################################################################### -# FuseObjs_wColors() poeschlr -# Function to fuse multible objects together. -################################################################### -def multiFuseObjs_wColors(App, Gui, docName, objs, keepOriginals=False): - - # Fuse two objects - App.ActiveDocument=None - Gui.ActiveDocument=None - App.setActiveDocument(docName) - App.ActiveDocument=App.getDocument(docName) - Gui.ActiveDocument=Gui.getDocument(docName) - App.activeDocument().addObject("Part::MultiFuse","Fusion") - App.activeDocument().Fusion.Shapes = objs - Gui.ActiveDocument.Fusion.ShapeColor=Gui.ActiveDocument.getObject(objs[0].Name).ShapeColor - Gui.ActiveDocument.Fusion.DisplayMode=Gui.ActiveDocument.getObject(objs[0].Name).DisplayMode - App.ActiveDocument.recompute() - - App.ActiveDocument.addObject('Part::Feature','Fusion').Shape=App.ActiveDocument.Fusion.Shape - App.ActiveDocument.ActiveObject.Label=docName - fused_obj = App.ActiveDocument.ActiveObject - - Gui.ActiveDocument.ActiveObject.ShapeColor=Gui.ActiveDocument.Fusion.ShapeColor - Gui.ActiveDocument.ActiveObject.LineColor=Gui.ActiveDocument.Fusion.LineColor - Gui.ActiveDocument.ActiveObject.PointColor=Gui.ActiveDocument.Fusion.PointColor - Gui.ActiveDocument.ActiveObject.DiffuseColor=Gui.ActiveDocument.Fusion.DiffuseColor - App.ActiveDocument.recompute() - - # Remove the part1 part2 objects - if not keepOriginals: - for o in objs: - App.getDocument(docName).removeObject(o.Name) - - # Remove the fusion itself - App.getDocument(docName).removeObject("Fusion") - - return fused_obj - ################################################################### # FuseObjs_wColors_naming() maui # Function to fuse two objects together.