def read_txt(self, filePath, overwrite=True, afType=1): """ reads in airfoil coordinates file in text format. Parameters ---------- filePath : path absolute path of text file to read overwrite : bool if True then overwrites coordinates in self.coord otherwise returns coordinates as numpy array. afType : integer type of airfoil file. 1 or 2 """ if afType == 1: out = self.read_txt_1(filePath) if overwrite: self.coord = out[0] self.upPts, self.loPts = geom.separate_coordinates(self.coord) self.name = out[1] else: return out[0] elif afType == 2: out = self.read_txt_2(filePath) if overwrite: self.upPts = out[0] self.loPts = out[1] self.join_coordinates() self.name = out[2] else: return geom.join_coordinates(out[0], out[1])
def separate_coordinates(self): self.upPts, self.loPts = geom.separate_coordinates(self.coord)
def _separate_coordinates(self): self.ptsUp, self.ptsLo = geom.separate_coordinates(self.pts)