FEM Post: Fix rebase errors

This commit is contained in:
Stefan Tröger 2016-05-14 07:59:10 +02:00 committed by wmayer
parent 4c9d4e1fdc
commit 836d5b1525
11 changed files with 1 additions and 5596 deletions

View File

@ -1,247 +0,0 @@
if(WIN32)
add_definitions(-DFCApp)
add_definitions(-DBOOST_DYN_LINK)
endif(WIN32)
# This causes some problems with the resource files to be found, especially with the StartPage
IF(RESOURCEDIR)
add_definitions(-DRESOURCEDIR="${RESOURCEDIR}")
ENDIF(RESOURCEDIR)
IF(DOCDIR)
add_definitions(-DDOCDIR="${DOCDIR}")
ENDIF(DOCDIR)
<<<<<<< 99c1373c94c4a8d3efa0cc0f558a8e523389a501
add_definitions(-DBOOST_${Boost_VERSION})
=======
#write relevant cmake variables to a file for later access with python. Exportet are all variables
#starting with BUILD. As the variable only exists if the user set it to ON a dict is useless, we
#use a python list for export.
set(_vars "const char CMakeVariables[] =\"cmake = [")
set(_delim "")
get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
if (${_variableName})
STRING(REGEX MATCH "^[_]?[^_]*" _prefix "${_variableName}_")
if(${_prefix} STREQUAL "BUILD")
STRING(REPLACE "\\" "\\\\" _name ${_variableName})
set(_vars "${_vars}${_delim}\\n\"\n\"\\\"${_name}\\\"")
set(_delim ",")
endif()
endif ()
endforeach()
set(_vars "${_vars}]\\n\" \n;")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CMakeScript.h "${_vars}" )
>>>>>>> Give access to cmake BUILD variables from python
include_directories(
${CMAKE_BINARY_DIR}/src
${CMAKE_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
${XercesC_INCLUDE_DIRS}
${QT_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
)
set(FreeCADApp_LIBS
FreeCADBase
${Boost_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTXML_LIBRARY}
)
generate_from_xml(DocumentPy)
generate_from_xml(DocumentObjectPy)
generate_from_xml(DocumentObjectGroupPy)
generate_from_xml(GeoFeaturePy)
generate_from_xml(GeoFeatureGroupPy)
generate_from_xml(OriginGroupPy)
generate_from_xml(PartPy)
generate_from_xml(ComplexGeoDataPy)
generate_from_xml(PropertyContainerPy)
generate_from_xml(MaterialPy)
generate_from_py(FreeCADInit InitScript.h)
generate_from_py(FreeCADTest TestScript.h)
SET(FreeCADApp_XML_SRCS
DocumentObjectGroupPy.xml
DocumentObjectPy.xml
GeoFeaturePy.xml
GeoFeatureGroupPy.xml
OriginGroupPy.xml
PartPy.xml
DocumentPy.xml
PropertyContainerPy.xml
ComplexGeoDataPy.xml
MaterialPy.xml
)
SOURCE_GROUP("XML" FILES ${FreeCADApp_XML_SRCS})
# The document stuff
SET(Document_CPP_SRCS
Annotation.cpp
Document.cpp
DocumentObject.cpp
DocumentObjectFileIncluded.cpp
DocumentObjectGroup.cpp
DocumentObjectGroupPyImp.cpp
GeoFeaturePyImp.cpp
DocumentObjectPyImp.cpp
DocumentObserver.cpp
DocumentObserverPython.cpp
DocumentPyImp.cpp
Expression.cpp
FeaturePython.cpp
FeatureTest.cpp
GeoFeature.cpp
GeoFeatureGroupPyImp.cpp
GeoFeatureGroup.cpp
OriginGroupPyImp.cpp
OriginGroup.cpp
PartPyImp.cpp
Part.cpp
Origin.cpp
Path.cpp
InventorObject.cpp
MeasureDistance.cpp
Placement.cpp
OriginFeature.cpp
Range.cpp
Transactions.cpp
VRMLObject.cpp
MaterialObject.cpp
MergeDocuments.cpp
)
SET(Document_HPP_SRCS
Annotation.h
Document.h
DocumentObject.h
DocumentObjectFileIncluded.h
DocumentObjectGroup.h
DocumentObserver.h
DocumentObserverPython.h
Expression.h
ExpressionVisitors.h
FeatureCustom.h
FeaturePython.h
FeaturePythonPyImp.h
FeaturePythonPyImp.inl
FeatureTest.h
GeoFeature.h
GeoFeatureGroup.h
OriginGroup.h
Part.h
Origin.h
Path.h
InventorObject.h
MeasureDistance.h
Placement.h
OriginFeature.h
Range.h
Transactions.h
VRMLObject.h
MaterialObject.h
MergeDocuments.h
)
SET(Document_SRCS
${Document_CPP_SRCS}
${Document_HPP_SRCS}
)
SOURCE_GROUP("Document" FILES ${Document_SRCS})
# The property stuff
SET(Properties_CPP_SRCS
DynamicProperty.cpp
ObjectIdentifier.cpp
Property.cpp
PropertyContainer.cpp
PropertyContainerPyImp.cpp
PropertyFile.cpp
PropertyGeo.cpp
PropertyLinks.cpp
PropertyPythonObject.cpp
PropertyStandard.cpp
PropertyUnits.cpp
PropertyExpressionEngine.cpp
)
SET(Properties_HPP_SRCS
DynamicProperty.h
ObjectIdentifier.h
Property.h
PropertyContainer.h
PropertyFile.h
PropertyGeo.h
PropertyLinks.h
PropertyPythonObject.h
PropertyStandard.h
PropertyUnits.h
PropertyExpressionEngine.h
)
SET(Properties_SRCS
${Properties_CPP_SRCS}
${Properties_HPP_SRCS}
)
SOURCE_GROUP("Properties" FILES ${Properties_SRCS})
SET(FreeCADApp_CPP_SRCS
${Document_CPP_SRCS}
${Properties_CPP_SRCS}
Application.cpp
ApplicationPy.cpp
Branding.cpp
ColorModel.cpp
ComplexGeoData.cpp
ComplexGeoDataPyImp.cpp
Enumeration.cpp
Material.cpp
MaterialPyImp.cpp
)
SET(FreeCADApp_HPP_SRCS
${Document_HPP_SRCS}
${Properties_HPP_SRCS}
Application.h
Branding.h
ColorModel.h
ComplexGeoData.h
Enumeration.h
Material.h
)
SET(FreeCADApp_SRCS
${FreeCADApp_CPP_SRCS}
${FreeCADApp_HPP_SRCS}
${FreeCADApp_XML_SRCS}
FreeCADInit.py
FreeCADTest.py
PreCompiled.cpp
PreCompiled.h
)
if(MSVC)
add_definitions(-D_PreComp_)
ADD_MSVC_PRECOMPILED_HEADER(FreeCADApp PreCompiled.h PreCompiled.cpp FreeCADApp_CPP_SRCS)
endif(MSVC)
add_library(FreeCADApp SHARED ${FreeCADApp_SRCS})
target_link_libraries(FreeCADApp ${FreeCADApp_LIBS})
SET_BIN_DIR(FreeCADApp FreeCADApp)
if(WIN32)
INSTALL(TARGETS FreeCADApp
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
else(WIN32)
INSTALL(TARGETS FreeCADApp
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif(WIN32)

File diff suppressed because it is too large Load Diff

View File

@ -1,311 +0,0 @@
/***************************************************************************
* Copyright (c) 2005 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 "PreCompiled.h"
#ifndef _PreComp_
# include <Inventor/actions/SoToVRML2Action.h>
# include <Inventor/VRMLnodes/SoVRMLGroup.h>
# include <Inventor/VRMLnodes/SoVRMLParent.h>
# include <Inventor/SbString.h>
# include <Inventor/nodes/SoGroup.h>
#endif
#include <Base/FileInfo.h>
#include <Base/Stream.h>
#include <zipios++/gzipoutputstream.h>
#include "SoFCDB.h"
#include "SoFCColorBar.h"
#include "SoFCColorLegend.h"
#include "SoFCColorGradient.h"
#include "SoFCSelection.h"
#include "SoFCBackgroundGradient.h"
#include "SoFCBoundingBox.h"
#include "SoFCSelection.h"
#include "SoFCUnifiedSelection.h"
#include "SoFCSelectionAction.h"
#include "SoFCInteractiveElement.h"
#include "SoFCUnifiedSelection.h"
#include "SoFCVectorizeSVGAction.h"
#include "SoFCVectorizeU3DAction.h"
#include "SoAxisCrossKit.h"
#include "SoTextLabel.h"
#include "SoNavigationDragger.h"
#include "Inventor/SoDrawingGrid.h"
#include "Inventor/SoAutoZoomTranslation.h"
#include "Inventor/MarkerBitmaps.h"
#include "SoFCCSysDragger.h"
#include "propertyeditor/PropertyItem.h"
#include "NavigationStyle.h"
#include "Flag.h"
#include "SelectionObject.h"
using namespace Gui;
using namespace Gui::Inventor;
using namespace Gui::PropertyEditor;
static SbBool init_done = false;
static SoGroup *storage = nullptr;
SbBool Gui::SoFCDB::isInitialized(void)
{
return init_done;
}
void Gui::SoFCDB::init()
{
SoInteraction ::init();
RotTransDragger ::initClass();
SoGLRenderActionElement ::initClass();
SoFCInteractiveElement ::initClass();
SoGLWidgetElement ::initClass();
SoFCColorBarBase ::initClass();
SoFCColorBar ::initClass();
SoFCColorLegend ::initClass();
SoFCColorGradient ::initClass();
SoFCBackgroundGradient ::initClass();
SoFCBoundingBox ::initClass();
SoFCSelection ::initClass();
SoFCUnifiedSelection ::initClass();
SoFCSelectionAction ::initClass();
SoFCDocumentAction ::initClass();
SoGLWidgetNode ::initClass();
SoFCEnableSelectionAction ::initClass();
SoFCEnableHighlightAction ::initClass();
SoFCSelectionColorAction ::initClass();
SoFCHighlightColorAction ::initClass();
SoFCDocumentObjectAction ::initClass();
SoGLSelectAction ::initClass();
SoVisibleFaceAction ::initClass();
SoBoxSelectionRenderAction ::initClass();
SoFCVectorizeSVGAction ::initClass();
SoFCVectorizeU3DAction ::initClass();
SoHighlightElementAction ::initClass();
SoSelectionElementAction ::initClass();
SoVRMLAction ::initClass();
SoSkipBoundingGroup ::initClass();
SoTextLabel ::initClass();
SoStringLabel ::initClass();
SoFrameLabel ::initClass();
TranslateManip ::initClass();
SoShapeScale ::initClass();
SoAxisCrossKit ::initClass();
SoRegPoint ::initClass();
SoDrawingGrid ::initClass();
SoAutoZoomTranslation ::initClass();
MarkerBitmaps ::initClass();
<<<<<<< d7d347b2d62ec685840e7db1c35863e659148981
SoFCCSysDragger ::initClass();
=======
SoVTKActor ::initClass();
>>>>>>> proof of concept
PropertyItem ::init();
PropertySeparatorItem ::init();
PropertyStringItem ::init();
PropertyFontItem ::init();
PropertyIntegerItem ::init();
PropertyIntegerConstraintItem ::init();
PropertyFloatItem ::init();
PropertyUnitItem ::init();
PropertyFloatConstraintItem ::init();
PropertyUnitConstraintItem ::init();
PropertyAngleItem ::init();
PropertyBoolItem ::init();
PropertyVectorItem ::init();
PropertyVectorDistanceItem ::init();
PropertyMatrixItem ::init();
PropertyPlacementItem ::init();
PropertyEnumItem ::init();
PropertyStringListItem ::init();
PropertyFloatListItem ::init();
PropertyIntegerListItem ::init();
PropertyColorItem ::init();
PropertyMaterialItem ::init();
PropertyMaterialListItem ::init();
PropertyFileItem ::init();
PropertyPathItem ::init();
PropertyTransientFileItem ::init();
PropertyLinkItem ::init();
NavigationStyle ::init();
UserNavigationStyle ::init();
InventorNavigationStyle ::init();
CADNavigationStyle ::init();
BlenderNavigationStyle ::init();
MayaGestureNavigationStyle ::init();
TouchpadNavigationStyle ::init();
GestureNavigationStyle ::init();
OpenCascadeNavigationStyle ::init();
GLGraphicsItem ::init();
GLFlagWindow ::init();
SelectionObject ::init();
qRegisterMetaType<Base::Vector3f>("Base::Vector3f");
qRegisterMetaType<Base::Vector3d>("Base::Vector3d");
qRegisterMetaType<Base::Quantity>("Base::Quantity");
qRegisterMetaType<QList<Base::Quantity> >("Base::QuantityList");
init_done = true;
assert(!storage);
storage = new SoGroup();
storage->ref();
}
void Gui::SoFCDB::finish()
{
// Coin doesn't provide a mechanism to free static members of own data types.
// Hence, we need to define a static method e.g. 'finish()' for all new types
// to invoke the private member function 'atexit_cleanup()'.
SoFCColorBarBase ::finish();
SoFCColorBar ::finish();
SoFCColorLegend ::finish();
SoFCColorGradient ::finish();
SoFCBackgroundGradient ::finish();
SoFCBoundingBox ::finish();
SoFCSelection ::finish();
SoFCSelectionAction ::finish();
SoFCDocumentAction ::finish();
SoFCDocumentObjectAction ::finish();
SoFCEnableSelectionAction ::finish();
SoFCEnableHighlightAction ::finish();
SoFCSelectionColorAction ::finish();
SoFCHighlightColorAction ::finish();
storage->unref();
storage = nullptr;
}
// buffer acrobatics for inventor ****************************************************
static char * buffer;
static size_t buffer_size = 0;
static std::string cReturnString;
static void *
buffer_realloc(void * bufptr, size_t size)
{
buffer = (char *)realloc(bufptr, size);
buffer_size = size;
return buffer;
}
const std::string& Gui::SoFCDB::writeNodesToString(SoNode * root)
{
SoOutput out;
buffer = (char *)malloc(1024);
buffer_size = 1024;
out.setBuffer(buffer, buffer_size, buffer_realloc);
if (root && root->getTypeId().isDerivedFrom(SoVRMLParent::getClassTypeId()))
out.setHeaderString("#VRML V2.0 utf8");
SoWriteAction wa(&out);
wa.apply(root);
cReturnString = buffer;
free(buffer);
return cReturnString;
}
bool Gui::SoFCDB::writeToVRML(SoNode* node, const char* filename, bool binary)
{
SoVRMLAction vrml2;
vrml2.setOverrideMode(true);
vrml2.apply(node);
SoToVRML2Action tovrml2;
tovrml2.apply(node);
SoVRMLGroup* vrmlRoot = tovrml2.getVRML2SceneGraph();
vrmlRoot->setInstancePrefix(SbString("o"));
vrmlRoot->ref();
std::string buffer = SoFCDB::writeNodesToString(vrmlRoot);
vrmlRoot->unref(); // release the memory as soon as possible
// restore old settings
vrml2.setOverrideMode(false);
vrml2.apply(node);
Base::FileInfo fi(filename);
if (binary) {
// We want to write compressed VRML but Coin 2.4.3 doesn't do it even though
// SoOutput::getAvailableCompressionMethods() delivers a string list that
// contains 'GZIP'. setCompression() was called directly after opening the file,
// returned true and no error message appeared but anyway it didn't work.
// Strange is that reading GZIPped VRML files works.
// So, we do the compression on our own.
Base::ofstream str(fi, std::ios::out | std::ios::binary);
zipios::GZIPOutputStream gzip(str);
if (gzip) {
gzip << buffer;
gzip.close();
return true;
}
}
else {
Base::ofstream str(fi, std::ios::out);
if (str) {
str << buffer;
str.close();
return true;
}
}
return false;
}
bool Gui::SoFCDB::writeToFile(SoNode* node, const char* filename, bool binary)
{
bool ret = false;
Base::FileInfo fi(filename);
// Write VRML V2.0
if (fi.hasExtension("wrl") || fi.hasExtension("vrml") || fi.hasExtension("wrz")) {
// If 'wrz' is set then force compression
if (fi.hasExtension("wrz"))
binary = true;
ret = SoFCDB::writeToVRML(node, filename, binary);
}
else if (fi.hasExtension("iv")) {
// Write Inventor in ASCII
std::string buffer = SoFCDB::writeNodesToString(node);
Base::ofstream str(Base::FileInfo(filename), std::ios::out);
if (str) {
str << buffer;
str.close();
ret = true;
}
}
return ret;
}
SoGroup* Gui::SoFCDB::getStorage()
{
assert(storage); //call init first.
return storage;
}

View File

@ -1,310 +0,0 @@
/***************************************************************************
* Copyright (c) 2005 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 "PreCompiled.h"
#ifndef _PreComp_
# include <Inventor/actions/SoToVRML2Action.h>
# include <Inventor/VRMLnodes/SoVRMLGroup.h>
# include <Inventor/VRMLnodes/SoVRMLParent.h>
# include <Inventor/SbString.h>
# include <Inventor/nodes/SoGroup.h>
#endif
#include <Base/FileInfo.h>
#include <Base/Stream.h>
#include <zipios++/gzipoutputstream.h>
#include "SoFCDB.h"
#include "SoFCColorBar.h"
#include "SoFCColorLegend.h"
#include "SoFCColorGradient.h"
#include "SoFCSelection.h"
#include "SoFCBackgroundGradient.h"
#include "SoFCBoundingBox.h"
#include "SoFCSelection.h"
#include "SoFCUnifiedSelection.h"
#include "SoFCSelectionAction.h"
#include "SoFCInteractiveElement.h"
#include "SoFCUnifiedSelection.h"
#include "SoFCVectorizeSVGAction.h"
#include "SoFCVectorizeU3DAction.h"
#include "SoAxisCrossKit.h"
#include "SoTextLabel.h"
#include "SoNavigationDragger.h"
#include "Inventor/SoDrawingGrid.h"
#include "Inventor/SoAutoZoomTranslation.h"
#include "Inventor/MarkerBitmaps.h"
#include "SoFCCSysDragger.h"
#include "propertyeditor/PropertyItem.h"
#include "NavigationStyle.h"
#include "Flag.h"
#include "SelectionObject.h"
using namespace Gui;
using namespace Gui::Inventor;
using namespace Gui::PropertyEditor;
static SbBool init_done = false;
static SoGroup *storage = nullptr;
SbBool Gui::SoFCDB::isInitialized(void)
{
return init_done;
}
void Gui::SoFCDB::init()
{
SoInteraction ::init();
RotTransDragger ::initClass();
SoGLRenderActionElement ::initClass();
SoFCInteractiveElement ::initClass();
SoGLWidgetElement ::initClass();
SoFCColorBarBase ::initClass();
SoFCColorBar ::initClass();
SoFCColorLegend ::initClass();
SoFCColorGradient ::initClass();
SoFCBackgroundGradient ::initClass();
SoFCBoundingBox ::initClass();
SoFCSelection ::initClass();
SoFCUnifiedSelection ::initClass();
SoFCSelectionAction ::initClass();
SoFCDocumentAction ::initClass();
SoGLWidgetNode ::initClass();
SoFCEnableSelectionAction ::initClass();
SoFCEnableHighlightAction ::initClass();
SoFCSelectionColorAction ::initClass();
SoFCHighlightColorAction ::initClass();
SoFCDocumentObjectAction ::initClass();
SoGLSelectAction ::initClass();
SoVisibleFaceAction ::initClass();
SoBoxSelectionRenderAction ::initClass();
SoFCVectorizeSVGAction ::initClass();
SoFCVectorizeU3DAction ::initClass();
SoHighlightElementAction ::initClass();
SoSelectionElementAction ::initClass();
SoVRMLAction ::initClass();
SoSkipBoundingGroup ::initClass();
SoTextLabel ::initClass();
SoStringLabel ::initClass();
SoFrameLabel ::initClass();
TranslateManip ::initClass();
SoShapeScale ::initClass();
SoAxisCrossKit ::initClass();
SoRegPoint ::initClass();
SoDrawingGrid ::initClass();
SoAutoZoomTranslation ::initClass();
MarkerBitmaps ::initClass();
<<<<<<< 09326bbbdaf756fe381d51d340e0db27fd8c452a
SoFCCSysDragger ::initClass();
=======
>>>>>>> Move post processing to fem objects
PropertyItem ::init();
PropertySeparatorItem ::init();
PropertyStringItem ::init();
PropertyFontItem ::init();
PropertyIntegerItem ::init();
PropertyIntegerConstraintItem ::init();
PropertyFloatItem ::init();
PropertyUnitItem ::init();
PropertyFloatConstraintItem ::init();
PropertyUnitConstraintItem ::init();
PropertyAngleItem ::init();
PropertyBoolItem ::init();
PropertyVectorItem ::init();
PropertyVectorDistanceItem ::init();
PropertyMatrixItem ::init();
PropertyPlacementItem ::init();
PropertyEnumItem ::init();
PropertyStringListItem ::init();
PropertyFloatListItem ::init();
PropertyIntegerListItem ::init();
PropertyColorItem ::init();
PropertyMaterialItem ::init();
PropertyMaterialListItem ::init();
PropertyFileItem ::init();
PropertyPathItem ::init();
PropertyTransientFileItem ::init();
PropertyLinkItem ::init();
NavigationStyle ::init();
UserNavigationStyle ::init();
InventorNavigationStyle ::init();
CADNavigationStyle ::init();
BlenderNavigationStyle ::init();
MayaGestureNavigationStyle ::init();
TouchpadNavigationStyle ::init();
GestureNavigationStyle ::init();
OpenCascadeNavigationStyle ::init();
GLGraphicsItem ::init();
GLFlagWindow ::init();
SelectionObject ::init();
qRegisterMetaType<Base::Vector3f>("Base::Vector3f");
qRegisterMetaType<Base::Vector3d>("Base::Vector3d");
qRegisterMetaType<Base::Quantity>("Base::Quantity");
qRegisterMetaType<QList<Base::Quantity> >("Base::QuantityList");
init_done = true;
assert(!storage);
storage = new SoGroup();
storage->ref();
}
void Gui::SoFCDB::finish()
{
// Coin doesn't provide a mechanism to free static members of own data types.
// Hence, we need to define a static method e.g. 'finish()' for all new types
// to invoke the private member function 'atexit_cleanup()'.
SoFCColorBarBase ::finish();
SoFCColorBar ::finish();
SoFCColorLegend ::finish();
SoFCColorGradient ::finish();
SoFCBackgroundGradient ::finish();
SoFCBoundingBox ::finish();
SoFCSelection ::finish();
SoFCSelectionAction ::finish();
SoFCDocumentAction ::finish();
SoFCDocumentObjectAction ::finish();
SoFCEnableSelectionAction ::finish();
SoFCEnableHighlightAction ::finish();
SoFCSelectionColorAction ::finish();
SoFCHighlightColorAction ::finish();
storage->unref();
storage = nullptr;
}
// buffer acrobatics for inventor ****************************************************
static char * buffer;
static size_t buffer_size = 0;
static std::string cReturnString;
static void *
buffer_realloc(void * bufptr, size_t size)
{
buffer = (char *)realloc(bufptr, size);
buffer_size = size;
return buffer;
}
const std::string& Gui::SoFCDB::writeNodesToString(SoNode * root)
{
SoOutput out;
buffer = (char *)malloc(1024);
buffer_size = 1024;
out.setBuffer(buffer, buffer_size, buffer_realloc);
if (root && root->getTypeId().isDerivedFrom(SoVRMLParent::getClassTypeId()))
out.setHeaderString("#VRML V2.0 utf8");
SoWriteAction wa(&out);
wa.apply(root);
cReturnString = buffer;
free(buffer);
return cReturnString;
}
bool Gui::SoFCDB::writeToVRML(SoNode* node, const char* filename, bool binary)
{
SoVRMLAction vrml2;
vrml2.setOverrideMode(true);
vrml2.apply(node);
SoToVRML2Action tovrml2;
tovrml2.apply(node);
SoVRMLGroup* vrmlRoot = tovrml2.getVRML2SceneGraph();
vrmlRoot->setInstancePrefix(SbString("o"));
vrmlRoot->ref();
std::string buffer = SoFCDB::writeNodesToString(vrmlRoot);
vrmlRoot->unref(); // release the memory as soon as possible
// restore old settings
vrml2.setOverrideMode(false);
vrml2.apply(node);
Base::FileInfo fi(filename);
if (binary) {
// We want to write compressed VRML but Coin 2.4.3 doesn't do it even though
// SoOutput::getAvailableCompressionMethods() delivers a string list that
// contains 'GZIP'. setCompression() was called directly after opening the file,
// returned true and no error message appeared but anyway it didn't work.
// Strange is that reading GZIPped VRML files works.
// So, we do the compression on our own.
Base::ofstream str(fi, std::ios::out | std::ios::binary);
zipios::GZIPOutputStream gzip(str);
if (gzip) {
gzip << buffer;
gzip.close();
return true;
}
}
else {
Base::ofstream str(fi, std::ios::out);
if (str) {
str << buffer;
str.close();
return true;
}
}
return false;
}
bool Gui::SoFCDB::writeToFile(SoNode* node, const char* filename, bool binary)
{
bool ret = false;
Base::FileInfo fi(filename);
// Write VRML V2.0
if (fi.hasExtension("wrl") || fi.hasExtension("vrml") || fi.hasExtension("wrz")) {
// If 'wrz' is set then force compression
if (fi.hasExtension("wrz"))
binary = true;
ret = SoFCDB::writeToVRML(node, filename, binary);
}
else if (fi.hasExtension("iv")) {
// Write Inventor in ASCII
std::string buffer = SoFCDB::writeNodesToString(node);
Base::ofstream str(Base::FileInfo(filename), std::ios::out);
if (str) {
str << buffer;
str.close();
ret = true;
}
}
return ret;
}
SoGroup* Gui::SoFCDB::getStorage()
{
assert(storage); //call init first.
return storage;
}

View File

@ -129,25 +129,6 @@
#include "WinNativeGestureRecognizers.h"
#include "Document.h"
/*
#include "SoVTKActor.h"
#include "vtkDataSetSurfaceFilter.h"
#include "vtkGeometryFilter.h"
#include "vtkLookupTable.h"
#include "vtkPointData.h"
#include "vtkCellData.h"
#include "vtkContourFilter.h"
#include "vtkCubeSource.h"
#include "vtkPlane.h"
#include "vtkCutter.h"
#include "vtkHedgeHog.h"
#include "vtkGlyph3D.h"
#include "vtkArrowSource.h"
#include "vtkPointSource.h"
#include "vtkRungeKutta4.h"
#include "vtkStreamTracer.h"
#include "vtkPointLocator.h"
*/
//#define FC_LOGGING_CB
using namespace Gui;
@ -546,7 +527,6 @@ void View3DInventorViewer::init()
cursor = QBitmap::fromData(QSize(PAN_WIDTH, PAN_HEIGHT), pan_bitmap);
mask = QBitmap::fromData(QSize(PAN_WIDTH, PAN_HEIGHT), pan_mask_bitmap);
panCursor = QCursor(cursor, mask, PAN_HOT_X, PAN_HOT_Y);
}
View3DInventorViewer::~View3DInventorViewer()

View File

@ -1,339 +0,0 @@
<<<<<<< 43b51b168bc838480fd6a0a4b9f67e0bf864a560
/***************************************************************************
* Copyright (c) 2008 Jürgen Riegel (juergen.riegel@web.de) *
* *
* 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 "PreCompiled.h"
#ifndef _PreComp_
# include <Python.h>
#endif
#include <Base/Console.h>
#include <Base/Interpreter.h>
#include <CXX/Extensions.hxx>
#include "FemMeshPy.h"
#include "FemMesh.h"
#include "FemMeshProperty.h"
#include "FemAnalysis.h"
#include "FemMeshObject.h"
#include "FemMeshShapeObject.h"
#include "FemMeshShapeNetgenObject.h"
#include "FemSetElementsObject.h"
#include "FemSetFacesObject.h"
#include "FemSetGeometryObject.h"
#include "FemSetNodesObject.h"
#include "HypothesisPy.h"
#include "FemConstraintBearing.h"
#include "FemConstraintFixed.h"
#include "FemConstraintForce.h"
#include "FemConstraintPressure.h"
#include "FemConstraintGear.h"
#include "FemConstraintPulley.h"
#include "FemConstraintDisplacement.h"
#include "FemResultObject.h"
#include "FemSolverObject.h"
#ifdef FC_USE_VTK
#include "FemPostPipeline.h"
#include "FemPostFilter.h"
#include "FemPostFunction.h"
#endif
namespace Fem {
extern PyObject* initModule();
}
/* Python entry */
PyMODINIT_FUNC initFem()
{
// load dependend module
try {
Base::Interpreter().loadModule("Part");
//Base::Interpreter().loadModule("Mesh");
}
catch(const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
return;
}
PyObject* femModule = Fem::initModule();
Base::Console().Log("Loading Fem module... done\n");
Fem::StdMeshers_Arithmetic1DPy ::init_type(femModule);
Fem::StdMeshers_AutomaticLengthPy ::init_type(femModule);
Fem::StdMeshers_NotConformAllowedPy ::init_type(femModule);
Fem::StdMeshers_MaxLengthPy ::init_type(femModule);
Fem::StdMeshers_LocalLengthPy ::init_type(femModule);
Fem::StdMeshers_QuadranglePreferencePy ::init_type(femModule);
Fem::StdMeshers_Quadrangle_2DPy ::init_type(femModule);
Fem::StdMeshers_MaxElementAreaPy ::init_type(femModule);
Fem::StdMeshers_Regular_1DPy ::init_type(femModule);
Fem::StdMeshers_UseExisting_1DPy ::init_type(femModule);
Fem::StdMeshers_UseExisting_2DPy ::init_type(femModule);
Fem::StdMeshers_CompositeSegment_1DPy ::init_type(femModule);
Fem::StdMeshers_Deflection1DPy ::init_type(femModule);
Fem::StdMeshers_LayerDistributionPy ::init_type(femModule);
Fem::StdMeshers_LengthFromEdgesPy ::init_type(femModule);
Fem::StdMeshers_MaxElementVolumePy ::init_type(femModule);
Fem::StdMeshers_MEFISTO_2DPy ::init_type(femModule);
Fem::StdMeshers_NumberOfLayersPy ::init_type(femModule);
Fem::StdMeshers_NumberOfSegmentsPy ::init_type(femModule);
Fem::StdMeshers_Prism_3DPy ::init_type(femModule);
Fem::StdMeshers_Projection_1DPy ::init_type(femModule);
Fem::StdMeshers_Projection_2DPy ::init_type(femModule);
Fem::StdMeshers_Projection_3DPy ::init_type(femModule);
Fem::StdMeshers_ProjectionSource1DPy ::init_type(femModule);
Fem::StdMeshers_ProjectionSource2DPy ::init_type(femModule);
Fem::StdMeshers_ProjectionSource3DPy ::init_type(femModule);
Fem::StdMeshers_QuadraticMeshPy ::init_type(femModule);
Fem::StdMeshers_RadialPrism_3DPy ::init_type(femModule);
Fem::StdMeshers_SegmentAroundVertex_0DPy ::init_type(femModule);
Fem::StdMeshers_SegmentLengthAroundVertexPy ::init_type(femModule);
Fem::StdMeshers_StartEndLengthPy ::init_type(femModule);
Fem::StdMeshers_TrianglePreferencePy ::init_type(femModule);
Fem::StdMeshers_Hexa_3DPy ::init_type(femModule);
// Add Types to module
Base::Interpreter().addType(&Fem::FemMeshPy::Type,femModule,"FemMesh");
// NOTE: To finish the initialization of our own type objects we must
// call PyType_Ready, otherwise we run into a segmentation fault, later on.
// This function is responsible for adding inherited slots from a type's base class.
Fem::FemAnalysis ::init();
Fem::FemAnalysisPython ::init();
Fem::DocumentObject ::init();
Fem::FeaturePython ::init();
Fem::FemMesh ::init();
Fem::FemMeshObject ::init();
Fem::FemMeshShapeObject ::init();
Fem::FemMeshShapeNetgenObject ::init();
Fem::PropertyFemMesh ::init();
Fem::FemSetObject ::init();
Fem::FemSetElementsObject ::init();
Fem::FemSetFacesObject ::init();
Fem::FemSetGeometryObject ::init();
Fem::FemSetNodesObject ::init();
Fem::Constraint ::init();
Fem::ConstraintBearing ::init();
Fem::ConstraintFixed ::init();
Fem::ConstraintForce ::init();
Fem::ConstraintPressure ::init();
Fem::ConstraintGear ::init();
Fem::ConstraintPulley ::init();
Fem::ConstraintDisplacement ::init();
Fem::FemResultObject ::init();
Fem::FemSolverObject ::init();
Fem::FemSolverObjectPython ::init();
#ifdef FC_USE_VTK
Fem::FemPostObject ::init();
Fem::FemPostPipeline ::init();
Fem::FemPostFilter ::init();
Fem::FemPostClipFilter ::init();
Fem::FemPostScalarClipFilter ::init();
Fem::FemPostWarpVectorFilter ::init();
Fem::FemPostCutFilter ::init();
Fem::FemPostFunction ::init();
Fem::FemPostFunctionProvider ::init();
Fem::FemPostPlaneFunction ::init();
Fem::FemPostSphereFunction ::init();
#endif
}
=======
/***************************************************************************
* Copyright (c) 2008 Jürgen Riegel (juergen.riegel@web.de) *
* *
* 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 "PreCompiled.h"
#ifndef _PreComp_
# include <Python.h>
#endif
#include <Base/Console.h>
#include <Base/Interpreter.h>
#include <CXX/Extensions.hxx>
#include "FemMeshPy.h"
#include "FemMesh.h"
#include "FemMeshProperty.h"
#include "FemAnalysis.h"
#include "FemMeshObject.h"
#include "FemMeshShapeObject.h"
#include "FemMeshShapeNetgenObject.h"
#include "FemSetElementsObject.h"
#include "FemSetFacesObject.h"
#include "FemSetGeometryObject.h"
#include "FemSetNodesObject.h"
#include "HypothesisPy.h"
#include "FemConstraintBearing.h"
#include "FemConstraintFixed.h"
#include "FemConstraintForce.h"
#include "FemConstraintPressure.h"
#include "FemConstraintGear.h"
#include "FemConstraintPulley.h"
#include "FemConstraintDisplacement.h"
#include "FemResultObject.h"
#include "FemSolverObject.h"
#ifdef FC_USE_VTK
#include "FemPostPipeline.h"
#include "FemPostFilter.h"
#include "FemPostFunction.h"
#include "PropertyPostDataObject.h"
#endif
namespace Fem {
extern PyObject* initModule();
}
/* Python entry */
PyMODINIT_FUNC initFem()
{
// load dependend module
try {
Base::Interpreter().loadModule("Part");
//Base::Interpreter().loadModule("Mesh");
}
catch(const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
return;
}
PyObject* femModule = Fem::initModule();
Base::Console().Log("Loading Fem module... done\n");
Fem::StdMeshers_Arithmetic1DPy ::init_type(femModule);
Fem::StdMeshers_AutomaticLengthPy ::init_type(femModule);
Fem::StdMeshers_NotConformAllowedPy ::init_type(femModule);
Fem::StdMeshers_MaxLengthPy ::init_type(femModule);
Fem::StdMeshers_LocalLengthPy ::init_type(femModule);
Fem::StdMeshers_QuadranglePreferencePy ::init_type(femModule);
Fem::StdMeshers_Quadrangle_2DPy ::init_type(femModule);
Fem::StdMeshers_MaxElementAreaPy ::init_type(femModule);
Fem::StdMeshers_Regular_1DPy ::init_type(femModule);
Fem::StdMeshers_UseExisting_1DPy ::init_type(femModule);
Fem::StdMeshers_UseExisting_2DPy ::init_type(femModule);
Fem::StdMeshers_CompositeSegment_1DPy ::init_type(femModule);
Fem::StdMeshers_Deflection1DPy ::init_type(femModule);
Fem::StdMeshers_LayerDistributionPy ::init_type(femModule);
Fem::StdMeshers_LengthFromEdgesPy ::init_type(femModule);
Fem::StdMeshers_MaxElementVolumePy ::init_type(femModule);
Fem::StdMeshers_MEFISTO_2DPy ::init_type(femModule);
Fem::StdMeshers_NumberOfLayersPy ::init_type(femModule);
Fem::StdMeshers_NumberOfSegmentsPy ::init_type(femModule);
Fem::StdMeshers_Prism_3DPy ::init_type(femModule);
Fem::StdMeshers_Projection_1DPy ::init_type(femModule);
Fem::StdMeshers_Projection_2DPy ::init_type(femModule);
Fem::StdMeshers_Projection_3DPy ::init_type(femModule);
Fem::StdMeshers_ProjectionSource1DPy ::init_type(femModule);
Fem::StdMeshers_ProjectionSource2DPy ::init_type(femModule);
Fem::StdMeshers_ProjectionSource3DPy ::init_type(femModule);
Fem::StdMeshers_QuadraticMeshPy ::init_type(femModule);
Fem::StdMeshers_RadialPrism_3DPy ::init_type(femModule);
Fem::StdMeshers_SegmentAroundVertex_0DPy ::init_type(femModule);
Fem::StdMeshers_SegmentLengthAroundVertexPy ::init_type(femModule);
Fem::StdMeshers_StartEndLengthPy ::init_type(femModule);
Fem::StdMeshers_TrianglePreferencePy ::init_type(femModule);
Fem::StdMeshers_Hexa_3DPy ::init_type(femModule);
// Add Types to module
Base::Interpreter().addType(&Fem::FemMeshPy::Type,femModule,"FemMesh");
// NOTE: To finish the initialization of our own type objects we must
// call PyType_Ready, otherwise we run into a segmentation fault, later on.
// This function is responsible for adding inherited slots from a type's base class.
Fem::FemAnalysis ::init();
Fem::FemAnalysisPython ::init();
Fem::DocumentObject ::init();
Fem::FeaturePython ::init();
Fem::FemMesh ::init();
Fem::FemMeshObject ::init();
Fem::FemMeshShapeObject ::init();
Fem::FemMeshShapeNetgenObject ::init();
Fem::PropertyFemMesh ::init();
Fem::FemSetObject ::init();
Fem::FemSetElementsObject ::init();
Fem::FemSetFacesObject ::init();
Fem::FemSetGeometryObject ::init();
Fem::FemSetNodesObject ::init();
Fem::Constraint ::init();
Fem::ConstraintBearing ::init();
Fem::ConstraintFixed ::init();
Fem::ConstraintForce ::init();
Fem::ConstraintPressure ::init();
Fem::ConstraintGear ::init();
Fem::ConstraintPulley ::init();
Fem::ConstraintDisplacement ::init();
Fem::FemResultObject ::init();
Fem::FemSolverObject ::init();
Fem::FemSolverObjectPython ::init();
#ifdef FC_USE_VTK
Fem::FemPostObject ::init();
Fem::FemPostPipeline ::init();
Fem::FemPostFilter ::init();
Fem::FemPostClipFilter ::init();
Fem::FemPostScalarClipFilter ::init();
Fem::FemPostWarpVectorFilter ::init();
Fem::FemPostCutFilter ::init();
Fem::FemPostFunction ::init();
Fem::FemPostFunctionProvider ::init();
Fem::FemPostPlaneFunction ::init();
Fem::FemPostSphereFunction ::init();
Fem::PropertyPostDataObject ::init();
#endif
}
>>>>>>> FreeCADify the vtk post processing

View File

@ -1,535 +0,0 @@
<<<<<<< 9049674212e3b4f1429e82bfa203304100632838
/***************************************************************************
* Copyright (c) 2008 Jürgen Riegel (juergen.riegel@web.de) *
* *
* 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 "PreCompiled.h"
#ifndef _PreComp_
# include <Python.h>
# include <memory>
#endif
#include <CXX/Extensions.hxx>
#include <CXX/Objects.hxx>
#include <Base/Console.h>
#include <Base/Tools.h>
#include <Base/VectorPy.h>
#include <Base/PlacementPy.h>
#include <App/Application.h>
#include <App/Document.h>
#include <App/DocumentObject.h>
#include <App/DocumentObjectPy.h>
//#include <Mod/Mesh/App/Core/MeshKernel.h>
//#include <Mod/Mesh/App/Core/Evaluation.h>
//#include <Mod/Mesh/App/Core/Iterator.h>
#include <SMESH_Gen.hxx>
#include <SMESH_Group.hxx>
#include <SMESHDS_Mesh.hxx>
#include <SMDS_MeshNode.hxx>
#include <StdMeshers_MaxLength.hxx>
#include <StdMeshers_LocalLength.hxx>
#include <StdMeshers_NumberOfSegments.hxx>
#include <StdMeshers_AutomaticLength.hxx>
#include <StdMeshers_TrianglePreference.hxx>
#include <StdMeshers_MEFISTO_2D.hxx>
#include <StdMeshers_Deflection1D.hxx>
#include <StdMeshers_MaxElementArea.hxx>
#include <StdMeshers_Regular_1D.hxx>
#include <StdMeshers_QuadranglePreference.hxx>
#include <StdMeshers_Quadrangle_2D.hxx>
#include <StdMeshers_LengthFromEdges.hxx>
#include <StdMeshers_NotConformAllowed.hxx>
#include <StdMeshers_Arithmetic1D.hxx>
#include "FemMesh.h"
#include "FemMeshObject.h"
#include "FemPostPipeline.h"
#include "FemMeshPy.h"
#include <cstdlib>
#include <Standard_Real.hxx>
#include <Base/Vector3D.h>
#include <Mod/Part/App/OCCError.h>
namespace Fem {
class Module : public Py::ExtensionModule<Module>
{
public:
Module() : Py::ExtensionModule<Module>("Fem")
{
add_varargs_method("open",&Module::open,
"open(string) -- Create a new document and a Mesh::Import feature to load the file into the document."
);
add_varargs_method("insert",&Module::insert,
"insert(string|mesh,[string]) -- Load or insert a mesh into the given or active document."
);
add_varargs_method("export",&Module::exporter,
"export(list,string) -- Export a list of objects into a single file."
);
add_varargs_method("read",&Module::read,
"Read a mesh from a file and returns a Mesh object."
);
add_varargs_method("show",&Module::show,
"show(shape) -- Add the shape to the active document or create one if no document exists."
);
initialize("This module is the Fem module."); // register with Python
}
virtual ~Module() {}
private:
virtual Py::Object invoke_method_varargs(void *method_def, const Py::Tuple &args)
{
try {
return Py::ExtensionModule<Module>::invoke_method_varargs(method_def, args);
}
catch (const Standard_Failure &e) {
std::string str;
Standard_CString msg = e.GetMessageString();
str += typeid(e).name();
str += " ";
if (msg) {str += msg;}
else {str += "No OCCT Exception Message";}
throw Py::Exception(Part::PartExceptionOCCError, str);
}
catch (const Base::Exception &e) {
throw Py::RuntimeError(e.what());
}
catch (const std::exception &e) {
throw Py::RuntimeError(e.what());
}
}
Py::Object open(const Py::Tuple& args)
{
char* Name;
if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
std::auto_ptr<FemMesh> mesh(new FemMesh);
mesh->read(EncodedName.c_str());
Base::FileInfo file(EncodedName.c_str());
// create new document and add Import feature
App::Document *pcDoc = App::GetApplication().newDocument("Unnamed");
FemMeshObject *pcFeature = static_cast<FemMeshObject *>
(pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str()));
pcFeature->Label.setValue(file.fileNamePure().c_str());
pcFeature->FemMesh.setValuePtr(mesh.get());
(void)mesh.release();
pcFeature->purgeTouched();
return Py::None();
}
Py::Object insert(const Py::Tuple& args)
{
char* Name;
const char* DocName = 0;
if (!PyArg_ParseTuple(args.ptr(), "et|s","utf-8",&Name,&DocName))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
App::Document *pcDoc = 0;
if (DocName)
pcDoc = App::GetApplication().getDocument(DocName);
else
pcDoc = App::GetApplication().getActiveDocument();
if (!pcDoc) {
pcDoc = App::GetApplication().newDocument(DocName);
}
Base::FileInfo file(EncodedName.c_str());
try {
std::auto_ptr<FemMesh> mesh(new FemMesh);
mesh->read(EncodedName.c_str());
FemMeshObject *pcFeature = static_cast<FemMeshObject *>
(pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str()));
pcFeature->Label.setValue(file.fileNamePure().c_str());
pcFeature->FemMesh.setValuePtr(mesh.get());
(void)mesh.release();
pcFeature->purgeTouched();
}
catch(Base::Exception& e) {
#ifdef FC_USE_VTK
if( FemPostPipeline::canRead(file) ) {
FemPostPipeline *pcFeature = static_cast<FemPostPipeline *>
(pcDoc->addObject("Fem::FemPostPipeline", file.fileNamePure().c_str()));
pcFeature->Label.setValue(file.fileNamePure().c_str());
pcFeature->read(file);
pcFeature->touch();
pcDoc->recomputeFeature(pcFeature);
}
else
throw e;
#else
throw e;
#endif
}
return Py::None();
}
Py::Object exporter(const Py::Tuple& args)
{
PyObject* object;
char* Name;
if (!PyArg_ParseTuple(args.ptr(), "Oet",&object,"utf-8",&Name))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
Py::Sequence list(object);
Base::Type meshId = Base::Type::fromName("Fem::FemMeshObject");
for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) {
PyObject* item = (*it).ptr();
if (PyObject_TypeCheck(item, &(App::DocumentObjectPy::Type))) {
App::DocumentObject* obj = static_cast<App::DocumentObjectPy*>(item)->getDocumentObjectPtr();
if (obj->getTypeId().isDerivedFrom(meshId)) {
static_cast<FemMeshObject*>(obj)->FemMesh.getValue().write(EncodedName.c_str());
break;
}
}
}
return Py::None();
}
Py::Object read(const Py::Tuple& args)
{
char* Name;
if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
std::auto_ptr<FemMesh> mesh(new FemMesh);
mesh->read(EncodedName.c_str());
return Py::asObject(new FemMeshPy(mesh.release()));
}
Py::Object show(const Py::Tuple& args)
{
PyObject *pcObj;
if (!PyArg_ParseTuple(args.ptr(), "O!", &(FemMeshPy::Type), &pcObj))
throw Py::Exception();
App::Document *pcDoc = App::GetApplication().getActiveDocument();
if (!pcDoc)
pcDoc = App::GetApplication().newDocument();
FemMeshPy* pShape = static_cast<FemMeshPy*>(pcObj);
Fem::FemMeshObject *pcFeature = (Fem::FemMeshObject *)pcDoc->addObject("Fem::FemMeshObject", "Mesh");
// copy the data
//TopoShape* shape = new MeshObject(*pShape->getTopoShapeObjectPtr());
pcFeature->FemMesh.setValue(*(pShape->getFemMeshPtr()));
pcDoc->recompute();
return Py::None();
}
};
PyObject* initModule()
{
return (new Module)->module().ptr();
}
} // namespace Fem
=======
/***************************************************************************
* Copyright (c) 2008 Jürgen Riegel (juergen.riegel@web.de) *
* *
* 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 "PreCompiled.h"
#ifndef _PreComp_
# include <Python.h>
# include <memory>
#endif
#include <CXX/Extensions.hxx>
#include <CXX/Objects.hxx>
#include <Base/Console.h>
#include <Base/Tools.h>
#include <Base/VectorPy.h>
#include <Base/PlacementPy.h>
#include <App/Application.h>
#include <App/Document.h>
#include <App/DocumentObject.h>
#include <App/DocumentObjectPy.h>
//#include <Mod/Mesh/App/Core/MeshKernel.h>
//#include <Mod/Mesh/App/Core/Evaluation.h>
//#include <Mod/Mesh/App/Core/Iterator.h>
#include <SMESH_Gen.hxx>
#include <SMESH_Group.hxx>
#include <SMESHDS_Mesh.hxx>
#include <SMDS_MeshNode.hxx>
#include <StdMeshers_MaxLength.hxx>
#include <StdMeshers_LocalLength.hxx>
#include <StdMeshers_NumberOfSegments.hxx>
#include <StdMeshers_AutomaticLength.hxx>
#include <StdMeshers_TrianglePreference.hxx>
#include <StdMeshers_MEFISTO_2D.hxx>
#include <StdMeshers_Deflection1D.hxx>
#include <StdMeshers_MaxElementArea.hxx>
#include <StdMeshers_Regular_1D.hxx>
#include <StdMeshers_QuadranglePreference.hxx>
#include <StdMeshers_Quadrangle_2D.hxx>
#include <StdMeshers_LengthFromEdges.hxx>
#include <StdMeshers_NotConformAllowed.hxx>
#include <StdMeshers_Arithmetic1D.hxx>
#include "FemMesh.h"
#include "FemMeshObject.h"
#include "FemMeshPy.h"
#ifdef FC_USE_VTK
#include "FemPostPipeline.h"
#endif
#include <cstdlib>
#include <Standard_Real.hxx>
#include <Base/Vector3D.h>
#include <Mod/Part/App/OCCError.h>
namespace Fem {
class Module : public Py::ExtensionModule<Module>
{
public:
Module() : Py::ExtensionModule<Module>("Fem")
{
add_varargs_method("open",&Module::open,
"open(string) -- Create a new document and a Mesh::Import feature to load the file into the document."
);
add_varargs_method("insert",&Module::insert,
"insert(string|mesh,[string]) -- Load or insert a mesh into the given or active document."
);
add_varargs_method("export",&Module::exporter,
"export(list,string) -- Export a list of objects into a single file."
);
add_varargs_method("read",&Module::read,
"Read a mesh from a file and returns a Mesh object."
);
add_varargs_method("show",&Module::show,
"show(shape) -- Add the shape to the active document or create one if no document exists."
);
initialize("This module is the Fem module."); // register with Python
}
virtual ~Module() {}
private:
virtual Py::Object invoke_method_varargs(void *method_def, const Py::Tuple &args)
{
try {
return Py::ExtensionModule<Module>::invoke_method_varargs(method_def, args);
}
catch (const Standard_Failure &e) {
std::string str;
Standard_CString msg = e.GetMessageString();
str += typeid(e).name();
str += " ";
if (msg) {str += msg;}
else {str += "No OCCT Exception Message";}
throw Py::Exception(Part::PartExceptionOCCError, str);
}
catch (const Base::Exception &e) {
throw Py::RuntimeError(e.what());
}
catch (const std::exception &e) {
throw Py::RuntimeError(e.what());
}
}
Py::Object open(const Py::Tuple& args)
{
char* Name;
if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
std::auto_ptr<FemMesh> mesh(new FemMesh);
mesh->read(EncodedName.c_str());
Base::FileInfo file(EncodedName.c_str());
// create new document and add Import feature
App::Document *pcDoc = App::GetApplication().newDocument("Unnamed");
FemMeshObject *pcFeature = static_cast<FemMeshObject *>
(pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str()));
pcFeature->Label.setValue(file.fileNamePure().c_str());
pcFeature->FemMesh.setValuePtr(mesh.get());
(void)mesh.release();
pcFeature->purgeTouched();
return Py::None();
}
Py::Object insert(const Py::Tuple& args)
{
char* Name;
const char* DocName = 0;
if (!PyArg_ParseTuple(args.ptr(), "et|s","utf-8",&Name,&DocName))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
App::Document *pcDoc = 0;
if (DocName)
pcDoc = App::GetApplication().getDocument(DocName);
else
pcDoc = App::GetApplication().getActiveDocument();
if (!pcDoc) {
pcDoc = App::GetApplication().newDocument(DocName);
}
Base::FileInfo file(EncodedName.c_str());
try {
std::auto_ptr<FemMesh> mesh(new FemMesh);
mesh->read(EncodedName.c_str());
FemMeshObject *pcFeature = static_cast<FemMeshObject *>
(pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str()));
pcFeature->Label.setValue(file.fileNamePure().c_str());
pcFeature->FemMesh.setValuePtr(mesh.get());
(void)mesh.release();
pcFeature->purgeTouched();
}
catch(Base::Exception& e) {
#ifdef FC_USE_VTK
if( FemPostPipeline::canRead(file) ) {
FemPostPipeline *pcFeature = static_cast<FemPostPipeline *>
(pcDoc->addObject("Fem::FemPostPipeline", file.fileNamePure().c_str()));
pcFeature->Label.setValue(file.fileNamePure().c_str());
pcFeature->read(file);
pcFeature->touch();
pcDoc->recomputeFeature(pcFeature);
}
else
throw e;
#else
throw e;
#endif
}
return Py::None();
}
Py::Object exporter(const Py::Tuple& args)
{
PyObject* object;
char* Name;
if (!PyArg_ParseTuple(args.ptr(), "Oet",&object,"utf-8",&Name))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
Py::Sequence list(object);
Base::Type meshId = Base::Type::fromName("Fem::FemMeshObject");
for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) {
PyObject* item = (*it).ptr();
if (PyObject_TypeCheck(item, &(App::DocumentObjectPy::Type))) {
App::DocumentObject* obj = static_cast<App::DocumentObjectPy*>(item)->getDocumentObjectPtr();
if (obj->getTypeId().isDerivedFrom(meshId)) {
static_cast<FemMeshObject*>(obj)->FemMesh.getValue().write(EncodedName.c_str());
break;
}
}
}
return Py::None();
}
Py::Object read(const Py::Tuple& args)
{
char* Name;
if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
std::auto_ptr<FemMesh> mesh(new FemMesh);
mesh->read(EncodedName.c_str());
return Py::asObject(new FemMeshPy(mesh.release()));
}
Py::Object show(const Py::Tuple& args)
{
PyObject *pcObj;
if (!PyArg_ParseTuple(args.ptr(), "O!", &(FemMeshPy::Type), &pcObj))
throw Py::Exception();
App::Document *pcDoc = App::GetApplication().getActiveDocument();
if (!pcDoc)
pcDoc = App::GetApplication().newDocument();
FemMeshPy* pShape = static_cast<FemMeshPy*>(pcObj);
Fem::FemMeshObject *pcFeature = (Fem::FemMeshObject *)pcDoc->addObject("Fem::FemMeshObject", "Mesh");
// copy the data
//TopoShape* shape = new MeshObject(*pShape->getTopoShapeObjectPtr());
pcFeature->FemMesh.setValue(*(pShape->getFemMeshPtr()));
pcDoc->recompute();
return Py::None();
}
};
PyObject* initModule()
{
return (new Module)->module().ptr();
}
} // namespace Fem
>>>>>>> Fem Post: fix vtk include wthout guard

View File

@ -122,7 +122,6 @@ SET(FemScripts_SRCS
FemSelectionObserver.py
TestFem.py
z88DispReader.py
TaskPanelFemBeamSection.ui
TaskPanelFemShellThickness.ui
TaskPanelFemSolverCalculix.ui
@ -222,7 +221,7 @@ SET(Fem_SRCS
${FemSet_SRCS}
${FemConstraints_SRCS}
${FemResult_SRCS}
....${FemPost_SRCS}
${FemPost_SRCS}
${Mod_SRCS}
${Python_SRCS}
)

View File

@ -1,236 +0,0 @@
if(MSVC)
add_definitions(-DFCAppFem -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
endif(MSVC)
if(BUILD_FEM_NETGEN)
add_definitions(-DFCWithNetgen ${NETGEN_DEFINITIONS})
endif(BUILD_FEM_NETGEN)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src/3rdParty/ANN/include
${Boost_INCLUDE_DIRS}
${QT_INCLUDE_DIR}
${OCC_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${XercesC_INCLUDE_DIRS}
${SMESH_INCLUDE_DIR}
)
link_directories(${OCC_LIBRARY_DIR})
set(Fem_LIBS
Part
FreeCADApp
StdMeshers
SMESH
SMDS
SMESHDS
)
if(BUILD_FEM_NETGEN)
set(Fem_LIBS
${Fem_LIBS}
NETGENPlugin
)
endif(BUILD_FEM_NETGEN)
if(BUILD_FEM_VTK)
set(Fem_LIBS
${Fem_LIBS}
${VTK_LIBRARIES}
)
endif(BUILD_FEM_VTK)
generate_from_xml(FemMeshPy)
SET(Python_SRCS
FemMeshPy.xml
FemMeshPyImp.cpp
HypothesisPy.cpp
HypothesisPy.h
)
SOURCE_GROUP("Python" FILES ${Python_SRCS})
SET(Mod_SRCS
AppFem.cpp
AppFemPy.cpp
FemTools.cpp
FemTools.h
PreCompiled.cpp
PreCompiled.h
)
SOURCE_GROUP("Module" FILES ${Mod_SRCS})
SET(FemScripts_SRCS
_CommandFemBeamSection.py
_CommandFemFromShape.py
_CommandFemShellThickness.py
_CommandFemSolverCalculix.py
_CommandMechanicalMaterial.py
_CommandMechanicalShowResult.py
_CommandNewMechanicalAnalysis.py
_CommandPurgeFemResults.py
_CommandQuickAnalysis.py
_CommandSolverJobControl.py
_FemAnalysis.py
_FemBeamSection.py
_FemShellThickness.py
_FemSolverCalculix.py
_MechanicalMaterial.py
_TaskPanelFemBeamSection.py
_TaskPanelFemShellThickness.py
_TaskPanelFemSolverCalculix.py
_TaskPanelMechanicalMaterial.py
_TaskPanelResultControl.py
_ViewProviderFemAnalysis.py
_ViewProviderFemBeamSection.py
_ViewProviderFemShellThickness.py
_ViewProviderFemSolverCalculix.py
_ViewProviderMechanicalMaterial.py
ccxDatReader.py
ccxFrdReader.py
ccxInpWriter.py
convert2TetGen.py
Init.py
InitGui.py
FemAnalysis.py
FemCommands.py
FemBeamSection.py
FemShellThickness.py
FemSolverCalculix.py
FemTools.py
MechanicalMaterial.py
SelectionObserverFem.py
TestFem.py
TaskPanelFemBeamSection.ui
TaskPanelFemShellThickness.ui
TaskPanelFemSolverCalculix.ui
TaskPanelMechanicalMaterial.ui
TaskPanelShowDisplacement.ui
)
#SOURCE_GROUP("Scripts" FILES ${FemScripts_SRCS})
SET(FemTests_SRCS
test_files/ccx/mesh_points.csv
test_files/ccx/mesh_volumes.csv
test_files/ccx/cube_frequency.inp
test_files/ccx/cube_frequency.dat
test_files/ccx/cube_frequency.frd
test_files/ccx/cube_frequency_expected_values
test_files/ccx/cube_static.inp
test_files/ccx/cube_static.dat
test_files/ccx/cube_static.frd
test_files/ccx/cube_static_expected_values
test_files/ccx/cube.fcstd
)
SET(FemBase_SRCS
FemMeshObject.cpp
FemMeshObject.h
FemMeshShapeObject.cpp
FemMeshShapeObject.h
FemMeshShapeNetgenObject.cpp
FemMeshShapeNetgenObject.h
FemAnalysis.cpp
FemAnalysis.h
FemMesh.cpp
FemMesh.h
FemResultObject.cpp
FemResultObject.h
FemSolverObject.cpp
FemSolverObject.h
FemConstraint.cpp
FemConstraint.h
FemMeshProperty.cpp
FemMeshProperty.h
)
SOURCE_GROUP("Base types" FILES ${FemBase_SRCS})
SET(FemSet_SRCS
FemSetObject.cpp
FemSetObject.h
FemSetNodesObject.cpp
FemSetNodesObject.h
FemSetElementsObject.cpp
FemSetElementsObject.h
FemSetFacesObject.cpp
FemSetFacesObject.h
FemSetGeometryObject.cpp
FemSetGeometryObject.h
)
SOURCE_GROUP("Set objects" FILES ${FemSet_SRCS})
SET(FemConstraints_SRCS
FemConstraintBearing.h
FemConstraintBearing.cpp
FemConstraintFixed.cpp
FemConstraintFixed.h
FemConstraintForce.cpp
FemConstraintForce.h
FemConstraintPressure.cpp
FemConstraintPressure.h
FemConstraintGear.cpp
FemConstraintGear.h
FemConstraintPulley.cpp
FemConstraintPulley.h
FemConstraintDisplacement.h
FemConstraintDisplacement.cpp
)
SOURCE_GROUP("Constraints" FILES ${FemConstraints_SRCS})
if(BUILD_FEM_VTK)
SET(FemPost_SRCS
FemPostObject.h
FemPostObject.cpp
FemPostPipeline.h
FemPostPipeline.cpp
FemPostFilter.h
FemPostFilter.cpp
<<<<<<< eec6f7aee8b6e5979a799358e2ae69bdc5a7af5b
)
=======
FemPostFunction.h
FemPostFunction.cpp
)
>>>>>>> Basic implementation of filter framework
SOURCE_GROUP("PostObjects" FILES ${FemPost_SRCS})
endif(BUILD_FEM_VTK)
SET(Fem_SRCS
${FemBase_SRCS}
${FemSet_SRCS}
${FemConstraints_SRCS}
${FemResult_SRCS}
....${FemPost_SRCS}
${Mod_SRCS}
${Python_SRCS}
)
add_library(Fem SHARED ${Fem_SRCS})
target_link_libraries(Fem ${Fem_LIBS})
fc_target_copy_resource(Fem
${CMAKE_SOURCE_DIR}/src/Mod/Fem
${CMAKE_BINARY_DIR}/Mod/Fem
Init.py
${FemScripts_SRCS}
${FemTests_SRCS}
)
SET_BIN_DIR(Fem Fem /Mod/Fem)
SET_PYTHON_PREFIX_SUFFIX(Fem)
INSTALL(TARGETS Fem DESTINATION ${CMAKE_INSTALL_LIBDIR})

File diff suppressed because it is too large Load Diff

View File

@ -1,123 +0,0 @@
<<<<<<< f24874396c47b854461779051d98df0c6567b0a2
<RCC>
<qresource>
<file>icons/fem-fem-mesh-from-shape.svg</file>
<file>icons/fem-fem-mesh-create-node-by-poly.svg</file>
<file>icons/fem-analysis.svg</file>
<file>icons/fem-solver.svg</file>
<file>icons/fem-constraint-displacement.svg</file>
<file>icons/fem-constraint-force.svg</file>
<file>icons/fem-constraint-fixed.svg</file>
<file>icons/fem-constraint-pressure.svg</file>
<file>icons/fem-constraint-bearing.svg</file>
<file>icons/fem-constraint-gear.svg</file>
<file>icons/fem-constraint-pulley.svg</file>
<file>icons/fem-add-fem-mesh.svg</file>
<file>icons/fem-add-material.svg</file>
<file>icons/fem-add-part.svg</file>
<file>icons/fem-inp-editor.svg</file>
<file>icons/fem-material.svg</file>
<file>icons/fem-new-analysis.svg</file>
<file>icons/fem-purge-results.svg</file>
<file>icons/fem-quick-analysis.svg</file>
<file>icons/fem-frequency-analysis.svg</file>
<file>icons/fem-result.svg</file>
<file>icons/fem-shell-thickness.svg</file>
<file>icons/fem-beam-section.svg</file>
<file>icons/preferences-fem.svg</file>
<file>icons/FemWorkbench.svg</file>
<file>translations/Fem_af.qm</file>
<file>translations/Fem_de.qm</file>
<file>translations/Fem_fi.qm</file>
<file>translations/Fem_fr.qm</file>
<file>translations/Fem_hr.qm</file>
<file>translations/Fem_it.qm</file>
<file>translations/Fem_nl.qm</file>
<file>translations/Fem_no.qm</file>
<file>translations/Fem_pl.qm</file>
<file>translations/Fem_ru.qm</file>
<file>translations/Fem_uk.qm</file>
<file>translations/Fem_tr.qm</file>
<file>translations/Fem_sv-SE.qm</file>
<file>translations/Fem_zh-TW.qm</file>
<file>translations/Fem_pt-BR.qm</file>
<file>translations/Fem_cs.qm</file>
<file>translations/Fem_sk.qm</file>
<file>translations/Fem_es-ES.qm</file>
<file>translations/Fem_zh-CN.qm</file>
<file>translations/Fem_ja.qm</file>
<file>translations/Fem_ro.qm</file>
<file>translations/Fem_hu.qm</file>
<file>translations/Fem_pt-PT.qm</file>
<file>translations/Fem_sr.qm</file>
<file>translations/Fem_el.qm</file>
<file>translations/Fem_sl.qm</file>
</qresource>
</RCC>
=======
<RCC>
<qresource>
<file>icons/fem-fem-mesh-from-shape.svg</file>
<file>icons/fem-fem-mesh-create-node-by-poly.svg</file>
<file>icons/fem-analysis.svg</file>
<file>icons/fem-solver.svg</file>
<file>icons/fem-constraint-displacement.svg</file>
<file>icons/fem-constraint-force.svg</file>
<file>icons/fem-constraint-fixed.svg</file>
<file>icons/fem-constraint-pressure.svg</file>
<file>icons/fem-constraint-bearing.svg</file>
<file>icons/fem-constraint-gear.svg</file>
<file>icons/fem-constraint-pulley.svg</file>
<file>icons/fem-add-fem-mesh.svg</file>
<file>icons/fem-add-material.svg</file>
<file>icons/fem-add-part.svg</file>
<file>icons/fem-inp-editor.svg</file>
<file>icons/fem-material.svg</file>
<file>icons/fem-new-analysis.svg</file>
<file>icons/fem-purge-results.svg</file>
<file>icons/fem-quick-analysis.svg</file>
<file>icons/fem-frequency-analysis.svg</file>
<file>icons/fem-result.svg</file>
<file>icons/fem-shell-thickness.svg</file>
<file>icons/fem-beam-section.svg</file>
<file>icons/preferences-fem.svg</file>
<file>icons/FemWorkbench.svg</file>
<file>icons/fem-clip.png</file>
<file>icons/fem-clip-scalar.png</file>
<file>icons/fem-cut.png</file>
<file>icons/fem-isosurface.png</file>
<file>icons/fem-warp.png</file>
<file>icons/fem-data.png</file>
<file>icons/fem-plane.svg</file>
<file>icons/fem-box.svg</file>
<file>icons/fem-sphere.svg</file>
<file>icons/fem-cylinder.svg</file>
<file>translations/Fem_af.qm</file>
<file>translations/Fem_de.qm</file>
<file>translations/Fem_fi.qm</file>
<file>translations/Fem_fr.qm</file>
<file>translations/Fem_hr.qm</file>
<file>translations/Fem_it.qm</file>
<file>translations/Fem_nl.qm</file>
<file>translations/Fem_no.qm</file>
<file>translations/Fem_pl.qm</file>
<file>translations/Fem_ru.qm</file>
<file>translations/Fem_uk.qm</file>
<file>translations/Fem_tr.qm</file>
<file>translations/Fem_sv-SE.qm</file>
<file>translations/Fem_zh-TW.qm</file>
<file>translations/Fem_pt-BR.qm</file>
<file>translations/Fem_cs.qm</file>
<file>translations/Fem_sk.qm</file>
<file>translations/Fem_es-ES.qm</file>
<file>translations/Fem_zh-CN.qm</file>
<file>translations/Fem_ja.qm</file>
<file>translations/Fem_ro.qm</file>
<file>translations/Fem_hu.qm</file>
<file>translations/Fem_pt-PT.qm</file>
<file>translations/Fem_sr.qm</file>
<file>translations/Fem_el.qm</file>
<file>translations/Fem_sl.qm</file>
</qresource>
</RCC>
>>>>>>> Add icons for fem post processing