Commit a489517e authored by Travis Howse's avatar Travis Howse

Align STLs to z=0 when autoplating.

parent 9ee36bdf
...@@ -53,7 +53,7 @@ class showstl(wx.Window): ...@@ -53,7 +53,7 @@ class showstl(wx.Window):
if i != -1: if i != -1:
m=self.models[self.l.GetItemText(i)] m=self.models[self.l.GetItemText(i)]
m.offsets[2]=-1.0*min(m.facetsminz)[0] m.offsets[2]=-1.0*min(m.facetsminz)[0]
#print m.offsets[2] #print m.offsets[2]
self.Refresh() self.Refresh()
def delete(self,event): def delete(self,event):
...@@ -89,6 +89,7 @@ class showstl(wx.Window): ...@@ -89,6 +89,7 @@ class showstl(wx.Window):
newrow = 0 newrow = 0
max = [0,0] max = [0,0]
for i in self.models: for i in self.models:
self.models[i].offsets[2]=-1.0*min(m.facetsminz)[0]
x = abs(self.models[i].dims[0] - self.models[i].dims[1]) x = abs(self.models[i].dims[0] - self.models[i].dims[1])
y = abs(self.models[i].dims[2] - self.models[i].dims[3]) y = abs(self.models[i].dims[2] - self.models[i].dims[3])
centre = [x/2, y/2] centre = [x/2, y/2]
...@@ -116,7 +117,6 @@ class showstl(wx.Window): ...@@ -116,7 +117,6 @@ class showstl(wx.Window):
for i in self.models: for i in self.models:
self.models[i].offsets[0] += centreoffset[0] self.models[i].offsets[0] += centreoffset[0]
self.models[i].offsets[1] += centreoffset[1] self.models[i].offsets[1] += centreoffset[1]
self.Refresh() self.Refresh()
def right(self,event): def right(self,event):
......
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