【保姆式】FreeCAD0.21编译?怎么编译?这篇史诗级巨作将告诉你答案,看完不会来砍我。

本文介绍了如何在Windows10环境下配置FreeCAD(基于PYQt的三维建模软件)的编译过程,包括所需环境(Win10、VS2019、Qt5.15.2)、Python版本和依赖库的安装。作者分享了解决编译过程中遇到的错误步骤,如libpack问题和CMake配置,以帮助读者顺利搭建FreeCAD环境。
摘要由CSDN通过智能技术生成

FreeCad是一款基于PYQt的三维模型建模软件,无需多言。看完再说话。有问题打评论区。

先说在前面,你编译出错了,不看清楚,说谁马虎粗心,谁心里有数。(很乱,但是你看完,就不需要找什么攻略一步一步跟着别人做,最后做完一大堆错,不明所以。学会自己成长)

首先你需要什么:

环境:win10、vs2019、qt5.15.2(5.15版本都行,无所谓的)python(我电脑之前下载了pyhon3.11.4)、freeCAD、freeCAD依赖包(里面包含了qt和python的库,我没有改pyhon和其他的库,只改了qt的库,看完我的你就懂了)

一定要先看完一遍我的这篇文章,不要一步一步按照这上面过程来,看完以后,你自己去编译就行了,下面的链接也是我在网上找的链接)

资料下载的地址:

下载源码开放下载:(这里用gitee的很快,git的几百M下的很慢,这里直接下载压缩包,一样的,或者你去官网找源码下载,我直接下的最新0.21版本好像,网上大都是0.19)

mirrors / FreeCAD / FreeCAD · GitCodeThis is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler. 🚀 Github 镜像仓库 🚀 源项目地址...https://gitcode.net/mirrors/FreeCAD/FreeCAD?utm_source=csdn_github_accelerator

git地址(你可以fork一份):

访问FreeCAD的GitHub网页:https://github.com/FreeCAD/FreeCAD_Source

LibPack依赖库下载:

Releases · apeltauer/FreeCAD · GitHubThis is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler - Releases · apeltauer/FreeCADhttps://github.com/apeltauer/FreeCAD/releases

访问FreeCAD的官方网站:

FreeCAD: Your own 3D parametric modelerFreeCAD, the open source 3D parametric modelerhttps://www.freecadweb.org/

(没有人告诉你出来的三个让你下哪个,我告诉你,下载那个.7z的压缩包,其他的没啥用,其他的是源码包,编译用不上,反正我没用上)

依赖库放源码的目录下(后面会报个错)缺少依赖库的错误;

1.打开cmake,最低版本要求3.16以上(没人告诉你要新建一个build的文件夹,一个install文件夹,我告诉你了,别谢,看完它)


 

 Finash-------------------------------

第一次点击Configure

错误1: Could not find libpack error(大约还有两个,其他不用管,只要这个libpack修好就行了)

找到FREECAD LIBPACK DIR:这里修改成你下载的那个压缩包的地址,我是直接放到项目目录下,好找。(避免水印遮挡,我直接截我笔记的截图好了)

 正在编译;(偷笑,,,geigeigeigegege)

 编译成功:

 这是成功的字样

点击Generate生成文件:

完成以后:

点击

选择vs2019打开------------------->

 

打开成功

