def readNode(self): "Gets next node." while self.counterNodes < self.nrNodes: line = self.getline() coord = line.split() self.counterNodes += 1 yield generic.node(coord[0], coord[1], coord[2], label=str(self.counterNodes))
def readNode(self): "Gets next node" self._section("Vertices") number = int(self.getline()) if self.logger.isEnabledFor(logging.DEBUG): self.logger.debug("Mesh contains %d vertices" % number) for i in xrange(number): line = self.getline() coord = line.split() yield generic.node(coord[0], coord[1], coord[2], label=str(i+1), color=coord[3])
def readNode(self): "Gets next node" self._section("2411") floatPattern = re.compile("[DE]") while True: line = self.getline() if (line == " -1"): return fields = line.split() line = self.getline() line = re.sub(floatPattern, "e", line) coord = line.split() yield generic.node(coord[0], coord[1], coord[2], label=fields[0], color=fields[3])
def readNode(self): "Gets next node" if self.position != "start": self.logger.debug("Reset to node location") self.f.seek(0) for i in range(4): line = self.getline() self.position = "nodes" floatPattern = re.compile("[DE]") while self.counterNodes < self.nrNodes: line = self.getline() label = line.split()[1] line = self.getline() line = re.sub(floatPattern, "e", line) coord = struct.unpack("16s16s16s", line) line = self.getline() self.counterNodes += 1 yield generic.node(coord[0], coord[1], coord[2], label=label)
def readNode(self): "Gets next node." nodeCounter = 0 try: while True: line = self.getline() while line.endswith("\\"): # Remove backslash and concatenate with next line line = line[:-1] + self.getline() if line.startswith("v "): coord = line.split() coord.pop(0) nodeCounter += 1 yield generic.node(coord[0], coord[1], coord[2], label=str(nodeCounter)) except IOError: return
def readNode(self): "Gets next node" for i in xrange(self.nrNodes): line = self.getline() coord = line.split() yield generic.node(coord[0], coord[1], coord[2], label=str(i + 1))
def readNode(self): "Gets next node" for i in xrange(self.nrNodes): line = self.getline() coord = line.split() yield generic.node(coord[0], coord[1], coord[2], label=str(i+1))