centOS 环境下用python转换step为stl出错

Chinese forum

Moderator: paullee

Forum rules
论坛规矩 / 論壇規矩 , 有用的资讯 / 有用的資訊
重要:寻求帮助之前,请先看看这里 /
重要:尋求幫助之前,請先看看這裡

另外,对论坛用户 友善!阅读FreeCAD 行为准则!
/ 另外,對論壇用戶 友善! 閱讀FreeCAD
行為準則
Post Reply
lindow
Posts: 7
Joined: Fri Jun 10, 2022 4:03 pm

centOS 环境下用python转换step为stl出错

Post by lindow »

环境:centos7
freecad版本:0.18.2
代码:
import FreeCAD
import Part
import Mesh
shape = Part.Shape()
shape.read('my_shape.step')
doc = App.newDocument('Doc')
pf = doc.addObject("Part::Feature","MyShape")
pf.Shape = shape
Mesh.export([pf], 'my_shape.stl')

但是导出的stl文件与step源文件有数据确实,图形显示不全。大家有遇到同样的问题吗,如何解决呢?

十分感谢
User avatar
johnwang
Veteran
Posts: 1102
Joined: Sun Jan 27, 2019 12:41 am

Re: centOS 环境下用python转换step为stl出错

Post by johnwang »

试一下新版0.20
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
lindow
Posts: 7
Joined: Fri Jun 10, 2022 4:03 pm

Re: centOS 环境下用python转换step为stl出错

Post by lindow »

centos怎样安装0.20?
paullee
Veteran
Posts: 4395
Joined: Wed May 04, 2016 3:58 pm

Re: centOS 环境下用python转换step为stl出错

Post by paullee »

lindow wrote: Sat Jun 11, 2022 2:52 am centos怎样安装0.20?
下載 AppImage 直接便可行了,我用在Fedora 上。

https://www.freecadweb.org/downloads.php
lindow
Posts: 7
Joined: Fri Jun 10, 2022 4:03 pm

Re: centOS 环境下用python转换step为stl出错

Post by lindow »

貌似不太行,我是装在服务器上的
paullee
Veteran
Posts: 4395
Joined: Wed May 04, 2016 3:58 pm

Re: centOS 环境下用python转换step为stl出错

Post by paullee »

lindow wrote: Tue Jun 21, 2022 2:17 am ... 装在服务器上的
甚麼意思?
lindow
Posts: 7
Joined: Fri Jun 10, 2022 4:03 pm

Re: centOS 环境下用python转换step为stl出错

Post by lindow »

我需要将freecad安装在服务器上,服务器的系统是centos 7.6,因此无法使用appImage版本
paullee
Veteran
Posts: 4395
Joined: Wed May 04, 2016 3:58 pm

Re: centOS 环境下用python转换step为stl出错

Post by paullee »

lindow
Posts: 7
Joined: Fri Jun 10, 2022 4:03 pm

Re: centOS 环境下用python转换step为stl出错

Post by lindow »

嗯,如果是snap安装的话,python调用就又有点麻烦
Post Reply