Added init and show for mesh headers

This commit is contained in:
_ 2018-05-13 01:33:12 -07:00
parent accf440047
commit 49a3c8f0b7

View File

@ -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()