basic_proto
This commit is contained in:
parent
c11f47a2b6
commit
243d2c4385
2
main.py
2
main.py
@ -22,7 +22,7 @@ class MainWindow(QMainWindow):
|
|||||||
def generate_mesh(self):
|
def generate_mesh(self):
|
||||||
code_bytes = self.ui.textEdit.toPlainText().encode('utf-8')
|
code_bytes = self.ui.textEdit.toPlainText().encode('utf-8')
|
||||||
code_text = code_bytes.decode('utf-8')
|
code_text = code_bytes.decode('utf-8')
|
||||||
save_string = "\nf.save('out.stl', samples=2**10)"
|
save_string = "\nf.save('out.stl', samples=2**12)"
|
||||||
code_text += save_string
|
code_text += save_string
|
||||||
|
|
||||||
local_vars = {}
|
local_vars = {}
|
||||||
|
@ -73,6 +73,21 @@ class OpenGLWidget(QOpenGLWidget):
|
|||||||
glVertex3fv(vertex)
|
glVertex3fv(vertex)
|
||||||
glEnd()
|
glEnd()
|
||||||
|
|
||||||
|
# Draw edges
|
||||||
|
glColor3f(0.0, 0.0, 1.0) # Set color to blue
|
||||||
|
glLineWidth(2.0) # Set line width
|
||||||
|
glBegin(GL_LINES)
|
||||||
|
for triangle in vertices:
|
||||||
|
glVertex3fv(triangle[0])
|
||||||
|
glVertex3fv(triangle[1])
|
||||||
|
|
||||||
|
glVertex3fv(triangle[1])
|
||||||
|
glVertex3fv(triangle[2])
|
||||||
|
|
||||||
|
glVertex3fv(triangle[2])
|
||||||
|
glVertex3fv(triangle[0])
|
||||||
|
glEnd()
|
||||||
|
|
||||||
def mousePressEvent(self, event):
|
def mousePressEvent(self, event):
|
||||||
self.lastPos = event.pos()
|
self.lastPos = event.pos()
|
||||||
|
|
||||||
|
10
requirements.txt
Normal file
10
requirements.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
matplotlib==3.8.2
|
||||||
|
numpy==1.26.2
|
||||||
|
Pillow==10.1.0
|
||||||
|
Pint==0.22
|
||||||
|
pygame==2.5.2
|
||||||
|
PySide6==6.6.1
|
||||||
|
rich==13.7.0
|
||||||
|
scikit-image==0.22.0
|
||||||
|
scipy==1.11.4
|
||||||
|
vtk==9.3.0
|
Loading…
x
Reference in New Issue
Block a user