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

Added pose_stl() module because pose() only works for assembly views.

This commit is contained in:
Chris Palmer
2025-04-09 23:29:00 +01:00
parent 6a58d37f77
commit 33ac3820b0
4 changed files with 26 additions and 7 deletions

View File

@@ -69,7 +69,10 @@ class Part:
self.count = 1
for arg in args:
arg = arg.replace('true', 'True').replace('false', 'False').replace('undef', 'None')
exec('self.' + arg)
try:
exec('self.' + arg)
except:
print(arg)
def data(self):
return self.__dict__
@@ -107,7 +110,7 @@ class BOM:
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)]
args = match.group(2).split('|')
if s[-4:] == ".stl":
parts = self.printed
else: