1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-21 06:41:30 +02:00

Add generating SVG file for CNC usage

Generate SVG files, like DXF files for CNC usage
This commit is contained in:
Jeroen Roos
2024-02-04 17:32:39 +01:00
parent e3ad32713d
commit f85fdca051
12 changed files with 85 additions and 19 deletions

View File

@@ -104,14 +104,14 @@ class BOM:
def add_part(self, s):
args = []
match = re.match(r'^(.*?\.stl|.*?\.dxf)\((.*)\)$', s) #look for name.stl(...) or name.dxf(...)
match = re.match(r'^(.*?\.stl|.*?\.dxf|.*?\.svg)\((.*)\)$', s) #look for name.stl(...), name.dxf(...) or name.svg(...)
if match:
s = match.group(1)
args = [match.group(2)]
if s[-4:] == ".stl":
parts = self.printed
else:
if s[-4:] == ".dxf":
if s[-4:] == ".dxf" or s[-4:] == ".svg":
parts = self.routed
else:
parts = self.vitamins