chiark / gitweb /
Move SF into its own directory, to seperate SF and Cura. Rename newui to gui.
[cura.git] / Cura / cura_sf / fabmetheus_utilities / geometry / manipulation_paths / convex.py
1 """
2 Create outline.
3
4 """
5
6 from __future__ import absolute_import
7 #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
8 import __init__
9
10 from fabmetheus_utilities.geometry.creation import lineation
11 from fabmetheus_utilities.geometry.geometry_utilities import evaluate
12 from fabmetheus_utilities import euclidean
13
14
15 __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
16 __credits__ = 'Art of Illusion <http://www.artofillusion.org/>'
17 __date__ = '$Date: 2008/02/05 $'
18 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
19
20
21 globalExecutionOrder = 80
22
23
24 def getManipulatedPaths(close, elementNode, loop, prefix, sideLength):
25         "Get path with overhangs removed or filled in."
26         if len(loop) < 4:
27                 return [loop]
28         loopComplex = euclidean.getComplexPath(loop)
29         return euclidean.getVector3Paths([euclidean.getLoopConvex(loopComplex)], loop[0].z)
30
31 def getNewDerivation(elementNode, prefix, sideLength):
32         'Get new derivation.'
33         return evaluate.EmptyObject()
34
35 def processElementNode(elementNode):
36         "Process the xml element."
37         lineation.processElementNodeByFunction(elementNode, getManipulatedPaths)