forked from kartchnb/AutoTowersGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenScadJob.py
More file actions
23 lines (14 loc) · 749 Bytes
/
OpenScadJob.py
File metadata and controls
23 lines (14 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from UM.Job import Job
class OpenScadJob(Job):
'''A simple class used to generate an STL file using OpenSCAD
Since this can be a lengthy process, Uranium's Job class is used
to perform the work in the background'''
def __init__(self, openScadInterface, openScadFilePath, openScadParameters, stlFilePath):
super().__init__()
self._openScadInterface = openScadInterface
self._openScadFilePath = openScadFilePath
self._openScadParameters = openScadParameters
self._stlFilePath = stlFilePath
def run(self) -> None:
'''Generate an STL from an OpenSCAD file'''
self._openScadInterface.GenerateStl(self._openScadFilePath, self._openScadParameters, self._stlFilePath)