右键FreeCADMain,设置其为启动项。(重要

选择ALL_BUILD右键重新生成(大约需要10-15分钟)

启动。

恭喜,失败了。你不看完,就编译,浪费是你的时间,让你看完你不看。。。。

按照上面的如果你没有什么疑惑,说明你错了,这东西,怎么能一次就编译好呢。哈哈哈,我也是不断试错才发现的,我下载的是上面链接的那个压缩包没错,但是cmake过程都挺好的,就是vs生成的时候报了600多个错。

第2错,查看你的cmake的有关qt的目录,是不是有qt5.11.2之类的,把他全换了

就是这些东西(建议你一个一个的从上往下改,别急)

 第三错:之前建立的install目录,和build同级还记得不,我是没放c盘那边,你不想改,也没事,后面用everthing在找吧。(这一步我觉得不算错误,改不改好像无所谓。)

第四错:编译成功后,提示好几个文件找不到,还是什么错误的,尤其是FemGui这个文件下的错误,哪个文件错,你点哪个右键修改属性,高级那里,改为多字节,我知道有找不到的,看图说话。

上面画框的地方,改完以后,等3秒左右,错误就没了,这时候你可以试试启动(有的小呆瓜是不是忘了设置启动项啦)

 设置启动项是这个:

 

再运行好了,看结果;

0.21版本运行成功了,接着你就分析源码,debug一步一步走就完事了。

 还有其他错误的小伙伴,评论区留言,一一解答,点点关注不迷路,小白带你上高速。

  • 11
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 14
    评论
Module developer’s guide to FreeCAD source code by Qingfeng Xia http://www.iesensor.com • 2015-09-18 version 0.1 for FreeCAD version 0.16-dev • 2016-09-18 version 0.2 for FreeCAD version 0.17-dev License of this book This ebook is licensed the same as FreeCAD document license CC-BY 3.0 http://creativecommons.org/licenses/by/3.0/Contents 1 FreeCAD overview and architecture 7 1.1 Introduction to FreeCAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2 Key features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 Software architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.1 Key software libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.2 Mixed python and c++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3.3 GPL code will not be included into installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4 How 3D model are renderred . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4.1 Selection of 3D visualization libarary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4.2 Discussion of 3D rendering library selection on FreeCAD Forum . . . . . . . . . . . . . . . . . . . . . 8 1.5 Roadmap of FreeCAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.5.1 Keep updated with main components: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.5.2 C++11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.5.3 Pyside 2 project for Qt 5.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 Organisation of FreeCAD source code 11 2.1 Build system for FreeCAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.1 Analysis of src/cMake/SMesh.cMake . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2 List of files and folders in FreeCAD source folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3 List of modules in FreeCAD Mod folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.4 Learning path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5 Learning OpenInventor/Coin3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5.1 OpenInventor in FreeCAD’s ViewProvider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5.2 Important classes in OpenInventor/Coin3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.5.3 Window System integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.5.4 Pivy: Coin3D ’s Python wrapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3 Base, App and Main module 19 3.1 List of header files in Base folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.1.1 Frequently included headers files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.1.2 Correct way of using Sequencer in try-catch block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.1.3 String enconding utf8 and conversion into wchar_t QString . . . . . . . . . . . . . . . . . . . . . . . . 22 3.2 Type, BaseClass, PyObjectBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.2.1 Type system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.2.2 src/Base/BaseClass.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2.3 src/Base/PyObjectBase.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.2.4 src/Base/Persistence.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.2.5 GeoFeature: Base class of all geometric document objects . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.3 Unit scheme for physial quantity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.3.1 src/Base/Unit.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.3.2 src/Base/Quantity.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.4 List of header files in App folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.5 Property framewrok . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.5.1 Naming of property and PropertyEditor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.5.2 src/App/PropertyStandard.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.5.3 PropertyEnumeration, see src/App/Enumeration.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.5.4 Geometry related property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.5.5 File related property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 1
Unity 抠人像的原理是基于计算机视觉技术中的图像分割算法。这种算法可以将一张图片分割成多个区域,进而实现抠图的效果。其中最常用的图像分割算法是基于深度学习的语义分割算法。 具体来说,语义分割算法会将一张图片中的每个像素都标记上对应的类别,比如人像、背景、物体等等。在抠图的场景中,我们需要将人像标记出来,并将背景去除,从而实现抠图的效果。 下面是一些保姆的抠图教程,手把手教你如何进行抠图: 1. 使用 Photoshop 的磁性套索工具进行抠图 磁性套索工具是 Photoshop 中常用的抠图工具之一,它可以根据颜色的相似度自动选取区域。使用磁性套索工具进行抠图时,需要先调整磁性套索工具的参数,比如设置套索的宽度和磁性强度等。 2. 使用在线抠图工具进行抠图 现在有很多在线抠图工具可以使用,比如 Clipping Magic、Remove.bg 等等。这些工具使用的是深度学习算法,可以自动识别人像并将背景去除,使用起来非常方便。 3. 使用 Unity 的抠图插件进行抠图 Unity 中也有一些非常好用的抠图插件,比如 Alpha Mask、Simple Mask 和 Smart Mask 等等。这些插件可以帮助开发者快速实现抠图的效果,无需手动进行抠图操作。 总之,抠图是计算机视觉技术中一个非常重要的应用场景,也是游戏开发中常见的需求之一。掌握抠图的技巧和方法,可以帮助开发者快速实现游戏中的各种效果。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 14
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序小白Erike.

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值