From 49a3c8f0b7965347f940979c981f6362c4dcd88e Mon Sep 17 00:00:00 2001 From: _ <_> Date: Sun, 13 May 2018 01:33:12 -0700 Subject: [PATCH] Added init and show for mesh headers --- bindings/py3devil1.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bindings/py3devil1.py b/bindings/py3devil1.py index 18d1e67..6554ed5 100755 --- a/bindings/py3devil1.py +++ b/bindings/py3devil1.py @@ -321,6 +321,18 @@ class GEOHeader: devil1geo.printheader(self.cstruct) pass +class MEShHeader: + def __init__(self, i, filedata): + self.cstruct = ctypes.pointer(MeshHeader()) + ptrofptr = ctypes.byref(self.cstruct) + if filedata: + devil1geo.getmeshheader(ptrofptr, i, filedata) + return + pass + + def show(self): + devil1geo.printmeshheader(self.cstruct) + #--------------------------------------+ # Regular Python #--------------------------------------+ @@ -404,6 +416,8 @@ if __name__ == "__main__": data = f.read() gh = GEOHeader(data) gh.show() + mh = MEShHeader(3, data) + mh.show() #---------------------------------------+ # main()