pyNastran
0.5.0
pyNastran BDF Reader/Writer, OP2 Parser, and GUI
|
00001 ## GNU Lesser General Public License 00002 ## 00003 ## Program pyNastran - a python interface to NASTRAN files 00004 ## Copyright (C) 2011-2012 Steven Doyle, Al Danial 00005 ## 00006 ## Authors and copyright holders of pyNastran 00007 ## Steven Doyle <mesheb82@gmail.com> 00008 ## Al Danial <al.danial@gmail.com> 00009 ## 00010 ## This file is part of pyNastran. 00011 ## 00012 ## pyNastran is free software: you can redistribute it and/or modify 00013 ## it under the terms of the GNU Lesser General Public License as published by 00014 ## the Free Software Foundation, either version 3 of the License, or 00015 ## (at your option) any later version. 00016 ## 00017 ## pyNastran is distributed in the hope that it will be useful, 00018 ## but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 ## GNU General Public License for more details. 00021 ## 00022 ## You should have received a copy of the GNU Lesser General Public License 00023 ## along with pyNastran. If not, see <http://www.gnu.org/licenses/>. 00024 ## 00025 00026 from __future__ import division, print_function 00027 #import os 00028 #import sys 00029 #from struct import unpack 00030 00031 #from pyNastran.bdf.cards.nodes import GRID 00032 #from pyNastran.bdf.cards.coordinateSystems import CORD1R,CORD2R,CORD2C,CORD3G #CORD1C,CORD1S,CORD2S 00033 00034 00035 class R1TAB(object): 00036 00037 def readTable_R1TAB(self): 00038 tableName = self.readTableName(rewind=False) # R1TAB 00039 self.tableInit(tableName) 00040 #print "tableName = |%r|" %(tableName) 00041 00042 self.readMarkers([-1,7],'R1TAB') 00043 ints = self.readIntBlock() 00044 #print "*ints = ",ints 00045 00046 self.readMarkers([-2,1,0],'R1TAB') 00047 bufferWords = self.getMarker() 00048 #print "bufferWords = ",bufferWords 00049 word = self.readStringBlock() # DESTAB 00050 00051 iTable = -3 00052 while bufferWords: # read until bufferWords=0 00053 #print "iTable = ",iTable 00054 self.readMarkers([iTable,1,0],'R1TAB') 00055 nOld = self.n 00056 bufferWords = self.getMarker() 00057 #print "bufferWords = ",bufferWords 00058 if bufferWords==0: # maybe read new buffer... 00059 self.goto(nOld) 00060 break 00061 data = self.readBlock() 00062 #print "len(data) = ",len(data) 00063 self.readDesvar(data) 00064 iTable -= 1 00065 00066 #print self.printSection(200) 00067 00068 #sys.exit('R1TAB in r1tab.py') 00069