Ticket #9238: trac_9232_plot3d_base_pyx.patch

File trac_9232_plot3d_base_pyx.patch, 1.5 KB (added by gutow, 10 years ago)

plot3d/base.pyx fixes to launch Jmol from cmd line

  • sage/plot/plot3d/base.pyx

    # HG changeset patch
    # User Jonathan H. Gutow <gutow@uwosh.edu>
    # Date 1300258588 25200
    # Node ID f18cb9ba35587e01428783ca86db5bc17da7d707
    # Parent  361a4ad7d52c69b64ae2e658ffd0820af0d87e93
    trac 9232: fix no Jmol luanch fr cmd line
    
    diff -r 361a4ad7d52c -r f18cb9ba3558 sage/plot/plot3d/base.pyx
    a b  
    596596            select atomno = 1
    597597            color atom  [102,102,255]
    598598            label "hi"
     599            isosurface fullylit; pmesh o* fullylit; set antialiasdisplay on;
    599600
    600601            sage: print z.read(z.namelist()[0])
    601602            24
     
    656657
    657658        # Put the rest of the object in
    658659        f.write("\n".join(all))
     660        #make sure the lighting is correct
     661        f.write("isosurface fullylit; pmesh o* fullylit; set antialiasdisplay on;\n")
    659662
    660663        render_params.output_archive.writestr('SCRIPT', f.getvalue())
    661664        render_params.output_archive.close()
     
    11131116            viewer_app = "sage-native-execute " + os.path.join(sage.misc.misc.SAGE_LOCAL, "bin/jmol")
    11141117
    11151118            # We need a script to load the file
    1116             f = open(filename + '.jmol', 'w')
     1119            if not EMBEDDED_MODE:
     1120                ext = "spt"#.spt is script extension
     1121            f = open(filename + '.%s'%ext, 'w')
    11171122            f.write('set defaultdirectory "%s"\n' % archive_name)
    11181123            f.write('script SCRIPT\n')
    11191124            f.close()