Changeset 355
- Timestamp:
- 11/04/02 13:57:16 (6 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/RBRapier/RBRapier/Formats/Wavefront/Loader.py
r345 r355 74 74 } 75 75 76 Line Number =077 for Line in WavefrontOBJFile:76 Line, LineNumber = '', 0 77 for PartialLine in WavefrontOBJFile: 78 78 LineNumber += 1 79 Line =Line.strip()79 Line += PartialLine.strip() 80 80 if not Line or Line[0] == '#': 81 Line = '' 81 82 continue # Comment -- move on 83 if Line[-1] == '\\': 84 Line = Line[:-1] 85 continue # line continuation -- get the rest of it 82 86 Line = Line.split() 83 87 Command, Args = Line[0], Line[1:] … … 86 90 except KeyError: 87 91 if self.RaiseMissingElements: 88 raise KeyError, "Unknown Wavefront command %r (%s<%d>)" % (' '.join(Line), WavefrontOBJFile.name, LineNumber)92 raise NotImplemented, "Unknown Wavefront command %r (%s<%d>)" % (' '.join(Line), WavefrontOBJFile.name, LineNumber) 89 93 elif self.WarnMissingElements: 90 94 print "%s<%d>: Wavefront command not supported: %r" % (WavefrontOBJFile.name, LineNumber, ' '.join(Line)) 91 95 else: 92 96 ex(Args) 97 Line = '' 93 98 94 99 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Tools/Geometry/Analysis/TriangleStripifier.py
r345 r355 241 241 242 242 for face in FaceList[1:]: 243 try: 244 # Build the strip by repeatedly finding the missing index 245 result.append(face.OtherVertex(*result[-2:])) 246 except KeyError: 247 idx = FaceList.index(face) 248 print 249 print 250 print "Face -2", idx-2, FaceList[idx-2] 251 print "Face -1", idx-1, FaceList[idx-1] 252 print "Error face:", idx, face 253 print "Face 1", idx+1, FaceList[idx+1] 254 print 255 print "StartIdx", FaceList.index(self.StartFace) 256 print "Total", len(FaceList) 257 print 258 259 raise 260 261 return result 262 243 # Build the strip by repeatedly finding the missing index 244 result.append(face.OtherVertex(*result[-2:])) 245 246 return result 263 247 264 248 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
