[Import] remove unused includes and Xerces

This commit is contained in:
Uwe
2022-03-20 19:03:52 +01:00
parent d41f55f382
commit c9d28b542f
9 changed files with 185 additions and 232 deletions

View File

@@ -20,13 +20,11 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#if defined(__MINGW32__)
# define WNT // avoid conflict with GUID
#endif
#ifndef _PreComp_
# include <Python.h>
# include <climits>
#if defined(__clang__)
# pragma clang diagnostic push

View File

@@ -1,92 +1,91 @@
if(MSVC)
add_definitions(-DFCAppImport -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
endif(MSVC)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${XercesC_INCLUDE_DIRS}
)
link_directories(${OCC_LIBRARY_DIR})
set(Import_LIBS
Part
#Assembly
${OCC_OCAF_LIBRARIES}
${OCC_OCAF_DEBUG_LIBRARIES}
)
SET(Import_SRCS
AppImport.cpp
AppImportPy.cpp
ExportOCAF.cpp
ExportOCAF.h
ImportOCAF.cpp
ImportOCAF.h
ImportOCAF2.cpp
ImportOCAF2.h
#ImportOCAFAssembly.cpp
#ImportOCAFAssembly.h
StepShapePy.xml
StepShape.h
StepShape.cpp
StepShapePyImp.cpp
PreCompiled.cpp
PreCompiled.h
ImpExpDxf.cpp
ImpExpDxf.h
dxf.cpp
dxf.h
)
SET(SCL_Resources
SCL/__init__.py
SCL/AggregationDataTypes.py
SCL/BaseType.py
SCL/Builtin.py
SCL/ConstructedDataTypes.py
SCL/essa_par.py
SCL/Model.py
SCL/Part21.py
SCL/Rules.py
SCL/SCLBase.py
SCL/SimpleDataTypes.py
SCL/TypeChecker.py
SCL/Utils.py
SCL/SimpleReader.py
SCL/Aufspannung.stp
SCL/gasket1.p21
SCL/Product1.stp
automotive_design.py # AP214e3
ifc2x3.py # IFC
ifc4.py # IFC 4
PlmXmlParser.py
)
SOURCE_GROUP("SCL" FILES ${SCL_Resources})
generate_from_xml(StepShapePy)
add_library(Import SHARED ${Import_SRCS})
target_link_libraries(Import ${Import_LIBS})
ADD_CUSTOM_TARGET(ImportPy ALL
SOURCES ${SCL_Resources}
)
fc_target_copy_resource(ImportPy
${CMAKE_SOURCE_DIR}/src/Mod/Import/App
${CMAKE_BINARY_DIR}/Mod/Import
${SCL_Resources})
SET_BIN_DIR(Import Import /Mod/Import)
SET_PYTHON_PREFIX_SUFFIX(Import)
INSTALL(TARGETS Import DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(MSVC)
add_definitions(-DFCAppImport -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
endif(MSVC)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
)
link_directories(${OCC_LIBRARY_DIR})
set(Import_LIBS
Part
#Assembly
${OCC_OCAF_LIBRARIES}
${OCC_OCAF_DEBUG_LIBRARIES}
)
SET(Import_SRCS
AppImport.cpp
AppImportPy.cpp
ExportOCAF.cpp
ExportOCAF.h
ImportOCAF.cpp
ImportOCAF.h
ImportOCAF2.cpp
ImportOCAF2.h
#ImportOCAFAssembly.cpp
#ImportOCAFAssembly.h
StepShapePy.xml
StepShape.h
StepShape.cpp
StepShapePyImp.cpp
PreCompiled.cpp
PreCompiled.h
ImpExpDxf.cpp
ImpExpDxf.h
dxf.cpp
dxf.h
)
SET(SCL_Resources
SCL/__init__.py
SCL/AggregationDataTypes.py
SCL/BaseType.py
SCL/Builtin.py
SCL/ConstructedDataTypes.py
SCL/essa_par.py
SCL/Model.py
SCL/Part21.py
SCL/Rules.py
SCL/SCLBase.py
SCL/SimpleDataTypes.py
SCL/TypeChecker.py
SCL/Utils.py
SCL/SimpleReader.py
SCL/Aufspannung.stp
SCL/gasket1.p21
SCL/Product1.stp
automotive_design.py # AP214e3
ifc2x3.py # IFC
ifc4.py # IFC 4
PlmXmlParser.py
)
SOURCE_GROUP("SCL" FILES ${SCL_Resources})
generate_from_xml(StepShapePy)
add_library(Import SHARED ${Import_SRCS})
target_link_libraries(Import ${Import_LIBS})
ADD_CUSTOM_TARGET(ImportPy ALL
SOURCES ${SCL_Resources}
)
fc_target_copy_resource(ImportPy
${CMAKE_SOURCE_DIR}/src/Mod/Import/App
${CMAKE_BINARY_DIR}/Mod/Import
${SCL_Resources})
SET_BIN_DIR(Import Import /Mod/Import)
SET_PYTHON_PREFIX_SUFFIX(Import)
INSTALL(TARGETS Import DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@@ -49,9 +49,6 @@
#ifdef _PreComp_
// Python
#include <Python.h>
// standard
#include <list>
#include <iostream>
@@ -63,9 +60,6 @@
#include <vector>
#include <map>
// Xerces
#include <xercesc/util/XercesDefs.hpp>
// OpenCasCade =====================================================================================
// Base
#include "OpenCascadeAll.h"

View File

@@ -21,20 +21,16 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <App/Application.h>
#include <Base/Console.h>
#include <Base/Interpreter.h>
#include <Base/PyObjectBase.h>
#include <Gui/Application.h>
#include "Workbench.h"
// use a different name to CreateCommand()
void CreateImportCommands(void);

View File

@@ -20,39 +20,32 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#if defined(__MINGW32__)
# define WNT // avoid conflict with GUID
#endif
#ifndef _PreComp_
# include <Python.h>
# include <iostream>
# include <climits>
# include <iostream>
# include <QApplication>
# include <QDialog>
# include <QDialogButtonBox>
# include <QPointer>
# include <QString>
# include <QStyle>
# include <QTreeWidget>
# include <QTreeWidgetItem>
# include <QTextStream>
# include <QHBoxLayout>
# include <QVBoxLayout>
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wextra-semi"
#endif
# include <Standard_Version.hxx>
# include <NCollection_Vector.hxx>
# include <BRep_Builder.hxx>
# include <TDocStd_Document.hxx>
# include <XCAFApp_Application.hxx>
# include <TDocStd_Document.hxx>
# include <XCAFApp_Application.hxx>
# include <XCAFDoc_DocumentTool.hxx>
# include <XCAFDoc_ShapeTool.hxx>
# include <XCAFDoc_ColorTool.hxx>
# include <XCAFDoc_Location.hxx>
# include <TDF_Label.hxx>
# include <TDF_LabelSequence.hxx>
# include <TDF_ChildIterator.hxx>
# include <TDataStd_Name.hxx>
# include <Quantity_Color.hxx>
# include <STEPCAFControl_Reader.hxx>
# include <STEPCAFControl_Writer.hxx>
# include <STEPControl_Writer.hxx>
# include <APIHeaderSection_MakeHeader.hxx>
# include <IGESCAFControl_Reader.hxx>
# include <IGESCAFControl_Writer.hxx>
# include <IGESControl_Controller.hxx>
@@ -60,80 +53,70 @@
# include <IGESData_IGESModel.hxx>
# include <IGESToBRep_Actor.hxx>
# include <Interface_Static.hxx>
# include <Transfer_TransientProcess.hxx>
# include <XSControl_WorkSession.hxx>
# include <XSControl_TransferReader.hxx>
# include <TopTools_IndexedMapOfShape.hxx>
# include <TopTools_MapOfShape.hxx>
# include <TopExp_Explorer.hxx>
# include <TopoDS_Iterator.hxx>
# include <APIHeaderSection_MakeHeader.hxx>
# include <OSD_Exception.hxx>
# include <Standard_Version.hxx>
# include <STEPCAFControl_Reader.hxx>
# include <STEPCAFControl_Writer.hxx>
# include <TColStd_IndexedDataMapOfStringString.hxx>
#if OCC_VERSION_HEX >= 0x070500
# include <RWGltf_CafWriter.hxx>
# include <Message_ProgressRange.hxx>
#endif
# include <TDataStd_Name.hxx>
# include <TDF_ChildIterator.hxx>
# include <TDF_Label.hxx>
# include <TDocStd_Document.hxx>
# include <XCAFApp_Application.hxx>
# include <XCAFDoc_ColorTool.hxx>
# include <XCAFDoc_DocumentTool.hxx>
# include <XCAFDoc_Location.hxx>
# include <XCAFDoc_ShapeTool.hxx>
# include <XSControl_TransferReader.hxx>
# include <XSControl_WorkSession.hxx>
#if OCC_VERSION_HEX >= 0x060500
# include <TDataXtd_Shape.hxx>
# else
# include <TDataStd_Shape.hxx>
# endif
#if OCC_VERSION_HEX >= 0x070500
# include <Message_ProgressRange.hxx>
# include <RWGltf_CafWriter.hxx>
#endif
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#endif
#include <CXX/Extensions.hxx>
#include <CXX/Objects.hxx>
#include <Base/PyObjectBase.h>
#include <Base/Console.h>
#include <App/Application.h>
#include <App/Document.h>
#include <App/DocumentObjectPy.h>
#include <Gui/Application.h>
#include <Base/Console.h>
#include <Base/PyObjectBase.h>
#include <Gui/MainWindow.h>
#include <Gui/Application.h>
#include <Gui/Command.h>
#include <Gui/Document.h>
#include <Gui/ViewProvider.h>
#include <Gui/ViewProviderLink.h>
#include <Mod/Import/App/ImportOCAF2.h>
#include <Mod/Part/Gui/ViewProvider.h>
#include <Mod/Part/App/PartFeature.h>
#include <Mod/Part/App/ProgressIndicator.h>
#include <Mod/Part/App/encodeFilename.h>
#include <Mod/Part/App/ImportIges.h>
#include <Mod/Part/App/ImportStep.h>
#include <Mod/Part/App/encodeFilename.h>
#include <Mod/Import/App/ImportOCAF2.h>
#include <Mod/Part/App/PartFeature.h>
#include <Mod/Part/App/ProgressIndicator.h>
#include <TDataStd.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_TreeNode.hxx>
#include <TDF_ChildIDIterator.hxx>
#include <TDF_AttributeIterator.hxx>
#include <TDF_Data.hxx>
#include <TDF_ChildIDIterator.hxx>
#include <TDF_IDList.hxx>
#include <TDF_ListIteratorOfIDList.hxx>
#include <TDF_TagSource.hxx>
#include <TDocStd_Owner.hxx>
#include <TNaming_NamedShape.hxx>
#include <TNaming_UsedShapes.hxx>
#include <XCAFDoc.hxx>
#include <XCAFDoc_Color.hxx>
#include <XCAFDoc_LayerTool.hxx>
#include <XCAFDoc_ShapeMapTool.hxx>
#include <QApplication>
#include <QDialog>
#include <QDialogButtonBox>
#include <QPointer>
#include <QStyle>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <QTextStream>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <Gui/Application.h>
#include <Gui/Document.h>
#include <Gui/ViewProvider.h>
#include <Gui/ViewProviderLink.h>
FC_LOG_LEVEL_INIT("Import", true, true)

View File

@@ -1,46 +1,45 @@
if(MSVC)
add_definitions(-DFCAppPart -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
endif(MSVC)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
${COIN3D_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${XercesC_INCLUDE_DIRS}
)
link_directories(${OCC_LIBRARY_DIR})
set(ImportGui_LIBS
FreeCADGui
PartGui
Import
${OCC_OCAF_LIBRARIES}
${OCC_OCAF_DEBUG_LIBRARIES}
)
SET(ImportGui_SRCS
AppImportGui.cpp
AppImportGuiPy.cpp
Command.cpp
PreCompiled.cpp
PreCompiled.h
Workbench.cpp
Workbench.h
)
add_library(ImportGui SHARED ${ImportGui_SRCS})
target_link_libraries(ImportGui ${ImportGui_LIBS})
SET_BIN_DIR(ImportGui ImportGui /Mod/Import)
SET_PYTHON_PREFIX_SUFFIX(ImportGui)
INSTALL(TARGETS ImportGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(MSVC)
add_definitions(-DFCAppPart -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
endif(MSVC)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
${COIN3D_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
)
link_directories(${OCC_LIBRARY_DIR})
set(ImportGui_LIBS
FreeCADGui
PartGui
Import
${OCC_OCAF_LIBRARIES}
${OCC_OCAF_DEBUG_LIBRARIES}
)
SET(ImportGui_SRCS
AppImportGui.cpp
AppImportGuiPy.cpp
Command.cpp
PreCompiled.cpp
PreCompiled.h
Workbench.cpp
Workbench.h
)
add_library(ImportGui SHARED ${ImportGui_SRCS})
target_link_libraries(ImportGui ${ImportGui_LIBS})
SET_BIN_DIR(ImportGui ImportGui /Mod/Import)
SET_PYTHON_PREFIX_SUFFIX(ImportGui)
INSTALL(TARGETS ImportGui DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@@ -20,18 +20,13 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <Base/Exception.h>
#include <Base/Tools.h>
#include <App/Document.h>
#include <Gui/Application.h>
#include <Gui/MainWindow.h>
#include <Gui/Command.h>
#include <Gui/FileDialog.h>
#include <Gui/MainWindow.h>
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

View File

@@ -50,9 +50,6 @@
#ifdef _PreComp_
// Python
#include <Python.h>
// standard
#include <list>
#include <iostream>
@@ -64,14 +61,10 @@
#include <string>
#include <set>
#include <Python.h>
#ifndef FC_OS_WIN32
# include <windows.h>
#endif
// Xerces
#include <xercesc/util/XercesDefs.hpp>
// OpenCasCade Base
#include "OpenCascadeAll.h"

View File

@@ -20,15 +20,11 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <qobject.h>
#endif
#include <Gui/ToolBarManager.h>
#include "Workbench.h"
#include <Gui/ToolBarManager.h>
using namespace ImportGui;