chiark / gitweb /
Add back the ultimaker platform, and made the platform mesh simpler.
[cura.git] / Cura / slice / cura_sf / fabmetheus_utilities / geometry / statements / while.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         if elementNode.xmlObject == None:
20                 if 'condition' in elementNode.attributes:
21                         value = elementNode.attributes['condition']
22                         elementNode.xmlObject = evaluate.getEvaluatorSplitWords(value)
23                 else:
24                         elementNode.xmlObject = []
25         if len( elementNode.xmlObject ) < 1:
26                 return
27         xmlProcessor = elementNode.getXMLProcessor()
28         if len( xmlProcessor.functions ) < 1:
29                 return
30         function = xmlProcessor.functions[-1]
31         while evaluate.getEvaluatedExpressionValueBySplitLine(elementNode, elementNode.xmlObject) > 0:
32                 function.processChildNodes(elementNode)