Skip to content

Commit

Permalink
Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Apr 14, 2014
2 parents f3b150c + 9b554cb commit 384778e
Show file tree
Hide file tree
Showing 8 changed files with 449 additions and 17 deletions.
3 changes: 1 addition & 2 deletions src/Mod/Arch/ArchCommands.py
Expand Up @@ -105,8 +105,7 @@ def addComponents(objectsList,host):
a = host.Objects
for o in objectsList:
if not o in a:
if hasattr(o,"Shape"):
a.append(o)
a.append(o)
host.Objects = a
elif host.isDerivedFrom("App::DocumentObjectGroup"):
c = host.Group
Expand Down
1 change: 1 addition & 0 deletions src/Mod/OpenSCAD/Init.py
Expand Up @@ -34,4 +34,5 @@
FreeCAD.addImportType("OpenSCAD Format (*.scad)","importCSG")
FreeCAD.addExportType("OpenSCAD CSG Format (*.csg)","exportCSG")
FreeCAD.addExportType("OpenSCAD Format (*.scad)","exportCSG")
FreeCAD.addExportType("DRAWEXE source (*.draw)","exportDRAWEXE")

11 changes: 8 additions & 3 deletions src/Mod/OpenSCAD/OpenSCADCommands.py
Expand Up @@ -183,12 +183,17 @@ def GetResources(self):

class ReplaceObject:
def IsActive(self):
return FreeCADGui.Selection.countObjectsOfType('Part::Feature') == 3
nobj = FreeCADGui.Selection.countObjectsOfType('Part::Feature')
if nobj == 3: return True
elif nobj == 2: return tuple((len(obj.InList)) for obj in \
FreeCADGui.Selection.getSelection()) in ((0,1),(1,0))
#else: return False

def Activated(self):
import replaceobj
#objs=[selobj.Object for selobj in FreeCADGui.Selection.getSelectionEx()]
objs=FreeCADGui.Selection.getSelection()
if len(objs)==3:
if len(objs)==3 or \
tuple((len(obj.InList)) for obj in objs) in ((0,1),(1,0)):
replaceobj.replaceobjfromselection(objs)
else:
FreeCAD.Console.PrintError(unicode(translate('OpenSCAD',\
Expand Down
8 changes: 4 additions & 4 deletions src/Mod/OpenSCAD/OpenSCAD_rc.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/Mod/OpenSCAD/Resources/OpenSCAD.qrc
Expand Up @@ -4,6 +4,7 @@
<file>icons/OpenSCAD_AddOpenSCADElement.svg</file>
<file>icons/OpenSCAD_ColorCodeShape.svg</file>
<file>icons/OpenSCAD_RefineShapeFeature.svg</file>
<file>icons/OpenSCAD_IncreaseToleranceFeature.svg</file>
<file>icons/OpenSCAD_ReplaceObject.svg</file>
<file>icons/OpenSCAD_RemoveSubtree.svg</file>
<file>icons/OpenSCAD_Explode_Group.svg</file>
Expand Down
212 changes: 212 additions & 0 deletions src/Mod/OpenSCAD/Resources/icons/OpenSCAD_IncreaseToleranceFeature.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 384778e

Please sign in to comment.