# Their root dir were found when looking for Sphinx (FindSalomeSphinx.cmake):
SET(_pydir python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
-IF(WINDOWS)
+IF(WIN32)
STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\lib\\${_pydir}\\site-packages\\salome\;%PYTHONPATH%
@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
@SET PATH=${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
")
SET(EXT "bat")
SET(CALL_STR "call")
-ELSE(WINDOWS)
+ELSE(WIN32)
SET(SCR " export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/${_pydir}/site-packages/salome:\${PYTHONPATH}
export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
)
SET(EXT "sh")
SET(CALL_STR ".")
-ENDIF(WINDOWS)
+ENDIF(WIN32)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")
SALOME_CONFIGURE_FILE(static/header_py.html.in ${builddir}/static/header_py.html)
SET(f "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py")
-IF(WINDOWS)
+IF(WIN32)
STRING(REPLACE "/" "\\" f ${f})
-ENDIF(WINDOWS)
+ENDIF(WIN32)
-ADD_CUSTOM_TARGET(usr_docs mkdir -p tmp
+ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/geomBuilder.py ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/geomBuilder.py
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/gsketcher.py ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/gsketcher.py
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_tui
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil; shutil.rmtree(r'''tmp''')"
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM''', ignore=shutil.ignore_patterns('*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*')); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM/geompy_doc'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/static/SALOME_BOA_PA.pdf''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM''')"
+ COMMAND ${CMAKE_COMMAND} -E remove_directory tmp
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
ADD_DEPENDENCIES(usr_docs html_docs)
INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)")
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${SALOME_INSTALL_DOC}/gui)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${SALOME_INSTALL_DOC}/gui
+ PATTERN "*usr_docs*" EXCLUDE
+ PATTERN "*CMakeFiles*" EXCLUDE
+ PATTERN "static" EXCLUDE
+ PATTERN "Makefile*" EXCLUDE
+ PATTERN "*.cmake" EXCLUDE
+ PATTERN "doxyfile*" EXCLUDE
+ PATTERN "*.vcproj" EXCLUDE
+)
+
INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/static/SALOME_BOA_PA.pdf DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM)
+
${CMAKE_CURRENT_BINARY_DIR}
)
-IF(WINDOWS)
+IF(WIN32)
ADD_DEFINITIONS(-DNOGDI)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
SET(SalomeIDLGEOM_IDLSOURCES
#include <SALOMEDS_wrap.hxx>
#include <GEOMImpl_Types.hxx>
+#ifdef max
+ #undef max
+#endif
+
const int theIntLimit = std::numeric_limits<int>::max() - 10;
${CAS_TKCDF}
${CAS_TKG3d}
${KERNEL_SALOMELocalTrace}
+ ${KERNEL_OpUtil}
GEOMSketcher
)
const TCollection_AsciiString& anEntry,
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
- void DocumentModified(const int theDocId, const bool isModified);
+ Standard_EXPORT void DocumentModified(const int theDocId, const bool isModified);
- bool DocumentModified(const int theDocId);
+ Standard_EXPORT bool DocumentModified(const int theDocId);
protected:
Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
SWIG_ADD_MODULE(libGEOM_Swig python libGEOM_Swig.i libGEOM_Swig.cxx)
SWIG_LINK_LIBRARIES(libGEOM_Swig "${_link_LIBRARIES}")
-IF(WINDOWS)
+IF(WIN32)
SET_TARGET_PROPERTIES(_libGEOM_Swig PROPERTIES DEBUG_OUTPUT_NAME _libGEOM_Swig_d)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
INSTALL(TARGETS _libGEOM_Swig DESTINATION ${SALOME_INSTALL_PYTHON})
void ClickOnOk();
bool ClickOnApply();
void ActivateThisDialog();
- void LineEditReturnPressed();
+// void LineEditReturnPressed();
void SelectionIntoArgument();
void SetEditCurrentArgument();
void btnFileSelectClicked();
void ClickOnOk();
bool ClickOnApply();
void ActivateThisDialog();
- void LineEditReturnPressed();
+// void LineEditReturnPressed();
void btnFileSelectClicked();
};
SET(_link_LIBRARIES
${PTHREAD_LIBRARIES}
${LIBXML2_LIBRARIES}
- ${CAS_TKBRep} ${CAS_TKTopAlgo}
+ ${CAS_TKBRep} ${CAS_TKTopAlgo} ${CAS_TKG2d}
)
# --- headers ---
SET(XAO_HEADERS
+ XAO.hxx
XAO_BooleanField.hxx
XAO_BooleanStep.hxx
XAO_BrepGeometry.hxx
--- /dev/null
+// Copyright (C) 2013 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Roman NIKOLAEV (OpenCascade)
+
+#if defined XAO_EXPORTS || defined Xao_EXPORTS
+ #if defined WIN32
+ #define XAO_EXPORT __declspec( dllexport )
+ #else
+ #define XAO_EXPORT
+ #endif
+#else
+ #if defined WIN32
+ #define XAO_EXPORT __declspec( dllimport )
+ #else
+ #define XAO_EXPORT
+ #endif
+#endif
\ No newline at end of file
#include <string>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Field.hxx"
#include "XAO_BooleanStep.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
namespace XAO
{
/**
* @class BooleanField
* Represents a field with boolean values.
*/
- class BooleanField : public Field
+ class XAO_EXPORT BooleanField : public Field
{
public:
/**
#include <vector>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Step.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
+
namespace XAO
{
/**
* @class BooleanStep
* Step with boolean values.
*/
- class BooleanStep : public Step
+ class XAO_EXPORT BooleanStep : public Step
{
public:
/**
#include <TopoDS_Shape.hxx>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Geometry.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
namespace XAO
{
/**
* @class BrepGeometry
* Representation of a BRep Geometry.
*/
- class BrepGeometry : public Geometry
+ class XAO_EXPORT BrepGeometry : public Geometry
{
public:
/**
#include <string>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Field.hxx"
#include "XAO_DoubleStep.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
namespace XAO
{
/**
* @class DoubleField
* Represents a field with double values.
*/
- class DoubleField : public Field
+ class XAO_EXPORT DoubleField : public Field
{
public:
/**
#include <vector>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Step.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
namespace XAO
{
/**
* @class DoubleStep
* Step with double values.
*/
- class DoubleStep : public Step
+ class XAO_EXPORT DoubleStep : public Step
{
public:
/**
#ifndef __XAO_EXCEPTION_HXX__
#define __XAO_EXCEPTION_HXX__
+#include "XAO.hxx"
+#include <exception>
+
namespace XAO
{
/**
* \class XAO_Exception
* Exception for XAO operations.
*/
- class XAO_Exception : public std::exception
+ class XAO_EXPORT XAO_Exception : public std::exception
{
public:
/**
Field::~Field()
{
- for (int i = 0; i < m_steps.size(); ++i)
+ for (unsigned int i = 0; i < m_steps.size(); ++i)
delete m_steps[i];
}
void Field::setComponentsNames(const std::vector<std::string>& names)
throw (XAO_Exception)
{
- for (int i = 0; i < names.size(); ++i)
+ for (unsigned int i = 0; i < names.size(); ++i)
{
if (i < m_nbComponents)
m_components[i] = names[i];
#include <string>
#include <vector>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Step.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
+
namespace XAO
{
typedef std::vector<Step*>::iterator stepIterator;
* @class Field
* A geometrical Field.
*/
- class Field
+ class XAO_EXPORT Field
{
protected:
/**
#include <string>
#include <map>
+
+#include "XAO.hxx"
#include "XAO_Exception.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
+
namespace XAO
{
/**
* \class GeometricElement
* Generic class to manipulate a topologic element (vertex, edge, face or solid).
*/
- class GeometricElement
+ class XAO_EXPORT GeometricElement
{
public:
/**
* \class GeometricElementList
* Generic class to manipulate a list of topologic element.
*/
- class GeometricElementList
+ class XAO_EXPORT GeometricElementList
{
public:
/**
#include <string>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Exception.hxx"
#include "XAO_GeometricElement.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
namespace XAO
{
/**
* @class Geometry
* Base class for geometries.
*/
- class Geometry
+ class XAO_EXPORT Geometry
{
protected:
/**
#include <string>
#include <set>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
-
+#ifdef WIN32
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
namespace XAO
{
/**
* \class Group
* Class to represent a Geometrical Group.
*/
- class Group
+ class XAO_EXPORT Group
{
public:
/**
#include <string>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Field.hxx"
#include "XAO_IntegerStep.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
namespace XAO
{
/**
* @class IntegerField
* Represents a field with integer values.
*/
- class IntegerField : public Field
+ class XAO_EXPORT IntegerField : public Field
{
public:
/**
#include <vector>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Step.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
+
namespace XAO
{
/**
* @class IntegerStep
* Step with integer values.
*/
- class IntegerStep : public Step
+ class XAO_EXPORT IntegerStep : public Step
{
public:
/**
#ifndef __XAO_STEP_HXX__
#define __XAO_STEP_HXX__
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
namespace XAO
{
/**
* @class Step
* Base class for steps.
*/
- class Step
+ class XAO_EXPORT Step
{
protected:
/** Default constructor. */
#include <string>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Field.hxx"
#include "XAO_StringStep.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
namespace XAO
{
/**
* @class StringField
* Represents a field with string values.
*/
- class StringField : public Field
+ class XAO_EXPORT StringField : public Field
{
public:
/**
#include <string>
#include <vector>
+#include "XAO.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Step.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
namespace XAO
{
/**
* @class StringStep
* Step with strings values.
*/
- class StringStep : public Step
+ class XAO_EXPORT StringStep : public Step
{
public:
/**
#include <string>
#include <list>
+
+#include "XAO.hxx"
#include "XAO_Exception.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Geometry.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
namespace XAO
{
class Group;
* @class Xao
* The Xao class describes the XAO format.
*/
- class Xao
+ class XAO_EXPORT Xao
{
public:
/**
#ifndef __XAO_XAOEXPORTER_HXX__
#define __XAO_XAOEXPORTER_HXX__
+#include "XAO.hxx"
#include "XAO_Xao.hxx"
#include "XAO_Geometry.hxx"
#include "XAO_Group.hxx"
#include "XAO_Field.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
namespace XAO
{
/**
* @class XaoExporter
* Util class for import/export XAO.
*/
- class XaoExporter
+ class XAO_EXPORT XaoExporter
{
public:
/**
#include <sstream>
+#include "XAO_Exception.hxx"
#include "XAO_Xao.hxx"
#include "XAO_XaoUtils.hxx"
#include <string>
#include <exception>
+#include "XAO.hxx"
#include "XAO_Exception.hxx"
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
namespace XAO
{
* \class XaoUtils
* Utilities class to convert types.
*/
- class XaoUtils
+ class XAO_EXPORT XaoUtils
{
public:
/**
void printVector(std::vector<int>& v)
{
std::cout << "# ";
- for (int i = 0; i < v.size(); i++)
+ for (unsigned int i = 0; i < v.size(); i++)
std::cout << v[i] << ", ";
std::cout << std::endl;
}
{
std::cout << " Shell #" << shellIndex << std::endl;
std::vector<int> faces = geom->getSolidFaces(solidIndex, shellIndex);
- for (int indf = 0; indf < faces.size(); ++indf)
+ for (unsigned int indf = 0; indf < faces.size(); ++indf)
{
int faceIndex = faces[indf];
std::cout << " Face #" << geom->getFaceReference(faceIndex) << std::endl;
{
std::cout << " Wire #" << wireIndex << std::endl;
std::vector<int> edges = geom->getFaceEdges(faceIndex, wireIndex);
- for (int inde = 0; inde < edges.size(); ++inde)
+ for (unsigned int inde = 0; inde < edges.size(); ++inde)
{
int edgeIndex = edges[inde];
std::cout << " Edge #" << geom->getEdgeReference(edgeIndex) << " : ";
static std::string getTestFilePath(const std::string& fileName)
{
std::string dataDir = getenv("GEOM_SRC_DIR");
- dataDir += "/src/XAO/tests/data/" + fileName;
+ dataDir += "/src/XAO/tests/data/";
+ dataDir += fileName;
return dataDir;
}
SWIG_ADD_MODULE(xao python xao.i)
SWIG_LINK_LIBRARIES(xao "${_link_LIBRARIES}")
-IF(WINDOWS)
+IF(WIN32)
SET_TARGET_PROPERTIES(_xao PROPERTIES DEBUG_OUTPUT_NAME _xao_d)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
INSTALL(TARGETS _xao DESTINATION ${SALOME_INSTALL_PYTHON})
INSTALL(FILES xao.i DESTINATION ${SALOME_INSTALL_HEADERS})
%module xao
%{
+#include "XAO.hxx"
#include "XAO_Exception.hxx"
#include "XAO_XaoUtils.hxx"
#include "XAO_Xao.hxx"
%ignore XAO::MsgBuilder;
%ignore XAO::XaoUtils;
+%include "XAO.hxx"
%include XAO_Exception.hxx
%include XAO_XaoUtils.hxx