尝试开源3D三维免费软件OpenCASCADE OpenCASCADE-7.6.0

尝试开源3D三维免费自由软件OpenCASCADE,基于MIT协议1-安装和配置

1、 从官网下载,需要注册用户信息。下载window安装包即可。最新版为OpenCASCADE-7.6.0-vc14。
2、默认安装到C盘 C:OpenCASCADE-7.6.0-vc14-64\ 下。
3、安装完毕,进入后的路径结构大致如下:参见老版本结构图
在这里插入图片描述
以上图片是官方提供的。
4、 很关键,看官方的帮助文件。路径为doc\下,有chm,pdf等多种格式。
5、设置环境:在路径C:\OpenCASCADE-7.6.0-vc14-64\opencascade-7.6.0\env.bat文件,直接管理员运行;原文是:
You can define the environment variables with env.bat script located in the $CASROOT folder. This script accepts two arguments to be used: the version of Visual Studio (vc10 – vc142) and the architecture (win32 or win64).
6、 顺便,执行一下同路径下的 custom.bat 文件,这是支持第三方工具使用的。
7、这里,就可以执行msvc.bat 来打开项目进行自己编译了。

编译没有问题的话,基本就成功一半。

以上设置会生成很多系统变量,基本定义如下,感兴趣可以仔细看看:
CASROOT is used to define the root directory of Open CASCADE Technology;
•PATH is required to define the path to OCCT binaries and 3rdparty folder;
•LD_LIBRARY_PATH is required to define the path to OCCT libraries (on UNIX platforms only; DYLD_LIBRARY_PATH variable in case of macOS);
•MMGT_OPT (optional) if set to 1, the memory manager performs optimizations as described below; if set to 2, Intel ® TBB optimized memory manager is used; if 0 (default), every memory block is allocated in C memory heap directly (via malloc() and free() functions). In the latter case, all other options starting with MMGT, except MMGT_CLEAR, are ignored;
•MMGT_CLEAR (optional) if set to 1 (default), every allocated memory block is cleared by zeros; if set to 0, memory block is returned as it is;
•MMGT_CELLSIZE (optional) defines the maximal size of blocks allocated in large pools of memory. Default is 200;
•MMGT_NBPAGES (optional) defines the size of memory chunks allocated for small blocks in pages (operating-system dependent). Default is 10000;
•MMGT_THRESHOLD (optional) defines the maximal size of blocks that are recycled internally instead of being returned to the heap. Default is 40000;
•MMGT_MMAP (optional) when set to 1 (default), large memory blocks are allocated using memory mapping functions of the operating system; if set to 0, they will be allocated in the C heap by malloc();
•CSF_LANGUAGE (optional) defines default language of messages;
•CSF_DEBUG (optional, Windows only): if defined then a diagnostic message is displayed in case of an exception;
•CSF_DEBUG_BOP (optional): if defined then it should specify directory where diagnostic data on problems occurred in Boolean operations will be saved;
•CSF_MDTVTexturesDirectory defines the directory for available textures when using texture mapping;
•CSF_ShadersDirectory (optional) defines the directory for GLSL programs for Ray Tracing renderer (embedded resources are used when variable is undefined);
•CSF_SHMessage (optional) defines the path to the messages file for ShapeHealing;
•CSF_XSMessage (optional) defines the path to the messages file for STEP and IGES translators;
•CSF_StandardDefaults, CSF_StandardLiteDefaults*, **CSF_XCAFDefaults, and CSF_PluginDefaults define paths to directory where configuration files for OCAF persistence are located (required for open/save operations with OCAF documents);
•CSF_IGESDefaults and CSF_STEPDefaults (optional) define paths to directory where resource files of IGES and STEP translators are located;
•CSF_XmlOcafResource is required in order to set the path to XSD resources, which defines XML grammar.
•CSF_MIGRATION_TYPES is required in order to read documents that contain old data types, such as TDataStd_Shape;

已经开始编译,希望没有错误。win10+vs2019 community+OpenCASCADE-7.6.0

2021-12-25: 补充:

  1. 设置正确的编译器VC142后编译成功。参见下图:
    在这里插入图片描述
    注意:一定要设置好相关编译环境。可以使用cascade自带编译好的,但是不一定兼容你自己的环境。
  2. 编译成功后,再运行示例程序,不再有任何错误,我使用原厂的dll总是保存自己生成的dll文件找不到。运行参见下图:
    在这里插入图片描述

效果是相当好。重要提示,一定要看官方帮助文档。
3. 后续看如何使用c#进行后续自己玩了。

ps:我是纯粹是个人喜欢,学习下新知识。希望能做出个自定义的CAD/CAM/CAE软件。目标是不是太远大了。

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值