chiark / gitweb /
Add back the ultimaker platform, and made the platform mesh simpler.
[cura.git] / Cura / slice / cura_sf / fabmetheus_utilities / geometry / manipulation_paths / wedge.py
1 """
2 Add material to support overhang or remove material at the overhang angle.
3
4 """
5
6 from __future__ import absolute_import
7
8 from fabmetheus_utilities.geometry.creation import lineation
9 from fabmetheus_utilities.geometry.geometry_utilities import evaluate
10 from fabmetheus_utilities.vector3 import Vector3
11
12
13 __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
14 __credits__ = 'Art of Illusion <http://www.artofillusion.org/>'
15 __date__ = '$Date: 2008/02/05 $'
16 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
17
18
19 globalExecutionOrder = -200
20
21
22 def getManipulatedPaths(close, elementNode, loop, prefix, sideLength):
23         "Get wedge loop."
24         derivation = WedgeDerivation(elementNode, prefix)
25         loop.append(derivation.center)
26         return [loop]
27
28 def getNewDerivation(elementNode, prefix, sideLength):
29         'Get new derivation.'
30         return WedgeDerivation(elementNode, prefix)
31
32 def processElementNode(elementNode):
33         "Process the xml element."
34         lineation.processElementNodeByFunction(elementNode, getManipulatedPaths)
35
36
37 class WedgeDerivation(object):
38         "Class to hold wedge variables."
39         def __init__(self, elementNode, prefix):
40                 'Set defaults.'
41                 self.center = evaluate.getVector3ByPrefix(Vector3(), elementNode, prefix + 'center')