def handleTRANSFORM(self, fh, line): nset = None for part in line.parts: part = part.upper() if part.startswith("NSET="): _, nset = part.split("=") elif part.startswith("TYPE="): _, csys = part.split("=") if csys != 'R': raise ParserError(line, 'Only rectangular (R) system supported') else: raise ParserError(line, '*TRANSFORM definition malformed!') if nset is None or nset not in self.nset: raise FEError("NSET not valid or not defined") # fetch next line line = self.nextline(fh) if line.keyword or line is EmptyLine: raise ParserError(line, 'Expected *TRANSFORM definitions!') ax, ay, az, bx, by, bz = map(float, line.parts) csys = Transform.carthesian((ax, ay, az), (bx, by, bz)) for nid in self.nset[nset]: node = self.nodemap[nid] node.coordSys = csys return line
def __init__(self): Transform.__init__(self)