def iges2png(iges_file, png_file): '''usage: %prog <iges_file> <png_file> converts from IGES to PNG stuff it leaves behind: input.iges.stl input.iges.pov input.iges.pov.inc output.png''' print "iges2png: loading iges file." my_iges_importer = IGESImporter(iges_file) my_iges_importer.ReadFile() the_shapes = my_iges_importer.GetShapes() main_shape = the_shapes[0] print "iges2png: saving iges as stl." stl_exp = StlAPI() stl_exp.Write(main_shape, iges_file + ".stl") print "iges2png: converting stl to pov" stl2pov(iges_file + ".stl", iges_file + ".pov") print "iges2png: converting pov to png" pov2png(iges_file + ".pov", png_file) print "iges2png: done"
def write_file(self): stl_writer = StlAPI() stl_writer.Write(self._shape, self._filename, self._ASCIIMode)