Skip to content

Commit

Permalink
Merge branch 'FreeCAD:main' into CarbonCopy_Fix_SketchArchPython
Browse files Browse the repository at this point in the history
  • Loading branch information
Syres916 authored Nov 30, 2024
2 parents c0ff6aa + 9f0e9a2 commit c516701
Show file tree
Hide file tree
Showing 592 changed files with 37,162 additions and 28,506 deletions.
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/PROBLEM_REPORT.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Report a Problem
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
labels: ["Status: Needs triage"]
labels: ["Status: Needs triage","Status: Needs confirmation"]
body:
- type: checkboxes
id: existing_issue
Expand Down Expand Up @@ -40,6 +40,8 @@ body:
- Expressions
- FEM
- File formats
- Material
- Measurement
- Mesh
- OpenSCAD
- Part
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/sub_buildUbuntu2004.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ jobs:
libboost-thread-dev \
libcoin-dev \
libeigen3-dev \
libgts-bin \
libgts-dev \
libkdtree++-dev \
libmedc-dev \
libocct-data-exchange-dev \
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/sub_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,6 @@ jobs:
libboost-thread-dev \
libcoin-dev \
libeigen3-dev \
libgts-bin \
libgts-dev \
libkdtree++-dev \
libmedc-dev \
libocct-data-exchange-dev \
Expand Down
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ exclude: |
src/App/ExpressionParser.tab.h|
src/App/ExpressionParser.y|
src/App/lex.ExpressionParser.c|
src/Gui/3Dconnexion/navlib|
src/Gui/QSint|
src/Gui/Quarter|
src/Mod/Import/App/SCL|
src/Mod/Import/App/SCL_output|
src/Mod/Mesh/App/TestData|
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ if(FREECAD_USE_CCACHE)
find_program(CCACHE_PROGRAM ccache) #This check should occur before project()
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
message(NOTICE "-- Using ccache found at: " ${CCACHE_PROGRAM})
endif()
endif()

Expand Down
8 changes: 4 additions & 4 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ hostage in demands for "bounties" will not be entertained. Contact the FPA at fp

## Supported Versions

FreeCAD implements security fixes to the current release series, and to the current development on the master branch.
FreeCAD implements security fixes to the current release series, and to the current development on the main branch.

| Version | Supported |
|---------| ------------------ |
| 0.22dev | :white_check_mark: |
| 0.21 | :white_check_mark: |
| < 0.21 | :x: |
| 1.1dev | :white_check_mark: |
| 1.0 | :white_check_mark: |
| < 1.0 | :x: |

## Reporting a Vulnerability

Expand Down
9 changes: 3 additions & 6 deletions cMake/FindKDL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ IF ( CMAKE_PKGCONFIG_EXECUTABLE )

SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/")
MESSAGE( "Looking for KDL in: ${KDL_INSTALL}")
PKGCONFIG( "orocos-kdl >= 0.99" KDL_FOUND KDL_INCLUDE_DIRS KDL_DEFINES KDL_LINK_DIRS KDL_LIBS )
PKGCONFIG( "orocos-kdl >= 1.4.0" KDL_FOUND KDL_INCLUDE_DIRS KDL_DEFINES KDL_LINK_DIRS KDL_LIBS )

IF( KDL_FOUND )
MESSAGE(" Includes in: ${KDL_INCLUDE_DIRS}")
Expand All @@ -22,13 +22,10 @@ IF ( CMAKE_PKGCONFIG_EXECUTABLE )

INCLUDE_DIRECTORIES( ${KDL_INCLUDE_DIRS} )
LINK_DIRECTORIES( ${KDL_LINK_DIRS})
#OROCOS_PKGCONFIG_INCPATH("${KDLTK_INCLUDE_DIRS}")
#OROCOS_PKGCONFIG_LIBS("${KDL_LIBS}")
#OROCOS_PKGCONFIG_LIBPATH("${KDL_LINK_DIRS}")

SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:${OROCOS_INSTALL}/lib/pkgconfig")
MESSAGE( "Looking for KDL Toolkit in: ${PKG_CONFIG_PATH}")
PKGCONFIG( "orocos-kdltk-${OROCOS_TARGET} >= 0.99" KDLTK_FOUND KDLTK_INCLUDE_DIRS KDLTK_DEFINES KDLTK_LINK_DIRS KDLTK_LIBS )
PKGCONFIG( "orocos-kdltk-${OROCOS_TARGET} >= 1.4.0" KDLTK_FOUND KDLTK_INCLUDE_DIRS KDLTK_DEFINES KDLTK_LINK_DIRS KDLTK_LIBS )
IF(KDLTK_FOUND)
INCLUDE_DIRECTORIES( ${KDLTK_INCLUDE_DIRS} )
LINK_DIRECTORIES( ${KDLTK_LINK_DIRS})
Expand All @@ -38,7 +35,7 @@ IF ( CMAKE_PKGCONFIG_EXECUTABLE )
IF(CORBA_ENABLED)
SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:${OROCOS_INSTALL}/lib/pkgconfig")
MESSAGE("Looking for KDL Toolkit CORBA extension in ${PKG_CONFIG_PATH}")
PKGCONFIG( "orocos-kdltk-corba-${OROCOS_TARGET} >= 0.99" KDLTKCORBA_FOUND KDLTKCORBA_INCLUDE_DIRS KDLTKCORBA_DEFINES KDLTKCORBA_LINK_DIRS KDLTKCORBA_LIBS )
PKGCONFIG( "orocos-kdltk-corba-${OROCOS_TARGET} >= 1.4.0" KDLTKCORBA_FOUND KDLTKCORBA_INCLUDE_DIRS KDLTKCORBA_DEFINES KDLTKCORBA_LINK_DIRS KDLTKCORBA_LIBS )
IF(KDLTKCORBA_FOUND)
INCLUDE_DIRECTORIES( ${KDLTKCORBA_INCLUDE_DIRS} )
LINK_DIRECTORIES( ${KDLTKCORBA_LINK_DIRS})
Expand Down
6 changes: 0 additions & 6 deletions cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ macro(InitializeFreeCADBuildOptions)
set(BUILD_SMESH ON )
endif()

# for Windows the minimum required cmake version is 3.4.3 to build the CAM module
if(WIN32 AND CMAKE_VERSION VERSION_LESS 3.4.3)
message(WARNING "Disable CAM, requires cmake >= 3.4.3 in order to build this module")
set(BUILD_CAM OFF )
endif()

# force build directory to be different to source directory
if (BUILD_FORCE_DIRECTORY)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
Expand Down
2 changes: 1 addition & 1 deletion contrib/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"redirectOutput": true,
"connect": {
"host": "localhost",
"port": 5678
"port": 5679
},
"pathMappings": [
{
Expand Down
6 changes: 5 additions & 1 deletion contrib/.vscode/scripts/VSCodeAutostartDebug.FCMacro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ from freecad.utils import get_python_exe
# By default it attempts to use Freecad's PID mistaking it for python.
# https://github.com/microsoft/debugpy/issues/262
debugpy.configure(python=get_python_exe())
debugpy.listen(('localhost', 5678))
# As of Python 3.12, debugpy runs a forwarding process that listens both on the port specified here for the debugger
# to connect to, but also on an internal port for the underlying pydevd within the python process to connect to. The
# default for that internal port is 5678, so we need to not duplicate it for the external port. Also, on Linux the
# attempt to spawn the forwarding process separately fails, so we force it to be internal to our main process.
debugpy.listen(('localhost', 5679),in_process_debug_adapter=True)

# Turns out you cannot probe debugpy to see if it is up:
# https://github.com/microsoft/debugpy/issues/974
Expand Down
4 changes: 2 additions & 2 deletions contrib/.vscode/scripts/WaitForDebugpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def check_socket(host, port):
return sock.connect_ex((host, port)) == 0

def main():
# DO NOT CHECK 5678 or debugpy will break
# Check other port manually opened instead
# DO NOT CHECK the actual port 5678/5879 or debugpy will break
# Check that the other port 39999 used as a flag is manually opened instead
attempt_counter = 0
while (not check_socket('localhost', 39999)) and attempt_counter < MAX_ATTEMPTS:
time.sleep(RETRY_DELAY_S)
Expand Down
12 changes: 12 additions & 0 deletions contrib/clion/GetCLionDebugPort.FCMacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pydevd
from multiprocessing.connection import Listener

print("CLion debugger macro running. Starting listener to get port")
listen = Listener(('localhost', 39998), backlog=1)
link = listen.accept()
port = link.recv()
link.close()
listen.close()
print("Port", port, "received, starting debugger. Check CLion to see if a breakpoint has been hit and continue")
pydevd.settrace(port=port)
print("Debugger operating, leaving macro.")
18 changes: 18 additions & 0 deletions contrib/clion/attach_pydevd.py.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- attach_pydevd.py.orig 2024-09-26 10:36:47.131066345 -0400
+++ attach_pydevd.py 2024-09-26 10:16:48.687714133 -0400
@@ -48,6 +48,15 @@
import add_code_to_python_process
show_debug_info_on_target_process = 0

Check warning on line 6 in contrib/clion/attach_pydevd.py.patch

View workflow job for this annotation

GitHub Actions / Lint / Lint

<-- trailing whitespace
+ print("attach_pydevd is trying to relay the port",setup['port'])
+ try:
+ from multiprocessing.connection import Client
+ link = Client(('localhost',39998))
+ link.send(setup['port'])
+ link.close()
+ except ConnectionError as ce:
+ pass
+
pydevd_dirname = os.path.dirname(os.path.dirname(__file__))

Check warning on line 17 in contrib/clion/attach_pydevd.py.patch

View workflow job for this annotation

GitHub Actions / Lint / Lint

<-- trailing whitespace
if sys.platform == 'win32':
Binary file added data/tests/mesh.3mf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/App/Annotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ PROPERTY_SOURCE(App::AnnotationLabel, App::DocumentObject)

AnnotationLabel::AnnotationLabel()
{
ADD_PROPERTY_TYPE(LabelText, (""), "Label",Prop_Output, "Text label of the annotation");
ADD_PROPERTY_TYPE(LabelText, (""), "Label", Prop_Output, "Text label of the annotation");
ADD_PROPERTY_TYPE(BasePosition, (Base::Vector3d()), "Label", Prop_Output, "Base position");
ADD_PROPERTY_TYPE(TextPosition, (Base::Vector3d()), "Label", Prop_Output, "Text position");
}
Expand Down
14 changes: 8 additions & 6 deletions src/App/Annotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
namespace App
{

class AppExport Annotation : public DocumentObject
class AppExport Annotation: public DocumentObject
{
PROPERTY_HEADER_WITH_OVERRIDE(App::Annotation);

Expand All @@ -45,12 +45,13 @@ class AppExport Annotation : public DocumentObject
App::PropertyVector Position;

/// returns the type name of the ViewProvider
const char* getViewProviderName() const override {
const char* getViewProviderName() const override
{
return "Gui::ViewProviderAnnotation";
}
};

class AppExport AnnotationLabel : public DocumentObject
class AppExport AnnotationLabel: public DocumentObject
{
PROPERTY_HEADER_WITH_OVERRIDE(App::AnnotationLabel);

Expand All @@ -64,12 +65,13 @@ class AppExport AnnotationLabel : public DocumentObject
App::PropertyVector TextPosition;

/// returns the type name of the ViewProvider
const char* getViewProviderName() const override {
const char* getViewProviderName() const override
{
return "Gui::ViewProviderAnnotationLabel";
}
};

} //namespace App
} // namespace App


#endif // APP_ANNOTATION_H
#endif // APP_ANNOTATION_H
13 changes: 12 additions & 1 deletion src/App/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2250,6 +2250,7 @@ void parseProgramOptions(int ac, char ** av, const string& exe, variables_map& v
("run-open,r", value<string>()->implicit_value(""),"Run a given test case (use 0 (zero) to run all tests). If no argument is provided then return list of all available tests. Keeps UI open after test(s) complete.")
("module-path,M", value< vector<string> >()->composing(),"Additional module paths")
("python-path,P", value< vector<string> >()->composing(),"Additional python paths")
("disable-addon", value< vector<string> >()->composing(),"Disable a given addon.")
("single-instance", "Allow to run a single instance of the application")
("safe-mode", "Force enable safe mode")
("pass", value< vector<string> >()->multitoken(), "Ignores the following arguments and pass them through to be used by a script")
Expand Down Expand Up @@ -2431,6 +2432,16 @@ void processProgramOptions(const variables_map& vm, std::map<std::string,std::st
Base::Interpreter().addPythonPath(It.c_str());
}

if (vm.count("disable-addon")) {
auto Addons = vm["disable-addon"].as< vector<string> >();
string temp;
for (const auto & It : Addons) {
temp += It + ";";
}
temp.erase(temp.end()-1);
mConfig["DisabledAddons"] = temp;
}

if (vm.count("input-file")) {
vector<string> files(vm["input-file"].as< vector<string> >());
int OpenFileCount=0;
Expand Down Expand Up @@ -3049,7 +3060,7 @@ void Application::LoadParameters()
}
}

#if defined(_MSC_VER) && BOOST_VERSION < 108300
#if defined(_MSC_VER) && BOOST_VERSION < 108200
// fix weird error while linking boost (all versions of VC)
// VS2010: https://forum.freecad.org/viewtopic.php?f=4&t=1886&p=12553&hilit=boost%3A%3Afilesystem%3A%3Aget#p12553
namespace boost { namespace program_options { std::string arg="arg"; } }
Expand Down
7 changes: 5 additions & 2 deletions src/App/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class AppExport Application
{

public:

//---------------------------------------------------------------------
// exported functions go here +++++++++++++++++++++++++++++++++++++++++
//---------------------------------------------------------------------
Expand Down Expand Up @@ -205,6 +204,8 @@ class AppExport Application
void closeActiveTransaction(bool abort=false, int id=0);
//@}

// NOLINTBEGIN
// clang-format off
/** @name Signals of the Application */
//@{
/// signal on new Document
Expand Down Expand Up @@ -311,7 +312,9 @@ class AppExport Application
boost::signals2::signal<void (const App::ExtensionContainer&, std::string extension)> signalBeforeAddingDynamicExtension;
/// signal after the extension was added
boost::signals2::signal<void (const App::ExtensionContainer&, std::string extension)> signalAddedDynamicExtension;
//@}
//@}
// clang-format off
// NOLINTEND


/** @name methods for parameter handling */
Expand Down
Loading

0 comments on commit c516701

Please sign in to comment.