x
This commit is contained in:
@@ -73,7 +73,8 @@ class GeometryVerificationService:
|
||||
try:
|
||||
result = subprocess.run(['which', cmd_name], capture_output=True, text=True)
|
||||
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}")
|
||||
break
|
||||
except:
|
||||
@@ -87,7 +88,7 @@ class GeometryVerificationService:
|
||||
cmd = [
|
||||
'env', 'QT_QPA_PLATFORM=offscreen',
|
||||
'freecad', '-c',
|
||||
str(self.verification_script), stp_path_str
|
||||
str(self.verification_script), str(Path(stp_path_str).absolute())
|
||||
]
|
||||
except:
|
||||
pass
|
||||
@@ -97,7 +98,7 @@ class GeometryVerificationService:
|
||||
try:
|
||||
result = subprocess.run(['which', 'xvfb-run'], capture_output=True, text=True)
|
||||
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:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user