FEP00 | |
---|---|
Title | Evolution of FreeCAD's Rendering Subsystem |
Status | Draft |
Author(s) | Joao Matos (tritao) |
Created | Mar 02, 2025 |
Updated | Mar 02, 2025 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static PyObject* createMyConstantsEnum() | |
{ | |
// Import the Python 'enum' module. | |
PyObject* enumModule = PyImport_ImportModule("enum"); | |
if (!enumModule) { | |
PyErr_SetString(PyExc_ImportError, "Failed to import the enum module"); | |
return nullptr; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Python.h> | |
#include <thread> | |
#include <future> | |
#include <iostream> | |
#include <chrono> | |
// ----- Python-bound Function: execute ----- | |
// | |
// This function takes an integer, offloads a computation (here, squaring the number) | |
// using std::async, and returns the result. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <chrono> | |
struct Color { | |
float a, b, c, d; | |
}; | |
volatile float sink = 0.0f; | |
#if defined(_MSC_VER) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cMake/FreeCAD_Helpers/SetupPython.cmake b/cMake/FreeCAD_Helpers/SetupPython.cmake | |
index a2887affcb..6043fba779 100644 | |
--- a/cMake/FreeCAD_Helpers/SetupPython.cmake | |
+++ b/cMake/FreeCAD_Helpers/SetupPython.cmake | |
@@ -18,4 +18,12 @@ macro(SetupPython) | |
message(FATAL_ERROR "To build FreeCAD you need at least Python 3.8\n") | |
endif() | |
+ # If a custom Python directory was passed in, then save it as PYTHON_HOME_DIR, | |
+ # which is used by config.h.cmake when generating the config header file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | |
cd $SCRIPT_DIR | |
cd coin | |
# rm -rf bld | |
mkdir -p bld && cd bld | |
cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ | |
-DCOIN_BUILD_SHARED_LIBS=1 -DCOIN_BUILD_EXAMPLES=1 -DCOIN_BUILD_TRACY_PROFILER=0 \ |
Welcome to the new Python-based binding system for exposing FreeCAD C++ APIs to Python. This system replaces the previous XML-based approach with a more direct and flexible Python interface, allowing C++ developers to define Python bindings using native Python syntax, type annotations, and decorators.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | |
cd $SCRIPT_DIR | |
cd FreeCAD | |
# rm -rf bld | |
mkdir -p bld && cd bld | |
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ | |
-DCMAKE_INSTALL_MODE=SYMLINK \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Analyzing build trace from 'FreeCAD/bld-time/trace.out'... | |
**** Time summary: | |
Compilation (2324 times): | |
Parsing (frontend): 28802.2 s | |
Codegen & opts (backend): 1670.7 s | |
**** Files that took longest to parse (compiler frontend): | |
109871 ms: traces/qrc_resource.cpp.json | |
109871 ms: traces/src/Gui/CMakeFiles/FreeCADGui.dir/qrc_resource.cpp.json | |
59126 ms: traces/SketchObject.cpp.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Options: | |
Date: 2021-07-05 18:21:48 | |
Version: 5.111 | |
Tip: To override a DTO option, remove "//" prefix before updating | |
BaseUrl: https://localhost:5001 | |
//Package: | |
//AddServiceStackTypes: True | |
//AddResponseStatus: False | |
//AddImplicitVersion: |
NewerOlder