Example #1
0
 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
Example #2
0
    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
Example #3
0
	def __init__(self):
		Transform.__init__(self)
Example #4
0
 def __init__(self):
     Transform.__init__(self)