diff --git a/src/Mod/OpenSCAD/InitGui.py b/src/Mod/OpenSCAD/InitGui.py index 7339c1164..4e91d66db 100644 --- a/src/Mod/OpenSCAD/InitGui.py +++ b/src/Mod/OpenSCAD/InitGui.py @@ -4,29 +4,29 @@ # This is the second one of three init scripts, the third one # runs when the gui is up -#*************************************************************************** -#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU General Public License (GPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#* Juergen Riegel 2002 * -#***************************************************************************/ +#*************************************************************************** +#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 * +#* * +#* This file is part of the FreeCAD CAx development system. * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* FreeCAD is distributed in the hope that it will be useful, * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * +#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +#* GNU Lesser General Public License for more details. * +#* * +#* You should have received a copy of the GNU Library General Public * +#* License along with FreeCAD; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#* Juergen Riegel 2002 * +#***************************************************************************/ import FreeCAD param = FreeCAD.ParamGet(\ diff --git a/src/Mod/OpenSCAD/OpenSCAD2Dgeom.py b/src/Mod/OpenSCAD/OpenSCAD2Dgeom.py index 7e6bddc9d..709c08796 100644 --- a/src/Mod/OpenSCAD/OpenSCAD2Dgeom.py +++ b/src/Mod/OpenSCAD/OpenSCAD2Dgeom.py @@ -1,6 +1,6 @@ #*************************************************************************** #* * -#* Copyright (c) 2012 Sebastian Hoogen * +#* Copyright (c) 2012 Sebastian Hoogen * #* * #* This program is free software; you can redistribute it and/or modify * #* it under the terms of the GNU Lesser General Public License (LGPL) * diff --git a/src/Mod/OpenSCAD/OpenSCADCommands.py b/src/Mod/OpenSCAD/OpenSCADCommands.py index 5d85395d0..0637640f0 100644 --- a/src/Mod/OpenSCAD/OpenSCADCommands.py +++ b/src/Mod/OpenSCAD/OpenSCADCommands.py @@ -1,3 +1,33 @@ +#*************************************************************************** +#* * +#* Copyright (c) 2012 Sebastian Hoogen * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* This program is distributed in the hope that it will be useful, * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * +#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +#* GNU Library General Public License for more details. * +#* * +#* You should have received a copy of the GNU Library General Public * +#* License along with this program; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#*************************************************************************** + +__title__="FreeCAD OpenSCAD Workbench - GUI Commands" +__author__ = "Sebastian Hoogen" +__url__ = ["http://free-cad.sourceforge.net"] + +''' +This Script includes the GUI Commands of the OpenSCAD module +''' + import FreeCAD,FreeCADGui from PyQt4 import QtGui, QtCore diff --git a/src/Mod/OpenSCAD/OpenSCADFeatures.py b/src/Mod/OpenSCAD/OpenSCADFeatures.py index fea2581c9..6248f8bb8 100644 --- a/src/Mod/OpenSCAD/OpenSCADFeatures.py +++ b/src/Mod/OpenSCAD/OpenSCADFeatures.py @@ -1,6 +1,6 @@ #*************************************************************************** #* * -#* Copyright (c) 2012 Sebastian Hoogen * +#* Copyright (c) 2012 Sebastian Hoogen * #* * #* This program is free software; you can redistribute it and/or modify * #* it under the terms of the GNU Lesser General Public License (LGPL) * diff --git a/src/Mod/OpenSCAD/OpenSCADUtils.py b/src/Mod/OpenSCAD/OpenSCADUtils.py index 8f815b1e2..f8fc17553 100644 --- a/src/Mod/OpenSCAD/OpenSCADUtils.py +++ b/src/Mod/OpenSCAD/OpenSCADUtils.py @@ -1,6 +1,6 @@ #*************************************************************************** #* * -#* Copyright (c) 2012 Sebastian Hoogen * +#* Copyright (c) 2012 Sebastian Hoogen * #* * #* This program is free software; you can redistribute it and/or modify * #* it under the terms of the GNU Lesser General Public License (LGPL) * diff --git a/src/Mod/OpenSCAD/colorcodeshapes.py b/src/Mod/OpenSCAD/colorcodeshapes.py index c6fb19203..214953488 100644 --- a/src/Mod/OpenSCAD/colorcodeshapes.py +++ b/src/Mod/OpenSCAD/colorcodeshapes.py @@ -1,3 +1,34 @@ +#*************************************************************************** +#* * +#* Copyright (c) 2012 Sebastian Hoogen * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* This program is distributed in the hope that it will be useful, * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * +#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +#* GNU Library General Public License for more details. * +#* * +#* You should have received a copy of the GNU Library General Public * +#* License along with this program; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#*************************************************************************** + +__title__="FreeCAD OpenSCAD Workbench - 2D helper fuctions" +__author__ = "Sebastian Hoogen" +__url__ = ["http://free-cad.sourceforge.net"] + +''' +This Script includes python functions to ifind out the most basic shape type +in a compound and to change the color of shapes according to thier shape type +''' + import FreeCAD def shapedict(shapelst): return dict([(shape.hashCode(),shape) for shape in shapelst]) diff --git a/src/Mod/OpenSCAD/expandplacements.py b/src/Mod/OpenSCAD/expandplacements.py index b258c499a..d4c1b9c63 100644 --- a/src/Mod/OpenSCAD/expandplacements.py +++ b/src/Mod/OpenSCAD/expandplacements.py @@ -1,3 +1,34 @@ +#*************************************************************************** +#* * +#* Copyright (c) 2012 Sebastian Hoogen * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* This program is distributed in the hope that it will be useful, * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * +#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +#* GNU Library General Public License for more details. * +#* * +#* You should have received a copy of the GNU Library General Public * +#* License along with this program; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#*************************************************************************** + +__title__="FreeCAD OpenSCAD Workbench - expand placements and matrices fuctions" +__author__ = "Sebastian Hoogen" +__url__ = ["http://free-cad.sourceforge.net"] + +''' +This Script includes python functions to shift all placements down the +feature tree to the most baisc objects +''' + import FreeCAD from OpenSCADFeatures import * from OpenSCADUtils import isspecialorthogonalpython,isspecialorthogonal diff --git a/src/Mod/OpenSCAD/importCSG.py b/src/Mod/OpenSCAD/importCSG.py index 9140b2947..4891e4a1d 100644 --- a/src/Mod/OpenSCAD/importCSG.py +++ b/src/Mod/OpenSCAD/importCSG.py @@ -416,12 +416,12 @@ def p_difference_action(p): print "difference" print len(p[5]) print p[5] - mycut = doc.addObject('Part::Cut',p[1]) - mycut.Base = p[5][0] if (len(p[5]) == 1 ): #single object p[0] = p[5] else: # Cut using Fuse + mycut = doc.addObject('Part::Cut',p[1]) + mycut.Base = p[5][0] # Can only Cut two objects do we need to fuse extras if (len(p[5]) > 2 ): print "Need to Fuse Extra First" @@ -803,7 +803,7 @@ def p_cylinder_action(p): mycyl.Height = h mycyl.Radius1 = r1 mycyl.Radius2 = r2 - print "Center = ",center + print "Center = ",tocenter if tocenter=='true' : center(mycyl,0,0,h) if False : diff --git a/src/Mod/OpenSCAD/prototype.py b/src/Mod/OpenSCAD/prototype.py index 166bac30c..f43d1629d 100644 --- a/src/Mod/OpenSCAD/prototype.py +++ b/src/Mod/OpenSCAD/prototype.py @@ -687,7 +687,6 @@ def insert(filename,docname): #doc.recompute() -import FreeCAD global dxfcache dxfcache = {} diff --git a/src/Mod/OpenSCAD/replaceobj.py b/src/Mod/OpenSCAD/replaceobj.py index f5e50fedf..a4b94e4c0 100644 --- a/src/Mod/OpenSCAD/replaceobj.py +++ b/src/Mod/OpenSCAD/replaceobj.py @@ -1,3 +1,33 @@ +#*************************************************************************** +#* * +#* Copyright (c) 2012 Sebastian Hoogen * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* This program is distributed in the hope that it will be useful, * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * +#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +#* GNU Library General Public License for more details. * +#* * +#* You should have received a copy of the GNU Library General Public * +#* License along with this program; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#*************************************************************************** + +__title__="FreeCAD OpenSCAD Workbench - replace object fuction" +__author__ = "Sebastian Hoogen" +__url__ = ["http://free-cad.sourceforge.net"] + +''' +This fucntions allows to replace an object in the feature hierarchy +''' + def replaceobj(parent,oldchild,newchild): for propname in parent.PropertiesList: propvalue=parent.getPropertyByName(propname)