x
This commit is contained in:
@@ -73,7 +73,8 @@ class GeometryVerificationService:
|
|||||||
try:
|
try:
|
||||||
result = subprocess.run(['which', cmd_name], capture_output=True, text=True)
|
result = subprocess.run(['which', cmd_name], capture_output=True, text=True)
|
||||||
if result.returncode == 0 and result.stdout.strip():
|
if result.returncode == 0 and result.stdout.strip():
|
||||||
cmd = [cmd_name, str(self.verification_script), stp_path_str]
|
# 使用绝对路径
|
||||||
|
cmd = [cmd_name, str(self.verification_script), str(Path(stp_path_str).absolute())]
|
||||||
logger.debug(f"找到 FreeCAD 命令: {cmd_name}")
|
logger.debug(f"找到 FreeCAD 命令: {cmd_name}")
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
@@ -87,7 +88,7 @@ class GeometryVerificationService:
|
|||||||
cmd = [
|
cmd = [
|
||||||
'env', 'QT_QPA_PLATFORM=offscreen',
|
'env', 'QT_QPA_PLATFORM=offscreen',
|
||||||
'freecad', '-c',
|
'freecad', '-c',
|
||||||
str(self.verification_script), stp_path_str
|
str(self.verification_script), str(Path(stp_path_str).absolute())
|
||||||
]
|
]
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@@ -97,7 +98,7 @@ class GeometryVerificationService:
|
|||||||
try:
|
try:
|
||||||
result = subprocess.run(['which', 'xvfb-run'], capture_output=True, text=True)
|
result = subprocess.run(['which', 'xvfb-run'], capture_output=True, text=True)
|
||||||
if result.returncode == 0:
|
if result.returncode == 0:
|
||||||
cmd = ['xvfb-run', 'freecad', '-c', str(self.verification_script), stp_path_str]
|
cmd = ['xvfb-run', 'freecad', '-c', str(self.verification_script), str(Path(stp_path_str).absolute())]
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user