Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove duplicated function multiFuseObjs_wColors #258

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions cadquery/FCAD_script_generator/_tools/cq_cad_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down