Skip to content

Commit

Permalink
changes for flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumechauvat committed Dec 27, 2022
1 parent ec9225a commit a302eba
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions pymech/meshplot.py
@@ -1,10 +1,9 @@
import wx
from wx import glcanvas
import OpenGL
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GL import glViewport, glMatrixMode, glClearColor, glClear, glLoadIdentity, glOrtho, glEnable, glLineWidth, glBegin, glEnd, glColor, glVertex3fv, GL_PROJECTION, GL_COLOR_BUFFER_BIT, GL_LINE_SMOOTH, GL_MODELVIEW, GL_LINES
from math import sqrt, atan2, asin, cos, sin


class MeshFrame(wx.Frame):
"""
A frame to display meshes
Expand All @@ -19,12 +18,12 @@ def __init__(self,
size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE,
name='frame'
):
):
super(MeshFrame, self).__init__(parent, id, title, pos, size, style, name)
self.GLinitialized = False
attribList = (glcanvas.WX_GL_RGBA, # RGBA
glcanvas.WX_GL_DOUBLEBUFFER, # Double Buffered
glcanvas.WX_GL_DEPTH_SIZE, 24) # 24 bit
attribList = (glcanvas.WX_GL_RGBA, # RGBA
glcanvas.WX_GL_DOUBLEBUFFER, # Double Buffered
glcanvas.WX_GL_DEPTH_SIZE, 24) # 24 bit

# Create the canvas
self.canvas = glcanvas.GLCanvas(self, attribList=attribList)
Expand All @@ -35,9 +34,8 @@ def __init__(self,
self.canvas.Bind(wx.EVT_SIZE, self.processSizeEvent)
self.canvas.Bind(wx.EVT_PAINT, self.processPaintEvent)


# create a menu bar
#self.makeMenuBar()
# self.makeMenuBar()

# mesh display properties
self.curve_points = 12
Expand All @@ -53,10 +51,10 @@ def __init__(self,
self.setLimits(mesh)
# current limits
self.limits = self.mesh_limits

# and a status bar
#self.CreateStatusBar()
#self.SetStatusText("initialised")
# self.CreateStatusBar()
# self.SetStatusText("initialised")

# Canvas Proxy Methods

Expand All @@ -76,7 +74,7 @@ def OnExit(self, event):

def processEraseBackgroundEvent(self, event):
"""Process the erase background event."""
pass # Do nothing, to avoid flashing on MSWin
pass # Do nothing, to avoid flashing on MSWin

def processSizeEvent(self, event):
"""Process the resize event."""
Expand All @@ -101,8 +99,7 @@ def processPaintEvent(self, event):

self.OnDraw()
event.Skip()



# GLFrame OpenGL Event Handlers

def OnInitGL(self):
Expand Down

0 comments on commit a302eba

Please sign in to comment.