chiark / gitweb /
Renamed "load stl" to "load model", added better error output for dangling edges...
authordaid <daid303@gmail.com>
Thu, 15 Mar 2012 16:54:22 +0000 (17:54 +0100)
committerdaid <daid303@gmail.com>
Thu, 15 Mar 2012 16:54:22 +0000 (17:54 +0100)
SkeinPyPy_NewUI/fabmetheus_utilities/geometry/solids/triangle_mesh.py
SkeinPyPy_NewUI/newui/mainWindow.py

index 82bd7ac4b564dd1da2771e471a550dd81e23dd7b..a738c41f999805ca18d88cc5fb117f7f50cabc73 100644 (file)
@@ -687,6 +687,10 @@ def isPathAdded( edges, faces, loops, remainingEdgeTable, vertexes, z ):
                nextEdgeIndexAroundZ = getNextEdgeIndexAroundZ( edges[ nextEdgeIndexAroundZ ], faces, remainingEdgeTable )
        if len( pathIndexes ) < 3:
                print('Dangling edges, will use intersecting circles to get import layer at height %s' % z)
+               for idx in pathIndexes:
+                       if not hasattr(edges[idx], 'errorReported'):
+                               print('Model error(dangle): ' + str(vertexes[edges[idx].vertexIndexes[0]]) + ' ' + str(vertexes[edges[idx].vertexIndexes[1]]))
+                               edges[idx].errorReported = True
                del loops[:]
                return False
        loops.append( getPath( edges, pathIndexes, vertexes, z ) )
index 960a0ff65e920632b59d6c94813619acc7bd2f42..6c2ace4f79856ea1374aab473614134530fd3645 100644 (file)
@@ -32,8 +32,8 @@ class mainWindow(configBase.configWindowBase):
                
                menubar = wx.MenuBar()
                fileMenu = wx.Menu()
-               i = fileMenu.Append(-1, 'Load STL file...')
-               self.Bind(wx.EVT_MENU, self.OnLoadSTL, i)
+               i = fileMenu.Append(-1, 'Load model file...')
+               self.Bind(wx.EVT_MENU, self.OnLoadModel, i)
                fileMenu.AppendSeparator()
                i = fileMenu.Append(-1, 'Open Profile...')
                self.Bind(wx.EVT_MENU, self.OnLoadProfile, i)
@@ -173,12 +173,12 @@ class mainWindow(configBase.configWindowBase):
                configBase.settingNotify(c, self.preview3d.updateModelTransform)
 
                # load and slice buttons.
-               loadButton = wx.Button(self, -1, 'Load STL')
+               loadButton = wx.Button(self, -1, 'Load Model')
                sliceButton = wx.Button(self, -1, 'Slice to GCode')
-               self.Bind(wx.EVT_BUTTON, self.OnLoadSTL, loadButton)
+               self.Bind(wx.EVT_BUTTON, self.OnLoadModel, loadButton)
                self.Bind(wx.EVT_BUTTON, self.OnSlice, sliceButton)
                #Also bind double clicking the 3D preview to load an STL file.
-               self.preview3d.glCanvas.Bind(wx.EVT_LEFT_DCLICK, self.OnLoadSTL, self.preview3d.glCanvas)
+               self.preview3d.glCanvas.Bind(wx.EVT_LEFT_DCLICK, self.OnLoadModel, self.preview3d.glCanvas)
 
                #Main sizer, to position the preview window, buttons and tab control
                sizer = wx.GridBagSizer()
@@ -242,9 +242,9 @@ class mainWindow(configBase.configWindowBase):
                configWizard.configWizard()
                self.updateProfileToControls()
 
-       def OnLoadSTL(self, e):
+       def OnLoadModel(self, e):
                dlg=wx.FileDialog(self, "Open file to print", self.lastPath, style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
-               dlg.SetWildcard("OBJ, STL files (*.stl;*.obj)|*.stl;*.obj")
+               dlg.SetWildcard("STL files (*.stl)|*.stl")
                if dlg.ShowModal() == wx.ID_OK:
                        self.filename=dlg.GetPath()
                        settings.putPreference('lastFile', self.filename)