chiark / gitweb /
Add back the ultimaker platform, and made the platform mesh simpler.
[cura.git] / Cura / slice / cura_sf / fabmetheus_utilities / geometry / statements / return.py
1 """
2 Polygon path.
3
4 """
5
6 from __future__ import absolute_import
7
8 from fabmetheus_utilities.geometry.geometry_utilities import evaluate
9
10
11 __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
12 __credits__ = 'Art of Illusion <http://www.artofillusion.org/>'
13 __date__ = '$Date: 2008/02/05 $'
14 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
15
16
17 def processElementNode(elementNode):
18         "Process the xml element."
19         functions = elementNode.getXMLProcessor().functions
20         if len(functions) < 1:
21                 return
22         function = functions[-1]
23         function.shouldReturn = True
24         if elementNode.xmlObject == None:
25                 if 'return' in elementNode.attributes:
26                         value = elementNode.attributes['return']
27                         elementNode.xmlObject = evaluate.getEvaluatorSplitWords(value)
28                 else:
29                         elementNode.xmlObject = []
30         if len( elementNode.xmlObject ) > 0:
31                 function.returnValue = evaluate.getEvaluatedExpressionValueBySplitLine(elementNode, elementNode.xmlObject)