mirror of
https://github.com/nophead/Mendel90.git
synced 2025-09-01 17:12:37 +02:00
Sheets.py now removes the scad files it generates.
Bodge for race condition on Win7. Note PDF files have change due to new version of InkScape but should look the same.
This commit is contained in:
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_base_dxf();
|
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_gantry_and_y_carriage_dxf();
|
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_gantry_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_left_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_right_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_stays_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
y_carriage_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
y_heatshield_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_base_dxf();
|
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_gantry_and_y_carriage_dxf();
|
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_gantry_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_left_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_right_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_stays_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
y_carriage_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
y_heatshield_dxf();
|
15
sheets.py
15
sheets.py
@@ -6,6 +6,8 @@ import InkCL
|
||||
import shutil
|
||||
import sys
|
||||
from dxf import *
|
||||
from set_machine import *
|
||||
from time import *
|
||||
|
||||
source_dir = "scad"
|
||||
|
||||
@@ -15,20 +17,16 @@ def sheets(machine):
|
||||
#
|
||||
target_dir = machine + "/sheets"
|
||||
if os.path.isdir(target_dir):
|
||||
try:
|
||||
shutil.rmtree(target_dir)
|
||||
os.makedirs(target_dir)
|
||||
except:
|
||||
pass
|
||||
shutil.rmtree(target_dir)
|
||||
sleep(0.1)
|
||||
os.makedirs(target_dir)
|
||||
else:
|
||||
os.makedirs(target_dir)
|
||||
|
||||
#
|
||||
# Set the target machine
|
||||
#
|
||||
f = open("scad/conf/machine.scad","wt")
|
||||
f. write("include <%s_config.scad>\n" % machine);
|
||||
f.close()
|
||||
set_machine(machine)
|
||||
|
||||
#
|
||||
# Find all the scad files
|
||||
@@ -65,6 +63,7 @@ def sheets(machine):
|
||||
# Make PDF for printing
|
||||
#
|
||||
InkCL.run("-f", base_name + ".svg", "-A", base_name + ".pdf")
|
||||
os.remove(dxf_maker_name)
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) > 1:
|
||||
|
2
stls.py
2
stls.py
@@ -6,6 +6,7 @@ import shutil
|
||||
import sys
|
||||
import c14n_stl
|
||||
from set_machine import *
|
||||
from time import *
|
||||
|
||||
from bom import source_dir
|
||||
|
||||
@@ -34,6 +35,7 @@ def stls(machine, parts = None):
|
||||
if os.path.isdir(target_dir):
|
||||
if not parts:
|
||||
shutil.rmtree(target_dir) #if making the BOM clear the directory first
|
||||
sleep(0.1)
|
||||
os.makedirs(target_dir)
|
||||
else:
|
||||
os.makedirs(target_dir)
|
||||
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_base_dxf();
|
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_gantry_and_y_carriage_dxf();
|
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_gantry_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_left_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_right_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
frame_stays_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
y_carriage_dxf();
|
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
use <../../scad/main.scad>
|
||||
y_heatshield_dxf();
|
Reference in New Issue
Block a user