Skip to content

Commit

Permalink
added licences for OpenSCAD module
Browse files Browse the repository at this point in the history
  • Loading branch information
5263 authored and wwmayer committed Jan 9, 2013
1 parent 8e2ae90 commit 45e10d8
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 30 deletions.
46 changes: 23 additions & 23 deletions src/Mod/OpenSCAD/InitGui.py
Expand Up @@ -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(\
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/OpenSCAD/OpenSCAD2Dgeom.py
@@ -1,6 +1,6 @@
#***************************************************************************
#* *
#* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
#* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
Expand Down
30 changes: 30 additions & 0 deletions src/Mod/OpenSCAD/OpenSCADCommands.py
@@ -1,3 +1,33 @@
#***************************************************************************
#* *
#* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
#* *
#* 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

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/OpenSCAD/OpenSCADFeatures.py
@@ -1,6 +1,6 @@
#***************************************************************************
#* *
#* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
#* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/OpenSCAD/OpenSCADUtils.py
@@ -1,6 +1,6 @@
#***************************************************************************
#* *
#* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
#* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
Expand Down
31 changes: 31 additions & 0 deletions src/Mod/OpenSCAD/colorcodeshapes.py
@@ -1,3 +1,34 @@
#***************************************************************************
#* *
#* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
#* *
#* 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])
Expand Down
31 changes: 31 additions & 0 deletions src/Mod/OpenSCAD/expandplacements.py
@@ -1,3 +1,34 @@
#***************************************************************************
#* *
#* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
#* *
#* 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
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/OpenSCAD/importCSG.py
Expand Up @@ -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"
Expand Down Expand Up @@ -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 :
Expand Down
1 change: 0 additions & 1 deletion src/Mod/OpenSCAD/prototype.py
Expand Up @@ -687,7 +687,6 @@ def insert(filename,docname):
#doc.recompute()


import FreeCAD

global dxfcache
dxfcache = {}
Expand Down
30 changes: 30 additions & 0 deletions src/Mod/OpenSCAD/replaceobj.py
@@ -1,3 +1,33 @@
#***************************************************************************
#* *
#* Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
#* *
#* 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)
Expand Down

0 comments on commit 45e10d8

Please sign in to comment.