Freecad is an open-source CAD software. Although its functions are not perfect yet, it demonstrates how to build a complete CAD System-cross-platform.
I have also studied how to build a CAD System in Windows to imitate the software that I am working on, but it involves MFC, VBA, and COM. Although I have always felt that the behaviors that use Microsoft's technologies and advocate Mac and Linux are very emotional, I would rather cool: I cannot cross-platform platforms, and I always feel something missing ~~~
Currently, freecad uses cmake to uniformly configure the compilation system on various platforms, and does not provide Visual Studio project files on Windows. to generate the files by yourself, the steps are naturally troublesome, although the official website provides a detailed tutorial, it is not enough to detail it so that you do not take some detours. Here are some additional notes:
- If you submitCodeIf it is not so sensitive, do not use SVN. Stable versions are available for downloading.
- After downloading sourcepack and libpack, decompress the package to the same directory. Note that the package is integrated into the same directory instead of being decompressed into two subdirectories. Cmake searches for files in this way.
- Cmake needs to download and install it by yourself. After it is started, enter the directory of source and Lib in "where is the source code; in "where to build the binaries", enter the directory of the vs project file to be generated, and click Configure. If configure is successful, you can click Generate to generate the project file.
- In general, your configure will fail, for example, you cannot find a specific directory:Cmake error at src/MoD/cmakelists.txt: 22 (add_subdirectory ):
Add_subdirectory given source "start" which is not an existing Directory.
Now you can open the cmakelists file and comment out the line with the # symbol.
- After generate is successful, open the solution file of Vs and compile it directly. However, if you try to compile with incredibuild, it cannot be successful.
- Before Running freecad, you need to add the bin directory of libpack to the path environment variable. Otherwise, so many third-party DLL files cannot be found.