Apr-11-2024, 09:59 AM
Hello all - Jayson Here... and i have an issue with a Program that uses WxPython now for a gui, hopefully with flask later for web visability on my Virtual Machine.
The .py file makes an solid.stl file reads it and displays the stl mesh, however, my issue comes up on the last line of code.
and it is with the x display.
Code: stl.py
Any knowledge that could get me closer to a screen? maybe on the web too...
The .py file makes an solid.stl file reads it and displays the stl mesh, however, my issue comes up on the last line of code.
and it is with the x display.
Code: stl.py
from solid2 import *
from jupyterscad import view
from simple_3dviz import Mesh
from simple_3dviz.window import show
from simple_3dviz.utils import render
import os
import subprocess
from subprocess import Popen, PIPE, STDOUT
subprocess.Popen('sudo Xvfb :1', shell=True, stdout=subprocess.PIPE, stderr=STDOUT)
os.environ['DISPLAY'] = '127.0.0.1:1'
d = cube(5) + sphere(5).right(5) - cylinder(r=2, h=6)
scad = (scad_render(d))
view(scad, outfile='/var/www/design.stl')
m = Mesh.from_file('/var/www/design.stl', color=(0.1,0.5,0.1))
show(m, camera_position=(-60., -160, 120), camera_target=(0., 0, 40), light=(-60, -160, 120))say i run the program, with sudo python3 /var/www/cgi-bin/stl.pythis happens....
Any knowledge that could get me closer to a screen? maybe on the web too...
