Commit 5782d079 authored by sumpfralle's avatar sumpfralle

added an "add" function to the model object for combining two models


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@341 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 906cde43
......@@ -63,6 +63,15 @@ class Model:
self.maxz = None
self._maxsize = None
def __add__(self, other_model):
""" combine two models """
result = Model()
for t in self._triangles:
result.append(t)
for t in other_model._triangles:
result.append(t)
return result
def to_OpenGL(self):
if not GL_enabled:
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment