revert a not backportable fixe and its dependencies
This commit is contained in:
@@ -24,9 +24,6 @@
|
||||
#define RANGE_H
|
||||
|
||||
#include <string>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace App {
|
||||
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include "Vector3D.h"
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Base
|
||||
{
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QEventLoop>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Base {
|
||||
/**
|
||||
|
||||
+5
-7
@@ -25,13 +25,11 @@
|
||||
#ifndef BASE_FACTORY_H
|
||||
#define BASE_FACTORY_H
|
||||
|
||||
#include <typeinfo>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <list>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
#include<typeinfo>
|
||||
#include<string>
|
||||
#include<map>
|
||||
#include<list>
|
||||
#include"../FCConfig.h"
|
||||
|
||||
|
||||
namespace Base
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
// Std. configurations
|
||||
|
||||
#include <string>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Base
|
||||
{
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <typeinfo>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
class QAtomicInt;
|
||||
|
||||
|
||||
@@ -32,9 +32,6 @@
|
||||
#include <xercesc/util/XercesVersion.hpp>
|
||||
#include <xercesc/sax/InputSource.hpp>
|
||||
#include <QTextCodec>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
|
||||
XERCES_CPP_NAMESPACE_BEGIN
|
||||
|
||||
+1
-4
@@ -25,15 +25,12 @@
|
||||
#define BASE_MATRIX_H
|
||||
|
||||
#include <cassert>
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
#include "Vector3D.h"
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
#include <float.h>
|
||||
|
||||
namespace Base {
|
||||
|
||||
|
||||
+17
-21
@@ -22,34 +22,30 @@
|
||||
|
||||
#ifndef BASE_MEMDEBUG_H
|
||||
#define BASE_MEMDEBUG_H
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <crtdbg.h>
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Base
|
||||
{
|
||||
|
||||
|
||||
|
||||
// Std. configurations
|
||||
#if defined(_MSC_VER)
|
||||
class BaseExport MemCheck
|
||||
{
|
||||
public:
|
||||
MemCheck();
|
||||
~MemCheck();
|
||||
|
||||
void setNextCheckpoint();
|
||||
static bool checkMemory();
|
||||
static bool dumpLeaks();
|
||||
static bool isValidHeapPointer(const void*);
|
||||
|
||||
private:
|
||||
_CrtMemState s1, s2, s3;
|
||||
};
|
||||
#if defined(_MSC_VER)
|
||||
class BaseExport MemCheck
|
||||
{
|
||||
public:
|
||||
MemCheck();
|
||||
~MemCheck();
|
||||
|
||||
void setNextCheckpoint();
|
||||
static bool checkMemory();
|
||||
static bool dumpLeaks();
|
||||
static bool isValidHeapPointer(const void*);
|
||||
|
||||
private:
|
||||
_CrtMemState s1, s2, s3;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
} //namespace Base
|
||||
|
||||
#endif // BASE_MEMDEBUG_H
|
||||
|
||||
@@ -73,9 +73,6 @@ extern "C" { /* a C library, but callable from C++ */
|
||||
# undef _POSIX_C_SOURCE
|
||||
#endif // (re-)defined in pyconfig.h
|
||||
#include <Python.h>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
extern int PP_RELOAD; /* 1=reload py modules when attributes referenced */
|
||||
extern int PP_DEBUG; /* 1=start debugger when string/function/member run */
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
#define BASE_ROTATION_H
|
||||
|
||||
#include "Vector3D.h"
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Base {
|
||||
|
||||
|
||||
@@ -36,10 +36,7 @@
|
||||
// so we need not to check the version (because we only support _MSC_VER >= 1100)!
|
||||
#pragma once
|
||||
|
||||
#include <Windows.h>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
// special defines for VC5/6 (if no actual PSDK is installed):
|
||||
#if _MSC_VER < 1300
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
#ifndef BASE_TOOLS_H
|
||||
#define BASE_TOOLS_H
|
||||
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
+1
-4
@@ -28,14 +28,11 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cfloat>
|
||||
#include <cstdio>
|
||||
#include <stdio.h>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
#include "Vector3D.h"
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Base {
|
||||
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
|
||||
#include <CXX/Extensions.hxx>
|
||||
#include <CXX/Objects.hxx>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Base {
|
||||
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Base
|
||||
{
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
// Std. configurations
|
||||
|
||||
#include <string>
|
||||
#ifndef FC_GLOBAL_H
|
||||
#include <FCGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Base
|
||||
{
|
||||
|
||||
+33
-1
@@ -304,7 +304,39 @@ typedef unsigned __int64 uint64_t;
|
||||
|
||||
//**************************************************************************
|
||||
// Windows import export DLL defines
|
||||
#include <FCGlobal.h>
|
||||
#if defined (FC_OS_WIN32) || defined(FC_OS_CYGWIN)
|
||||
# ifdef FCApp
|
||||
# define AppExport __declspec(dllexport)
|
||||
# define DataExport __declspec(dllexport)
|
||||
# else
|
||||
# define AppExport __declspec(dllimport)
|
||||
# define DataExport __declspec(dllimport)
|
||||
# endif
|
||||
# ifdef FCBase
|
||||
# define BaseExport __declspec(dllexport)
|
||||
# else
|
||||
# define BaseExport __declspec(dllimport)
|
||||
# endif
|
||||
# ifdef FCGui
|
||||
# define GuiExport __declspec(dllexport)
|
||||
# else
|
||||
# define GuiExport __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# ifndef BaseExport
|
||||
# define BaseExport
|
||||
# endif
|
||||
# ifndef GuiExport
|
||||
# define GuiExport
|
||||
# endif
|
||||
# ifndef AppExport
|
||||
# define AppExport
|
||||
# endif
|
||||
# ifndef DataExport
|
||||
# define DataExport
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// here get the warnings of too long specifiers disabled (needed for VC6)
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2019 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
/** \file FCGlobal.h
|
||||
* \brief Include export or import macros.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef FC_GLOBAL_H
|
||||
#define FC_GLOBAL_H
|
||||
|
||||
|
||||
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || defined(__CYGWIN__)
|
||||
# define FREECAD_DECL_EXPORT __declspec(dllexport)
|
||||
# define FREECAD_DECL_IMPORT __declspec(dllimport)
|
||||
#else
|
||||
# define FREECAD_DECL_EXPORT
|
||||
# define FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
// FreeCADBase
|
||||
#ifdef FreeCADBase_EXPORTS
|
||||
# define BaseExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define BaseExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
// FreeCADApp
|
||||
#ifdef FreeCADApp_EXPORTS
|
||||
# define AppExport FREECAD_DECL_EXPORT
|
||||
# define DataExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define AppExport FREECAD_DECL_IMPORT
|
||||
# define DataExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
// FreeCADGui
|
||||
#ifdef FreeCADGui_EXPORTS
|
||||
# define GuiExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define GuiExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#endif //FC_GLOBAL_H
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef IMAGEBASE_H
|
||||
#define IMAGEBASE_H
|
||||
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
namespace Image
|
||||
{
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <App/GeoFeature.h>
|
||||
#include <App/PropertyFile.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
namespace Image
|
||||
{
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#else
|
||||
#include "GLImageBox.h"
|
||||
#endif
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
class QSlider;
|
||||
class QAction;
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#define IMAGE_ViewProviderImagePlane_H
|
||||
|
||||
#include <Gui/ViewProviderGeometryObject.h>
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
class SoCoordinate3;
|
||||
class SoDrawStyle;
|
||||
@@ -49,12 +48,12 @@ public:
|
||||
void attach(App::DocumentObject *pcObject);
|
||||
void setDisplayMode(const char* ModeName);
|
||||
std::vector<std::string> getDisplayModes() const;
|
||||
void updateData(const App::Property*);
|
||||
|
||||
private:
|
||||
bool loadSvg(const char*, float x, float y, QImage& img);
|
||||
|
||||
protected:
|
||||
void updateData(const App::Property*);
|
||||
|
||||
private:
|
||||
bool loadSvg(const char*, float x, float y, QImage& img);
|
||||
|
||||
protected:
|
||||
SoCoordinate3 * pcCoords;
|
||||
SoTexture2 * texture;
|
||||
};
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#define IMAGE_WORKBENCH_H
|
||||
|
||||
#include <Gui/Workbench.h>
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
namespace ImageGui {
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) Imetric 4D Imaging Sarl *
|
||||
* *
|
||||
* Author: Werner Mayer *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <FCGlobal.h>
|
||||
|
||||
#ifndef IMAGE_GLOBAL_H
|
||||
#define IMAGE_GLOBAL_H
|
||||
|
||||
|
||||
// Image
|
||||
#ifndef ImageExport
|
||||
#ifdef Image_EXPORTS
|
||||
# define ImageExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define ImageExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// ImageGui
|
||||
#ifndef ImageGuiExport
|
||||
#ifdef ImageGui_EXPORTS
|
||||
# define ImageGuiExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define ImageGuiExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //IMAGE_GLOBAL_H
|
||||
@@ -28,9 +28,6 @@
|
||||
#include <Mod/Mesh/App/WildMagic4/Wm4QuadricSurface.h>
|
||||
#include <Mod/Mesh/App/WildMagic4/Wm4Eigen.h>
|
||||
#include <Mod/Mesh/App/WildMagic4/Wm4ImplicitSurface.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <set>
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
#ifndef MESH_DEFINITIONS_H
|
||||
#define MESH_DEFINITIONS_H
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
// default values
|
||||
#define MESH_MIN_PT_DIST 1.0e-6f
|
||||
#define MESH_MIN_EDGE_LEN 1.0e-3f
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
#ifndef VISITOR_H
|
||||
#define VISITOR_H
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace MeshCore {
|
||||
|
||||
class MeshFacet;
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Mesh
|
||||
{
|
||||
|
||||
@@ -24,13 +24,10 @@
|
||||
#ifndef MESH_MESHPOINT_H
|
||||
#define MESH_MESHPOINT_H
|
||||
|
||||
#include <climits>
|
||||
#include <Base/Matrix.h>
|
||||
#include <Base/Vector3D.h>
|
||||
#include <Base/Handle.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
#include "Mesh.h"
|
||||
|
||||
using Base::Vector3d;
|
||||
|
||||
@@ -62,4 +59,4 @@ public:
|
||||
} // namespace Mesh
|
||||
|
||||
|
||||
#endif // MESH_MESHPOINT_H
|
||||
#endif // MESH_MESH_H
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
#ifndef MESHGUI_DLGSETTINGSIMPORTEXPORTIMP_H
|
||||
#define MESHGUI_DLGSETTINGSIMPORTEXPORTIMP_H
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
#include <Gui/PropertyPage.h>
|
||||
|
||||
namespace MeshGui {
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
#ifndef MESHGUI_DLGSETTINGSMESHVIEW_H
|
||||
#define MESHGUI_DLGSETTINGSMESHVIEW_H
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
#include <QDialog>
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
class QButtonGroup;
|
||||
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
#include <Gui/SelectionObject.h>
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Gui {
|
||||
class View3DInventorViewer;
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
#define MESHGUI_PROPERTYEDITOR_MESH_H
|
||||
|
||||
#include <Gui/propertyeditor/PropertyItem.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace MeshGui {
|
||||
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
#include <QWidget>
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
// forward declarations
|
||||
namespace Mesh { class Feature; }
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
#include <Inventor/engines/SoSubEngine.h>
|
||||
#include <Inventor/fields/SoSFBool.h>
|
||||
#include <Inventor/fields/SoMFColor.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
class SoGLCoordinateElement;
|
||||
class SoTextureCoordinateBundle;
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
#include <Inventor/nodes/SoSubNode.h>
|
||||
#include <Inventor/nodes/SoShape.h>
|
||||
#include <Inventor/elements/SoReplacedElement.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace MeshGui {
|
||||
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
#ifndef MESH_WORKBENCH_H
|
||||
#define MESH_WORKBENCH_H
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
#include <Gui/Workbench.h>
|
||||
|
||||
namespace MeshGui {
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2019 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <FCGlobal.h>
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#define MESH_GLOBAL_H
|
||||
|
||||
|
||||
// Mesh
|
||||
#ifndef MeshExport
|
||||
#ifdef Mesh_EXPORTS
|
||||
# define MeshExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define MeshExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// MeshGui
|
||||
#ifndef MeshGuiExport
|
||||
#ifdef MeshGui_EXPORTS
|
||||
# define MeshGuiExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define MeshGuiExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //MESH_GLOBAL_H
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <Mod/Part/App/PartFeature.h>
|
||||
#include <Mod/PartDesign/PartDesignGlobal.h>
|
||||
|
||||
class gp_Pnt;
|
||||
class gp_Pln;
|
||||
|
||||
@@ -70,11 +70,6 @@ ShapeBinder::~ShapeBinder()
|
||||
this->connectDocumentChangedObject.disconnect();
|
||||
}
|
||||
|
||||
void ShapeBinder::onChanged(const App::Property* prop)
|
||||
{
|
||||
Feature::onChanged(prop);
|
||||
}
|
||||
|
||||
short int ShapeBinder::mustExecute(void) const {
|
||||
|
||||
if (Support.isTouched())
|
||||
@@ -85,45 +80,29 @@ short int ShapeBinder::mustExecute(void) const {
|
||||
return Part::Feature::mustExecute();
|
||||
}
|
||||
|
||||
Part::TopoShape ShapeBinder::updatedShape() const
|
||||
{
|
||||
Part::TopoShape shape;
|
||||
App::GeoFeature* obj = nullptr;
|
||||
std::vector<std::string> subs;
|
||||
|
||||
ShapeBinder::getFilteredReferences(&Support, obj, subs);
|
||||
|
||||
//if we have a link we rebuild the shape, but we change nothing if we are a simple copy
|
||||
if (obj) {
|
||||
shape = ShapeBinder::buildShapeFromReferences(obj, subs);
|
||||
//now, shape is in object's CS, and includes local Placement of obj but nothing else.
|
||||
|
||||
if (TraceSupport.getValue()) {
|
||||
//compute the transform, and apply it to the shape.
|
||||
Base::Placement sourceCS = //full placement of container of obj
|
||||
obj->globalPlacement() * obj->Placement.getValue().inverse();
|
||||
Base::Placement targetCS = //full placement of container of this shapebinder
|
||||
this->globalPlacement() * this->Placement.getValue().inverse();
|
||||
Base::Placement transform = targetCS.inverse() * sourceCS;
|
||||
shape.setPlacement(transform * shape.getPlacement());
|
||||
}
|
||||
}
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
||||
bool ShapeBinder::hasPlacementChanged() const
|
||||
{
|
||||
Part::TopoShape shape(updatedShape());
|
||||
Base::Placement placement(shape.getTransform());
|
||||
return this->Placement.getValue() != placement;
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn* ShapeBinder::execute(void) {
|
||||
|
||||
if (!this->isRestoring()) {
|
||||
Part::TopoShape shape(updatedShape());
|
||||
if (!shape.isNull()) {
|
||||
App::GeoFeature* obj = nullptr;
|
||||
std::vector<std::string> subs;
|
||||
|
||||
ShapeBinder::getFilteredReferences(&Support, obj, subs);
|
||||
|
||||
//if we have a link we rebuild the shape, but we change nothing if we are a simple copy
|
||||
if (obj) {
|
||||
Part::TopoShape shape(ShapeBinder::buildShapeFromReferences(obj, subs));
|
||||
//now, shape is in object's CS, and includes local Placement of obj but nothing else.
|
||||
|
||||
if (TraceSupport.getValue()) {
|
||||
//compute the transform, and apply it to the shape.
|
||||
Base::Placement sourceCS = //full placement of container of obj
|
||||
obj->globalPlacement() * obj->Placement.getValue().inverse();
|
||||
Base::Placement targetCS = //full placement of container of this shapebinder
|
||||
this->globalPlacement() * this->Placement.getValue().inverse();
|
||||
Base::Placement transform = targetCS.inverse() * sourceCS;
|
||||
shape.setPlacement(transform * shape.getPlacement());
|
||||
}
|
||||
|
||||
this->Placement.setValue(shape.getTransform());
|
||||
this->Shape.setValue(shape);
|
||||
}
|
||||
@@ -132,8 +111,7 @@ App::DocumentObjectExecReturn* ShapeBinder::execute(void) {
|
||||
return Part::Feature::execute();
|
||||
}
|
||||
|
||||
void ShapeBinder::getFilteredReferences(const App::PropertyLinkSubList* prop,
|
||||
App::GeoFeature*& obj,
|
||||
void ShapeBinder::getFilteredReferences(App::PropertyLinkSubList* prop, App::GeoFeature*& obj,
|
||||
std::vector< std::string >& subobjects)
|
||||
{
|
||||
obj = nullptr;
|
||||
@@ -275,8 +253,7 @@ void ShapeBinder::slotChangedObject(const App::DocumentObject& Obj, const App::P
|
||||
if (obj) {
|
||||
if (obj == &Obj) {
|
||||
// the directly referenced object has changed
|
||||
if (hasPlacementChanged())
|
||||
enforceRecompute();
|
||||
enforceRecompute();
|
||||
}
|
||||
else if (Obj.hasExtension(App::GroupExtension::getExtensionClassTypeId())) {
|
||||
// check if the changed property belongs to a group-like object
|
||||
@@ -289,8 +266,7 @@ void ShapeBinder::slotChangedObject(const App::DocumentObject& Obj, const App::P
|
||||
|
||||
auto it = std::find(chain.begin(), chain.end(), &Obj);
|
||||
if (it != chain.end()) {
|
||||
if (hasPlacementChanged())
|
||||
enforceRecompute();
|
||||
enforceRecompute();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <boost_signals2.hpp>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include <Mod/Part/App/DatumFeature.h>
|
||||
#include <Mod/PartDesign/PartDesignGlobal.h>
|
||||
|
||||
namespace PartDesign
|
||||
{
|
||||
@@ -52,7 +51,7 @@ public:
|
||||
App::PropertyLinkSubListGlobal Support;
|
||||
App::PropertyBool TraceSupport;
|
||||
|
||||
static void getFilteredReferences(const App::PropertyLinkSubList* prop, App::GeoFeature*& object, std::vector< std::string >& subobjects);
|
||||
static void getFilteredReferences(App::PropertyLinkSubList* prop, App::GeoFeature*& object, std::vector< std::string >& subobjects);
|
||||
static Part::TopoShape buildShapeFromReferences(App::GeoFeature* obj, std::vector< std::string > subs);
|
||||
|
||||
const char* getViewProviderName(void) const override {
|
||||
@@ -60,12 +59,9 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
Part::TopoShape updatedShape() const;
|
||||
bool hasPlacementChanged() const;
|
||||
virtual void handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop) override;
|
||||
virtual short int mustExecute(void) const override;
|
||||
virtual App::DocumentObjectExecReturn* execute(void) override;
|
||||
virtual void onChanged(const App::Property* prop) override;
|
||||
|
||||
private:
|
||||
void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop);
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2021 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef PARTDESIGN_GLOBAL_H
|
||||
#define PARTDESIGN_GLOBAL_H
|
||||
|
||||
#include <FCGlobal.h>
|
||||
|
||||
|
||||
// PartDesign
|
||||
#ifndef PartDesignExport
|
||||
#ifdef PartDesign_EXPORTS
|
||||
# define PartDesignExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define PartDesignExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PartDesignGui
|
||||
#ifndef PartDesignGuiExport
|
||||
#ifdef PartDesignGui_EXPORTS
|
||||
# define PartDesignGuiExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define PartDesignGuiExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //PARTDESIGN_GLOBAL_H
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyGeo.h>
|
||||
#include <Mod/Points/PointsGlobal.h>
|
||||
|
||||
namespace Points
|
||||
{
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <Gui/ViewProviderPythonFeature.h>
|
||||
#include <Gui/ViewProviderBuilder.h>
|
||||
#include <Inventor/SbVec2f.h>
|
||||
#include <Mod/Points/PointsGlobal.h>
|
||||
|
||||
|
||||
class SoSwitch;
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#define POINTS_WORKBENCH_H
|
||||
|
||||
#include <Gui/Workbench.h>
|
||||
#include <Mod/Points/PointsGlobal.h>
|
||||
|
||||
namespace PointsGui {
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2019 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <FCGlobal.h>
|
||||
|
||||
#ifndef POINTS_GLOBAL_H
|
||||
#define POINTS_GLOBAL_H
|
||||
|
||||
|
||||
// Points
|
||||
#ifndef PointsExport
|
||||
#ifdef Points_EXPORTS
|
||||
# define PointsExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define PointsExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PointsGui
|
||||
#ifndef PointsGuiExport
|
||||
#ifdef PointsGui_EXPORTS
|
||||
# define PointsGuiExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define PointsGuiExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //POINTS_GLOBAL_H
|
||||
Reference in New Issue
Block a user