Skip to content

Commit

Permalink
Merge branch 'FreeCAD:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sasobadovinac committed May 1, 2024
2 parents 306d71a + 502f78e commit c0a53b5
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 34 deletions.
6 changes: 5 additions & 1 deletion cMake/FreeCAD_Helpers/CompilerChecksAndSetups.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ macro(CompilerChecksAndSetups)
endif()
else(BUILD_DYNAMIC_LINK_PYTHON)
if(CMAKE_COMPILER_IS_CLANGXX)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--undefined,dynamic_lookup")
if(APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup")
elseif(UNIX)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--undefined,dynamic_lookup")
endif()
endif()
endif(BUILD_DYNAMIC_LINK_PYTHON)
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
Expand Down
2 changes: 1 addition & 1 deletion src/App/MeasureManagerPy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ measureType : Measure.MeasureBasePython
The actual measure type.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getMeasureTypes" Static="true">
<Methode Name="getMeasureTypes" Static="true" NoArgs="true">
<Documentation>
<UserDocu>getMeasureTypes() -> List[(id, label, pythonMeasureType)]

Expand Down
6 changes: 3 additions & 3 deletions src/App/MeasureManagerPyImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ PyObject* MeasureManagerPy::addMeasureType(PyObject *args)
}


PyObject* MeasureManagerPy::getMeasureTypes(PyObject *args)
PyObject* MeasureManagerPy::getMeasureTypes()
{
Py::List types;
for (auto & it : MeasureManager::getMeasureTypes()) {
Expand All @@ -73,7 +73,7 @@ PyObject* MeasureManagerPy::getMeasureTypes(PyObject *args)
type.setItem(2, Py::Object(it->pythonClass));

types.append(type);
}
}

return Py::new_reference_to(types);
}
}
1 change: 1 addition & 0 deletions src/Doc/CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ Tomas Pavlicek (pavltom)
totyg
triplus
trzyha
Turan Furkan Topak
ulrich1a
UR_
Uwe Stöhr (donovaly)
Expand Down
3 changes: 0 additions & 3 deletions src/Gui/TaskMeasure.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,11 @@ class TaskMeasure : public TaskView::TaskDialog, public Gui::SelectionObserver {
void setMeasureObject(Measure::MeasureBase* obj);

private:
QColumnView* dialog{nullptr};

void onSelectionChanged(const Gui::SelectionChanges& msg) override;

Measure::MeasureBase *_mMeasureObject = nullptr;

QLineEdit* valueResult{nullptr};
QLabel* labelResult{nullptr};
QComboBox* modeSwitch{nullptr};

void removeObject();
Expand Down
6 changes: 5 additions & 1 deletion src/Mod/CAM/libarea/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ target_link_libraries(area area-native ${area_LIBS} ${area_native_LIBS})
# TODO why CMAKE_SHARED_LINKER_FLAGS is not used here?
# This is a dirty workaround!
if(NOT BUILD_DYNAMIC_LINK_PYTHON AND CMAKE_COMPILER_IS_CLANGXX)
target_link_libraries(area "-Wl,--undefined,dynamic_lookup")
if(APPLE)
target_link_libraries(area "-Wl,-undefined,dynamic_lookup")
else(UNIX)
target_link_libraries(area "-Wl,--undefined,dynamic_lookup")
endif()
endif()

SET_BIN_DIR(area area /Mod/CAM)
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Measure/App/MeasureBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class MeasureExport MeasureBase : public App::DocumentObject
virtual QString getResultString();

virtual std::vector<std::string> getInputProps();
virtual App::Property* getResultProp() {return {};};
virtual App::Property* getResultProp() {return {};}
virtual Base::Placement getPlacement();

// Return the objects that are measured
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Measure/App/MeasureLength.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class MeasureExport MeasureLength : public Measure::MeasureBaseExtendable<Part::
App::Property* getResultProp() override {return &this->Length;}

// Return a placement for the viewprovider, just use the first element for now
Base::Placement getPlacement();
Base::Placement getPlacement() override;

// Return the object we are measuring
std::vector<App::DocumentObject*> getSubject() const override;
Expand Down
3 changes: 1 addition & 2 deletions src/Mod/Measure/Gui/Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ using namespace std;

void CreateMeasureCommands() {
Base::Console().Message("Init MeasureGui\n");
Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager();
}
}
7 changes: 0 additions & 7 deletions src/Mod/Part/App/MeasureClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@
#include <Base/Rotation.h>
#include <Base/Vector3D.h>

#include <Mod/Measure/App/MeasureAngle.h>
#include <Mod/Measure/App/MeasureDistance.h>
#include <Mod/Measure/App/MeasureLength.h>
#include <Mod/Measure/App/MeasurePosition.h>
#include <Mod/Measure/App/MeasureArea.h>
#include <Mod/Measure/App/MeasureRadius.h>

#include "VectorAdapter.h"
#include "PartFeature.h"

Expand Down
1 change: 1 addition & 0 deletions src/Mod/Part/App/TopoShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4081,6 +4081,7 @@ bool TopoShape::findPlane(gp_Pln& pln, double tol, double atol) const
}
#else
bool TopoShape::findPlane(gp_Pln &pln, double tol, double atol) const {
(void)atol;
if(_Shape.IsNull())
return false;
TopoDS_Shape shape = _Shape;
Expand Down
1 change: 0 additions & 1 deletion src/Mod/PartDesign/App/FeatureExtrude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ App::DocumentObjectExecReturn* FeatureExtrude::buildExtrusion(ExtrudeOptions opt
bool makeface = options.testFlag(ExtrudeOption::MakeFace);
bool fuse = options.testFlag(ExtrudeOption::MakeFuse);
bool legacyPocket = options.testFlag(ExtrudeOption::LegacyPocket);
bool inverseDirection = options.testFlag(ExtrudeOption::InverseDirection);

std::string method(Type.getValueAsString());

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/PartDesign/App/FeatureSketchBased.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ TopoDS_Shape ProfileBased::getVerifiedFace(bool silent) const {
}

TopoShape ProfileBased::getTopoShapeVerifiedFace(bool silent,
bool doFit,
[[maybe_unused]]bool doFit, // TODO: Remove parameter
bool allowOpen,
const App::DocumentObject* profile,
const std::vector<std::string>& _subs) const
Expand Down
1 change: 0 additions & 1 deletion src/Mod/Sketcher/Gui/DrawSketchHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,6 @@ void DrawSketchHandler::createAutoConstraints(const std::vector<AutoConstraint>&
geoId2);
} break;
case Sketcher::Symmetric: {
Sketcher::PointPos posId2 = cstr.PosId;
Gui::cmdAppObjectArgs(
sketchgui->getObject(),
"addConstraint(Sketcher.Constraint('Symmetric',%d,1,%d,2,%d,%d)) ",
Expand Down
1 change: 0 additions & 1 deletion src/Mod/Start/App/ExamplesModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

using namespace Start;

FC_LOG_LEVEL_INIT(ExamplesModel)

ExamplesModel::ExamplesModel(QObject* parent)
: DisplayedFilesModel(parent)
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Start/Gui/AppStartGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ PyObject* initModule()
PyMOD_INIT_FUNC(StartGui)
{
static StartGui::StartLauncher* launcher = new StartGui::StartLauncher();
Q_UNUSED(launcher)

Base::Console().Log("Loading GUI of Start module... ");
PyObject* mod = StartGui::initModule();
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Start/Gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS}
${COIN3D_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
${QtCore_INCLUDE_DIRS}
${QtSvg_INCLUDE_DIRS}
Expand Down
10 changes: 5 additions & 5 deletions tests/src/App/DocumentObserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using namespace App;
using namespace Data;

class DocumentObserverTest: public ::testing::Test
class DISABLED_DocumentObserverTest: public ::testing::Test
{
protected:
static void SetUpTestSuite()
Expand All @@ -40,7 +40,7 @@ class DocumentObserverTest: public ::testing::Test
// NOLINTEND(cppcoreguidelines-non-private-member-variables-in-classes)
};

TEST_F(DocumentObserverTest, hasSubObject)
TEST_F(DISABLED_DocumentObserverTest, hasSubObject)
{
// Arrange

Expand Down Expand Up @@ -83,7 +83,7 @@ TEST_F(DocumentObserverTest, hasSubObject)
EXPECT_TRUE(hasSubObj);
}

TEST_F(DocumentObserverTest, hasSubElement)
TEST_F(DISABLED_DocumentObserverTest, hasSubElement)
{
// Arrange

Expand Down Expand Up @@ -127,7 +127,7 @@ TEST_F(DocumentObserverTest, hasSubElement)
EXPECT_TRUE(hasSubEl);
}

TEST_F(DocumentObserverTest, normalize)
TEST_F(DISABLED_DocumentObserverTest, normalize)
{
// Arrange

Expand Down Expand Up @@ -307,7 +307,7 @@ TEST_F(DocumentObserverTest, normalize)
EXPECT_TRUE(normalizeConvertIndex);
}

TEST_F(DocumentObserverTest, normalized)
TEST_F(DISABLED_DocumentObserverTest, normalized)
{
// Arrange

Expand Down
1 change: 1 addition & 0 deletions tests/src/Mod/Part/App/TopoShapeExpansion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,7 @@ TEST_F(TopoShapeExpansionTest, makeElementThickSolid)
std::vector<TopoShape> shapes = {subFaces[0], subFaces[1]};
// Act
TopoShape& result = cube1TS.makeElementThickSolid(cube1TS, shapes, 0.1, 1e-07);
(void)result;
auto elements = elementMap(cube1TS);
// Assert
EXPECT_EQ(cube1TS.countSubElements("Wire"), 16);
Expand Down
10 changes: 5 additions & 5 deletions tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ TEST_F(TopoShapeMakeShapeWithElementMapTests, findMakerOpInElementMap)
EXPECT_EQ(tmpShape.getElementMapSize(), 26);

// For all the mappedElements ...
for (const auto& mappedElement : tmpShape.getElementMap()) {
// TODO: This no longer works, it needs a different check. We don't set MAK
// EXPECT_NE(mappedElement.name.find(OpCodes::Maker),
// -1); // ... we check that there's the "MAK" OpCode
}
// for (const auto& mappedElement : tmpShape.getElementMap()) {
// TODO: This no longer works, it needs a different check. We don't set MAK
// EXPECT_NE(mappedElement.name.find(OpCodes::Maker),
// -1); // ... we check that there's the "MAK" OpCode
//}
}
}

Expand Down

0 comments on commit c0a53b5

Please sign in to comment.