def _get_solids(self): """ List of solids (aka meshes) obtained from "GItemList/GMeshLib.txt" within the basis geocache """ if self._solids is None: path = os.path.join(self.GEOCACHE, "GItemList/GMeshLib.txt") self._solids = splitlines_(path) return self._solids
def _get_csgbnd(self): """ csg.txt contains a list of boundaries, one per line:: [blyth@localhost tboolean-box]$ cat csg.txt Rock//perfectAbsorbSurface/Vacuum Vacuum///GlassSchottF2 * observed no newline at end """ if self.TestCSGPath is None: return [] pass csgtxt = os.path.join(self.TestCSGPath, "csg.txt") csgbnd = splitlines_(csgtxt) if os.path.exists(csgtxt) else [] return csgbnd
def load(self): if not os.path.exists(self.pdir): log.fatal("no such path %s " % self.pdir) assert 0 a = np.load(self.xpath) self.buf = a.view(Buf) for att in self.atts: path = self.txtpath(att) if os.path.exists(path): setattr(self.buf, att, splitlines_(path)) else: log.warning("no such path %s " % path) path = self.gcsgpath() if os.path.exists(path): self.gcsgbuf = np.load(path) else: log.warning("no such path %s " % path)