Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
FreeCAD
FreeCAD
Commits
45e10d80
Commit
45e10d80
authored
Jan 09, 2013
by
Sebastian Hoogen
Committed by
wmayer
Jan 09, 2013
Browse files
added licences for OpenSCAD module
parent
8e2ae905
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/Mod/OpenSCAD/InitGui.py
View file @
45e10d80
...
...
@@ -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 L
ibrary
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 (
L
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 L
esser
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
(
\
...
...
src/Mod/OpenSCAD/OpenSCAD2Dgeom.py
View file @
45e10d80
#***************************************************************************
#* *
#* 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) *
...
...
src/Mod/OpenSCAD/OpenSCADCommands.py
View file @
45e10d80
#***************************************************************************
#* *
#* 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
...
...
src/Mod/OpenSCAD/OpenSCADFeatures.py
View file @
45e10d80
#***************************************************************************
#* *
#* 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) *
...
...
src/Mod/OpenSCAD/OpenSCADUtils.py
View file @
45e10d80
#***************************************************************************
#* *
#* 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) *
...
...
src/Mod/OpenSCAD/colorcodeshapes.py
View file @
45e10d80
#***************************************************************************
#* *
#* 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
])
...
...
src/Mod/OpenSCAD/expandplacements.py
View file @
45e10d80
#***************************************************************************
#* *
#* 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
...
...
src/Mod/OpenSCAD/importCSG.py
View file @
45e10d80
...
...
@@ -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 = "
,
to
center
if
tocenter
==
'true'
:
center
(
mycyl
,
0
,
0
,
h
)
if
False
:
...
...
src/Mod/OpenSCAD/prototype.py
View file @
45e10d80
...
...
@@ -687,7 +687,6 @@ def insert(filename,docname):
#doc.recompute()
import
FreeCAD
global
dxfcache
dxfcache
=
{}
...
...
src/Mod/OpenSCAD/replaceobj.py
View file @
45e10d80
#***************************************************************************
#* *
#* 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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment