-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2013-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2021 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
-# Copyright (C) 2013-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2021 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
SET(QT_LIBRARIES)
# Find Qt5Core to get Qt version
SET(Qt5_FIND_COMPONENTS QtCore)
+SET(Qt5_OPTIONAL_COMPONENTS)
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Core Qt5Core_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)
IF(Qt5Core_FOUND)
LIST(APPEND QT_INCLUDES ${Qt5Core_INCLUDE_DIRS})
SET(QT_VERSION "${Qt5Core_VERSION}")
ENDIF()
-SET(Qt5_FIND_COMPONENTS Gui Widgets Network Xml OpenGL PrintSupport Help Test Sql Sensors Positioning Quick Qml Multimedia MultimediaWidgets WebChannel UiTools)
+# Add mandatory Qt 5 components below
+SET(Qt5_FIND_COMPONENTS Gui Widgets Network Xml OpenGL PrintSupport Help Test)
+# Add optional Qt 5 components below
+SET(Qt5_OPTIONAL_COMPONENTS)
IF ("${QT_VERSION}" VERSION_LESS "5.6.0")
+ # QtWebKit package is used with Qt < 5.6
LIST(APPEND Qt5_FIND_COMPONENTS WebKit WebKitWidgets)
ELSE()
- LIST(APPEND Qt5_OPTIONAL_COMPONENTS WebEngine WebEngineWidgets)
+ # QtWebEngine package is (optionally) used with Qt >= 5.6
+ # Anyway, not available with Python 3
+ LIST(APPEND Qt5_OPTIONAL_COMPONENTS WebEngineCore WebEngine WebEngineWidgets)
ENDIF()
IF(NOT WIN32)
+ ## QtX11Extras package is used on Linux only
LIST(APPEND Qt5_FIND_COMPONENTS X11Extras)
ENDIF()
IF(${idx} GREATER -1)
SET(Salome${_Qt5_COMPONENT}_FIND_QUIETLY TRUE)
ENDIF()
- SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(${_Qt5_COMPONENT} ${_Qt5_COMPONENT}_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)
+ FIND_PACKAGE(${_Qt5_COMPONENT})
LIST(APPEND QT_INCLUDES ${${_Qt5_COMPONENT}_INCLUDE_DIRS})
LIST(APPEND QT_DEFINITIONS ${${_Qt5_COMPONENT}_DEFINITIONS})
LIST(APPEND QT_LIBRARIES ${${_Qt5_COMPONENT}_LIBRARIES})
GET_FILENAME_COMPONENT(QT_BINARY_DIR ${QT_LRELEASE_EXECUTABLE} DIRECTORY)
MARK_AS_ADVANCED(QT_BINARY_DIR)
-# This is only needed to correctly detect Qt help generator tool, to workaround an error
+# This is only needed to correctly detect Qt help generator tool, to workaround an error
# coming from ParaView detection procedure
FIND_PROGRAM(QT_HELP_GENERATOR
qhelpgenerator
DOC "qhelpgenerator used to compile Qt help project files")
MARK_AS_ADVANCED(QT_HELP_GENERATOR)
-IF(Qt5Core_FOUND)
+IF(Qt5Core_FOUND)
SALOME_ACCUMULATE_HEADERS(QT_INCLUDES)
SALOME_ACCUMULATE_ENVIRONMENT(PATH ${LINGUIST_PATH})
SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${Qt5Core_LIBRARIES})
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
# SPHINX_PYTHONPATH - path to the Sphinx Python modules
#
###########################################################################
-# Copyright (C) 2013-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2021 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2012-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2021 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
+# Copyright (C) 2014-2021 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, 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
+# 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
+#
+
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
SET(${PROJECT_NAME}_MINOR_VERSION 6)
SET(${PROJECT_NAME}_PATCH_VERSION 0)
SET(${PROJECT_NAME}_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_VERSION})
+SET(COMPONENT_NAME SHAPER)
# Ensure a proper linker behavior:
CMAKE_POLICY(SET CMP0003 NEW)
INCLUDE(FindSUIT)
INCLUDE(FindTInspector)
-IF(${HAVE_SALOME})
+IF(HAVE_SALOME)
SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
IF(EXISTS ${CONFIGURATION_ROOT_DIR})
- LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
+ SET(CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
INCLUDE(SalomeMacros)
INCLUDE(FindSalomeQt5)
ELSE()
ENDIF()
SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
IF(EXISTS ${KERNEL_ROOT_DIR})
- LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
FIND_PACKAGE(SalomeKERNEL REQUIRED)
ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
ENDIF(EXISTS ${KERNEL_ROOT_DIR})
SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
IF(EXISTS ${GUI_ROOT_DIR})
- LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/salome_adm/cmake_files")
FIND_PACKAGE(SalomeGUI REQUIRED)
+ ELSE(EXISTS ${GUI_ROOT_DIR})
+ MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
ENDIF(EXISTS ${GUI_ROOT_DIR})
INCLUDE(SalomeSetupPlatform) # From CONFIGURATION
FIND_PACKAGE(SalomeOpenCASCADE REQUIRED)
-ELSE(${HAVE_SALOME})
+ELSE()
INCLUDE(SalomeMacros)
INCLUDE(FindSalomeQt5)
INCLUDE(FindPython)
INCLUDE(FindSalomeOpenCASCADE)
-ENDIF(${HAVE_SALOME})
+ENDIF()
# Common CMake macros
# ===================
SET(SHAPER_INSTALL_PYTHON_API ${_pydir}/salome/shaper CACHE INTERNAL "" FORCE)
SET(SHAPER_INSTALL_SWIG ${_pydir} CACHE INTERNAL "" FORCE)
IF(${HAVE_SALOME})
+ SET(SHAPER_INSTALL_EXE bin/salome CACHE INTERNAL "" FORCE)
SET(SHAPER_INSTALL_ADDONS bin/salome CACHE INTERNAL "" FORCE)
SET(SHAPER_INSTALL_BIN lib/salome CACHE INTERNAL "" FORCE)
SET(SHAPER_INSTALL_PLUGIN_FILES lib/salome CACHE INTERNAL "" FORCE)
SALOME_INSTALL_SCRIPTS("shaper_test.py" ${SHAPER_INSTALL_PYTHON_FILES})
ELSE(${HAVE_SALOME})
+ SET(SHAPER_INSTALL_EXE bin CACHE INTERNAL "" FORCE)
SET(SHAPER_INSTALL_ADDONS addons CACHE INTERNAL "" FORCE)
SET(SHAPER_INSTALL_BIN bin CACHE INTERNAL "" FORCE)
SET(SHAPER_INSTALL_HEADERS include CACHE INTERNAL "" FORCE)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
+
+import importlib
import os
import sys
import sphinx
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc','sphinx.ext.autosummary']
-try:
- import sphinxcontrib.napoleon
- extensions += ['sphinxcontrib.napoleon']
-except:
- pass
-try:
- import sphinx_rtd_theme
- extensions += ['sphinx_rtd_theme']
- use_rtd_theme = True
-except:
- use_rtd_theme = False
+# Optional extensions
+extra_extensions = ['sphinx_rtd_theme']
+if sphinx.version_info[:2] < (1,3):
+ extra_extensions += ['sphinxcontrib.napoleon']
+else:
+ extra_extensions += ['sphinx.ext.napoleon']
+for ext in extra_extensions:
+ try:
+ importlib.import_module(ext)
+ extensions.append(ext)
+ globals().update({'use_{}'.format(ext):True})
+ except:
+ globals().update({'use_{}'.format(ext):False})
# Add any paths that contain templates here, relative to this directory.
#templates_path = [os.path.join('@CMAKE_CURRENT_SOURCE_DIR@','templates')]
# General information about the project.
project = u'SHAPER'
-copyright = u'2014-2020 CEA/DEN, EDF R&D'
+copyright = u'2014-2021 CEA/DEN, EDF R&D'
# Copyright is shown via custom footer
html_show_copyright = False
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
-if use_rtd_theme:
+if use_sphinx_rtd_theme:
html_theme = 'sphinx_rtd_theme'
else:
html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic'
{%- block footer %}
<div class="footer">
- Copyright © 2014-2020 CEA/DEN, EDF R&D
+ Copyright © 2014-2021 CEA/DEN, EDF R&D
</div>
{{ super() }}
{%- endblock %}
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
#!/bin/bash -x
-export SALOME_DIR=/dn46/SALOME/series9x/current-2020-12-21
+export SALOME_DIR=/dn46/SALOME/series9x/current-2021-03-26
# Path to sources
export SOURCES_DIR=$(pwd)
#!/bin/env python
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
const bool theIsToReorder)
: ModelHighAPI_Interface(theFeature)
{
- if(initialize()) {
+ if (initialize()) {
+ fillAttribute(BuildPlugin_Interpolation::CREATION_METHOD_BY_SELECTION_ID(),mycreationmethod);
setUseTangents(true);
setTangents(theStartTangent, theEndTangent);
setClosed(theIsClosed);
: ModelHighAPI_Interface(theFeature)
{
if (initialize()) {
+ fillAttribute(BuildPlugin_Interpolation::CREATION_METHOD_BY_SELECTION_ID(),mycreationmethod);
setClosed(theIsClosed);
setReorder(theIsToReorder);
setUseTangents(false);
}
}
+//==================================================================================================
+BuildAPI_Interpolation::BuildAPI_Interpolation(const FeaturePtr& theFeature,
+ const std::string & theXTexpression,
+ const std::string & theYTexpression,
+ const std::string & theZTexpression,
+ const ModelHighAPI_Double& theMinT,
+ const ModelHighAPI_Double& theMaxT,
+ const ModelHighAPI_Integer& theNbStep)
+: ModelHighAPI_Interface(theFeature)
+{
+ if (initialize()) {
+ fillAttribute(BuildPlugin_Interpolation::CREATION_METHOD_ANALYTICAL_ID(),mycreationmethod);
+ fillAttribute(theXTexpression, myxt);
+ fillAttribute(theYTexpression, myyt);
+ fillAttribute(theZTexpression, myzt);
+ fillAttribute(theMinT, mymint);
+ fillAttribute(theMaxT, mymaxt);
+ fillAttribute(theNbStep, mynumstep);
+
+ execute();
+ }
+}
+
//==================================================================================================
BuildAPI_Interpolation::~BuildAPI_Interpolation()
{
FeaturePtr aBase = feature();
std::string aPartName = theDumper.name(aBase->document());
- AttributeSelectionListPtr anAttrBaseObjects =
- aBase->selectionList(BuildPlugin_Interpolation::BASE_OBJECTS_ID());
-
- theDumper << aBase << " = model.addInterpolation(" << aPartName << ", "
- << anAttrBaseObjects << ", ";
-
- AttributeStringPtr useTangentsAttr = useTangents();
- std::string useTangents = useTangentsAttr->value();
- if (!useTangents.empty()) {
- AttributeSelectionPtr anAttrStartTangent =
- aBase->selection(BuildPlugin_Interpolation::TANGENT_START_ID());
- AttributeSelectionPtr anAttrEndTangent =
- aBase->selection(BuildPlugin_Interpolation::TANGENT_END_ID());
-
- theDumper << anAttrStartTangent << ", " << anAttrEndTangent << ", ";
+ if (aBase->string(BuildPlugin_Interpolation::CREATION_METHOD_ID())->value() ==
+ BuildPlugin_Interpolation::CREATION_METHOD_BY_SELECTION_ID())
+ {
+ AttributeSelectionListPtr anAttrBaseObjects =
+ aBase->selectionList(BuildPlugin_Interpolation::BASE_OBJECTS_ID());
+
+ theDumper << aBase << " = model.addInterpolation(" << aPartName << ", "
+ << anAttrBaseObjects << ", ";
+
+ AttributeStringPtr useTangentsAttr = useTangents();
+ std::string useTangents = useTangentsAttr->value();
+ if (!useTangents.empty()) {
+ AttributeSelectionPtr anAttrStartTangent =
+ aBase->selection(BuildPlugin_Interpolation::TANGENT_START_ID());
+ AttributeSelectionPtr anAttrEndTangent =
+ aBase->selection(BuildPlugin_Interpolation::TANGENT_END_ID());
+
+ theDumper << anAttrStartTangent << ", " << anAttrEndTangent << ", ";
+ }
+
+ theDumper << closed() << ", " << reorder() << ")" << std::endl;
+ } else {
+ theDumper << aBase << " = model.addInterpolation(" << aPartName ;
+ AttributeStringPtr XtAttr = xt();
+ std::string xt = XtAttr->value();
+ AttributeStringPtr YtAttr = yt();
+ std::string yt = YtAttr->value();
+ AttributeStringPtr ZtAttr = zt();
+ std::string zt = ZtAttr->value();
+ AttributeDoublePtr minTAttr = mint();
+ double mint = minTAttr->value();
+ AttributeDoublePtr maxTAttr = maxt();
+ double maxt = maxTAttr->value();
+ AttributeIntegerPtr nbStepAttr = numstep();
+ int nbStep = nbStepAttr->value();
+
+ theDumper<< ", \"" << xt << "\", \"" << yt << "\", \""<< zt<< "\", " ;
+ theDumper << mint << ", " << maxt << ", "<< nbStep<< ")"<<std::endl;
}
-
- theDumper << closed() << ", " << reorder() << ")" << std::endl;
}
//==================================================================================================
theIsToReorder));
}
+InterpolationPtr addInterpolation(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::string & theXTexpression,
+ const std::string & theYTexpression,
+ const std::string & theZTexpression,
+ const ModelHighAPI_Double& theMinT,
+ const ModelHighAPI_Double& theMaxT,
+ const ModelHighAPI_Integer& theNbStep)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(BuildAPI_Interpolation::ID());
+ return InterpolationPtr(new BuildAPI_Interpolation(aFeature,
+ theXTexpression,
+ theYTexpression,
+ theZTexpression,
+ theMinT,
+ theMaxT,
+ theNbStep));
+}
+
//==================================================================================================
void BuildAPI_Interpolation::execIfBaseNotEmpty()
{
if (baseObjects()->size() > 0)
execute();
-}
\ No newline at end of file
+}
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include <BuildPlugin_Interpolation.h>
+#include <ModelHighAPI_Double.h>
+#include <ModelHighAPI_Integer.h>
#include <ModelHighAPI_Interface.h>
#include <ModelHighAPI_Macro.h>
#include <ModelHighAPI_Selection.h>
const std::list<ModelHighAPI_Selection>& theBaseObjects,
const bool theIsClosed, const bool theIsToReorder);
+ /// Constructor with expression analytical of X,Y andZ
+ BUILDAPI_EXPORT
+ explicit BuildAPI_Interpolation(const FeaturePtr& theFeature,
+ const std::string & theXTexpression,
+ const std::string & theYTexpression,
+ const std::string & theZTexpression,
+ const ModelHighAPI_Double& theMinT,
+ const ModelHighAPI_Double& theMaxT,
+ const ModelHighAPI_Integer& theNbStep);
+
/// Destructor.
BUILDAPI_EXPORT
virtual ~BuildAPI_Interpolation();
- INTERFACE_6(BuildPlugin_Interpolation::ID(),
+ INTERFACE_13(BuildPlugin_Interpolation::ID(),
baseObjects, BuildPlugin_Interpolation::BASE_OBJECTS_ID(),
ModelAPI_AttributeSelectionList, /** Base objects */,
closed, BuildPlugin_Interpolation::CLOSED_ID(),
startTangent, BuildPlugin_Interpolation::TANGENT_START_ID(),
ModelAPI_AttributeSelection, /** Start point tangent */,
endTangent, BuildPlugin_Interpolation::TANGENT_END_ID(),
- ModelAPI_AttributeSelection, /** End point tangent */)
+ ModelAPI_AttributeSelection, /** End point tangent */,
+ xt, BuildPlugin_Interpolation::XT_ID(),
+ ModelAPI_AttributeString, /** xt expression*/,
+ yt, BuildPlugin_Interpolation::YT_ID(),
+ ModelAPI_AttributeString, /** yt expression*/,
+ zt, BuildPlugin_Interpolation::ZT_ID(),
+ ModelAPI_AttributeString, /** zt expression*/,
+ mint, BuildPlugin_Interpolation::MINT_ID(),
+ ModelAPI_AttributeDouble, /** Min*/,
+ maxt, BuildPlugin_Interpolation::MAXT_ID(),
+ ModelAPI_AttributeDouble, /** Max*/,
+ numstep, BuildPlugin_Interpolation::NUMSTEP_ID(),
+ ModelAPI_AttributeInteger, /** Number of steps*/,
+ creationmethod, BuildPlugin_Interpolation::CREATION_METHOD_ID(),
+ ModelAPI_AttributeString, /** Creation method*/)
/// Modify base attribute of the feature.
BUILDAPI_EXPORT
const bool theIsClosed = false,
const bool theIsToReorder = false);
+/// \ingroup CPPHighAPI
+/// \brief Create Interpolation feature using tangents.
+BUILDAPI_EXPORT
+InterpolationPtr addInterpolation(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::string & theXTexpression,
+ const std::string & theYTexpression,
+ const std::string & theZTexpression,
+ const ModelHighAPI_Double& theMinT,
+ const ModelHighAPI_Double& theMaxT,
+ const ModelHighAPI_Integer& theNbStep);
+
#endif // BuildAPI_Interpolation_H_
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include "BuildPlugin_Interpolation.h"
#include <ModelAPI_AttributeBoolean.h>
-#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_AttributeDouble.h>
+#include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_AttributeRefList.h>
#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_AttributeTables.h>
+#include <ModelAPI_Events.h>
#include <ModelAPI_ResultBody.h>
-#include <ModelAPI_ResultConstruction.h>
+#include <ModelAPI_ResultParameter.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
#include <Events_InfoMessage.h>
+#include <Locale_Convert.h>
+
#include <GeomAlgoAPI_ShapeTools.h>
#include <GeomAlgoAPI_CurveBuilder.h>
#include <GeomAlgoAPI_PointBuilder.h>
#include <GeomAPI_ShapeExplorer.h>
#include <algorithm>
+#include <sstream>
//=================================================================================================
BuildPlugin_Interpolation::BuildPlugin_Interpolation()
data()->addAttribute(USE_TANGENTS_ID(), ModelAPI_AttributeString::typeId());
data()->addAttribute(TANGENT_START_ID(), ModelAPI_AttributeSelection::typeId());
data()->addAttribute(TANGENT_END_ID(), ModelAPI_AttributeSelection::typeId());
+
+ data()->addAttribute(CREATION_METHOD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(CREATION_METHOD_BY_SELECTION_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(CREATION_METHOD_ANALYTICAL_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(EXPRESSION_ERROR_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(VARIABLE_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(VALUE_ID(), ModelAPI_AttributeTables::typeId());
+ data()->string(EXPRESSION_ERROR_ID())->setIsArgument(false);
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), EXPRESSION_ERROR_ID());
+
+ data()->addAttribute(XT_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(YT_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(ZT_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(MINT_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(MAXT_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(NUMSTEP_ID(), ModelAPI_AttributeInteger::typeId());
+
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
+ CREATION_METHOD_ANALYTICAL_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
+ CREATION_METHOD_BY_SELECTION_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), VARIABLE_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), VALUE_ID());
+ data()->addAttribute(ARGUMENTS_ID(), ModelAPI_AttributeRefList::typeId());
+ data()->reflist(ARGUMENTS_ID())->setIsArgument(false);
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ARGUMENTS_ID());
+
+ if (string(XT_ID())->value() == ""
+ && string(YT_ID())->value() == ""
+ && string(ZT_ID())->value() == "") {
+ string(XT_ID())->setValue("t");
+ string(YT_ID())->setValue("t");
+ string(ZT_ID())->setValue("t");
+ real(MINT_ID())->setValue(0);
+ real(MAXT_ID())->setValue(100);
+ integer(NUMSTEP_ID())->setValue(10);
+ updateCoordinates();
+ }
+}
+
+//=================================================================================================
+void BuildPlugin_Interpolation::attributeChanged(const std::string& theID)
+{
+ if ((theID == XT_ID()
+ || theID == YT_ID()
+ || theID == ZT_ID()
+ || theID == MINT_ID()
+ || theID == MAXT_ID()
+ || theID == NUMSTEP_ID())
+ && string(XT_ID())->value() !=""
+ && string(YT_ID())->value() !=""
+ && string(ZT_ID())->value() !=""
+ && string(CREATION_METHOD_ID())->value() == CREATION_METHOD_ANALYTICAL_ID()) {
+ updateCoordinates();
+ }
+}
+
+//=================================================================================================
+void BuildPlugin_Interpolation::updateCoordinates()
+{
+ std::wstring exp;
+ double aMint = real(MINT_ID())->value();
+ double aMaxt = real(MAXT_ID())->value();
+ int aNbrStep = integer(NUMSTEP_ID())->value();
+
+ if (aMaxt < aMint) {
+ setError("The minimum value of the parameter must be less than maximum value !!!");
+ }
+
+ double aScale = (aMaxt - aMint)/aNbrStep;
+ string(VARIABLE_ID())->setValue("t");
+
+ tables(VALUE_ID())->setSize(aNbrStep+1,4);
+ for (int step = 0; step <= aNbrStep; step++) {
+ ModelAPI_AttributeTables::Value aVal;
+ aVal.myDouble = step * aScale + aMint;
+ tables(VALUE_ID())->setValue(aVal,step,0);
+ }
+
+ outErrorMessage="";
+ evaluate(outErrorMessage);
+ data()->string(EXPRESSION_ERROR_ID())->setValue(outErrorMessage);
+ if (!outErrorMessage.empty()) {
+ setError("Error: Python interpreter ");
+ return;
+ }
}
//=================================================================================================
//=================================================================================================
void BuildPlugin_Interpolation::execute()
{
- // Get closed flag value
- bool isClosed = boolean(CLOSED_ID())->value();
+ if (string(CREATION_METHOD_ID())->value() == CREATION_METHOD_BY_SELECTION_ID()) {
+ // Get closed flag value
+ bool isClosed = boolean(CLOSED_ID())->value();
- // Get reorder flag value
- bool isToReorder = boolean(REORDER_ID())->value();
+ // Get reorder flag value
+ bool isToReorder = boolean(REORDER_ID())->value();
- // Get use tangents flag value
- bool isToUseTangents = isClosed? false : (!string(USE_TANGENTS_ID())->value().empty());
+ // Get use tangents flag value
+ bool isToUseTangents = isClosed? false : (!string(USE_TANGENTS_ID())->value().empty());
- // Get tangent for start and end points
- GeomDirPtr aDirStart, aDirEnd;
- if (isToUseTangents) {
- aDirStart = selectionToDir(selection(TANGENT_START_ID()));
- aDirEnd = selectionToDir(selection(TANGENT_END_ID()));
- }
+ // Get tangent for start and end points
+ GeomDirPtr aDirStart, aDirEnd;
+ if (isToUseTangents) {
+ aDirStart = selectionToDir(selection(TANGENT_START_ID()));
+ aDirEnd = selectionToDir(selection(TANGENT_END_ID()));
+ }
- // Get base objects list.
- AttributeSelectionListPtr aSelectionList = selectionList(BASE_OBJECTS_ID());
-
- // Collect points.
- std::list<GeomPointPtr> aPoints;
- std::set<GeomShapePtr> aContexts;
- for (int anIndex = 0; anIndex < aSelectionList->size(); ++anIndex) {
- AttributeSelectionPtr aSelection = aSelectionList->value(anIndex);
-
- GeomShapePtr aContextShape = aSelection->context()->shape();
- aContexts.insert(aContextShape);
-
- GeomShapePtr aShape = aSelection->value();
- if (!aShape.get()) {
- aShape = aContextShape;
- }
-
- GeomPointPtr aPoint = GeomAlgoAPI_PointBuilder::point(aShape);
- aPoints.push_back(aPoint);
- }
-
- // Create curve from points
- GeomEdgePtr anEdge =
- GeomAlgoAPI_CurveBuilder::edge(aPoints, isClosed, isToReorder, aDirStart, aDirEnd);
- if (!anEdge.get()) {
- setError("Error: Result curve is empty.");
- return;
- }
+ // Get base objects list.
+ AttributeSelectionListPtr aSelectionList = selectionList(BASE_OBJECTS_ID());
- // Store result.
- ResultBodyPtr aResultBody = document()->createBody(data());
- std::set<GeomShapePtr>::const_iterator aContextIt = aContexts.begin();
- for (; aContextIt != aContexts.end(); aContextIt++) {
- aResultBody->storeModified(*aContextIt, anEdge, aContextIt == aContexts.begin());
- }
- int aVertexIndex = 1;
- for (GeomAPI_ShapeExplorer anExp(anEdge, GeomAPI_Shape::VERTEX); anExp.more(); anExp.next()) {
- std::string aVertexName = "Vertex_" + std::to_string((long long)aVertexIndex);
- aResultBody->generated(anExp.current(), aVertexName);
- }
+ // Collect points.
+ std::list<GeomPointPtr> aPoints;
+ std::set<GeomShapePtr> aContexts;
+ for (int anIndex = 0; anIndex < aSelectionList->size(); ++anIndex) {
+ AttributeSelectionPtr aSelection = aSelectionList->value(anIndex);
+
+ GeomShapePtr aContextShape = aSelection->context()->shape();
+ aContexts.insert(aContextShape);
+
+ GeomShapePtr aShape = aSelection->value();
+ if (!aShape.get()) {
+ aShape = aContextShape;
+ }
+
+ GeomPointPtr aPoint = GeomAlgoAPI_PointBuilder::point(aShape);
+ aPoints.push_back(aPoint);
+ }
+
+ // Create curve from points
+ GeomEdgePtr anEdge =
+ GeomAlgoAPI_CurveBuilder::edge(aPoints, isClosed, isToReorder, aDirStart, aDirEnd);
+ if (!anEdge.get()) {
+ setError("Error: Result curve is empty.");
+ return;
+ }
+
+ // Store result.
+ ResultBodyPtr aResultBody = document()->createBody(data());
+ std::set<GeomShapePtr>::const_iterator aContextIt = aContexts.begin();
+ for (; aContextIt != aContexts.end(); aContextIt++) {
+ aResultBody->storeModified(*aContextIt, anEdge, aContextIt == aContexts.begin());
+ }
+ int aVertexIndex = 1;
+ for (GeomAPI_ShapeExplorer anExp(anEdge, GeomAPI_Shape::VERTEX); anExp.more(); anExp.next()) {
+ std::string aVertexName = "Vertex_" + std::to_string((long long)aVertexIndex);
+ aResultBody->generated(anExp.current(), aVertexName);
+ }
+
+ setResult(aResultBody);
+
+ } else {
+ if (string(XT_ID())->value() == ""
+ ||string(YT_ID())->value() == ""
+ ||string(ZT_ID())->value() == ""
+ ||tables(VALUE_ID())->rows()== 0)
+ return;
+
+ bool aWasBlocked = data()->blockSendAttributeUpdated(true);
+ updateCoordinates();
+ data()->blockSendAttributeUpdated(aWasBlocked, false);
+
+ AttributeTablesPtr aTable = tables(VALUE_ID());
+ std::list<std::vector<double>> aCoordPoints;
+ for (int step = 0; step < aTable->rows(); step++) {
+ std::vector<double> aCoordPoint;
+ ModelAPI_AttributeTables::Value aValue;
+ //x
+ aValue = aTable->value(step, 1);
+ aCoordPoint.push_back(aValue.myDouble);
+ //y
+ aValue = aTable->value(step, 2);
+ aCoordPoint.push_back(aValue.myDouble);
+ //
+ aValue = aTable->value(step, 3);
+ aCoordPoint.push_back(aValue.myDouble);
+
+ aCoordPoints.push_back(aCoordPoint);
+ }
+
+ std::list<GeomPointPtr> aPoints;
+ std::list<std::vector<double>>::const_iterator anItCoordPoints = aCoordPoints.begin();
- setResult(aResultBody);
+ for (; anItCoordPoints!=aCoordPoints.end(); ++anItCoordPoints) {
+
+ GeomVertexPtr aVertex = GeomAlgoAPI_PointBuilder::vertex((*anItCoordPoints)[0],
+ (*anItCoordPoints)[1],
+ (*anItCoordPoints)[2]);
+ aPoints.push_back(aVertex->point());
+ }
+
+ // test if some points are identical
+ std::list<GeomPointPtr>::const_iterator anItPoint1 = aPoints.begin();
+ std::list<GeomPointPtr>::const_iterator anItPoint2;
+ for(; anItPoint1 != aPoints.end(); ++ anItPoint1) {
+ anItPoint2 = anItPoint1;
+ ++anItPoint2;
+ for(; anItPoint2 != aPoints.end(); ++ anItPoint2)
+ if ((*anItPoint2)->isEqual(*anItPoint1)) {
+ setError("Error: Several points are identical");
+ return;
+ }
+ }
+
+ // Create curve from points
+ GeomEdgePtr anEdge =
+ GeomAlgoAPI_CurveBuilder::edge(aPoints, false, false,GeomDirPtr(),GeomDirPtr());
+ if (!anEdge.get()) {
+ setError("Error: Result curve is empty.");
+ return;
+ }
+
+ ResultBodyPtr aResultBody = document()->createBody(data());
+ // Load the result
+ aResultBody->store(anEdge);
+ int aVertexIndex = 1;
+ for (GeomAPI_ShapeExplorer anExp(anEdge, GeomAPI_Shape::VERTEX); anExp.more(); anExp.next()) {
+ std::string aVertexName = "Vertex_" + std::to_string((long long)aVertexIndex);
+ aResultBody->generated(anExp.current(), aVertexName);
+ aVertexIndex++;
+ }
+ setResult(aResultBody);
+ }
}
+
+//=================================================================================================
+void BuildPlugin_Interpolation::evaluate(std::string& theError)
+{
+ FeaturePtr aMyPtr = std::dynamic_pointer_cast<ModelAPI_Feature>(data()->owner());
+ std::shared_ptr<ModelAPI_BuildEvalMessage> aProcessMessage =
+ ModelAPI_BuildEvalMessage::send(aMyPtr, this);
+
+ if (aProcessMessage->isProcessed()) {
+ theError = aProcessMessage->error();
+
+ const std::list<ResultParameterPtr>& aParamsList = aProcessMessage->params();
+ //store the list of parameters to store if changed
+ AttributeRefListPtr aParams = reflist(ARGUMENTS_ID());
+ aParams->clear();
+ std::list<ResultParameterPtr>::const_iterator aNewIter = aParamsList.begin();
+ for (; aNewIter != aParamsList.end(); aNewIter++) {
+ aParams->append(*aNewIter);
+ }
+ } else { // error: python interpreter is not active
+ theError = "Python interpreter is not available";
+ }
+}
\ No newline at end of file
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
return MY_ID;
}
+ /// Attribute name of creation method.
+ inline static const std::string& CREATION_METHOD_ID()
+ {
+ static const std::string MY_CREATION_METHOD_ID("interpolation_method");
+ return MY_CREATION_METHOD_ID;
+ }
+
+ /// Attribute name of creation method by selection
+ inline static const std::string& CREATION_METHOD_BY_SELECTION_ID()
+ {
+ static const std::string MY_CREATION_METHOD_BY_SELECTION_ID("by_selection");
+ return MY_CREATION_METHOD_BY_SELECTION_ID;
+ }
+
+ /// Attribute name of creation method analytical
+ inline static const std::string& CREATION_METHOD_ANALYTICAL_ID()
+ {
+ static const std::string MY_CREATION_METHOD_ANALYTICAL_ID("analytical");
+ return MY_CREATION_METHOD_ANALYTICAL_ID;
+ }
+
/// Attribute name of base objects.
inline static const std::string& BASE_OBJECTS_ID()
{
return MY_TANGENT_END_ID;
}
+ /// Attribute name of x(t) equation.
+ inline static const std::string& XT_ID()
+ {
+ static const std::string MY_XT_ID("xt");
+ return MY_XT_ID;
+ }
+
+ /// Attribute name of y(t) equation.
+ inline static const std::string& YT_ID()
+ {
+ static const std::string MY_YT_ID("yt");
+ return MY_YT_ID;
+ }
+
+ /// Attribute name of z(t) equation.
+ inline static const std::string& ZT_ID()
+ {
+ static const std::string MY_ZT_ID("zt");
+ return MY_ZT_ID;
+ }
+
+ /// Attribute name of min t.
+ inline static const std::string& MINT_ID()
+ {
+ static const std::string MY_MINT_ID("mint");
+ return MY_MINT_ID;
+ }
+
+ /// Attribute name of max t.
+ inline static const std::string& MAXT_ID()
+ {
+ static const std::string MY_MAXT_ID("maxt");
+ return MY_MAXT_ID;
+ }
+
+ /// Attribute of parameter name of variable
+ inline static const std::string& VARIABLE_ID()
+ {
+ static const std::string MY_VARIABLE_ID("variable");
+ return MY_VARIABLE_ID;
+ }
+
+ /// Attribute of parameter name of value
+ inline static const std::string& VALUE_ID()
+ {
+ static const std::string MY_VALUE_ID("value");
+ return MY_VALUE_ID;
+ }
+
+ /// Attribute of parameter expression error
+ inline static const std::string& EXPRESSION_ERROR_ID()
+ {
+ static const std::string MY_EXPRESSION_ERROR_ID("ExpressionError");
+ return MY_EXPRESSION_ERROR_ID;
+ }
+
+ /// Attribute name of number of steps
+ inline static const std::string& NUMSTEP_ID()
+ {
+ static const std::string MY_NUMSTEP_ID("numstep");
+ return MY_NUMSTEP_ID;
+ }
+
/// Default value of the closed attribute
inline static bool CLOSED_DEFAULT() { return false; }
+ /// List of references to the arguments of this expression
+ inline static const std::string& ARGUMENTS_ID()
+ {
+ static const std::string MY_ARGUMENTS_ID("arguments");
+ return MY_ARGUMENTS_ID;
+ }
+
/// \return the kind of a feature.
BUILDPLUGIN_EXPORT virtual const std::string& getKind()
{
/// Creates a new part document if needed.
BUILDPLUGIN_EXPORT virtual void execute();
+
+ /// Called on change of any argument-attribute of this object.
+ /// \param[in] theID identifier of changed attribute.
+ BUILDPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+
+ protected:
+ /// Evaluates the expression x(t), y(t),z(t) in value table.
+ void evaluate(std::string& theError);
+
+ /// Update coordinates x,y,z
+ void updateCoordinates();
+
+ /// Output error for python interpreter
+ std::string outErrorMessage;
+
};
#endif
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
new BuildPlugin_ValidatorFillingSelection());
aFactory->registerValidator("BuildPlugin_ValidatorBaseForVertex",
new BuildPlugin_ValidatorBaseForVertex());
+ aFactory->registerValidator("BuildPlugin_ValidatorExpressionInterpolation",
+ new BuildPlugin_ValidatorExpressionInterpolation());
// Register this plugin.
ModelAPI_Session::get()->registerPlugin(this);
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include "BuildPlugin_Validators.h"
#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeString.h>
#include <ModelAPI_ResultConstruction.h>
#include <GeomAPI_PlanarEdges.h>
#include <GeomValidators_FeatureKind.h>
#include <GeomValidators_ShapeType.h>
+#include <BuildPlugin_Interpolation.h>
+
#include <SketchPlugin_Sketch.h>
#include <Events_InfoMessage.h>
return true;
}
+
+//=================================================================================================
+bool BuildPlugin_ValidatorExpressionInterpolation::isValid(const AttributePtr& theAttribute,
+ const std::list<std::string>& /*theArguments*/,
+ Events_InfoMessage& theError) const
+{
+ FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
+
+ AttributeStringPtr aStrAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeString>(theAttribute);
+ if (!aStrAttr->isInitialized()) {
+ theError = "Attribute \"%1\" is not initialized.";
+ theError.arg(aStrAttr->id());
+ return false;
+ }
+ bool isEmptyExpr = aStrAttr->value().empty();
+ if (isEmptyExpr) {
+ theError = "Expression is empty.";
+ return false;
+ }
+
+ theError = aFeature->string(BuildPlugin_Interpolation::EXPRESSION_ERROR_ID())->value();
+ return theError.empty();
+}
+
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
Events_InfoMessage& theError) const;
};
+ /// \class BuildPlugin_ValidatorExpression
+ /// \ingroup Validators
+ /// \brief Validator for the expression of parameter.
+class BuildPlugin_ValidatorExpressionInterpolation: public ModelAPI_AttributeValidator
+{
+public:
+ //! Returns true if attribute has a valid parameter expression.
+ //! \param theAttribute the checked attribute
+ //! \param theArguments arguments of the attribute
+ //! \param theError the error string message if validation fails
+ virtual bool isValid(const AttributePtr& theAttribute,
+ const std::list<std::string>& theArguments,
+ Events_InfoMessage& theError) const;
+};
+
#endif
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
<translation>Tangentes</translation>
</message>
</context>
-
+ <context>
+ <name>Interpolation</name>
+ <message>
+ <source>Curves parameters</source>
+ <translation>Paramètres de la courbe</translation>
+ </message>
+ </context>
+ <context>
+ <name>Interpolation:xt</name>
+ <message>
+ <source>X(t) equation</source>
+ <translation>Équation X(t)</translation>
+ </message>
+ </context>
+ <context>
+ <name>Interpolation:yt</name>
+ <message>
+ <source>Y(t) equation</source>
+ <translation>Équation Y(t)</translation>
+ </message>
+ </context>
+ <context>
+ <name>Interpolation:zt</name>
+ <message>
+ <source>Z(t) equation</source>
+ <translation>Équation Z(t)</translation>
+ </message>
+ </context>
+ <context>
+ <name>Interpolation:numstep</name>
+ <message>
+ <source>Number of steps</source>
+ <translation>Nombre de pas</translation>
+ </message>
+ </context>
<context>
<name>Polyline:base_objects</name>
<message>
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Events
${PROJECT_SOURCE_DIR}/src/Config
${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/Locale
${PROJECT_SOURCE_DIR}/src/GeomAPI
${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
${PROJECT_SOURCE_DIR}/src/GeomValidators
${PROJECT_SOURCE_DIR}/src/SketchPlugin
+ ${PROJECT_SOURCE_DIR}/src/InitializationPlugin
+ ${SUIT_INCLUDE}
+ ${PYTHON_INCLUDE_DIR}
)
SET(PROJECT_HEADERS
GeomAPI
GeomAlgoAPI
GeomValidators
+ ${PyInterp}
+ ${PYTHON_LIBRARIES}
)
ADD_DEFINITIONS(-DBUILDPLUGIN_EXPORTS)
INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Build)
-ADD_UNIT_TESTS(TestVertex.py
- TestVertex_ErrorMsg.py
- TestVertex_WholeSketch_1.py
- TestVertex_WholeSketch_2.py
- TestEdge.py
- TestEdge_ByPoints.py
- TestEdge_ErrorMsg.py
- TestEdge_WholeSketch_1.py
- TestEdge_WholeSketch_2.py
- TestEdge_WholeSketch_3.py
- TestEdge_WholeSketch_4.py
- TestWire.py
- TestWire_ErrorMsg.py
- TestWire_WholeSketch_1.py
- TestWire_WholeSketch_2.py
- TestWire_WholeSketch_3.py
- TestWire_WholeSketch_4.py
- TestWire_WholeSketch_5.py
- TestWire_WholeSketch_6.py
- TestPolyline.py
- TestInterpolation.py
- TestFace.py
- TestFace_ErrorMsg.py
- TestFace_WholeSketch_1.py
- TestFace_WholeSketch_2.py
- TestShell.py
- TestShell_WholeSketch_1.py
- TestShell_WholeSketch_2.py
- TestSolid.py
- TestSolid_ErrorMsg.py
- TestCompSolid.py
- TestCompound.py
- TestCompound_ErrorMsg.py
- TestCompound_History.py
- TestSubShapes.py
- TestSubShapes_ErrorMsg.py
- TestFilling.py
- TestFilling_ByEdges.py
- TestFilling_ByWires.py
- TestFilling_Mixed.py
- TestFilling_ErrorMsg.py
- Test1920.py
- Test2398.py
- Test2409.py
- Test2415.py
- Test2439.py
- Test2454.py
- Test3125.py
- Test3271.py
- Test19056.py
- Test20469.py
- Test20513.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/BuildPlugin")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
+++ /dev/null
-# Copyright (C) 2020 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, 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
-# 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
-#
-
-from SketchAPI import *
-
-from salome.shaper import model
-
-model.begin()
-partSet = model.moduleDocument()
-
-### Create Part
-Part_1 = model.addPart(partSet)
-Part_1_doc = Part_1.document()
-
-### Create Sketch
-Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
-
-### Create SketchProjection
-SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
-SketchPoint_1 = SketchProjection_1.createdFeature()
-
-### Create SketchBSpline
-SketchBSpline_1_poles = [(0, 0),
- (64.69989977297864, 3.820449445888325),
- (63.227018959685, 42.02181716036146),
- (19.7442263567145, 66.94290132940253),
- (0, 0)
- ]
-SketchBSpline_1 = Sketch_1.addSpline(poles = SketchBSpline_1_poles)
-[SketchPoint_2, SketchPoint_3, SketchPoint_4, SketchPoint_5, SketchPoint_6] = SketchBSpline_1.controlPoles(auxiliary = [0, 1, 2, 3, 4])
-[SketchLine_1, SketchLine_2, SketchLine_3, SketchLine_4] = SketchBSpline_1.controlPolygon(auxiliary = [0, 1, 2, 3])
-Sketch_1.setCoincident(SketchAPI_Point(SketchPoint_2).coordinates(), SketchPoint_1.result())
-Sketch_1.setCoincident(SketchAPI_Point(SketchPoint_6).coordinates(), SketchPoint_1.result())
-model.do()
-
-### Create Plane
-Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Sketch_1/Face-SketchBSpline_1f"), 10, False)
-
-### Create Sketch
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
-
-### Create SketchProjection
-SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
-SketchPoint_7 = SketchProjection_2.createdFeature()
-
-### Create SketchBSpline
-SketchBSpline_2_poles = [(0, 0),
- (8.839087148173476, 45.21301708610518),
- (53.18579907801947, 39.22586299994072),
- (47.99568029170977, 4.506542817571567),
- (0, 0)
- ]
-SketchBSpline_2 = Sketch_2.addSpline(poles = SketchBSpline_2_poles)
-[SketchPoint_8, SketchPoint_9, SketchPoint_10, SketchPoint_11, SketchPoint_12] = SketchBSpline_2.controlPoles(auxiliary = [0, 1, 2, 3, 4])
-[SketchLine_5, SketchLine_6, SketchLine_7, SketchLine_8] = SketchBSpline_2.controlPolygon(auxiliary = [0, 1, 2, 3])
-Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_8).coordinates(), SketchPoint_7.result())
-Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_12).coordinates(), SketchPoint_7.result())
-model.do()
-
-### Create Wire
-Wire_1 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchBSpline_1")], False)
-
-### Create Wire
-Wire_2 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_2/SketchBSpline_2")], False)
-
-### Create Filling
-Filling_1 = model.addFilling(Part_1_doc, [model.selection("WIRE", "Wire_1_1"), model.selection("WIRE", "Wire_2_1")])
-
-model.end()
-
-from GeomAPI import *
-
-model.testNbResults(Filling_1, 1)
-model.testNbSubResults(Filling_1, [0])
-model.testNbSubShapes(Filling_1, GeomAPI_Shape.SOLID, [0])
-model.testNbSubShapes(Filling_1, GeomAPI_Shape.FACE, [1])
-model.testNbSubShapes(Filling_1, GeomAPI_Shape.EDGE, [4])
-model.testNbSubShapes(Filling_1, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Filling_1, [1872.0403629667237])
-
-assert(model.checkPythonDump())
--- /dev/null
+# Copyright (C) 2020-2021 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, 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
+# 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
+#
+
+from SketchAPI import *
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+
+### Create Part
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+### Create Sketch
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+
+### Create SketchProjection
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+
+### Create SketchBSpline
+SketchBSpline_1_poles = [(0, 0),
+ (64.69989977297864, 3.820449445888325),
+ (63.227018959685, 42.02181716036146),
+ (19.7442263567145, 66.94290132940253),
+ (0, 0)
+ ]
+SketchBSpline_1 = Sketch_1.addSpline(poles = SketchBSpline_1_poles)
+[SketchPoint_2, SketchPoint_3, SketchPoint_4, SketchPoint_5, SketchPoint_6] = SketchBSpline_1.controlPoles(auxiliary = [0, 1, 2, 3, 4])
+[SketchLine_1, SketchLine_2, SketchLine_3, SketchLine_4] = SketchBSpline_1.controlPolygon(auxiliary = [0, 1, 2, 3])
+Sketch_1.setCoincident(SketchAPI_Point(SketchPoint_2).coordinates(), SketchPoint_1.result())
+Sketch_1.setCoincident(SketchAPI_Point(SketchPoint_6).coordinates(), SketchPoint_1.result())
+model.do()
+
+### Create Plane
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Sketch_1/Face-SketchBSpline_1f"), 10, False)
+
+### Create Sketch
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
+
+### Create SketchProjection
+SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_7 = SketchProjection_2.createdFeature()
+
+### Create SketchBSpline
+SketchBSpline_2_poles = [(0, 0),
+ (8.839087148173476, 45.21301708610518),
+ (53.18579907801947, 39.22586299994072),
+ (47.99568029170977, 4.506542817571567),
+ (0, 0)
+ ]
+SketchBSpline_2 = Sketch_2.addSpline(poles = SketchBSpline_2_poles)
+[SketchPoint_8, SketchPoint_9, SketchPoint_10, SketchPoint_11, SketchPoint_12] = SketchBSpline_2.controlPoles(auxiliary = [0, 1, 2, 3, 4])
+[SketchLine_5, SketchLine_6, SketchLine_7, SketchLine_8] = SketchBSpline_2.controlPolygon(auxiliary = [0, 1, 2, 3])
+Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_8).coordinates(), SketchPoint_7.result())
+Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_12).coordinates(), SketchPoint_7.result())
+model.do()
+
+### Create Wire
+Wire_1 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchBSpline_1")], False)
+
+### Create Wire
+Wire_2 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_2/SketchBSpline_2")], False)
+
+### Create Filling
+Filling_1 = model.addFilling(Part_1_doc, [model.selection("WIRE", "Wire_1_1"), model.selection("WIRE", "Wire_2_1")])
+
+model.end()
+
+from GeomAPI import *
+
+model.testNbResults(Filling_1, 1)
+model.testNbSubResults(Filling_1, [0])
+model.testNbSubShapes(Filling_1, GeomAPI_Shape.SOLID, [0])
+model.testNbSubShapes(Filling_1, GeomAPI_Shape.FACE, [1])
+model.testNbSubShapes(Filling_1, GeomAPI_Shape.EDGE, [4])
+model.testNbSubShapes(Filling_1, GeomAPI_Shape.VERTEX, [8])
+model.testResultsAreas(Filling_1, [1872.0403629667237])
+
+assert(model.checkPythonDump())
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+
+### Create Part
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+### Create Plane
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), 36.35, False)
+
+### Create Sketch
+Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
+
+### Create SketchPoint
+SketchPoint_1 = Sketch_1.addPoint(3.502, 0)
+SketchPoint_1.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_2 = Sketch_1.addPoint(3.47587508, 0.08247210000000001)
+SketchPoint_2.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_3 = Sketch_1.addPoint(3.4170765, 0.14106056)
+SketchPoint_3.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_4 = Sketch_1.addPoint(3.33866672, 0.1866566)
+SketchPoint_4.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_5 = Sketch_1.addPoint(3.23630326, 0.2409376)
+SketchPoint_5.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_6 = Sketch_1.addPoint(3.12742608, 0.28649862)
+SketchPoint_6.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_7 = Sketch_1.addPoint(3.03161136, 0.32123846)
+SketchPoint_7.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_8 = Sketch_1.addPoint(2.92269916, 0.35163582)
+SketchPoint_8.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_9 = Sketch_1.addPoint(2.85300936, 0.36900574)
+SketchPoint_9.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_10 = Sketch_1.addPoint(2.76153712, 0.38637566)
+SketchPoint_10.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_11 = Sketch_1.addPoint(2.67006488, 0.39936808)
+SketchPoint_11.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_12 = Sketch_1.addPoint(2.58297014, 0.4167379999999999)
+SketchPoint_12.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_13 = Sketch_1.addPoint(2.47843544, 0.4297654399999999)
+SketchPoint_13.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_14 = Sketch_1.addPoint(2.3521183, 0.4384504)
+SketchPoint_14.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_15 = Sketch_1.addPoint(2.2127387, 0.4384504)
+SketchPoint_15.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_16 = Sketch_1.addPoint(2.06026162, 0.4384504)
+SketchPoint_16.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_17 = Sketch_1.addPoint(1.92743076, 0.4275942)
+SketchPoint_17.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_18 = Sketch_1.addPoint(1.80762734, 0.4167379999999999)
+SketchPoint_18.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_19 = Sketch_1.addPoint(1.70747014, 0.39936808)
+SketchPoint_19.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_20 = Sketch_1.addPoint(1.60293544, 0.38203318)
+SketchPoint_20.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_21 = Sketch_1.addPoint(1.48968076, 0.36466326)
+SketchPoint_21.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_22 = Sketch_1.addPoint(1.3720836, 0.34295086)
+SketchPoint_22.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_23 = Sketch_1.addPoint(1.25010894, 0.31689598)
+SketchPoint_23.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_24 = Sketch_1.addPoint(1.12162056, 0.2908411)
+SketchPoint_24.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_25 = Sketch_1.addPoint(0.99747466, 0.26047876)
+SketchPoint_25.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_26 = Sketch_1.addPoint(0.8929399600000001, 0.23442388)
+SketchPoint_26.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_27 = Sketch_1.addPoint(0.7971252400000002, 0.21271148)
+SketchPoint_27.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_28 = Sketch_1.addPoint(0.6860417999999999, 0.1866566)
+SketchPoint_28.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_29 = Sketch_1.addPoint(0.5597246600000001, 0.15625924)
+SketchPoint_29.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_30 = Sketch_1.addPoint(0.4312362800000002, 0.1258969)
+SketchPoint_30.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_31 = Sketch_1.addPoint(0.3397640399999999, 0.10201326)
+SketchPoint_31.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_32 = Sketch_1.addPoint(0.2395718200000001, 0.07812962)
+SketchPoint_32.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_33 = Sketch_1.addPoint(0.1437571000000002, 0.056032)
+SketchPoint_33.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_34 = Sketch_1.addPoint(0.06534731999999988, 0.03470482)
+SketchPoint_34.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_35 = Sketch_1.addPoint(0, 0.003502)
+SketchPoint_35.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_36 = Sketch_1.addPoint(0.0697248199999998, 0.014008)
+SketchPoint_36.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_37 = Sketch_1.addPoint(0.17443462, 0.0252144)
+SketchPoint_37.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_38 = Sketch_1.addPoint(0.25701178, 0.0266152)
+SketchPoint_38.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_39 = Sketch_1.addPoint(0.3658889599999999, 0.02601986)
+SketchPoint_39.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_40 = Sketch_1.addPoint(0.4791436400000002, 0.02601986)
+SketchPoint_40.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_41 = Sketch_1.addPoint(0.5815071000000001, 0.0173349)
+SketchPoint_41.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_42 = Sketch_1.addPoint(0.7012754999999999, 0.00213622)
+SketchPoint_42.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_43 = Sketch_1.addPoint(0.8058101999999998, -0.01516366)
+SketchPoint_43.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_44 = Sketch_1.addPoint(0.9060024200000001, -0.03470482)
+SketchPoint_44.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_45 = Sketch_1.addPoint(1.03666204, -0.0607597)
+SketchPoint_45.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_46 = Sketch_1.addPoint(1.14557424, -0.09115706)
+SketchPoint_46.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_47 = Sketch_1.addPoint(1.2980163, -0.1258969)
+SketchPoint_47.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_48 = Sketch_1.addPoint(1.4373959, -0.15625924)
+SketchPoint_48.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_49 = Sketch_1.addPoint(1.55937056, -0.1866566)
+SketchPoint_49.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_50 = Sketch_1.addPoint(1.6856877, -0.21705396)
+SketchPoint_50.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_51 = Sketch_1.addPoint(1.81634732, -0.2409376)
+SketchPoint_51.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_52 = Sketch_1.addPoint(1.94266446, -0.26047876)
+SketchPoint_52.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_53 = Sketch_1.addPoint(2.08204406, -0.27781366)
+SketchPoint_53.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_54 = Sketch_1.addPoint(2.22580116, -0.2908411)
+SketchPoint_54.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_55 = Sketch_1.addPoint(2.36080326, -0.29735482)
+SketchPoint_55.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_56 = Sketch_1.addPoint(2.51328034, -0.29952606)
+SketchPoint_56.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_57 = Sketch_1.addPoint(2.63959748, -0.29301234)
+SketchPoint_57.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_58 = Sketch_1.addPoint(2.77680584, -0.28215614)
+SketchPoint_58.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_59 = Sketch_1.addPoint(2.89223176, -0.2691287)
+SketchPoint_59.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_60 = Sketch_1.addPoint(3.0185489, -0.24745132)
+SketchPoint_60.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_61 = Sketch_1.addPoint(3.16444222, -0.21271148)
+SketchPoint_61.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_62 = Sketch_1.addPoint(3.31471304, -0.16060172)
+SketchPoint_62.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_63 = Sketch_1.addPoint(3.40618528, -0.11721194)
+SketchPoint_63.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_64 = Sketch_1.addPoint(3.4715326, -0.06510218)
+SketchPoint_64.setAuxiliary(True)
+
+### Create SketchBSpline
+SketchBSpline_1_poles = [(3.502, 0),
+ (3.501708060470513, 0.03160465459957851),
+ (3.482306354808988, 0.08478594846732339),
+ (3.416982460484224, 0.1463028723964636),
+ (3.330867828938158, 0.1897725095120994),
+ (3.23691571256371, 0.2438885707817408),
+ (3.132475493449838, 0.2847168793431304),
+ (3.028693716669709, 0.3242771718865035),
+ (2.935991590725414, 0.3481773438606656),
+ (2.846302117977083, 0.3714272918230952),
+ (2.761971777722034, 0.3876700086132496),
+ (2.670901019132808, 0.3971222319904175),
+ (2.577912212391188, 0.4199064802107029),
+ (2.47138895770733, 0.4307739368475885),
+ (2.347934842807255, 0.4411206976945238),
+ (2.208393417939975, 0.4367094703481399),
+ (2.066490356928406, 0.4424654746602308),
+ (1.931861446733529, 0.4266278861079822),
+ (1.813439066878724, 0.4202402668802049),
+ (1.706149087521655, 0.3984156148279285),
+ (1.600151931908012, 0.381280150658782),
+ (1.487912755840739, 0.3651602028428825),
+ (1.37022484781707, 0.343451145226399),
+ (1.248225848031129, 0.3155391742155946),
+ (1.122361457008797, 0.2925847187390579),
+ (1.003957496481461, 0.2621074537257155),
+ (0.8961617237627484, 0.2345532360663585),
+ (0.7918988749704297, 0.211845235390749),
+ (0.6808742181768952, 0.1856161550032198),
+ (0.5591323563208087, 0.1555837712922512),
+ (0.4432312945768512, 0.1299207001590713),
+ (0.3369105879407892, 0.1005196423732715),
+ (0.2422714917388343, 0.0789561461823229),
+ (0.1454129368472911, 0.05575321928504596),
+ (0.07867537192801388, 0.04292748679362836),
+ (-0.03801510663679483, -0.009036231961024368),
+ (0.09668159902862462, 0.02124137982940557),
+ (0.1631020115172611, 0.02544418940840985),
+ (0.2670052837801755, 0.02725755100255278),
+ (0.3669396449571852, 0.02499900964975237),
+ (0.4758196106561338, 0.02860804255883151),
+ (0.587520466545792, 0.01701112796086315),
+ (0.696501264135322, 0.003600344371230613),
+ (0.8046893603429499, -0.01419519074507264),
+ (0.9160129303585658, -0.03746502686037816),
+ (1.03084989928976, -0.05621611703810876),
+ (1.15892564877219, -0.09721235004459683),
+ (1.293587814245105, -0.1248468755833264),
+ (1.432121846768275, -0.1540096476220431),
+ (1.560708865933035, -0.187062827568635),
+ (1.686271640551389, -0.2189476512659969),
+ (1.814669465172142, -0.2409413298907317),
+ (1.94672182252948, -0.2618358185518865),
+ (2.083258581034335, -0.2785950467488627),
+ (2.222670155691588, -0.2918735040977562),
+ (2.366549046533922, -0.297866371507273),
+ (2.504656418820893, -0.3018436275465021),
+ (2.643344514150033, -0.2930128256147972),
+ (2.769720467648912, -0.2834650455787363),
+ (2.896386200659248, -0.2699367156705364),
+ (3.025904808388414, -0.2471667438643729),
+ (3.168089816001797, -0.2147033470830538),
+ (3.297598829858346, -0.1692120751505936),
+ (3.4021366076639, -0.1232968436621545),
+ (3.474062839110283, -0.07177094713741811),
+ (3.497525008229238, -0.02562138888775374),
+ (3.502, 0)
+ ]
+SketchBSpline_1 = Sketch_1.addSpline(degree = 3, poles = SketchBSpline_1_poles, weights = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], knots = [0, 0.01183488863837179, 0.0231901864984856, 0.03559858893144927, 0.05144916515834002, 0.06759531467622239, 0.0815379341596944, 0.09700677492797639, 0.1068321569610141, 0.1195693666101132, 0.1322085557927937, 0.1443579416201434, 0.1587691279665198, 0.1760903712525299, 0.1951577895815503, 0.2160169703364635, 0.2342490967534491, 0.2507056052742759, 0.2646118431448987, 0.2791077011690486, 0.2947823396709444, 0.3111417859997592, 0.3282046159595691, 0.3461398429174012, 0.3636238095657637, 0.3783618826153202, 0.391801869278653, 0.4074107325669362, 0.4251844860013295, 0.4432460569026663, 0.4561791711061376, 0.4702697244163377, 0.4837214559733177, 0.4948377859291224, 0.5047442665271804, 0.5143904392393579, 0.5287967600422182, 0.5400951120443203, 0.5549899587260146, 0.5704834338205002, 0.5845372797011691, 0.601053244848017, 0.6155483198902286, 0.6295130832805995, 0.6477395111687876, 0.6632083519370694, 0.6845974067707579, 0.7041119934399063, 0.7213087363026549, 0.7390824897370483, 0.7572531654218201, 0.7747391660376208, 0.7939534892917685, 0.8137003452650871, 0.8321903971419141, 0.8530516926114459, 0.8703550992317159, 0.8891841498048808, 0.9050749088751692, 0.9226079659764084, 0.9431244997359293, 0.9648828024586863, 0.9787328512217585, 0.9901668364115462, 1], multiplicities = [4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4])
+Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchBSpline_1.startPoint())
+Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchBSpline_1.endPoint())
+Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_4.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_5.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_7.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_8.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_9.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_10.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_11.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_12.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_13.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_14.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_15.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_16.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_17.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_18.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_19.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_20.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_21.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_22.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_23.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_24.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_25.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_26.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_27.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_28.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_29.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_30.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_31.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_32.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_33.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_34.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_35.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_36.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_37.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_38.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_39.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_40.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_41.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_42.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_43.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_44.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_45.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_46.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_47.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_48.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_49.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_50.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_51.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_52.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_53.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_54.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_55.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_56.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_57.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_58.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_59.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_60.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_61.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_62.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_63.coordinates(), SketchBSpline_1.result())
+Sketch_1.setCoincident(SketchPoint_64.coordinates(), SketchBSpline_1.result())
+
+### Create SketchOffset
+SketchOffset_1 = Sketch_1.addOffset([SketchBSpline_1.result()], 0.01, False)
+[SketchBSpline_2, SketchBSpline_3, SketchBSpline_4, SketchBSpline_5, SketchBSpline_6, SketchBSpline_7, SketchBSpline_8, SketchBSpline_9, SketchBSpline_10, SketchBSpline_11, SketchBSpline_12, SketchBSpline_13, SketchBSpline_14, SketchBSpline_15, SketchBSpline_16, SketchBSpline_17, SketchBSpline_18, SketchBSpline_19, SketchBSpline_20, SketchBSpline_21, SketchBSpline_22, SketchBSpline_23, SketchBSpline_24, SketchBSpline_25, SketchBSpline_26, SketchBSpline_27, SketchBSpline_28, SketchBSpline_29, SketchBSpline_30, SketchBSpline_31, SketchBSpline_32, SketchBSpline_33, SketchBSpline_34, SketchBSpline_35, SketchBSpline_36, SketchBSpline_37, SketchBSpline_38, SketchBSpline_39, SketchBSpline_40, SketchBSpline_41, SketchBSpline_42, SketchBSpline_43, SketchBSpline_44, SketchBSpline_45, SketchBSpline_46, SketchBSpline_47, SketchBSpline_48, SketchBSpline_49, SketchBSpline_50, SketchBSpline_51, SketchBSpline_52, SketchBSpline_53, SketchBSpline_54, SketchBSpline_55, SketchBSpline_56, SketchBSpline_57, SketchBSpline_58, SketchBSpline_59, SketchBSpline_60, SketchBSpline_61, SketchArc_1] = SketchOffset_1.offset()
+
+### Create SketchOffset
+SketchOffset_2 = Sketch_1.addOffset([SketchBSpline_1.result()], 0.07000000000000001, False)
+[SketchBSpline_62, SketchBSpline_63, SketchBSpline_64, SketchBSpline_65, SketchBSpline_66, SketchBSpline_67, SketchBSpline_68, SketchBSpline_69, SketchBSpline_70, SketchBSpline_71, SketchBSpline_72, SketchBSpline_73, SketchBSpline_74, SketchBSpline_75, SketchBSpline_76, SketchBSpline_77, SketchBSpline_78, SketchBSpline_79, SketchBSpline_80, SketchBSpline_81, SketchBSpline_82, SketchBSpline_83, SketchBSpline_84, SketchBSpline_85, SketchBSpline_86, SketchBSpline_87, SketchBSpline_88, SketchBSpline_89, SketchBSpline_90, SketchBSpline_91, SketchBSpline_92, SketchBSpline_93, SketchBSpline_94, SketchBSpline_95, SketchBSpline_96, SketchBSpline_97, SketchBSpline_98, SketchBSpline_99, SketchBSpline_100, SketchBSpline_101, SketchBSpline_102, SketchBSpline_103, SketchBSpline_104, SketchBSpline_105, SketchBSpline_106, SketchBSpline_107, SketchBSpline_108, SketchBSpline_109, SketchBSpline_110, SketchBSpline_111, SketchBSpline_112, SketchBSpline_113, SketchBSpline_114, SketchBSpline_115, SketchBSpline_116, SketchBSpline_117, SketchBSpline_118, SketchBSpline_119, SketchBSpline_120, SketchBSpline_121, SketchArc_2] = SketchOffset_2.offset()
+model.do()
+
+### Create Wire
+Wire_1 = model.addWire(Part_1_doc, [model.selection("EDGE", "SketchBSpline_1")], False)
+
+### Create Wire
+Wire_2_objects = [model.selection("EDGE", "SketchBSpline_2"),
+ model.selection("EDGE", "SketchBSpline_3"),
+ model.selection("EDGE", "SketchBSpline_4"),
+ model.selection("EDGE", "SketchBSpline_5"),
+ model.selection("EDGE", "SketchBSpline_6"),
+ model.selection("EDGE", "SketchBSpline_7"),
+ model.selection("EDGE", "SketchBSpline_8"),
+ model.selection("EDGE", "SketchBSpline_9"),
+ model.selection("EDGE", "SketchBSpline_10"),
+ model.selection("EDGE", "SketchBSpline_11"),
+ model.selection("EDGE", "SketchBSpline_12"),
+ model.selection("EDGE", "SketchBSpline_13"),
+ model.selection("EDGE", "SketchBSpline_14"),
+ model.selection("EDGE", "SketchBSpline_15"),
+ model.selection("EDGE", "SketchBSpline_16"),
+ model.selection("EDGE", "SketchBSpline_17"),
+ model.selection("EDGE", "SketchBSpline_18"),
+ model.selection("EDGE", "SketchBSpline_19"),
+ model.selection("EDGE", "SketchBSpline_20"),
+ model.selection("EDGE", "SketchBSpline_21"),
+ model.selection("EDGE", "SketchBSpline_22"),
+ model.selection("EDGE", "SketchBSpline_23"),
+ model.selection("EDGE", "SketchBSpline_24"),
+ model.selection("EDGE", "SketchBSpline_25"),
+ model.selection("EDGE", "SketchBSpline_26"),
+ model.selection("EDGE", "SketchBSpline_27"),
+ model.selection("EDGE", "SketchBSpline_28"),
+ model.selection("EDGE", "SketchBSpline_29"),
+ model.selection("EDGE", "SketchBSpline_30"),
+ model.selection("EDGE", "SketchBSpline_31"),
+ model.selection("EDGE", "SketchBSpline_32"),
+ model.selection("EDGE", "SketchBSpline_33"),
+ model.selection("EDGE", "SketchBSpline_34"),
+ model.selection("EDGE", "SketchBSpline_35"),
+ model.selection("EDGE", "SketchBSpline_36"),
+ model.selection("EDGE", "SketchBSpline_37"),
+ model.selection("EDGE", "SketchBSpline_38"),
+ model.selection("EDGE", "SketchBSpline_39"),
+ model.selection("EDGE", "SketchBSpline_40"),
+ model.selection("EDGE", "SketchBSpline_41"),
+ model.selection("EDGE", "SketchBSpline_42"),
+ model.selection("EDGE", "SketchBSpline_43"),
+ model.selection("EDGE", "SketchBSpline_44"),
+ model.selection("EDGE", "SketchBSpline_45"),
+ model.selection("EDGE", "SketchBSpline_46"),
+ model.selection("EDGE", "SketchBSpline_47"),
+ model.selection("EDGE", "SketchBSpline_48"),
+ model.selection("EDGE", "SketchBSpline_49"),
+ model.selection("EDGE", "SketchBSpline_50"),
+ model.selection("EDGE", "SketchBSpline_51"),
+ model.selection("EDGE", "SketchBSpline_52"),
+ model.selection("EDGE", "SketchBSpline_53"),
+ model.selection("EDGE", "SketchBSpline_54"),
+ model.selection("EDGE", "SketchBSpline_55"),
+ model.selection("EDGE", "SketchBSpline_56"),
+ model.selection("EDGE", "SketchBSpline_57"),
+ model.selection("EDGE", "SketchBSpline_58"),
+ model.selection("EDGE", "SketchBSpline_59"),
+ model.selection("EDGE", "SketchBSpline_60"),
+ model.selection("EDGE", "SketchBSpline_61"),
+ model.selection("EDGE", "SketchArc_1_2")]
+Wire_2 = model.addWire(Part_1_doc, Wire_2_objects, False)
+
+### Create Wire
+Wire_3_objects = [model.selection("EDGE", "SketchBSpline_62"),
+ model.selection("EDGE", "SketchBSpline_63"),
+ model.selection("EDGE", "SketchBSpline_64"),
+ model.selection("EDGE", "SketchBSpline_65"),
+ model.selection("EDGE", "SketchBSpline_66"),
+ model.selection("EDGE", "SketchBSpline_67"),
+ model.selection("EDGE", "SketchBSpline_68"),
+ model.selection("EDGE", "SketchBSpline_69"),
+ model.selection("EDGE", "SketchBSpline_70"),
+ model.selection("EDGE", "SketchBSpline_71"),
+ model.selection("EDGE", "SketchBSpline_72"),
+ model.selection("EDGE", "SketchBSpline_73"),
+ model.selection("EDGE", "SketchBSpline_74"),
+ model.selection("EDGE", "SketchBSpline_75"),
+ model.selection("EDGE", "SketchBSpline_76"),
+ model.selection("EDGE", "SketchBSpline_77"),
+ model.selection("EDGE", "SketchBSpline_78"),
+ model.selection("EDGE", "SketchBSpline_79"),
+ model.selection("EDGE", "SketchBSpline_80"),
+ model.selection("EDGE", "SketchBSpline_81"),
+ model.selection("EDGE", "SketchBSpline_82"),
+ model.selection("EDGE", "SketchBSpline_83"),
+ model.selection("EDGE", "SketchBSpline_84"),
+ model.selection("EDGE", "SketchBSpline_85"),
+ model.selection("EDGE", "SketchBSpline_86"),
+ model.selection("EDGE", "SketchBSpline_87"),
+ model.selection("EDGE", "SketchBSpline_88"),
+ model.selection("EDGE", "SketchBSpline_89"),
+ model.selection("EDGE", "SketchBSpline_90"),
+ model.selection("EDGE", "SketchBSpline_91"),
+ model.selection("EDGE", "SketchBSpline_92"),
+ model.selection("EDGE", "SketchBSpline_93"),
+ model.selection("EDGE", "SketchBSpline_94"),
+ model.selection("EDGE", "SketchBSpline_95"),
+ model.selection("EDGE", "SketchBSpline_96"),
+ model.selection("EDGE", "SketchBSpline_97"),
+ model.selection("EDGE", "SketchBSpline_98"),
+ model.selection("EDGE", "SketchBSpline_99"),
+ model.selection("EDGE", "SketchBSpline_100"),
+ model.selection("EDGE", "SketchBSpline_101"),
+ model.selection("EDGE", "SketchBSpline_102"),
+ model.selection("EDGE", "SketchBSpline_103"),
+ model.selection("EDGE", "SketchBSpline_104"),
+ model.selection("EDGE", "SketchBSpline_105"),
+ model.selection("EDGE", "SketchBSpline_106"),
+ model.selection("EDGE", "SketchBSpline_107"),
+ model.selection("EDGE", "SketchBSpline_108"),
+ model.selection("EDGE", "SketchBSpline_109"),
+ model.selection("EDGE", "SketchBSpline_110"),
+ model.selection("EDGE", "SketchBSpline_111"),
+ model.selection("EDGE", "SketchBSpline_112"),
+ model.selection("EDGE", "SketchBSpline_113"),
+ model.selection("EDGE", "SketchBSpline_114"),
+ model.selection("EDGE", "SketchBSpline_115"),
+ model.selection("EDGE", "SketchBSpline_116"),
+ model.selection("EDGE", "SketchBSpline_117"),
+ model.selection("EDGE", "SketchBSpline_118"),
+ model.selection("EDGE", "SketchBSpline_119"),
+ model.selection("EDGE", "SketchBSpline_120"),
+ model.selection("EDGE", "SketchBSpline_121"),
+ model.selection("EDGE", "SketchArc_2_2")]
+Wire_3 = model.addWire(Part_1_doc, Wire_3_objects, False)
+
+### Create Plane
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), 40.45, False)
+
+### Create Sketch
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
+
+### Create SketchPoint
+SketchPoint_65 = Sketch_2.addPoint(3.256, 0)
+SketchPoint_65.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_66 = Sketch_2.addPoint(3.23171024, 0.07667880000000001)
+SketchPoint_66.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_67 = Sketch_2.addPoint(3.177042, 0.13115168)
+SketchPoint_67.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_68 = Sketch_2.addPoint(3.10414016, 0.1735448)
+SketchPoint_68.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_69 = Sketch_2.addPoint(3.00896728, 0.2240128)
+SketchPoint_69.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_70 = Sketch_2.addPoint(2.90773824, 0.2663733599999999)
+SketchPoint_70.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_71 = Sketch_2.addPoint(2.81865408, 0.29867288)
+SketchPoint_71.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_72 = Sketch_2.addPoint(2.71739248, 0.32693496)
+SketchPoint_72.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_73 = Sketch_2.addPoint(2.65259808, 0.34308472)
+SketchPoint_73.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_74 = Sketch_2.addPoint(2.56755136, 0.35923448)
+SketchPoint_74.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_75 = Sketch_2.addPoint(2.48250464, 0.37131424)
+SketchPoint_75.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_76 = Sketch_2.addPoint(2.40152792, 0.387464)
+SketchPoint_76.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_77 = Sketch_2.addPoint(2.30433632, 0.39957632)
+SketchPoint_77.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_78 = Sketch_2.addPoint(2.1868924, 0.4076512)
+SketchPoint_78.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_79 = Sketch_2.addPoint(2.0573036, 0.4076512)
+SketchPoint_79.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_80 = Sketch_2.addPoint(1.91553736, 0.4076512)
+SketchPoint_80.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_81 = Sketch_2.addPoint(1.79203728, 0.3975576)
+SketchPoint_81.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_82 = Sketch_2.addPoint(1.68064952, 0.387464)
+SketchPoint_82.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_83 = Sketch_2.addPoint(1.58752792, 0.37131424)
+SketchPoint_83.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_84 = Sketch_2.addPoint(1.49033632, 0.35519704)
+SketchPoint_84.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_85 = Sketch_2.addPoint(1.38503728, 0.33904728)
+SketchPoint_85.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_86 = Sketch_2.addPoint(1.2757008, 0.31886008)
+SketchPoint_86.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_87 = Sketch_2.addPoint(1.16229432, 0.29463544)
+SketchPoint_87.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_88 = Sketch_2.addPoint(1.04283168, 0.2704108)
+SketchPoint_88.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_89 = Sketch_2.addPoint(0.9274064800000001, 0.24218128)
+SketchPoint_89.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_90 = Sketch_2.addPoint(0.8302148799999998, 0.21795664)
+SketchPoint_90.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_91 = Sketch_2.addPoint(0.7411307200000001, 0.19776944)
+SketchPoint_91.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_92 = Sketch_2.addPoint(0.6378504, 0.1735448)
+SketchPoint_92.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_93 = Sketch_2.addPoint(0.5204064800000001, 0.14528272)
+SketchPoint_93.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_94 = Sketch_2.addPoint(0.4009438400000001, 0.1170532)
+SketchPoint_94.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_95 = Sketch_2.addPoint(0.3158971199999998, 0.09484727999999999)
+SketchPoint_95.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_96 = Sketch_2.addPoint(0.2227429599999997, 0.07264135999999999)
+SketchPoint_96.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_97 = Sketch_2.addPoint(0.1336588000000001, 0.052096)
+SketchPoint_97.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_98 = Sketch_2.addPoint(0.06075695999999997, 0.03226696)
+SketchPoint_98.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_99 = Sketch_2.addPoint(0, 0.003256)
+SketchPoint_99.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_100 = Sketch_2.addPoint(0.06482695999999999, 0.013024)
+SketchPoint_100.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_101 = Sketch_2.addPoint(0.1621813599999999, 0.0234432)
+SketchPoint_101.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_102 = Sketch_2.addPoint(0.2389578399999999, 0.0247456)
+SketchPoint_102.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_103 = Sketch_2.addPoint(0.3401868800000001, 0.02419208)
+SketchPoint_103.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_104 = Sketch_2.addPoint(0.4454859200000003, 0.02419208)
+SketchPoint_104.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_105 = Sketch_2.addPoint(0.5406588000000001, 0.0161172)
+SketchPoint_105.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_106 = Sketch_2.addPoint(0.6520139999999999, 0.00198616)
+SketchPoint_106.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_107 = Sketch_2.addPoint(0.7492055999999998, -0.01409848)
+SketchPoint_107.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_108 = Sketch_2.addPoint(0.8423597599999999, -0.03226696)
+SketchPoint_108.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_109 = Sketch_2.addPoint(0.9638411199999997, -0.0564916)
+SketchPoint_109.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_110 = Sketch_2.addPoint(1.06510272, -0.08475368)
+SketchPoint_110.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_111 = Sketch_2.addPoint(1.2068364, -0.1170532)
+SketchPoint_111.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_112 = Sketch_2.addPoint(1.3364252, -0.14528272)
+SketchPoint_112.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_113 = Sketch_2.addPoint(1.44983168, -0.1735448)
+SketchPoint_113.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_114 = Sketch_2.addPoint(1.5672756, -0.20180688)
+SketchPoint_114.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_115 = Sketch_2.addPoint(1.68875696, -0.2240128)
+SketchPoint_115.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_116 = Sketch_2.addPoint(1.80620088, -0.24218128)
+SketchPoint_116.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_117 = Sketch_2.addPoint(1.93578968, -0.25829848)
+SketchPoint_117.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_118 = Sketch_2.addPoint(2.06944848, -0.2704108)
+SketchPoint_118.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_119 = Sketch_2.addPoint(2.19496728, -0.27646696)
+SketchPoint_119.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_120 = Sketch_2.addPoint(2.33673352, -0.27848568)
+SketchPoint_120.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_121 = Sketch_2.addPoint(2.45417744, -0.27242952)
+SketchPoint_121.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_122 = Sketch_2.addPoint(2.58174752, -0.26233592)
+SketchPoint_122.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_123 = Sketch_2.addPoint(2.68906528, -0.2502236)
+SketchPoint_123.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_124 = Sketch_2.addPoint(2.8065092, -0.23006896)
+SketchPoint_124.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_125 = Sketch_2.addPoint(2.94215416, -0.19776944)
+SketchPoint_125.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_126 = Sketch_2.addPoint(3.08186912, -0.14932016)
+SketchPoint_126.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_127 = Sketch_2.addPoint(3.16691584, -0.10897832)
+SketchPoint_127.setAuxiliary(True)
+
+### Create SketchPoint
+SketchPoint_128 = Sketch_2.addPoint(3.2276728, -0.06052903999999999)
+SketchPoint_128.setAuxiliary(True)
+
+### Create SketchBSpline
+SketchBSpline_122_poles = [(3.256, 0),
+ (3.255728567930323, 0.02938456749749511),
+ (3.237689746218751, 0.07883011085368516),
+ (3.176954566343984, 0.1360257431533082),
+ (3.09688910651703, 0.1764418306600214),
+ (3.00953671048185, 0.2267564781454451),
+ (2.912432954503905, 0.2647167787382159),
+ (2.815941388200049, 0.3014981358259439),
+ (2.729751176299813, 0.3237194265020923),
+ (2.646361992042657, 0.3453361685254134),
+ (2.567955484940874, 0.3604379063520104),
+ (2.483282044059514, 0.3692261528728723),
+ (2.396825289419105, 0.3904099084997285),
+ (2.297784821900362, 0.4005139744076952),
+ (2.183002812158886, 0.4101339211003338),
+ (2.05326355477229, 0.406032562950755),
+ (1.921328555727838, 0.4113842334362396),
+ (1.796156730600904, 0.3966591653819502),
+ (1.686052998788443, 0.3907202481330517),
+ (1.586299665611225, 0.3704286812906156),
+ (1.487748341031549, 0.3544969076370629),
+ (1.383393470307667, 0.3395093148076599),
+ (1.273972616931005, 0.319325222403528),
+ (1.160543506907297, 0.2933739438166694),
+ (1.043520532273171, 0.2720319372399694),
+ (0.9334339259119463, 0.2436955652001511),
+ (0.833210329118078, 0.2180769093752324),
+ (0.7362714839816442, 0.1969640452405135),
+ (0.6330458179280327, 0.1725774416591901),
+ (0.5198557830327111, 0.1446546999793175),
+ (0.4120962578932688, 0.1207943460074061),
+ (0.313244110318449, 0.09345858240073433),
+ (0.2252529917480424, 0.07340982637625464),
+ (0.1351983216375724, 0.05183680239637619),
+ (0.07314877527059195, 0.03991202084524661),
+ (-0.03534471365202863, -0.00840147666050696),
+ (0.08989014461370692, 0.01974926691163458),
+ (0.1516448171045691, 0.0236568477195267),
+ (0.2482493443712883, 0.02534282868769613),
+ (0.3411637589893189, 0.02324293986853048),
+ (0.4423953890052463, 0.02659845418947896),
+ (0.5462497541613646, 0.01581617151358379),
+ (0.6475751330738458, 0.003347436114427953),
+ (0.7481634943679742, -0.01319804142374542),
+ (0.8516670763128179, -0.03483327454522876),
+ (0.9584372564498741, -0.05226718363109152),
+ (1.077516251399843, -0.09038361271993345),
+ (1.202718995768721, -0.1160769351511452),
+ (1.331521625664622, -0.1431911515298037),
+ (1.451075975864637, -0.1739224918799187),
+ (1.567818521312199, -0.2035675478361183),
+ (1.687196967047543, -0.2240162678824165),
+ (1.809973230769842, -0.2434430111950148),
+ (1.936918886307194, -0.259024977788206),
+ (2.066537414886297, -0.2713706822793528),
+ (2.200309450461007, -0.2769425772780358),
+ (2.328715391113886, -0.2806404486840122),
+ (2.457661261585523, -0.2724299715025069),
+ (2.575159863696419, -0.2635528807551016),
+ (2.692927889590666, -0.2509748561459927),
+ (2.81334838838169, -0.2298043740783547),
+ (2.945545528527086, -0.1996213872365573),
+ (3.065957107372579, -0.1573256758110601),
+ (3.163151568975917, -0.114635786111929),
+ (3.230025301011729, -0.0667293557622594),
+ (3.251839356594632, -0.02382159971973897),
+ (3.256, 0)
+ ]
+SketchBSpline_122 = Sketch_2.addSpline(degree = 3, poles = SketchBSpline_122_poles, weights = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], knots = [0, 0.01183488863837179, 0.02319018649848563, 0.03559858893144933, 0.05144916515834002, 0.06759531467622243, 0.0815379341596944, 0.09700677492797637, 0.1068321569610141, 0.1195693666101132, 0.1322085557927938, 0.1443579416201434, 0.1587691279665199, 0.17609037125253, 0.1951577895815503, 0.2160169703364635, 0.2342490967534491, 0.2507056052742759, 0.2646118431448987, 0.2791077011690486, 0.2947823396709444, 0.3111417859997592, 0.3282046159595691, 0.3461398429174012, 0.3636238095657636, 0.3783618826153202, 0.3918018692786528, 0.4074107325669361, 0.4251844860013295, 0.4432460569026663, 0.4561791711061376, 0.4702697244163377, 0.4837214559733176, 0.4948377859291223, 0.5047442665271803, 0.514390439239358, 0.5287967600422183, 0.5400951120443203, 0.5549899587260146, 0.5704834338205, 0.584537279701169, 0.6010532448480169, 0.6155483198902286, 0.6295130832805996, 0.6477395111687876, 0.6632083519370696, 0.6845974067707581, 0.7041119934399064, 0.721308736302655, 0.7390824897370484, 0.7572531654218201, 0.7747391660376209, 0.7939534892917686, 0.8137003452650872, 0.8321903971419143, 0.8530516926114459, 0.8703550992317159, 0.8891841498048809, 0.9050749088751692, 0.9226079659764083, 0.9431244997359293, 0.9648828024586862, 0.9787328512217585, 0.9901668364115461, 1], multiplicities = [4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4])
+Sketch_2.setCoincident(SketchPoint_65.coordinates(), SketchBSpline_122.startPoint())
+Sketch_2.setCoincident(SketchPoint_65.coordinates(), SketchBSpline_122.endPoint())
+Sketch_2.setCoincident(SketchPoint_66.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_67.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_68.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_69.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_70.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_71.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_72.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_73.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_74.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_75.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_76.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_77.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_78.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_79.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_80.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_81.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_82.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_83.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_84.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_85.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_86.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_87.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_88.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_89.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_90.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_91.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_92.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_93.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_94.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_95.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_96.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_97.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_98.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_99.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_100.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_101.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_102.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_103.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_104.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_105.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_106.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_107.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_108.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_109.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_110.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_111.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_112.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_113.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_114.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_115.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_116.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_117.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_118.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_119.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_120.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_121.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_122.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_123.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_124.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_125.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_126.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_127.coordinates(), SketchBSpline_122.result())
+Sketch_2.setCoincident(SketchPoint_128.coordinates(), SketchBSpline_122.result())
+
+### Create SketchOffset
+SketchOffset_3 = Sketch_2.addOffset([SketchBSpline_122.result()], 0.01, False)
+[SketchBSpline_123, SketchBSpline_124, SketchBSpline_125, SketchBSpline_126, SketchBSpline_127, SketchBSpline_128, SketchBSpline_129, SketchBSpline_130, SketchBSpline_131, SketchBSpline_132, SketchBSpline_133, SketchBSpline_134, SketchBSpline_135, SketchBSpline_136, SketchBSpline_137, SketchBSpline_138, SketchBSpline_139, SketchBSpline_140, SketchBSpline_141, SketchBSpline_142, SketchBSpline_143, SketchBSpline_144, SketchBSpline_145, SketchBSpline_146, SketchBSpline_147, SketchBSpline_148, SketchBSpline_149, SketchBSpline_150, SketchBSpline_151, SketchBSpline_152, SketchBSpline_153, SketchBSpline_154, SketchBSpline_155, SketchBSpline_156, SketchBSpline_157, SketchBSpline_158, SketchBSpline_159, SketchBSpline_160, SketchBSpline_161, SketchBSpline_162, SketchBSpline_163, SketchBSpline_164, SketchBSpline_165, SketchBSpline_166, SketchBSpline_167, SketchBSpline_168, SketchBSpline_169, SketchBSpline_170, SketchBSpline_171, SketchBSpline_172, SketchBSpline_173, SketchBSpline_174, SketchBSpline_175, SketchBSpline_176, SketchBSpline_177, SketchBSpline_178, SketchBSpline_179, SketchBSpline_180, SketchBSpline_181, SketchBSpline_182, SketchArc_3] = SketchOffset_3.offset()
+
+### Create SketchOffset
+SketchOffset_4 = Sketch_2.addOffset([SketchBSpline_122.result()], 0.07000000000000001, False)
+[SketchBSpline_183, SketchBSpline_184, SketchBSpline_185, SketchBSpline_186, SketchBSpline_187, SketchBSpline_188, SketchBSpline_189, SketchBSpline_190, SketchBSpline_191, SketchBSpline_192, SketchBSpline_193, SketchBSpline_194, SketchBSpline_195, SketchBSpline_196, SketchBSpline_197, SketchBSpline_198, SketchBSpline_199, SketchBSpline_200, SketchBSpline_201, SketchBSpline_202, SketchBSpline_203, SketchBSpline_204, SketchBSpline_205, SketchBSpline_206, SketchBSpline_207, SketchBSpline_208, SketchBSpline_209, SketchBSpline_210, SketchBSpline_211, SketchBSpline_212, SketchBSpline_213, SketchBSpline_214, SketchBSpline_215, SketchBSpline_216, SketchBSpline_217, SketchBSpline_218, SketchBSpline_219, SketchBSpline_220, SketchBSpline_221, SketchBSpline_222, SketchBSpline_223, SketchBSpline_224, SketchBSpline_225, SketchBSpline_226, SketchBSpline_227, SketchBSpline_228, SketchBSpline_229, SketchBSpline_230, SketchBSpline_231, SketchBSpline_232, SketchBSpline_233, SketchBSpline_234, SketchBSpline_235, SketchBSpline_236, SketchBSpline_237, SketchBSpline_238, SketchBSpline_239, SketchBSpline_240, SketchBSpline_241, SketchBSpline_242, SketchArc_4] = SketchOffset_4.offset()
+model.do()
+
+### Create Wire
+Wire_4 = model.addWire(Part_1_doc, [model.selection("EDGE", "SketchBSpline_122")], False)
+
+### Create Wire
+Wire_5_objects = [model.selection("EDGE", "SketchBSpline_123"),
+ model.selection("EDGE", "SketchBSpline_124"),
+ model.selection("EDGE", "SketchBSpline_125"),
+ model.selection("EDGE", "SketchBSpline_126"),
+ model.selection("EDGE", "SketchBSpline_127"),
+ model.selection("EDGE", "SketchBSpline_128"),
+ model.selection("EDGE", "SketchBSpline_129"),
+ model.selection("EDGE", "SketchBSpline_130"),
+ model.selection("EDGE", "SketchBSpline_131"),
+ model.selection("EDGE", "SketchBSpline_132"),
+ model.selection("EDGE", "SketchBSpline_133"),
+ model.selection("EDGE", "SketchBSpline_134"),
+ model.selection("EDGE", "SketchBSpline_135"),
+ model.selection("EDGE", "SketchBSpline_136"),
+ model.selection("EDGE", "SketchBSpline_137"),
+ model.selection("EDGE", "SketchBSpline_138"),
+ model.selection("EDGE", "SketchBSpline_139"),
+ model.selection("EDGE", "SketchBSpline_140"),
+ model.selection("EDGE", "SketchBSpline_141"),
+ model.selection("EDGE", "SketchBSpline_142"),
+ model.selection("EDGE", "SketchBSpline_143"),
+ model.selection("EDGE", "SketchBSpline_144"),
+ model.selection("EDGE", "SketchBSpline_145"),
+ model.selection("EDGE", "SketchBSpline_146"),
+ model.selection("EDGE", "SketchBSpline_147"),
+ model.selection("EDGE", "SketchBSpline_148"),
+ model.selection("EDGE", "SketchBSpline_149"),
+ model.selection("EDGE", "SketchBSpline_150"),
+ model.selection("EDGE", "SketchBSpline_151"),
+ model.selection("EDGE", "SketchBSpline_152"),
+ model.selection("EDGE", "SketchBSpline_153"),
+ model.selection("EDGE", "SketchBSpline_154"),
+ model.selection("EDGE", "SketchBSpline_155"),
+ model.selection("EDGE", "SketchBSpline_156"),
+ model.selection("EDGE", "SketchBSpline_157"),
+ model.selection("EDGE", "SketchBSpline_158"),
+ model.selection("EDGE", "SketchBSpline_159"),
+ model.selection("EDGE", "SketchBSpline_160"),
+ model.selection("EDGE", "SketchBSpline_161"),
+ model.selection("EDGE", "SketchBSpline_162"),
+ model.selection("EDGE", "SketchBSpline_163"),
+ model.selection("EDGE", "SketchBSpline_164"),
+ model.selection("EDGE", "SketchBSpline_165"),
+ model.selection("EDGE", "SketchBSpline_166"),
+ model.selection("EDGE", "SketchBSpline_167"),
+ model.selection("EDGE", "SketchBSpline_168"),
+ model.selection("EDGE", "SketchBSpline_169"),
+ model.selection("EDGE", "SketchBSpline_170"),
+ model.selection("EDGE", "SketchBSpline_171"),
+ model.selection("EDGE", "SketchBSpline_172"),
+ model.selection("EDGE", "SketchBSpline_173"),
+ model.selection("EDGE", "SketchBSpline_174"),
+ model.selection("EDGE", "SketchBSpline_175"),
+ model.selection("EDGE", "SketchBSpline_176"),
+ model.selection("EDGE", "SketchBSpline_177"),
+ model.selection("EDGE", "SketchBSpline_178"),
+ model.selection("EDGE", "SketchBSpline_179"),
+ model.selection("EDGE", "SketchBSpline_180"),
+ model.selection("EDGE", "SketchBSpline_181"),
+ model.selection("EDGE", "SketchBSpline_182"),
+ model.selection("EDGE", "SketchArc_3_2")]
+Wire_5 = model.addWire(Part_1_doc, Wire_5_objects, False)
+
+### Create Wire
+Wire_6_objects = [model.selection("EDGE", "SketchBSpline_183"),
+ model.selection("EDGE", "SketchBSpline_184"),
+ model.selection("EDGE", "SketchBSpline_185"),
+ model.selection("EDGE", "SketchBSpline_186"),
+ model.selection("EDGE", "SketchBSpline_187"),
+ model.selection("EDGE", "SketchBSpline_188"),
+ model.selection("EDGE", "SketchBSpline_189"),
+ model.selection("EDGE", "SketchBSpline_190"),
+ model.selection("EDGE", "SketchBSpline_191"),
+ model.selection("EDGE", "SketchBSpline_192"),
+ model.selection("EDGE", "SketchBSpline_193"),
+ model.selection("EDGE", "SketchBSpline_194"),
+ model.selection("EDGE", "SketchBSpline_195"),
+ model.selection("EDGE", "SketchBSpline_196"),
+ model.selection("EDGE", "SketchBSpline_197"),
+ model.selection("EDGE", "SketchBSpline_198"),
+ model.selection("EDGE", "SketchBSpline_199"),
+ model.selection("EDGE", "SketchBSpline_200"),
+ model.selection("EDGE", "SketchBSpline_201"),
+ model.selection("EDGE", "SketchBSpline_202"),
+ model.selection("EDGE", "SketchBSpline_203"),
+ model.selection("EDGE", "SketchBSpline_204"),
+ model.selection("EDGE", "SketchBSpline_205"),
+ model.selection("EDGE", "SketchBSpline_206"),
+ model.selection("EDGE", "SketchBSpline_207"),
+ model.selection("EDGE", "SketchBSpline_208"),
+ model.selection("EDGE", "SketchBSpline_209"),
+ model.selection("EDGE", "SketchBSpline_210"),
+ model.selection("EDGE", "SketchBSpline_211"),
+ model.selection("EDGE", "SketchBSpline_212"),
+ model.selection("EDGE", "SketchBSpline_213"),
+ model.selection("EDGE", "SketchBSpline_214"),
+ model.selection("EDGE", "SketchBSpline_215"),
+ model.selection("EDGE", "SketchBSpline_216"),
+ model.selection("EDGE", "SketchBSpline_217"),
+ model.selection("EDGE", "SketchBSpline_218"),
+ model.selection("EDGE", "SketchBSpline_219"),
+ model.selection("EDGE", "SketchBSpline_220"),
+ model.selection("EDGE", "SketchBSpline_221"),
+ model.selection("EDGE", "SketchBSpline_222"),
+ model.selection("EDGE", "SketchBSpline_223"),
+ model.selection("EDGE", "SketchBSpline_224"),
+ model.selection("EDGE", "SketchBSpline_225"),
+ model.selection("EDGE", "SketchBSpline_226"),
+ model.selection("EDGE", "SketchBSpline_227"),
+ model.selection("EDGE", "SketchBSpline_228"),
+ model.selection("EDGE", "SketchBSpline_229"),
+ model.selection("EDGE", "SketchBSpline_230"),
+ model.selection("EDGE", "SketchBSpline_231"),
+ model.selection("EDGE", "SketchBSpline_232"),
+ model.selection("EDGE", "SketchBSpline_233"),
+ model.selection("EDGE", "SketchBSpline_234"),
+ model.selection("EDGE", "SketchBSpline_235"),
+ model.selection("EDGE", "SketchBSpline_236"),
+ model.selection("EDGE", "SketchBSpline_237"),
+ model.selection("EDGE", "SketchBSpline_238"),
+ model.selection("EDGE", "SketchBSpline_239"),
+ model.selection("EDGE", "SketchBSpline_240"),
+ model.selection("EDGE", "SketchBSpline_241"),
+ model.selection("EDGE", "SketchBSpline_242"),
+ model.selection("EDGE", "SketchArc_4_2")]
+Wire_6 = model.addWire(Part_1_doc, Wire_6_objects, False)
+
+### Create Filling
+Filling_1 = model.addFilling(Part_1_doc, [model.selection("WIRE", "Wire_1_1"), model.selection("WIRE", "Wire_4_1")], "curve_info", 2, 12, 0, 1e-06, 1e-06, False)
+
+### Create Filling
+Filling_2 = model.addFilling(Part_1_doc, [model.selection("WIRE", "Wire_2_1"), model.selection("WIRE", "Wire_5_1")], "curve_info", 2, 12, 0, 1e-06, 1e-06, False)
+
+### Create Filling
+Filling_3 = model.addFilling(Part_1_doc, [model.selection("WIRE", "Wire_3_1"), model.selection("WIRE", "Wire_6_1")], "curve_info", 2, 5, 0, 0.001, 0.001, False)
+
+model.end()
+
+from GeomAPI import *
+
+model.testNbResults(Filling_1, 1)
+model.testNbSubResults(Filling_1, [0])
+model.testNbSubShapes(Filling_1, GeomAPI_Shape.SOLID, [0])
+model.testNbSubShapes(Filling_1, GeomAPI_Shape.FACE, [1])
+model.testNbSubShapes(Filling_1, GeomAPI_Shape.EDGE, [4])
+model.testNbSubShapes(Filling_1, GeomAPI_Shape.VERTEX, [8])
+model.testResultsAreas(Filling_1, [28.94082894])
+
+model.testNbResults(Filling_2, 1)
+model.testNbSubResults(Filling_2, [0])
+model.testNbSubShapes(Filling_2, GeomAPI_Shape.SOLID, [0])
+model.testNbSubShapes(Filling_2, GeomAPI_Shape.FACE, [1])
+model.testNbSubShapes(Filling_2, GeomAPI_Shape.EDGE, [4])
+model.testNbSubShapes(Filling_2, GeomAPI_Shape.VERTEX, [8])
+model.testResultsAreas(Filling_2, [29.198793093])
+
+model.testNbResults(Filling_3, 1)
+model.testNbSubResults(Filling_3, [0])
+model.testNbSubShapes(Filling_3, GeomAPI_Shape.SOLID, [0])
+model.testNbSubShapes(Filling_3, GeomAPI_Shape.FACE, [1])
+model.testNbSubShapes(Filling_3, GeomAPI_Shape.EDGE, [4])
+model.testNbSubShapes(Filling_3, GeomAPI_Shape.VERTEX, [8])
+model.testResultsAreas(Filling_3, [30.74501422428])
+
+assert(model.checkPythonDump())
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
# check fillings
REF_DATA = [(Filling_1, 719.149788883378505488508380949),
- (Filling_2, 910.894041506332769131404347718),
+ (Filling_2, 910.894530912501409147807862610),
(Filling_3, 719.149788883378505488508380949),
(Filling_4, 910.894530912501409147807862610)]
for ref in REF_DATA:
model.testNbSubShapes(ref[0], GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(ref[0], GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(ref[0], GeomAPI_Shape.VERTEX, [8])
- model.testResultsVolumes(ref[0], [ref[1]])
+ model.testResultsAreas(ref[0], [ref[1]])
model.end()
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
from GeomAPI import GeomAPI_Shape
model.testNbResults(Filling_1, 1)
model.testNbSubShapes(Filling_1, GeomAPI_Shape.FACE, [1])
-model.testResultsVolumes(Filling_1, [3500])
+model.testResultsAreas(Filling_1, [3500])
model.end()
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
model.testNbSubShapes(Face_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Face_1, GeomAPI_Shape.EDGE, [3])
model.testNbSubShapes(Face_1, GeomAPI_Shape.VERTEX, [6])
-model.testResultsVolumes(Face_1, [441.0539215686274])
+model.testResultsAreas(Face_1, [441.0539215686274])
assert(model.checkPythonDump())
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
model.testNbSubShapes(Face_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Face_1, GeomAPI_Shape.EDGE, [3, 2, 2])
model.testNbSubShapes(Face_1, GeomAPI_Shape.VERTEX, [6, 4, 4])
-model.testResultsVolumes(Face_1, [441.0539215686274, 628.318530717958, 628.318530717958])
+model.testResultsAreas(Face_1, [441.0539215686274, 628.318530717958, 628.318530717958])
assert(model.checkPythonDump())
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
from salome.shaper import model
+import math
+
# Create document
model.begin()
partSet = model.moduleDocument()
model.end()
# =============================================================================
-# Test 12. Check Python dump
+# Test 12. Create curve using an analytical expression
+# =============================================================================
+Part_5 = model.addPart(partSet)
+Part_5_doc = Part_5.document()
+
+Interpolation_11 = model.addInterpolation(Part_5_doc, "sin(t)","cos(t)","t", 0, 100, 100)
+model.do()
+model.testNbResults(Interpolation_11, 1)
+myDelta = 1e-6
+Props = model.getGeometryCalculation(Part_5_doc,model.selection("EDGE", "Interpolation_1_1"))
+model.do()
+aRefLength = 141.32010978124
+aResLength = Props[0]
+assert (math.fabs(aResLength - aRefLength) < myDelta), "The length is wrong: expected = {0}, real = {1}".format(aRefLength, aResLength)
+model.end()
+# =============================================================================
+# Test 13. Check Python dump
# =============================================================================
assert(model.checkPythonDump(model.ModelHighAPI.CHECK_NAMING))
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
model.testNbSubShapes(Shell_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Shell_1, GeomAPI_Shape.EDGE, [3])
model.testNbSubShapes(Shell_1, GeomAPI_Shape.VERTEX, [6])
-model.testResultsVolumes(Shell_1, [441.0539215686274])
+model.testResultsAreas(Shell_1, [441.0539215686274])
assert(model.checkPythonDump())
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
model.testNbSubShapes(Shell_1, GeomAPI_Shape.FACE, [1, 2])
model.testNbSubShapes(Shell_1, GeomAPI_Shape.EDGE, [3, 4])
model.testNbSubShapes(Shell_1, GeomAPI_Shape.VERTEX, [6, 8])
-model.testResultsVolumes(Shell_1, [441.0539215686274, 1256.637061435917])
+model.testResultsAreas(Shell_1, [441.0539215686274, 1256.637061435917])
assert(model.checkPythonDump())
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
--- /dev/null
+
+ .. _tui_create_interpolation_analytical:
+
+Create Interpolation analytical
+===============================
+
+.. literalinclude:: examples/interpolationAnalytical.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/interpolationAnalytical.py>`
+
--- /dev/null
+
+ .. _tui_create_interpolation_by_selection:
+
+Create Interpolation by selection
+=================================
+
+.. literalinclude:: examples/interpolation.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/interpolation.py>`
+
+++ /dev/null
-
- .. _tui_create_interpolation:
-
-Create Interpolation
-====================
-
-.. literalinclude:: examples/interpolation.py
- :linenos:
- :language: python
-
-:download:`Download this script <examples/interpolation.py>`
-
--- /dev/null
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Interpolation_1 = model.addInterpolation(Part_1_doc, "5*sin(t)","5*cos(t)","t*0.2", 0, 25, 100)
+model.do()
+model.end()
Interpolation
=============
-Interpolation feature creates a curve (edge) using vertices already existing in other objects.
+Interpolation feature creates an interpolated curve (edge) based on existing points/vertices or based on analytical mathematical expression.
To create an interpolation in the active part:
#. select in the Main Menu *Build - > Interpolation* item or
#. click |feature_interpolation.icon| **Interpolation** button in the toolbar
-The following property panel will be opened:
+There are two creation modes of an interpolation:
+
+.. figure:: images/feature_interpolation_by_selection.png
+ :align: left
+ :height: 24px
+
+Interpolation by selection
+
+.. figure:: images/feature_interpolation_analytical.png
+ :align: left
+ :height: 24px
+
+Interpolation analytical
+
+Interpolation by selection
+""""""""""""""""""""""""""
+The property panel is shown below.
.. figure:: images/Interpolation.png
:align: center
- Create an interpolation
+ Create an interpolation by selection
Select one or several vertices or points in the viewer.
Result of the operation.
-**See Also** a sample TUI Script of :ref:`tui_create_interpolation` operation.
+**See Also** a sample TUI Script of :ref:`tui_create_interpolation_by_selection` operation.
+
+Interpolation analytical
+""""""""""""""""""""""""
+
+The property panel is shown below.
+
+.. figure:: images/InterpolationAnalytical.png
+ :align: center
+
+ Create an interpolation analytical
+
+- **Curves parameters** panel allows to define the mathematical expression for creating the interpolated curve.
+ - **X(t) equation** define the expression of X with t variable.
+ - **Y(t) equation** define the expression of Y with t variable.
+ - **Z(t) equation** define the expression of Z with t variable.
+
+- **Min t** define the minimun of t.
+
+- **Max t** define the maximum of t.
+
+- **Number of steps** define the number of steps.
+
+**Apply** button creates an interpolation.
+
+**Cancel** button cancels the operation.
+
+**TUI Commands**:
+
+.. py:function:: model.addInterpolation(Part_doc, xt, yt, zt, mint, maxt, nbSteps)
+
+ :param part: The current part object.
+ :param string: Expression of x.
+ :param string: Expression of y.
+ :param string: Expression of z.
+ :param number: Minimum value of t.
+ :param number: Maximum value of t.
+ :param number: Number of steps.
+ :return: Result object.
+
+Result
+""""""
+
+The result of the operation will be a curve created from analytical expressions for x,y and z as functions of variable t:
+
+.. figure:: images/CreateInterpolationAnalytical.png
+ :align: center
+
+ Result of the operation.
+
+**See Also** a sample TUI Script of :ref:`tui_create_interpolation_analytical` operation.
<source>
- <multi_selector id="base_objects"
- label="Points and vertices:"
- tooltip="Select points or vertices objects."
- shape_types="vertices"
- concealment="true">
- <validator id="GeomValidators_DifferentShapes"/>
- </multi_selector>
- <boolvalue id="reorder" label="Reorder" tooltip="Changes the order of points to construct the shortest curve." default="false"/>
- <optionalbox id="closed" title="Closed" tooltip="Makes the curve closed or not." default="false"
- has_frame="false" enable_on_check="false">
- <optionalbox id="use_tangents" title="Tangents" default="false">
- <shape_selector id="tangent_start"
- icon="icons/Features/axis.png"
- label="Start"
- tooltip="Select vector tangent to the start of curve"
- shape_types="edge"
- default="<start>">
- <validator id="GeomValidators_ShapeType" parameters="empty,line"/>
- </shape_selector>
- <shape_selector id="tangent_end"
- icon="icons/Features/axis.png"
- label="End"
- tooltip="Select vector tangent to the end of curve"
- shape_types="edge"
- default="<end>">
- <validator id="GeomValidators_ShapeType" parameters="empty,line"/>
- </shape_selector>
- </optionalbox>
- </optionalbox>
- <validator id="GeomValidators_MinObjectsSelected" parameters="base_objects,2"/>
+ <toolbox id="interpolation_method">
+ <box id="by_selection"
+ title="Curve by selection"
+ icon="icons/Build/feature_interpolation_by_selection.png">
+ <multi_selector id="base_objects"
+ label="Points and vertices:"
+ tooltip="Select points or vertices objects."
+ shape_types="vertices"
+ concealment="true">
+ <validator id="GeomValidators_DifferentShapes"/>
+ </multi_selector>
+ <boolvalue id="reorder" label="Reorder" tooltip="Changes the order of points to construct the shortest curve." default="false"/>
+ <optionalbox id="closed" title="Closed" tooltip="Makes the curve closed or not." default="false"
+ has_frame="false" enable_on_check="false">
+ <optionalbox id="use_tangents" title="Tangents" default="false">
+ <shape_selector id="tangent_start"
+ icon="icons/Features/axis.png"
+ label="Start"
+ tooltip="Select vector tangent to the start of curve"
+ shape_types="edge"
+ default="<start>">
+ <validator id="GeomValidators_ShapeType" parameters="empty,line"/>
+ </shape_selector>
+ <shape_selector id="tangent_end"
+ icon="icons/Features/axis.png"
+ label="End"
+ tooltip="Select vector tangent to the end of curve"
+ shape_types="edge"
+ default="<end>">
+ <validator id="GeomValidators_ShapeType" parameters="empty,line"/>
+ </shape_selector>
+ </optionalbox>
+ </optionalbox>
+ <validator id="GeomValidators_MinObjectsSelected" parameters="base_objects,2"/>
+ </box>
+ <box id="analytical"
+ title="Curve analytical"
+ icon="icons/Build/feature_interpolation_analytical.png">
+ <groupbox id="curves_parameters" title="Curves parameters">
+ <stringvalue id="xt" label="X(t) equation">
+ <validator id="BuildPlugin_ValidatorExpressionInterpolation"/>
+ </stringvalue>
+ <stringvalue id="yt" label="Y(t) equation">
+ <validator id="BuildPlugin_ValidatorExpressionInterpolation"/>
+ </stringvalue>
+ <stringvalue id="zt" label="Z(t) equation">
+ <validator id="BuildPlugin_ValidatorExpressionInterpolation"/>
+ </stringvalue>
+ <doublevalue id="mint"
+ label="Min t"
+ default="0">
+ </doublevalue>
+ <doublevalue id="maxt"
+ label="Max t"
+ default="100">
+ </doublevalue>
+ <integervalue id="numstep"
+ label="Number of steps"
+ min="0"
+ default="10">
+ <validator id="GeomValidators_Positive"/>
+ </integervalue>
+ </groupbox>
+ </box>
+ </toolbox>
</source>
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestVertex.py
+ TestVertex_ErrorMsg.py
+ TestVertex_WholeSketch_1.py
+ TestVertex_WholeSketch_2.py
+ TestEdge.py
+ TestEdge_ByPoints.py
+ TestEdge_ErrorMsg.py
+ TestEdge_WholeSketch_1.py
+ TestEdge_WholeSketch_2.py
+ TestEdge_WholeSketch_3.py
+ TestEdge_WholeSketch_4.py
+ TestWire.py
+ TestWire_ErrorMsg.py
+ TestWire_WholeSketch_1.py
+ TestWire_WholeSketch_2.py
+ TestWire_WholeSketch_3.py
+ TestWire_WholeSketch_4.py
+ TestWire_WholeSketch_5.py
+ TestWire_WholeSketch_6.py
+ TestPolyline.py
+ TestInterpolation.py
+ TestFace.py
+ TestFace_ErrorMsg.py
+ TestFace_WholeSketch_1.py
+ TestFace_WholeSketch_2.py
+ TestShell.py
+ TestShell_WholeSketch_1.py
+ TestShell_WholeSketch_2.py
+ TestSolid.py
+ TestSolid_ErrorMsg.py
+ TestCompSolid.py
+ TestCompound.py
+ TestCompound_ErrorMsg.py
+ TestCompound_History.py
+ TestSubShapes.py
+ TestSubShapes_ErrorMsg.py
+ TestFilling.py
+ TestFilling_ByEdges.py
+ TestFilling_ByWires.py
+ TestFilling_Mixed.py
+ TestFilling_ErrorMsg.py
+ Test1920.py
+ Test2398.py
+ Test2409.py
+ Test2415.py
+ Test2439.py
+ Test2454.py
+ Test3125.py
+ Test3271.py
+ Test19056.py
+ Test20469.py
+ Test20513_1.py
+ Test20513_2.py
+)
\ No newline at end of file
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
SET(COMPONENT_NAME SHAPER)
+set(SALOME_TEST_LABEL_ADV SHAPR_ADV)
# Add all test subdirs
SUBDIRS(ConnectorAPI
HDFs
+ FeaturesPlugin
+ ConstructionPlugin
+ SketchPlugin
+ ModelAPI
+ FiltersPlugin
+ CollectionPlugin
+ BuildPlugin
+ ExchangePlugin
+ PythonAPI
+ GeomAPI
+ ModelHighAPI
+ ParametersPlugin
+ PythonAddons
+ SketchAPI
+ ConstructionAPI
+ PartSetAPI
+ GeomDataAPI
+ Config
+ ExchangeAPI
+ ModelGeomAlgo
+ Locale
+ test_API
)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Collection)
INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-ADD_UNIT_TESTS(
- TestGroup.py
- TestGroup2.py
- TestField.py
- TestGroup1799.py
- TestGroupMove01.py
- TestGroupMove02.py
- TestGroupMove03.py
- TestGroupMove04.py
- TestGroupMove05.py
- TestGroupMove06.py
- TestGroupMove07.py
- TestGroupMove08.py
- TestGroupMove09.py
- TestGroupMove10.py
- TestGroupMove11.py
- TestGroupMove12.py
- TestGroupMove13.py
- TestGroupMove14.py
- TestGroupMove15.py
- TestGroupMove16.py
- TestGroupMove17.py
- TestGroupMove18.py
- TestGroupMove19.py
- TestGroupMove20.py
- TestGroupMove21.py
- TestGroupMove22.py
- TestGroupMove23.py
- TestGroupMove24.py
- TestGroupMove25.py
- TestGroupMove26.py
- TestGroupShareTopology.py
- TestGroupAddition.py
- TestGroupAddition_Error.py
- TestGroupIntersection.py
- TestGroupIntersection_Error.py
- TestGroupSubstraction.py
- TestGroupSubstraction2.py
- TestGroupSubstraction_Error1.py
- TestGroupSubstraction_Error2.py
- Test2977.py
- TestGroupWholeResult1.py
- TestGroupWholeResult2.py
- Test3031.py
- TestGroupWholeFeature1.py
- TestGroupWholeFeature2.py
- TestGroupMoveAndSplit1.py
- TestGroupMoveAndSplit2.py
- TestGroupMoveAndSplit3.py
- TestGroupMoveAndSplit4.py
- Test3114.py
- Test18739.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/CollectionPlugin")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
model.testNbSubShapes(GroupSubstraction_1, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(GroupSubstraction_1, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(GroupSubstraction_1, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(GroupSubstraction_1, [200])
+model.testResultsAreas(GroupSubstraction_1, [200])
assert(model.checkPythonDump())
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
model.testNbSubShapes(GroupAddition_1, GeomAPI_Shape.FACE, [3])
model.testNbSubShapes(GroupAddition_1, GeomAPI_Shape.EDGE, [12])
model.testNbSubShapes(GroupAddition_1, GeomAPI_Shape.VERTEX, [24])
-model.testResultsVolumes(GroupAddition_1, [300])
+model.testResultsAreas(GroupAddition_1, [300])
assert(model.checkPythonDump())
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
model.testNbSubShapes(GroupIntersection_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(GroupIntersection_1, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(GroupIntersection_1, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(GroupIntersection_1, [100])
+model.testResultsAreas(GroupIntersection_1, [100])
assert(model.checkPythonDump())
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestGroup.py
+ TestGroup2.py
+ TestField.py
+ TestGroup1799.py
+ TestGroupMove01.py
+ TestGroupMove02.py
+ TestGroupMove03.py
+ TestGroupMove04.py
+ TestGroupMove05.py
+ TestGroupMove06.py
+ TestGroupMove07.py
+ TestGroupMove08.py
+ TestGroupMove09.py
+ TestGroupMove10.py
+ TestGroupMove11.py
+ TestGroupMove12.py
+ TestGroupMove13.py
+ TestGroupMove14.py
+ TestGroupMove15.py
+ TestGroupMove16.py
+ TestGroupMove17.py
+ TestGroupMove18.py
+ TestGroupMove19.py
+ TestGroupMove20.py
+ TestGroupMove21.py
+ TestGroupMove22.py
+ TestGroupMove23.py
+ TestGroupMove24.py
+ TestGroupMove25.py
+ TestGroupMove26.py
+ TestGroupShareTopology.py
+ TestGroupAddition.py
+ TestGroupAddition_Error.py
+ TestGroupIntersection.py
+ TestGroupIntersection_Error.py
+ TestGroupSubstraction.py
+ TestGroupSubstraction2.py
+ TestGroupSubstraction_Error1.py
+ TestGroupSubstraction_Error2.py
+ Test2977.py
+ TestGroupWholeResult1.py
+ TestGroupWholeResult2.py
+ Test3031.py
+ TestGroupWholeFeature1.py
+ TestGroupWholeFeature2.py
+ TestGroupMoveAndSplit1.py
+ TestGroupMoveAndSplit2.py
+ TestGroupMoveAndSplit3.py
+ TestGroupMoveAndSplit4.py
+ Test3114.py
+ Test18739.py
+)
\ No newline at end of file
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INSTALL(TARGETS _ConfigAPI DESTINATION ${SHAPER_INSTALL_SWIG})
INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
-
-ADD_UNIT_TESTS(
- TestConfig.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/Config")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
MAYBE_UNUSED const static char* ATTR_ICON = FEATURE_ICON;
MAYBE_UNUSED const static char* ATTR_LABEL = "label";
MAYBE_UNUSED const static char* ATTR_STYLE_SHEET = "styleSheet";
+MAYBE_UNUSED const static char* ATTR_IS_SELECTABLE = "isSelectable";
MAYBE_UNUSED const static char* ATTR_HTML_STYLE = "isHTML";
MAYBE_UNUSED const static char* ATTR_DEFAULT = "default";
MAYBE_UNUSED const static char* ATTR_INTERNAL = "internal";
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+TestConfig.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INCLUDE(tests.set)
-SET(COMPONENT_NAME SHAPER)
-
SET(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ConnectorAPI")
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
SET(TIMEOUT 300)
-FOREACH(tfile ${TEST_NAMES} ${EXAMPLE_NAMES})
+FOREACH(tfile ${TEST_NAMES})
SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2007-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2007-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
# Map from feature index to index of result. If index is zero (initial), no surrfix to entry is added.
aFeaturesIndices = {}
for aResId in range(aPartDoc.size(model.ModelAPI_ResultBody_group())):
- aResObject = aPartDoc.object(model.ModelAPI_ResultBody_group(), aResId)
+ aResObject = aPartDoc.object(model.ModelAPI_ResultBody_group(), aResId)
aRes = model.objectToResult(aResObject)
#do not export images
if aRes.hasTextureFile() is True:
- continue
+ continue
aResFeatureId = str(aPartDoc.feature(aRes).data().featureId())
if aResFeatureId in aFeaturesIndices:
aFeaturesIndices[aResFeatureId] += 1
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INCLUDE(UnitTest)
-ADD_UNIT_TESTS(
- TestPoint.py
- TestAxis.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ConstructionAPI")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestPoint.py
+ TestAxis.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
../GeomDataAPI
)
+include(tests.set)
-ADD_UNIT_TESTS(TestAxisCreation.py
- TestAxis_ErrorMsg.py
- UnitTestAxis.py
- TestPoint_XYZ.py
- TestPoint_IntersectLines.py
- TestPoint_IntersectLineAndPlane.py
- TestPoint_IntersectPlanes.py
- TestPoint_Edge.py
- TestPoint_ProjectOnEdge.py
- TestPoint_ProjectOnFace.py
- TestPoint_GeometricalPropertyCenterOfGravity.py
- TestPoint_GeometricalPropertyCenterOfCircle.py
- TestPoint_VertexSelection.py
- TestPointName.py
- TestPoint_ErrorMsg.py
- TestPoint_FiniteValidator.py
- TestPlane.py
- TestPlane_ErrorMsg.py
- TestPlane_FaceValidator.py
- Test19207.py
- Test19471.py
-)
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ConstructionPlugin")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+#SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
+#SET(TIMEOUT 300)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestAxisCreation.py
+ TestAxis_ErrorMsg.py
+ UnitTestAxis.py
+ TestPoint_XYZ.py
+ TestPoint_IntersectLines.py
+ TestPoint_IntersectLineAndPlane.py
+ TestPoint_IntersectPlanes.py
+ TestPoint_Edge.py
+ TestPoint_ProjectOnEdge.py
+ TestPoint_ProjectOnFace.py
+ TestPoint_GeometricalPropertyCenterOfGravity.py
+ TestPoint_GeometricalPropertyCenterOfCircle.py
+ TestPoint_VertexSelection.py
+ TestPointName.py
+ TestPoint_ErrorMsg.py
+ TestPoint_FiniteValidator.py
+ TestPlane.py
+ TestPlane_ErrorMsg.py
+ TestPlane_FaceValidator.py
+ Test19207.py
+ Test19471.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INCLUDE(UnitTest)
-ADD_UNIT_TESTS(
- TestExchange.py
-)
-
-# ADD_SUBDIRECTORY (Test)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ExchangeAPI")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
// to make import have results
theDumper << "model.do()" << std::endl;
}
-
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+TestExchange.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Exchange)
INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-ADD_UNIT_TESTS(
- TestImport.py
- TestExport.py
- Test2290.py
- Test2459.py
- Test18710.py
- TestExportToXAOWithFields.py
- TestExportToXAOWithGroupNotUpdated.py
- TestExport_FiniteValidator.py
- TestExportPart_Failure_1.py
- TestExportPart_Failure_2.py
- TestExportPart_Failure_3.py
- TestExportPart_FullPartSet.py
- TestExportPart_FullPart_1.py
- TestExportPart_FullPart_2.py
- TestExportPart_PartSet.py
- TestExportPart_Results_1.py
- TestExportPart_Results_2.py
- TestExportPart_Results_3.py
- TestExportPart_Results_4.py
- TestExportPart_Results_5.py
- TestExportPart_Results_6.py
- TestExportPart_Results_7.py
- TestExportPart_Results_8.py
- TestImportPart_AfterCurrent_1.py
- TestImportPart_AfterCurrent_2.py
- TestImportPart_AfterLast_1.py
- TestImportPart_AfterLast_2.py
- TestImportPart_AfterLast_3.py
- TestImportPart_AfterLast_4.py
- TestImportPart_AfterLast_5.py
- TestImportPart_AfterLast_6.py
- TestImportPart_Construction_1.py
- TestImportPart_Construction_2.py
- TestImportPart_Construction_3.py
- TestImportPart_Construction_4.py
- TestImportPart_Multiple.py
- TestImportPart_ToEmptyPart.py
- TestImportPart_ToEmptyPartSet.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ExchangePlugin")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include <GeomAPI_Shape.h>
#include <GeomAPI_Face.h>
#include <GeomAPI_ShapeExplorer.h>
+#include <GeomAPI_ShapeIterator.h>
#include <Locale_Convert.h>
if (!aColor.empty()){
if (aRes->get() && aColor == theColor) {
- aSelectionList->setSelectionType(aShape->shapeTypeStr());
- aSelectionList->append(theResultBody,aShape);
+ if (aShape->isCompound() || aShape->isCompSolid()) {
+ GeomAPI_ShapeIterator anIt(aShape);
+ for (; anIt.more(); anIt.next()) {
+ aSelectionList->setSelectionType(anIt.current()->shapeTypeStr());
+ aSelectionList->append(theResultBody,anIt.current());
+ }
+ } else {
+ aSelectionList->setSelectionType(aShape->shapeTypeStr());
+ aSelectionList->append(theResultBody,aShape);
+ }
}
}
}
aResMat != anIt->second.end(); ++aResMat) {
if (aRes->get() && ((*aRes)->data()->name() == (*aResMat)))
{
- aSelectionList->append(theResultBody,aShape);
- aSelectionList->setSelectionType(aShape->shapeTypeStr());
+ if (aShape->isCompound() || aShape->isCompSolid()) {
+ GeomAPI_ShapeIterator anIt(aShape);
+ for (; anIt.more(); anIt.next()) {
+ aSelectionList->setSelectionType(anIt.current()->shapeTypeStr());
+ aSelectionList->append(theResultBody,anIt.current());
+ }
+ } else {
+ aSelectionList->setSelectionType(aShape->shapeTypeStr());
+ aSelectionList->append(theResultBody,aShape);
+ }
break;
}
}
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
*/
class ExchangePlugin_ImportFeatureBase : public ModelAPI_CompositeFeature
{
- public:
+public:
/// attribute name of file path
inline static const std::string& FILE_PATH_ID()
{
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
#=========================================================================
# Common test function
#=========================================================================
-def testExport(theType, theFormat, theFile, theVolume, theDelta, theErrorExpected = False):
+def testExport(theType, theFormat, theFile, theVolume, theArea, theDelta, theErrorExpected = False):
# Import a reference part
aSession.startOperation("Add part")
aPartFeature = aSession.moduleDocument().addFeature("Part")
assert os.path.exists(theFile)
# Test exported file by importing
- testImport(theType, theFile, theVolume, theDelta)
+ testImport(theType, theFile, theVolume, theArea, theDelta)
def testExportXAO(theFile, theEmptyFormat = False):
type = "XAO"
# Export a shape into BREP
#=========================================================================
aRealVolume = 3.78827401738e-06
- testExport("BREP", "BREP", os.path.join(tmp_dir, "screw_export.brep"), aRealVolume, 10 ** -17)
- testExport("BRP", "BREP", os.path.join(tmp_dir, "screw_export.brp"), aRealVolume, 10 ** -17)
- testExport("BREP", "", os.path.join(tmp_dir, "screw_export.brep"), aRealVolume, 10 ** -17)
+ testExport("BREP", "BREP", os.path.join(tmp_dir, "screw_export.brep"), aRealVolume, 0.0019293313778547098, 10 ** -17)
+ testExport("BRP", "BREP", os.path.join(tmp_dir, "screw_export.brp"), aRealVolume, 0.0019293313778547098, 10 ** -17)
+ testExport("BREP", "", os.path.join(tmp_dir, "screw_export.brep"), aRealVolume, 0.0019293313778547098, 10 ** -17)
#=========================================================================
# Export a shape into STEP
#=========================================================================
- testExport("STEP", "STEP", os.path.join(tmp_dir, "screw_export.step"), 3.788258075329978e-06, 10 ** -17)
- testExport("STEP", "STEP", os.path.join(tmp_dir, "screw_export.stp"), 3.788258075329978e-06, 10 ** -17)
- testExport("STEP", "", os.path.join(tmp_dir, "screw_export.step"), 3.788258075329978e-06, 10 ** -17)
+ testExport("STEP", "STEP", os.path.join(tmp_dir, "screw_export.step"), 3.788258075329978e-06, 0.0019293304476337928, 10 ** -17)
+ testExport("STEP", "STEP", os.path.join(tmp_dir, "screw_export.stp"), 3.788258075329978e-06, 0.0019293304476337928, 10 ** -17)
+ testExport("STEP", "", os.path.join(tmp_dir, "screw_export.step"), 3.788258075329978e-06, 0.0019293304476337928, 10 ** -17)
#=========================================================================
# Export a shape into IGES
#=========================================================================
- testExport("IGES", "IGES-5.1", os.path.join(tmp_dir, "screw_export-5.1.iges"), 0.0019293313766693052, 10 ** -17)
- testExport("IGS", "IGES-5.1", os.path.join(tmp_dir, "screw_export-5.1.igs"), 0.0019293313766693052, 10 ** -17)
- testExport("IGES", "", os.path.join(tmp_dir, "screw_export-5.1.iges"), 0.0019293313766693052, 10 ** -17)
- testExport("IGES", "IGES-5.3", os.path.join(tmp_dir, "screw_export-5.3.iges"), 3.78827401651e-06, 10 ** -17)
- testExport("IGS", "IGES-5.3", os.path.join(tmp_dir, "screw_export-5.3.igs"), 3.78827401651e-06, 10 ** -17)
+ testExport("IGES", "IGES-5.1", os.path.join(tmp_dir, "screw_export-5.1.iges"), 0.0, 0.0019293313766693052, 10 ** -17)
+ testExport("IGS", "IGES-5.1", os.path.join(tmp_dir, "screw_export-5.1.igs"), 0.0, 0.0019293313766693052, 10 ** -17)
+ testExport("IGES", "", os.path.join(tmp_dir, "screw_export-5.1.iges"), 0.0, 0.0019293313766693052, 10 ** -17)
+ testExport("IGES", "IGES-5.3", os.path.join(tmp_dir, "screw_export-5.3.iges"), 3.78827401651e-06, 0.001929331377591282, 10 ** -17)
+ testExport("IGS", "IGES-5.3", os.path.join(tmp_dir, "screw_export-5.3.igs"), 3.78827401651e-06, 0.001929331377591282, 10 ** -17)
#=========================================================================
# Export a shape into XAO
#=========================================================================
#=========================================================================
# Check error when export to unsupported format
#=========================================================================
- testExport("BREP", "", os.path.join(tmp_dir, "screw_export.dwg"), 3.78825807533e-06, 10 ** -17, True)
+ testExport("BREP", "", os.path.join(tmp_dir, "screw_export.dwg"), 3.78825807533e-06, 0.0019293313766693052, 10 ** -17, True)
#=========================================================================
# End of test
#=========================================================================
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
shapes_dir = os.path.join(os.getenv("DATA_DIR"), "Shapes")
return os.path.join(shapes_dir, path)
-def testImport(theType, theFile, theVolume, theDelta, theErrorExpected = False):
+def testImport(theType, theFile, theVolume, theArea, theDelta, theErrorExpected = False):
# Create a part for import
aSession.startOperation("Create part for import")
aPartFeature = aSession.moduleDocument().addFeature("Part")
aRefVolume = theVolume
aResVolume = GeomAlgoAPI_ShapeTools.volume(aShape)
assert (math.fabs(aResVolume - aRefVolume) < theDelta), "{0}: The volume is wrong: expected = {1}, real = {2}".format(theType, aRefVolume, aResVolume)
+ # Check shape area
+ aRefArea = theArea
+ aResArea = GeomAlgoAPI_ShapeTools.area(aShape)
+ assert (math.fabs(aResArea - aRefArea) < theDelta), "{0}: The area is wrong: expected = {1}, real = {2}".format(theType, aRefArea, aResArea)
def testImportXAO():
# Create a part for import
# Create a shape imported from BREP
#=========================================================================
shape_path = getShapePath("Brep/solid.brep")
- testImport("BREP", shape_path, 259982.297176, 10 ** -5)
+ testImport("BREP", shape_path, 259982.297176, 39481.415022205365, 10 ** -5)
shape_path = shutil.copyfile(shape_path, os.path.join(tmp_dir, "solid.brp"))
- testImport("BRP", shape_path, 259982.297176, 10 ** -5)
+ testImport("BRP", shape_path, 259982.297176, 39481.415022205365, 10 ** -5)
#=========================================================================
# Create a shape imported from STEP
#=========================================================================
shape_path = getShapePath("Step/screw.step")
- testImport("STEP", shape_path, 3.78827401738e-06, 10 ** -17)
+ testImport("STEP", shape_path, 3.78827401738e-06, 0.0019293313778547085, 10 ** -17)
shape_path = shutil.copyfile(shape_path, os.path.join(tmp_dir, "screw.stp"))
- testImport("STEP", shape_path, 3.78827401738e-06, 10 ** -17)
+ testImport("STEP", shape_path, 3.78827401738e-06, 0.0019293313778547085, 10 ** -17)
#=========================================================================
# Create a shape imported from IGES
#=========================================================================
shape_path = getShapePath("Iges/bearing.igs")
- testImport("IGS", shape_path, 1.3407098545036494e-08, 10 ** -25)
+ testImport("IGS", shape_path, 0.0, 1.3407098545036494e-08, 10 ** -25)
shape_path = shutil.copyfile(shape_path, os.path.join(tmp_dir, "bearing.iges"))
- testImport("IGES", shape_path, 1.3407098545036494e-08, 10 ** -25)
+ testImport("IGES", shape_path, 0.0, 1.3407098545036494e-08, 10 ** -25)
#=========================================================================
# Create a shape imported from XAO
#=========================================================================
# Check import errors
#=========================================================================
- testImport("BREP", "", 0, 10 ** -25, True)
+ testImport("BREP", "", 0, 0, 10 ** -25, True)
shape_path = getShapePath("Brep/solid.dwg")
- testImport("BREP", shape_path, 0, 10 ** -25, True)
+ testImport("BREP", shape_path, 0, 0, 10 ** -25, True)
shape_path = getShapePath("Xao/wrong_file.xao")
- testImport("XAO", shape_path, 0, 10 ** -25, True)
+ testImport("XAO", shape_path, 0, 0, 10 ** -25, True)
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
Export_1 = model.exportToFile(Part_1_doc, file_path,
[model.selection("SOLID", "Box_1_1")])
+
+file_xao = os.path.join(os.getenv("DATA_DIR"), "test.xao")
+Export_2 = model.exportToXAO(Part_1_doc, file_xao,
+ model.selection("SOLID", "Box_1_1"), "author", "box")
model.do()
model.end()
Selection list in the property panel contains a list of exported objects which can be selected in a viewer or object browser.
+*Note*: For XAO format, selection list is not available, the whole part is exported.
**Apply** button exports the file.
:param list: A list of exporting objects
-.. py:function:: model.exportToXAO(Part_doc, FileNameString, [ObjectsList, Author, GeometryName])
+.. py:function:: model.exportToXAO(Part_doc, FileNameString, Author="", GeometryName="")
+.. py:function:: model.exportToXAO(Part_doc, FileNameString, Object, Author="", GeometryName="")
:param part: The current part object
:param string: The file name
- :param list: A list of exporting objects, if necessary
- :param string: The name of the author
- :param string: The name for the shape processed in GEOMETRY module
-
-Result
-""""""
-
-The Result of operation is an exported file.
-
-**See Also** a sample TUI Script of :ref:`tui_export_file` operation.
+ :param object: An exporting object, if necessary
+ :param string: The name of the author, empty by default
+ :param string: The name for the shape processed in GEOMETRY module, empty by default
Result
""""""
</groupbox>
</groupbox>
</case>
- </switch>
+ </switch>
</feature>
<feature id="ImportImageMacro" title="Import" tooltip="Import a file" icon="icons/Exchange/import.png"
helpfile="importFeature.html"
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestImport.py
+ TestExport.py
+ Test2290.py
+ Test2459.py
+ Test18710.py
+ TestExportToXAOWithFields.py
+ TestExportToXAOWithGroupNotUpdated.py
+ TestExport_FiniteValidator.py
+ TestExportPart_Failure_1.py
+ TestExportPart_Failure_2.py
+ TestExportPart_Failure_3.py
+ TestExportPart_FullPartSet.py
+ TestExportPart_FullPart_1.py
+ TestExportPart_FullPart_2.py
+ TestExportPart_PartSet.py
+ TestExportPart_Results_1.py
+ TestExportPart_Results_2.py
+ TestExportPart_Results_3.py
+ TestExportPart_Results_4.py
+ TestExportPart_Results_5.py
+ TestExportPart_Results_6.py
+ TestExportPart_Results_7.py
+ TestExportPart_Results_8.py
+ TestImportPart_AfterCurrent_1.py
+ TestImportPart_AfterCurrent_2.py
+ TestImportPart_AfterLast_1.py
+ TestImportPart_AfterLast_2.py
+ TestImportPart_AfterLast_3.py
+ TestImportPart_AfterLast_4.py
+ TestImportPart_AfterLast_5.py
+ TestImportPart_AfterLast_6.py
+ TestImportPart_Construction_1.py
+ TestImportPart_Construction_2.py
+ TestImportPart_Construction_3.py
+ TestImportPart_Construction_4.py
+ TestImportPart_Multiple.py
+ TestImportPart_ToEmptyPart.py
+ TestImportPart_ToEmptyPartSet.py
+)
\ No newline at end of file
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
FeaturesAPI_Copy.h
FeaturesAPI_ImportResult.h
FeaturesAPI_Defeaturing.h
+ FeaturesAPI_PointCoordinates.h
+ FeaturesAPI_GeometryCalculation.h
+ FeaturesAPI_BoundingBox.h
)
SET(PROJECT_SOURCES
FeaturesAPI_Copy.cpp
FeaturesAPI_ImportResult.cpp
FeaturesAPI_Defeaturing.cpp
+ FeaturesAPI_PointCoordinates.cpp
+ FeaturesAPI_GeometryCalculation.cpp
+ FeaturesAPI_BoundingBox.cpp
)
SET(PROJECT_LIBRARIES
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
%shared_ptr(FeaturesAPI_Copy)
%shared_ptr(FeaturesAPI_ImportResult)
%shared_ptr(FeaturesAPI_Defeaturing)
+%shared_ptr(FeaturesAPI_BoundingBox)
%typecheck(SWIG_TYPECHECK_POINTER) std::pair<std::list<ModelHighAPI_Selection>, bool>, const std::pair<std::list<ModelHighAPI_Selection>, bool> & {
%include "FeaturesAPI_RemoveResults.h"
%include "FeaturesAPI_Copy.h"
%include "FeaturesAPI_ImportResult.h"
+%include "FeaturesAPI_PointCoordinates.h"
+%include "FeaturesAPI_GeometryCalculation.h"
+%include "FeaturesAPI_BoundingBox.h"
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#include "FeaturesAPI_BoundingBox.h"
+
+#include <FeaturesPlugin_CreateBoundingBox.h>
+#include <ModelAPI_AttributeDoubleArray.h>
+#include <ModelHighAPI_Services.h>
+#include <ModelHighAPI_Tools.h>
+
+#include <ModelHighAPI_Dumper.h>
+#include <ModelHighAPI_Selection.h>
+#include <ModelHighAPI_Tools.h>
+
+//=================================================================================================
+FeaturesAPI_BoundingBox::FeaturesAPI_BoundingBox(
+ const std::shared_ptr<ModelAPI_Feature>& theFeature)
+ : ModelHighAPI_Interface(theFeature)
+{
+ initialize();
+}
+
+//=================================================================================================
+FeaturesAPI_BoundingBox::FeaturesAPI_BoundingBox(
+ const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Selection& theObject)
+:ModelHighAPI_Interface(theFeature)
+{
+ if (initialize()) {
+ fillAttribute(theObject, myobjectSelected);
+ execute();
+ }
+}
+
+//=================================================================================================
+FeaturesAPI_BoundingBox::~FeaturesAPI_BoundingBox()
+{
+}
+
+//=================================================================================================
+void FeaturesAPI_BoundingBox::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ const std::string& aDocName = theDumper.name(aBase->document());
+
+ AttributeSelectionPtr anAttrObject;
+ anAttrObject = aBase->selection(FeaturesPlugin_CreateBoundingBox::OBJECT_ID());
+
+ theDumper << aBase << " = model.getBoundingBox(" << aDocName << ", " << anAttrObject;
+
+ theDumper << ")" << std::endl;
+}
+
+//=================================================================================================
+BoundingBoxPtr getBoundingBox(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Selection& theObject)
+{
+
+ FeaturePtr aFeature =
+ thePart->addFeature(FeaturesPlugin_CreateBoundingBox::ID());
+
+ BoundingBoxPtr aBoundingBox;
+
+ aBoundingBox.reset(new FeaturesAPI_BoundingBox(aFeature, theObject));
+
+ return aBoundingBox;
+}
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#ifndef FeaturesAPI_BoundingBox_H_
+#define FeaturesAPI_BoundingBox_H_
+
+#include "FeaturesAPI.h"
+
+#include "FeaturesPlugin_CreateBoundingBox.h"
+
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
+
+#include <memory>
+
+class ModelAPI_Document;
+class ModelHighAPI_Selection;
+
+/// \class FeaturesAPI_NormalToFace
+/// \ingroup CPPHighAPI
+/// \brief Interface for NormalToface feature.
+class FeaturesAPI_BoundingBox: public ModelHighAPI_Interface
+{
+public:
+ /// Constructor without values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_BoundingBox(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_BoundingBox(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Selection& theObject);
+
+ /// Destructor.
+ FEATURESAPI_EXPORT
+ virtual ~FeaturesAPI_BoundingBox();
+
+ INTERFACE_1(FeaturesPlugin_CreateBoundingBox::ID(),
+ objectSelected, FeaturesPlugin_CreateBoundingBox::OBJECT_ID(),
+ ModelAPI_AttributeSelection, /** object selected*/)
+
+ /// Dump wrapped feature
+ FEATURESAPI_EXPORT
+ virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+
+};
+
+/// Pointer on the NormalToface object.
+typedef std::shared_ptr<FeaturesAPI_BoundingBox> BoundingBoxPtr;
+
+/// \ingroup CPPHighAPI
+/// \brief get the bounding Box
+/// \param thePart the part
+/// \param theobject the object selected
+FEATURESAPI_EXPORT
+BoundingBoxPtr getBoundingBox(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Selection& theObject);
+
+#endif // FeaturesAPI_BoundingBox_H_
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#include "FeaturesAPI_GeometryCalculation.h"
+
+#include <FeaturesPlugin_GeometryCalculation.h>
+#include <ModelAPI_AttributeDoubleArray.h>
+#include <ModelHighAPI_Services.h>
+#include <ModelHighAPI_Tools.h>
+
+//=================================================================================================
+std::list<double> getGeometryCalculation(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Selection& theObject)
+{
+ FeaturePtr aPointCoodFeat = thePart->addFeature(FeaturesPlugin_GeometryCalculation::ID());
+
+ fillAttribute(theObject, aPointCoodFeat
+ ->selection(FeaturesPlugin_GeometryCalculation::OBJECT_SELECTED_ID()));
+ std::list<double> res;
+
+ // obtain result
+ AttributeDoubleArrayPtr aResult = std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(
+ aPointCoodFeat->attribute(FeaturesPlugin_GeometryCalculation::RESULT_VALUES_ID()));
+
+ for (int i : {0, 1, 2})
+ res.push_back(aResult->value(i));
+
+ return res;
+}
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#ifndef FeaturesAPI_GeometryCalculation_H_
+#define FeaturesAPI_GeometryCalculation_H_
+
+#include "FeaturesAPI.h"
+
+#include <list>
+#include <memory>
+
+class ModelAPI_Document;
+class ModelHighAPI_Selection;
+
+/// \ingroup CPPHighAPI
+/// \brief get the geometry calculation (length, Surface area, volume)
+FEATURESAPI_EXPORT
+std::list<double> getGeometryCalculation(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Selection& theObject);
+
+#endif // FeaturesAPI_GeometryCalculation_H_
\ No newline at end of file
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#include "FeaturesAPI_PointCoordinates.h"
+
+#include <FeaturesPlugin_PointCoordinates.h>
+#include <ModelAPI_AttributeDoubleArray.h>
+#include <ModelHighAPI_Services.h>
+#include <ModelHighAPI_Tools.h>
+
+std::list<double> getPointCoordinates(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Selection& thePoint)
+{
+ FeaturePtr aPointCoordFeat = thePart->addFeature(FeaturesPlugin_PointCoordinates::ID());
+
+ fillAttribute(thePoint, aPointCoordFeat
+ ->selection(FeaturesPlugin_PointCoordinates::POINT_SELECTED_ID()));
+ std::list<double> res;
+
+ // obtain result
+ AttributeDoubleArrayPtr aResult = std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(
+ aPointCoordFeat->attribute(FeaturesPlugin_PointCoordinates::RESULT_VALUES_ID()));
+
+ for ( int i : {0, 1, 2})
+ res.push_back( aResult->value(i));
+
+ return res;
+}
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#ifndef FeaturesAPI_PointCoordinates_H_
+#define FeaturesAPI_PointCoordinates_H_
+
+#include "FeaturesAPI.h"
+
+#include <list>
+#include <memory>
+
+class ModelAPI_Document;
+class ModelHighAPI_Selection;
+
+/// \ingroup CPPHighAPI
+/// \brief Get the point coordinates.
+FEATURESAPI_EXPORT
+std::list<double> getPointCoordinates(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Selection& thePoint);
+
+#endif // FeaturesAPI_PointCoordinates_H_
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include "FeaturesAPI_RemoveResults.h"
#include "FeaturesAPI_Copy.h"
#include "FeaturesAPI_ImportResult.h"
+ #include "FeaturesAPI_PointCoordinates.h"
+ #include "FeaturesAPI_GeometryCalculation.h"
+ #include "FeaturesAPI_BoundingBox.h"
#endif // FeaturesAPI_swig_H_
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INCLUDE(Common)
INCLUDE(UnitTest)
+
SET(PROJECT_HEADERS
FeaturesPlugin.h
FeaturesPlugin_Plugin.h
FeaturesPlugin_ImportResult.h
FeaturesPlugin_Defeaturing.h
FeaturesPlugin_VersionedChFi.h
+ FeaturesPlugin_PointCoordinates.h
+ FeaturesPlugin_GeometryCalculation.h
+ FeaturesPlugin_BoundingBox.h
+ FeaturesPlugin_CommonBoundingBox.h
+ FeaturesPlugin_CreateBoundingBox.h
)
SET(PROJECT_SOURCES
FeaturesPlugin_ImportResult.cpp
FeaturesPlugin_Defeaturing.cpp
FeaturesPlugin_VersionedChFi.cpp
+ FeaturesPlugin_PointCoordinates.cpp
+ FeaturesPlugin_GeometryCalculation.cpp
+ FeaturesPlugin_BoundingBox.cpp
+ FeaturesPlugin_CommonBoundingBox.cpp
+ FeaturesPlugin_CreateBoundingBox.cpp
)
SET(XML_RESOURCES
copy_widget.xml
import_result_widget.xml
defeaturing_widget.xml
+ point_coordinates_widget.xml
+ geometry_calculation_widget.xml
+ bounding_box_widget.xml
+ create_bounding_box_widget.xml
)
SET(TEXT_RESOURCES
../GeomAPI
../GeomAlgoAPI
../GeomValidators
+ ../ModuleBase
../Events
../Config
${OpenCASCADE_INCLUDE_DIR}
INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Features)
INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-ADD_UNIT_TESTS(TestExtrusion.py
- TestExtrusionOfCompound.py
- TestExtrusionCut.py
- TestExtrusionCut_BySize.py
- TestExtrusionCut_ByPlanesAndOffsets.py
- TestExtrusionCut_ByFaces.py
- TestExtrusionCut_ThroughAll.py
- TestExtrusionFuse.py
- TestExtrusionFuse_BySize.py
- TestExtrusionFuse_ByPlanesAndOffsets.py
- TestExtrusionFuse_ThroughAll.py
- TestExtrusion_ErrorMsg.py
- TestExtrusion_ZeroOffsetError.py
- TestExtrusion_ByFaces01.py
- TestExtrusion_ByFaces02.py
- TestExtrusion_ByFaces03.py
- TestExtrusion_ByFaces04.py
- TestExtrusion_ByFaces05.py
- TestExtrusion_ByFaces06.py
- TestExtrusion_ByFaces07.py
- TestExtrusion_ByFaces08.py
- TestExtrusion_ByFaces09.py
- TestExtrusion_ByFaces10.py
- TestExtrusion_ByFaces11.py
- TestExtrusion_ByFaces12.py
- TestExtrusion_ByFaces13.py
- TestExtrusion_ByFaces14.py
- TestExtrusion_ByFaces15.py
- TestExtrusion_ByFaces16.py
- TestExtrusion_ByFaces17.py
- TestExtrusion_ByFaces18.py
- TestExtrusion_ByFaces19.py
- TestRevolution.py
- TestRevolution_ByAngle.py
- TestRevolutionOfPoint.py
- TestRevolutionOfEdge.py
- TestRevolutionOfCompound.py
- TestRevolutionCut.py
- TestRevolutionCut_ByAngle.py
- TestRevolutionCut_ByPlanesAndOffsets.py
- TestRevolutionCut_ThroughAll.py
- TestRevolutionFuse.py
- TestRevolutionFuse_ByAngle.py
- TestRevolutionFuse_ByPlanesAndOffsets.py
- TestRevolutionFuse_ThroughAll.py
- TestCompositeFeaturesOnCompSolids.py
- TestPartition.py
- TestPartition_ErrorMsg.py
- TestPlacement_Vertex_Vertex.py
- TestPlacement_Edge_Vertex.py
- TestPlacement_Edge_Edge.py
- TestPlacement_Face_Vertex.py
- TestPlacement_Face_Edge.py
- TestPlacement_Face_Face.py
- TestPlacement_Part_Part.py
- TestPlacement_Complex.py
- TestPlacement_ErrorMsg.py
- TestPlacement_BodyShapesValidator.py
- TestTranslation.py
- TestTranslation_Part.py
- TestRotation.py
- TestRotation_ByAxis.py
- TestRotation_ByPoints.py
- TestRotation_ErrorMsg.py
- TestMultiRotation_Part.py
- TestMultiRotation_ErrorMsg.py
- TestMultiTranslation_Part.py
- TestMultiTranslation_ErrorMsg.py
- TestSymmetry_Part.py
- TestBoolean1.py
- TestBoolean2.py
- TestBoolean3.py
- TestBooleanCompSolids.py
- TestBooleanSmash.py
- TestBooleanSplit.py
- TestBooleanSplitWithPlane.py
- TestBooleanSplit_ErrorMsg.py
- TestMultiBoolean.py
- TestSerialBoolean.py
- TestBoolean_ErrorMsg.py
- TestIntersection.py
- TestIntersection_ErrorMsg.py
- TestUnion.py
- TestUnionFaces.py
- TestUnion_ErrorMsg.py
- TestRemoveSubShapes.py
- TestRemoveSubShapes2.py
- TestRemoveSubShapes3.py
- TestRemoveSubShapes4.py
- TestRemoveSubShapes5.py
- TestRemoveSubShapes6.py
- TestPipe.py
- TestPipe_Edge.py
- TestPipe_Wire.py
- TestPipe_Compound.py
- TestPipe_ErrorMsg.py
- TestRecover.py
- TestRecover_Compound.py
- TestRecover_Compsolid1.py
- TestRecover_Compsolid2.py
- TestRecover1798.py
- TestSplitEdgeVertex.py
- TestSplitEdgeEdge.py
- TestSplitEdgeEdgeIntersected.py
- TestSplitEdgeWire.py
- TestSplitEdgeFace.py
- TestSplitEdgeShell.py
- TestSplitEdgeSolid.py
- TestSplitEdgeSolidIntersected.py
- TestSplitWireVertex.py
- TestSplitWireEdge.py
- TestSplitWireWire.py
- TestSplitWireFace.py
- TestSplitWireShell.py
- TestSplitWireSolid.py
- TestSplitFaceVertex.py
- TestSplitFaceEdge.py
- TestSplitFaceEdgeInside.py
- TestSplitFaceEdgePerpendicular.py
- TestSplitFaceWire.py
- TestSplitFaceFace.py
- TestSplitFaceShell.py
- TestSplitFaceSolid.py
- TestSplitCompFaceSolid.py
- TestSplitShellVertex.py
- TestSplitShellEdge.py
- TestSplitShellConstrPlane.py
- TestSplitShellWire.py
- TestSplitShellFace.py
- TestSplitShellShell.py
- TestSplitShellSolid.py
- TestSplitSolid2ConstructionPlanes.py
- TestSplitSolidEdge.py
- TestSplitSolidFace.py
- TestSplitSolidCompFace.py
- TestSplitSolidShell.py
- TestSplitSolidCompShell.py
- TestSplitCompsolidPlane.py
- TestPartition2Faces.py
- TestPartition2Solids.py
- TestPartition2Wires.py
- TestPartitionBox4Planes.py
- TestPartitionEdgeSolid.py
- TestPartitionFace2Solid.py
- TestPartitionFaceSolid.py
- TestPartitionFaceWire.py
- TestPartitionInclinedFaceSolid.py
- TestPartitionWireFaceSolid.py
- TestUnion4CurvedFaces.py
- TestUnion4CurvedFaces_2.py
- TestUnion4Faces.py
- TestUnionOfUnion.py
- TestMeasurementLength.py
- TestMeasurementDistance.py
- TestMeasurementRadius.py
- TestMeasurementAngle.py
- TestMeasurementAngle3Points.py
- TestMeasurementPresentation.py
- TestFusionFaces.py
- TestFusionFaces2697.py
- Test1379.py
- Test1922.py
- Test1942.py
- Test1915.py
- Test2023.py
- Test2046.py
- Test2038.py
- Test2172.py
- Test2194.py
- Test2197_1.py
- Test2197_2.py
- Test2197_3.py
- Test2197_4.py
- Test2215.py
- Test2222.py
- Test2233.py
- Test2231.py
- Test2240.py
- Test2246.py
- Test2248.py
- Test2251.py
- Test2255.py
- Test2289.py
- Test2304.py
- Test2304_2.py
- Test2375.py
- Test2377.py
- Test2394.py
- Test2395.py
- Test2419_1.py
- Test2419_2.py
- Test2419_3.py
- Test2465.py
- Test2495.py
- Test2514.py
- Test2520.py
- TestBooleanCut_CompSolid_CompSolid.py
- TestBooleanCut_CompSolidCompound_CompSolidCompound.py
- TestBooleanCut_Edge_Edge.py
- TestBooleanCut_Edge_Face.py
- TestBooleanCut_EdgeCompound_EdgeCompound.py
- TestBooleanCut_EdgeCompound_Solid.py
- TestBooleanCut_Face_Face.py
- TestBooleanCut_Face_Solid.py
- TestBooleanCut_FaceCompound_FaceCompound.py
- TestBooleanCut_Shell_Shell.py
- TestBooleanCut_ShellCompound_ShellCompound.py
- TestBooleanCut_Solid_Solid.py
- TestBooleanCut_SolidCompound_SolidCompound.py
- TestBooleanCut_Vertex_Vertex.py
- TestBooleanCut_VertexCompound_Solid.py
- TestBooleanCut_VertexCompound_VertexCompound.py
- TestBooleanCut_Wire_Face.py
- TestBooleanCut_Wire_Wire.py
- TestBooleanCut_WireCompound_WireCompound.py
- TestBooleanCut_Compound_Solid.py
- TestBooleanCut_ErrorMsg.py
- TestBooleanCut_SolidsHistory.py
- TestBooleanSmash_Face_Face.py
- TestBooleanSmash_SubSolid_Solid.py
- TestBooleanSmash_CompSolid_Solid.py
- TestBooleanSmash_ErrorMsg.py
- TestBooleanSmash_SolidsHistory.py
- TestBooleanFuse_SimpleMode.py
- TestBooleanFuse_RemoveEdges.py
- TestBooleanFuse_ErrorMsg.py
- TestBooleanCommon_Vertex_Vertex.py
- TestBooleanCommon_VertexCompound_VertexCompound.py
- TestBooleanCommon_Edge_Edge.py
- TestBooleanCommon_EdgeCompound_EdgeCompound.py
- TestBooleanCommon_Wire_Wire.py
- TestBooleanCommon_WireCompound_WireCompound.py
- TestBooleanCommon_Face_Face.py
- TestBooleanCommon_Face_Plane.py
- TestBooleanCommon_FaceCompound_FaceCompound.py
- TestBooleanCommon_Shell_Shell.py
- TestBooleanCommon_ShellCompound_ShellCompound.py
- TestBooleanCommon_Solid_Face.py
- TestBooleanCommon_Solid_Shell.py
- TestBooleanCommon_Solid_Solid.py
- TestBooleanCommon_SolidCompound_Face.py
- TestBooleanCommon_SolidCompound_Shell.py
- TestBooleanCommon_SolidCompound_SolidCompound.py
- TestBooleanCommon_SubCompound_Solid.py
- TestBooleanCommon_SubSolid_Solid.py
- TestBooleanCommon_CompSolid_Face.py
- TestBooleanCommon_CompSolid_Shell.py
- TestBooleanCommon_CompSolid_CompSolid.py
- TestBooleanCommon_CompSolidCompound_Face.py
- TestBooleanCommon_CompSolidCompound_Shell.py
- TestBooleanCommon_CompSolidCompound_CompSolidCompound.py
- TestBooleanCommon_ErrorMsg.py
- TestBooleanCommon_SolidsHistory.py
- Test2596.py
- Test2592.py
- Test2588.py
- Test1467.py
- TestPartitionSubCompsolidWithCompSolid1.py
- TestPartitionSubCompsolidWithCompSolid2.py
- TestPartitionSubCompsolidWithCompSolid3.py
- TestPartitionSubCompsolidWithSolid1.py
- TestPartitionSubCompsolidWithSolid2.py
- TestPartitionSubCompsolidWithSolid3.py
- TestPartitionSubCompsolidWithSolid4.py
- TestPartitionSubCompsolidWithSolid5.py
- TestPartitionSubCompsolidWithFace1.py
- TestPartitionSubCompsolidWithFace2.py
- TestPartitionSubCompsolidWithFace3.py
- TestPartitionSubCompsolidWithFace4.py
- TestPartitionSubCompsolidWithFace5.py
- TestPartitionSubCompsolidWithPlane1.py
- TestPartitionSubCompsolidWithPlane2.py
- TestPartitionSubCompsolidWithPlane3.py
- TestPartitionSubCompsolidWithPlane4.py
- TestPartitionSubCompsolidWithPlane5.py
- TestPartitionArgsUpdate.py
- TestPartition_SolidsHistory.py
- TestBooleanFuse_Vertex_Vertex.py
- TestBooleanFuse_VertexCompound_VertexCompound.py
- TestBooleanFuse_Edge_Edge.py
- TestBooleanFuse_EdgeCompound_EdgeCompound.py
- TestBooleanFuse_Wire_Wire.py
- TestBooleanFuse_WireCompound_WireCompound.py
- TestBooleanFuse_Face_Face.py
- TestBooleanFuse_FaceCompound_FaceCompound.py
- TestBooleanFuse_Shell_Shell.py
- TestBooleanFuse_ShellCompound_ShellCompound.py
- TestBooleanFuse_Solid_Solid.py
- TestBooleanFuse_SolidCompound_SolidCompound.py
- TestBooleanFuse_CompSolid_Face.py
- TestBooleanFuse_CompSolid_CompSolid.py
- TestBooleanFuse_CompSolidCompound_CompSolidCompound.py
- TestBooleanFuse_SolidsHistory.py
- TestFillet.py
- TestFillet1.py
- TestFillet_ErrorMsg.py
- TestFillet_History.py
- TestScale1.py
- TestScale2.py
- Test1816.py
- Test1876.py
- Test2225.py
- Test2631.py
- Test2636.py
- Test2650.py
- Test2681.py
- Test2686.py
- Test2689.py
- Test2693.py
- Test2698.py
- Test2701.py
- Test2724.py
- Test2692.py
- Test2617.py
- Test2729.py
- Test2738.py
- Test2751.py
- Test2826.py
- Test2854.py
- Test2878.py
- Test2920.py
- Test2971.py
- Test3014.py
- TestBooleanCommon_MultiLevelCompound_v0_1.py
- TestBooleanCommon_MultiLevelCompound_v0_2.py
- TestBooleanCommon_MultiLevelCompound_v20190506_1.py
- TestBooleanCommon_MultiLevelCompound_v20190506_2.py
- TestBooleanCut_MultiLevelCompound_v0_1.py
- TestBooleanCut_MultiLevelCompound_v0_2.py
- TestBooleanCut_MultiLevelCompound_v20190506_1.py
- TestBooleanCut_MultiLevelCompound_v20190506_2.py
- TestBooleanFuse_MultiLevelCompound_v0_1.py
- TestBooleanFuse_MultiLevelCompound_v0_2.py
- TestBooleanFuse_MultiLevelCompound_v0_3.py
- TestBooleanFuse_MultiLevelCompound_v0_4.py
- TestBooleanFuse_MultiLevelCompound_v20190506_1.py
- TestBooleanFuse_MultiLevelCompound_v20190506_2.py
- TestBooleanFuse_MultiLevelCompound_v20190506_3.py
- TestBooleanFuse_MultiLevelCompound_v20190506_4.py
- TestBooleanSmash_MultiLevelCompound_v0_1.py
- TestBooleanSmash_MultiLevelCompound_v0_2.py
- TestBooleanSmash_MultiLevelCompound_v20190506_1.py
- TestBooleanSmash_MultiLevelCompound_v20190506_2.py
- TestBooleanSplit_MultiLevelCompound_v0_1.py
- TestBooleanSplit_MultiLevelCompound_v0_2.py
- TestBooleanSplit_MultiLevelCompound_v20190506_1.py
- TestBooleanSplit_MultiLevelCompound_v20190506_2.py
- TestPartition_MultiLevelCompound_v0_1.py
- TestPartition_MultiLevelCompound_v0_2.py
- TestPartition_MultiLevelCompound_v0_3.py
- TestPartition_MultiLevelCompound_v20190506_1.py
- TestPartition_MultiLevelCompound_v20190506_2.py
- TestPartition_MultiLevelCompound_v20190506_3.py
- TestUnion_MultiLevelCompound_v0.py
- TestUnion_MultiLevelCompound_v20190506.py
- TestUnionFaces_v20190506.py
- TestRemoveResultsBody.py
- TestRemoveResultsConstruction.py
- TestRemoveResultsPart.py
- Test17000.py
- Test17261.py
- Test17281.py
- TestChamfer.py
- Test3033.py
- Test3076.py
- Test17909.py
- TestCopy_ErrorMsg.py
- TestCopyFeature.py
- TestCopyFeatureMoveGroupOfFeature.py
- TestCopyMoveResult.py
- TestCopyMoveSubShapes.py
- TestCopyNames.py
- TestCopySubShapes.py
- TestCopyWholeFeature.py
- TestImportResult.py
- TestDefeaturing_ErrorMsg.py
- TestDefeaturing_OnSolid1.py
- TestDefeaturing_OnSolid2.py
- TestDefeaturing_OnSolid3.py
- TestDefeaturing_OnCompsolid1.py
- TestDefeaturing_OnCompsolid2.py
- TestDefeaturing_OnCompsolid3.py
- TestDefeaturing_OnCompound.py
- Test3137_1.py
- Test3137_2.py
- Test2918.py
- Test3139.py
- TestPlacement_MultiLevelCompound_v0_1.py
- TestPlacement_MultiLevelCompound_v0_2.py
- TestPlacement_MultiLevelCompound_v0_3.py
- TestPlacement_MultiLevelCompound_v0_4.py
- TestPlacement_MultiLevelCompound_v0_5.py
- TestPlacement_MultiLevelCompound_v0_6.py
- TestPlacement_MultiLevelCompound_v95_1.py
- TestPlacement_MultiLevelCompound_v95_2.py
- TestPlacement_MultiLevelCompound_v95_3.py
- TestPlacement_MultiLevelCompound_v95_4.py
- TestPlacement_MultiLevelCompound_v95_5.py
- TestPlacement_MultiLevelCompound_v95_6.py
- TestTranslation_MultiLevelCompound_v0_1.py
- TestTranslation_MultiLevelCompound_v0_2.py
- TestTranslation_MultiLevelCompound_v0_3.py
- TestTranslation_MultiLevelCompound_v0_4.py
- TestTranslation_MultiLevelCompound_v0_5.py
- TestTranslation_MultiLevelCompound_v95_1.py
- TestTranslation_MultiLevelCompound_v95_2.py
- TestTranslation_MultiLevelCompound_v95_3.py
- TestTranslation_MultiLevelCompound_v95_4.py
- TestTranslation_MultiLevelCompound_v95_5.py
- TestRotation_MultiLevelCompound_v0_1.py
- TestRotation_MultiLevelCompound_v0_2.py
- TestRotation_MultiLevelCompound_v0_3.py
- TestRotation_MultiLevelCompound_v0_4.py
- TestRotation_MultiLevelCompound_v95_1.py
- TestRotation_MultiLevelCompound_v95_2.py
- TestRotation_MultiLevelCompound_v95_3.py
- TestRotation_MultiLevelCompound_v95_4.py
- TestSymmetry_MultiLevelCompound_v0_1.py
- TestSymmetry_MultiLevelCompound_v0_2.py
- TestSymmetry_MultiLevelCompound_v0_3.py
- TestSymmetry_MultiLevelCompound_v0_4.py
- TestSymmetry_MultiLevelCompound_v0_5.py
- TestSymmetry_MultiLevelCompound_v95_1.py
- TestSymmetry_MultiLevelCompound_v95_2.py
- TestSymmetry_MultiLevelCompound_v95_3.py
- TestSymmetry_MultiLevelCompound_v95_4.py
- TestSymmetry_MultiLevelCompound_v95_5.py
- TestScale_MultiLevelCompound_v0_1.py
- TestScale_MultiLevelCompound_v0_2.py
- TestScale_MultiLevelCompound_v0_3.py
- TestScale_MultiLevelCompound_v0_4.py
- TestScale_MultiLevelCompound_v95_1.py
- TestScale_MultiLevelCompound_v95_2.py
- TestScale_MultiLevelCompound_v95_3.py
- TestScale_MultiLevelCompound_v95_4.py
- TestMultiTranslation_MultiLevelCompound_v0_1.py
- TestMultiTranslation_MultiLevelCompound_v0_2.py
- TestMultiTranslation_MultiLevelCompound_v0_3.py
- TestMultiTranslation_MultiLevelCompound_v0_4.py
- TestMultiTranslation_MultiLevelCompound_v95_1.py
- TestMultiTranslation_MultiLevelCompound_v95_2.py
- TestMultiTranslation_MultiLevelCompound_v95_3.py
- TestMultiTranslation_MultiLevelCompound_v95_4.py
- TestMultiRotation_MultiLevelCompound_v0_1.py
- TestMultiRotation_MultiLevelCompound_v0_2.py
- TestMultiRotation_MultiLevelCompound_v0_3.py
- TestMultiRotation_MultiLevelCompound_v0_4.py
- TestMultiRotation_MultiLevelCompound_v95_1.py
- TestMultiRotation_MultiLevelCompound_v95_2.py
- TestMultiRotation_MultiLevelCompound_v95_3.py
- TestMultiRotation_MultiLevelCompound_v95_4.py
- TestIntersection_MultiLevelCompound_v0_1.py
- TestIntersection_MultiLevelCompound_v0_2.py
- TestIntersection_MultiLevelCompound_v95_1.py
- TestIntersection_MultiLevelCompound_v95_2.py
- TestFillet_MultiLevelCompound_v0_1.py
- TestFillet_MultiLevelCompound_v0_2.py
- TestFillet_MultiLevelCompound_v0_3.py
- TestFillet_MultiLevelCompound_v0_4.py
- TestFillet_MultiLevelCompound_v95_1.py
- TestFillet_MultiLevelCompound_v95_2.py
- TestFillet_MultiLevelCompound_v95_3.py
- TestFillet_MultiLevelCompound_v95_4.py
- TestChamfer_MultiLevelCompound_v0_1.py
- TestChamfer_MultiLevelCompound_v0_2.py
- TestChamfer_MultiLevelCompound_v0_3.py
- TestChamfer_MultiLevelCompound_v0_4.py
- TestChamfer_MultiLevelCompound_v95_1.py
- TestChamfer_MultiLevelCompound_v95_2.py
- TestChamfer_MultiLevelCompound_v95_3.py
- TestChamfer_MultiLevelCompound_v95_4.py
- Test18836.py
- Test2817.py
- Test19065.py
- Test19066.py
- Test19115.py
- Test19196.py
- TestFillet1D_ErrorMsg.py
- TestFillet1D_Vertices_1.py
- TestFillet1D_Vertices_2.py
- TestFillet1D_Vertices_3.py
- TestFillet1D_Vertices_4.py
- TestFillet1D_Vertices_5.py
- TestFillet1D_Vertices_6.py
- TestFillet1D_Vertices_7.py
- TestFillet1D_Vertices_8.py
- TestFillet1D_Vertices_9.py
- TestFillet1D_Wire_1.py
- TestFillet1D_Wire_2.py
- TestFillet1D_Wire_3.py
- TestFillet1D_Wire_4.py
- TestFillet1D_Wire_5.py
- Test19931.py
- Test20027.py
- Test20245_1.py
- Test20245_2.py
- Test20245_3.py
- Test20247.py
+INCLUDE(tests.set)
+
+ADD_UNIT_TESTS(
+ ${TEST_NAMES}
)
+
+IF(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/FeaturesPlugin")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+ENDIF(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+#SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
+#SET(TIMEOUT 300)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
std::shared_ptr<GeomAlgoAPI_Boolean> aCutAlgo(
new GeomAlgoAPI_Boolean(aOneObjectList, aShapesToAdd, GeomAlgoAPI_Tools::BOOL_CUT));
- if (GeomAlgoAPI_ShapeTools::volume(aCutAlgo->shape()) > 1.e-27) {
+ if (GeomAlgoAPI_ShapeTools::area(aCutAlgo->shape()) > 1.e-27) {
aSolidsToFuse.push_back(aCutAlgo->shape());
aMakeShapeList->appendAlgo(aCutAlgo);
}
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
aShapesToAdd,
GeomAlgoAPI_Tools::BOOL_CUT));
- if (GeomAlgoAPI_ShapeTools::volume(anObjectsCutAlgo->shape()) > 1.e-27) {
+ if (GeomAlgoAPI_ShapeTools::area(anObjectsCutAlgo->shape()) > 1.e-27) {
aShapesToSmash.clear();
aShapesToSmash.push_back(anObjectsCutAlgo->shape());
aMakeShapeList->appendAlgo(anObjectsCutAlgo);
aShapesToAdd,
GeomAlgoAPI_Tools::BOOL_CUT));
- if (GeomAlgoAPI_ShapeTools::volume(aToolsCutAlgo->shape()) > 1.e-27) {
+ if (GeomAlgoAPI_ShapeTools::area(aToolsCutAlgo->shape()) > 1.e-27) {
aTools.clear();
aTools.push_back(aToolsCutAlgo->shape());
aMakeShapeList->appendAlgo(aToolsCutAlgo);
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#include "FeaturesPlugin_BoundingBox.h"
+
+#include <Config_PropManager.h>
+
+#include <FeaturesPlugin_CreateBoundingBox.h>
+
+#include <GeomAlgoAPI_BoundingBox.h>
+
+#include <ModelAPI_AttributeSelection.h>
+#include <ModelAPI_AttributeDoubleArray.h>
+#include <ModelAPI_AttributeBoolean.h>
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_Data.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
+
+#include <iomanip>
+#include <sstream>
+
+//=================================================================================================
+FeaturesPlugin_BoundingBox::FeaturesPlugin_BoundingBox()
+{
+}
+
+//=================================================================================================
+void FeaturesPlugin_BoundingBox::initAttributes()
+{
+ // attribute for object selected
+ data()->addAttribute(OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+
+ // attributes for result message and values
+ data()->addAttribute(X_MIN_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(Y_MIN_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(Z_MIN_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(X_MAX_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(Y_MAX_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(Z_MAX_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(CREATEBOX_ID(), ModelAPI_AttributeBoolean::typeId());
+
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), X_MIN_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), Y_MIN_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), Z_MIN_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), X_MAX_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), Y_MAX_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), Z_MAX_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), CREATEBOX_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), RESULT_VALUES_ID());
+
+ data()->addAttribute(RESULT_VALUES_ID(), ModelAPI_AttributeDoubleArray::typeId());
+
+ data()->realArray(RESULT_VALUES_ID())->setSize(6);
+
+}
+
+//=================================================================================================
+void FeaturesPlugin_BoundingBox::execute()
+{
+ if (!updateValues())
+ return;
+
+ createBoxByTwoPoints();
+
+ if (boolean(CREATEBOX_ID())->value()) {
+ if (!myCreateFeature.get())
+ createBox();
+ updateBox();
+ } else {
+ if (myCreateFeature.get()) {
+ myCreateFeature->eraseResults();
+ SessionPtr aSession = ModelAPI_Session::get();
+ DocumentPtr aDoc = aSession->activeDocument();
+ aDoc->removeFeature(myCreateFeature);
+ myCreateFeature.reset();
+ }
+ }
+}
+
+//=================================================================================================
+void FeaturesPlugin_BoundingBox::attributeChanged(const std::string& theID)
+{
+ if (theID == OBJECT_ID()) {
+ if (myCreateFeature.get())
+ updateBox();
+ }
+}
+
+//=================================================================================================
+AttributePtr FeaturesPlugin_BoundingBox::attributResultValues()
+{
+ return attribute(RESULT_VALUES_ID());
+}
+
+//=================================================================================================
+bool FeaturesPlugin_BoundingBox::updateValues()
+{
+ AttributeSelectionPtr aSelection = selection(OBJECT_ID());
+ if (aSelection->isInitialized()) {
+ AttributeDoubleArrayPtr aValues =
+ std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
+ std::stringstream streamxmin;
+ std::stringstream streamymin;
+ std::stringstream streamzmin;
+ std::stringstream streamxmax;
+ std::stringstream streamymax;
+ std::stringstream streamzmax;
+
+ GeomShapePtr aShape;
+ if (aSelection && aSelection->isInitialized()) {
+ aShape = aSelection->value();
+ if (!aShape && aSelection->context())
+ aShape = aSelection->context()->shape();
+ }
+
+ if (aShape && !aShape->isEqual(myShape)) {
+ double aXmin, aXmax, aYmin, aYmax, aZmin, aZmax;
+ std::string anError;
+ if (!GetBoundingBox(aShape,
+ aXmin, aXmax,
+ aYmin, aYmax,
+ aZmin, aZmax,
+ anError)) {
+ setError("Error in bounding box calculation :" + anError);
+ return false;
+ }
+
+ myShape = aShape;
+ streamxmin << std::setprecision(14) << aXmin;
+ aValues->setValue(0, aXmin);
+ streamxmax << std::setprecision(14) << aXmax;
+ aValues->setValue(1, aXmax);
+ streamymin << std::setprecision(14) << aYmin;
+ aValues->setValue(2, aYmin);
+ streamymax << std::setprecision(14) << aYmax;
+ aValues->setValue(3, aYmax);
+ streamzmin << std::setprecision(14) << aZmin;
+ aValues->setValue(4, aZmin);
+ streamzmax << std::setprecision(14) << aZmax;
+ aValues->setValue(5, aZmax);
+ string(X_MIN_COORD_ID() )->setValue( "X = " + streamxmin.str() );
+ string(Y_MIN_COORD_ID() )->setValue( "Y = " + streamymin.str() );
+ string(Z_MIN_COORD_ID() )->setValue( "Z = " + streamzmin.str() );
+ string(X_MAX_COORD_ID() )->setValue( "X = " + streamxmax.str() );
+ string(Y_MAX_COORD_ID() )->setValue( "Y = " + streamymax.str() );
+ string(Z_MAX_COORD_ID() )->setValue( "Z = " + streamzmax.str() );
+ }
+ }
+ return true;
+}
+
+//=================================================================================================
+void FeaturesPlugin_BoundingBox::createBox()
+{
+ SessionPtr aSession = ModelAPI_Session::get();
+
+ DocumentPtr aDoc = aSession->activeDocument();
+
+ if (aDoc.get()) {
+ myCreateFeature = aDoc->addFeature(FeaturesPlugin_CreateBoundingBox::ID());
+ }
+}
+
+//=================================================================================================
+void FeaturesPlugin_BoundingBox::updateBox()
+{
+ myCreateFeature->boolean(FeaturesPlugin_CreateBoundingBox::COMPUTE_ID())->setValue(false);
+ myCreateFeature->selection(FeaturesPlugin_CreateBoundingBox::OBJECT_ID())
+ ->setValue(selection(OBJECT_ID())->context(),
+ selection(OBJECT_ID())->value());
+
+ AttributeDoubleArrayPtr aValuesFeatures =
+ std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>
+ (myCreateFeature->attribute(RESULT_VALUES_ID()));
+ AttributeDoubleArrayPtr aValues =
+ std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
+ for (int anI=0; anI < 6; anI++)
+ aValuesFeatures->setValue(anI,aValues->value(anI));
+
+ myCreateFeature->execute();
+ myCreateFeature->boolean(FeaturesPlugin_CreateBoundingBox::COMPUTE_ID())->setValue(true);
+}
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#ifndef FeaturesPlugin_BoundingBox_H_
+#define FeaturesPlugin_BoundingBox_H_
+
+#include <FeaturesPlugin_CommonBoundingBox.h>
+
+/// \class FeaturesPlugin_BoundingBox
+/// \ingroup Plugins
+/// \brief Feature to view the Bounding Box.
+
+class FeaturesPlugin_BoundingBox : public FeaturesPlugin_CommonBoundingBox
+{
+public:
+ /// Bounding box macro kind.
+ inline static const std::string& ID()
+ {
+ static const std::string MY_ID("BoundingBoxMacro");
+ return MY_ID;
+ }
+
+ /// Attribute name for object selected.
+ inline static const std::string& OBJECT_ID()
+ {
+ static const std::string MY_OBJECT_ID("main_object");
+ return MY_OBJECT_ID;
+ }
+
+ /// Attribute name for x coodinate.
+ inline static const std::string& X_MIN_COORD_ID()
+ {
+ static const std::string MY_X_MIN_COORD_ID("xmincoordinate");
+ return MY_X_MIN_COORD_ID;
+ }
+
+ /// Attribute name for y coodinate.
+ inline static const std::string& Y_MIN_COORD_ID()
+ {
+ static const std::string MY_Y_MIN_COORD_ID("ymincoordinate");
+ return MY_Y_MIN_COORD_ID;
+ }
+
+ /// Attribute name for z coodinate.
+ inline static const std::string& Z_MIN_COORD_ID()
+ {
+ static const std::string MY_Z_MIN_COORD_ID("zmincoordinate");
+ return MY_Z_MIN_COORD_ID;
+ }
+
+ /// Attribute name for x max coodinate.
+ inline static const std::string& X_MAX_COORD_ID()
+ {
+ static const std::string MY_X_MAX_COORD_ID("xmaxcoordinate");
+ return MY_X_MAX_COORD_ID;
+ }
+
+ /// Attribute name for y max coodinate.
+ inline static const std::string& Y_MAX_COORD_ID()
+ {
+ static const std::string MY_Y_MAX_COORD_ID("ymaxcoordinate");
+ return MY_Y_MAX_COORD_ID;
+ }
+
+ /// Attribute name for z max coodinate.
+ inline static const std::string& Z_MAX_COORD_ID()
+ {
+ static const std::string MY_Z_MAX_COORD_ID("zmaxcoordinate");
+ return MY_Z_MAX_COORD_ID;
+ }
+
+ /// Attribute name for checkbox create box.
+ inline static const std::string& CREATEBOX_ID()
+ {
+ static const std::string MY_CREATEBOX_ID("createbox");
+ return MY_CREATEBOX_ID;
+ }
+
+ /// Attribute name for values of result.
+ inline static const std::string& RESULT_VALUES_ID()
+ {
+ static const std::string MY_RESULT_VALUES_ID("result_values");
+ return MY_RESULT_VALUES_ID;
+ }
+
+ /// \return the kind of a feature.
+ virtual const std::string& getKind()
+ {
+ return ID();
+ }
+
+ /// Performs the algorithm and stores results it in the data structure.
+ FEATURESPLUGIN_EXPORT virtual void execute();
+
+ /// Request for initialization of data model of the feature: adding all attributes
+ FEATURESPLUGIN_EXPORT virtual void initAttributes();
+
+ /// Called on change of any argument-attribute of this object
+ /// \param theID identifier of changed attribute
+ FEATURESPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+
+ /// Reimplemented from ModelAPI_Feature::isMacro(). Returns true.
+ FEATURESPLUGIN_EXPORT virtual bool isMacro() const { return true; }
+
+ /// Use plugin manager for features creation
+ FeaturesPlugin_BoundingBox();
+
+private:
+ /// Return Attribut values of result.
+ virtual AttributePtr attributResultValues();
+
+ /// Update values displayed.
+ bool updateValues();
+ /// Create Box
+ void createBox();
+ /// Update Box
+ void updateBox();
+
+ /// Feature to create box
+ FeaturePtr myCreateFeature;
+
+};
+
+#endif
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#include "FeaturesPlugin_CommonBoundingBox.h"
+
+#include <ModelAPI_AttributeDoubleArray.h>
+
+#include <ModelAPI_Data.h>
+#include <ModelAPI_ResultBody.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
+#include <GeomAPI_Vertex.h>
+
+#include <GeomAlgoAPI_BoundingBox.h>
+#include <GeomAlgoAPI_PointBuilder.h>
+#include <GeomAlgoAPI_ShapeTools.h>
+
+#include <Config_PropManager.h>
+
+#include <iomanip>
+#include <sstream>
+
+
+
+//=================================================================================================
+void FeaturesPlugin_CommonBoundingBox::createBoxByTwoPoints()
+{
+ AttributeDoubleArrayPtr aValues =
+ std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attributResultValues());
+
+ SessionPtr aSession = ModelAPI_Session::get();
+
+ DocumentPtr aDoc = aSession->activeDocument();
+
+ GeomVertexPtr vertexFirst =
+ GeomAlgoAPI_PointBuilder::vertex(aValues->value(0),
+ aValues->value(2),
+ aValues->value(4));
+
+ GeomVertexPtr vertexSecond =
+ GeomAlgoAPI_PointBuilder::vertex(aValues->value(1),
+ aValues->value(3),
+ aValues->value(5));
+
+
+ std::shared_ptr<GeomAlgoAPI_Box> aBoxAlgo;
+
+
+ aBoxAlgo = std::shared_ptr<GeomAlgoAPI_Box>(
+ new GeomAlgoAPI_Box(vertexFirst->point(),vertexSecond->point()));
+
+
+ // These checks should be made to the GUI for the feature but
+ // the corresponding validator does not exist yet.
+ if (!aBoxAlgo->check()) {
+ setError(aBoxAlgo->getError());
+ return;
+ }
+
+ // Build the box
+ aBoxAlgo->build();
+
+ // Check if the creation of the box
+ if (!aBoxAlgo->isDone()) {
+ // The error is not displayed in a popup window. It must be in the message console.
+ setError(aBoxAlgo->getError());
+ return;
+ }
+ if (!aBoxAlgo->checkValid("Box builder with two points")) {
+ // The error is not displayed in a popup window. It must be in the message console.
+ setError(aBoxAlgo->getError());
+ return;
+ }
+
+ int aResultIndex = 0;
+ ResultBodyPtr aResultBox = document()->createBody(data(), aResultIndex);
+ loadNamingDS(aBoxAlgo, aResultBox);
+ setResult(aResultBox, aResultIndex);
+}
+
+//=================================================================================================
+void FeaturesPlugin_CommonBoundingBox::loadNamingDS(std::shared_ptr<GeomAlgoAPI_Box> theBoxAlgo,
+ std::shared_ptr<ModelAPI_ResultBody> theResultBox)
+{
+ // Load the result
+ theResultBox->store(theBoxAlgo->shape());
+
+ // Prepare the naming
+ theBoxAlgo->prepareNamingFaces();
+
+ // Insert to faces
+ std::map< std::string, std::shared_ptr<GeomAPI_Shape> > listOfFaces =
+ theBoxAlgo->getCreatedFaces();
+ for (std::map< std::string, std::shared_ptr<GeomAPI_Shape> >::iterator it = listOfFaces.begin();
+ it != listOfFaces.end();
+ ++it) {
+ theResultBox->generated((*it).second, (*it).first);
+ }
+}
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#ifndef FeaturesPlugin_CommonBoundingBox_H_
+#define FeaturesPlugin_CommonBoundingBox_H_
+
+#include "FeaturesPlugin.h"
+#include <ModelAPI_Feature.h>
+
+#include <GeomAlgoAPI_Box.h>
+
+#include <GeomAPI_IPresentable.h>
+#include <GeomAPI_IScreenParams.h>
+
+#include <ModelAPI_Attribute.h>
+
+/// \class FeaturesPlugin_CommonBoundingBox
+/// \ingroup Plugins
+/// \brief Feature to view the Bounding Box.
+
+class FeaturesPlugin_CommonBoundingBox : public ModelAPI_Feature
+{
+public:
+ /// Performs the algorithm and stores results it in the data structure.
+ FEATURESPLUGIN_EXPORT virtual void execute(){};
+
+ /// Return Attribut values of result.
+ virtual AttributePtr attributResultValues() = 0;
+
+protected:
+ FeaturesPlugin_CommonBoundingBox() {}
+
+ /// Create box with two points
+ void createBoxByTwoPoints();
+
+ /// Create namming
+ void loadNamingDS(std::shared_ptr<GeomAlgoAPI_Box> theBoxAlgo,
+ std::shared_ptr<ModelAPI_ResultBody> theResultBox);
+
+ GeomShapePtr myShape;
+};
+
+#endif
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include <GeomAlgoAPI_MakeShapeList.h>
#include <GeomAlgoAPI_PaveFiller.h>
#include <GeomAlgoAPI_ShapeTools.h>
+#include <GeomAlgoAPI_MakeShapeCustom.h>
#include <GeomAPI_ShapeIterator.h>
// Getting objects.
ListOfShape anObjects, anEdgesAndFaces, aCompSolids;
std::map<GeomShapePtr, ListOfShape> aCompSolidsObjects;
+ bool aCompoundsOnly = true;// if there are only compounds, do not use filler restoring compsolids
AttributeSelectionListPtr anObjectsSelList = myFeature->selectionList(OBJECTS_ID());
for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
AttributeSelectionPtr anObjectAttr = anObjectsSelList->value(anObjectsIndex);
if(anIt == aCompSolidsObjects.end()) {
aCompSolidsObjects[aContextShape].push_back(anObject);
aCompSolids.push_back(aContextShape);
+ if (aContextShape->shapeType() != GeomAPI_Shape::COMPOUND)
+ aCompoundsOnly = false;
}
} else {
if(anObject->shapeType() == GeomAPI_Shape::EDGE ||
return false;
}
- if(GeomAlgoAPI_ShapeTools::volume(aBoolAlgo->shape()) > 1.e-27) {
+ if(GeomAlgoAPI_ShapeTools::area(aBoolAlgo->shape()) > 1.e-27) {
theObjects.push_back(anObject);
theMakeShapes.push_back(aBoolAlgo);
}
GeomShapePtr aBoolRes = aBoolAlgo->shape();
if (!aShapesToAdd.empty()) {
aShapesToAdd.push_back(aBoolRes);
- std::shared_ptr<GeomAlgoAPI_PaveFiller> aFillerAlgo(
- new GeomAlgoAPI_PaveFiller(aShapesToAdd, true));
- if(!aFillerAlgo->isDone() || aFillerAlgo->shape()->isNull() || !aFillerAlgo->isValid()) {
- myFeature->setError("Error: PaveFiller algorithm failed.");
- return false;
+ if (aCompoundsOnly)
+ { // 23885: if there are no compsolids in input, do not use filler to make compsolids
+ aBoolRes = GeomAlgoAPI_CompoundBuilder::compound(aShapesToAdd);
+ std::shared_ptr<GeomAlgoAPI_MakeShapeCustom> aCompMkr(new GeomAlgoAPI_MakeShapeCustom);
+ aCompMkr->setResult(aBoolRes);
+ for(ListOfShape::iterator aCS = aCompSolids.begin(); aCS != aCompSolids.end(); aCS++)
+ aCompMkr->addModified(*aCS, aBoolRes);
+ aMakeShapeList->appendAlgo(aCompMkr);
+ }
+ else
+ {
+ std::shared_ptr<GeomAlgoAPI_PaveFiller> aFillerAlgo(
+ new GeomAlgoAPI_PaveFiller(aShapesToAdd, true));
+ if (!aFillerAlgo->isDone() || aFillerAlgo->shape()->isNull() || !aFillerAlgo->isValid())
+ {
+ myFeature->setError("Error: PaveFiller algorithm failed.");
+ return false;
+ }
+ aBoolRes = aFillerAlgo->shape();
+ aMakeShapeList->appendAlgo(aFillerAlgo);
}
- aBoolRes = aFillerAlgo->shape();
- aMakeShapeList->appendAlgo(aFillerAlgo);
}
- if(GeomAlgoAPI_ShapeTools::volume(aBoolRes) > 1.e-27) {
+ if(GeomAlgoAPI_ShapeTools::area(aBoolRes) > 1.e-27) {
theObjects.push_back(aCompSolid);
theMakeShapes.push_back(aMakeShapeList);
}
std::shared_ptr<GeomAlgoAPI_Boolean> aCutAlgo(new GeomAlgoAPI_Boolean(aSolidsToFuse,
aShapesToAdd,
GeomAlgoAPI_Tools::BOOL_CUT));
- if(aCutAlgo->isDone() && GeomAlgoAPI_ShapeTools::volume(aCutAlgo->shape()) > 1.e-27) {
+ if(aCutAlgo->isDone() && GeomAlgoAPI_ShapeTools::area(aCutAlgo->shape()) > 1.e-27) {
aSolidsToFuse.clear();
aSolidsToFuse.push_back(aCutAlgo->shape());
aMakeShapeList->appendAlgo(aCutAlgo);
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#include "FeaturesPlugin_CreateBoundingBox.h"
+
+#include <ModelAPI_AttributeSelection.h>
+#include <ModelAPI_AttributeDoubleArray.h>
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_AttributeBoolean.h>
+
+#include <ModelAPI_Data.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
+
+#include <GeomAlgoAPI_BoundingBox.h>
+
+#include <Config_PropManager.h>
+#include <ModelAPI_ResultBody.h>
+
+#include <iomanip>
+#include <sstream>
+
+//=================================================================================================
+FeaturesPlugin_CreateBoundingBox::FeaturesPlugin_CreateBoundingBox()
+{
+}
+
+//=================================================================================================
+void FeaturesPlugin_CreateBoundingBox::initAttributes()
+{
+ // attribute for object selected
+ data()->addAttribute(OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+
+ // attributes for result message and values
+ data()->addAttribute(X_MIN_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(Y_MIN_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(Z_MIN_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(X_MAX_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(Y_MAX_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(Z_MAX_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(COMPUTE_ID(), ModelAPI_AttributeBoolean::typeId());
+
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), X_MIN_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), Y_MIN_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), Z_MIN_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), X_MAX_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), Y_MAX_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), Z_MAX_COORD_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), COMPUTE_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), OBJECT_ID());
+ data()->addAttribute(RESULT_VALUES_ID(), ModelAPI_AttributeDoubleArray::typeId());
+
+ data()->realArray(RESULT_VALUES_ID())->setSize(6);
+ data()->boolean(COMPUTE_ID())->setValue(true);
+}
+
+//=================================================================================================
+void FeaturesPlugin_CreateBoundingBox::execute()
+{
+ if (!updateValues())
+ return;
+
+ createBoxByTwoPoints();
+}
+
+//=================================================================================================
+void FeaturesPlugin_CreateBoundingBox::attributeChanged(const std::string& theID)
+{
+}
+
+//=================================================================================================
+bool FeaturesPlugin_CreateBoundingBox::updateValues()
+{
+ AttributeSelectionPtr aSelection = selection(OBJECT_ID());
+ AttributeDoubleArrayPtr aValues =
+ std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
+
+ if (aSelection->isInitialized()) {
+ std::stringstream streamxmin;
+ std::stringstream streamymin;
+ std::stringstream streamzmin;
+ std::stringstream streamxmax;
+ std::stringstream streamymax;
+ std::stringstream streamzmax;
+
+ GeomShapePtr aShape;
+ if (aSelection && aSelection->isInitialized()) {
+ aShape = aSelection->value();
+ if (!aShape && aSelection->context())
+ aShape = aSelection->context()->shape();
+ }
+
+ AttributeBooleanPtr anIsCompute = boolean(COMPUTE_ID());
+ if (!anIsCompute->value()) {
+ myShape = aShape;
+ anIsCompute->setValue(true);
+ }
+
+ if (aShape && !aShape->isEqual(myShape)) {
+ double aXmin, aXmax, aYmin, aYmax, aZmin, aZmax;
+ std::string anError;
+ if (!GetBoundingBox(aShape,
+ aXmin, aXmax,
+ aYmin, aYmax,
+ aZmin, aZmax,
+ anError)) {
+ setError("Error in bounding box calculation :" + anError);
+ return false;
+ }
+ myShape = aShape;
+ streamxmin << std::setprecision(14) << aXmin;
+ aValues->setValue(0, aXmin);
+ streamxmax << std::setprecision(14) << aXmax;
+ aValues->setValue(1, aXmax);
+ streamymin << std::setprecision(14) << aYmin;
+ aValues->setValue(2, aYmin);
+ streamymax << std::setprecision(14) << aYmax;
+ aValues->setValue(3, aYmax);
+ streamzmin << std::setprecision(14) << aZmin;
+ aValues->setValue(4, aZmin);
+ streamzmax << std::setprecision(14) << aZmax;
+ aValues->setValue(5, aZmax);
+ } else {
+ streamxmin << std::setprecision(14) << aValues->value(0);
+ streamxmax << std::setprecision(14) << aValues->value(1);
+ streamymin << std::setprecision(14) << aValues->value(2);
+ streamymax << std::setprecision(14) << aValues->value(3);
+ streamzmin << std::setprecision(14) << aValues->value(4);
+ streamzmax << std::setprecision(14) << aValues->value(5);
+ }
+
+ string(X_MIN_COORD_ID() )->setValue( "X = " + streamxmin.str() );
+ string(Y_MIN_COORD_ID() )->setValue( "Y = " + streamymin.str() );
+ string(Z_MIN_COORD_ID() )->setValue( "Z = " + streamzmin.str() );
+ string(X_MAX_COORD_ID() )->setValue( "X = " + streamxmax.str() );
+ string(Y_MAX_COORD_ID() )->setValue( "Y = " + streamymax.str() );
+ string(Z_MAX_COORD_ID() )->setValue( "Z = " + streamzmax.str() );
+ }
+ return true;
+}
+
+//=================================================================================================
+AttributePtr FeaturesPlugin_CreateBoundingBox::attributResultValues()
+{
+ return attribute(RESULT_VALUES_ID());
+}
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#ifndef FeaturesPlugin_CreateBoundingBox_H_
+#define FeaturesPlugin_CreateBoundingBox_H_
+
+#include <FeaturesPlugin_CommonBoundingBox.h>
+
+/// \class FeaturesPlugin_BoundingBox
+/// \ingroup Plugins
+/// \brief Feature to view the Bounding Box.
+
+class FeaturesPlugin_CreateBoundingBox : public FeaturesPlugin_CommonBoundingBox
+{
+public:
+ /// Bounding box kind.
+ inline static const std::string& ID()
+ {
+ static const std::string MY_ID("BoundingBox");
+ return MY_ID;
+ }
+
+ /// Attribute name for object selected.
+ inline static const std::string& OBJECT_ID()
+ {
+ static const std::string MY_OBJECT_ID("main_object");
+ return MY_OBJECT_ID;
+ }
+
+ /// Attribute name for x coodinate.
+ inline static const std::string& X_MIN_COORD_ID()
+ {
+ static const std::string MY_X_MIN_COORD_ID("xmincoordinate");
+ return MY_X_MIN_COORD_ID;
+ }
+
+ /// Attribute name for y coodinate.
+ inline static const std::string& Y_MIN_COORD_ID()
+ {
+ static const std::string MY_Y_MIN_COORD_ID("ymincoordinate");
+ return MY_Y_MIN_COORD_ID;
+ }
+
+ /// Attribute name for z coodinate.
+ inline static const std::string& Z_MIN_COORD_ID()
+ {
+ static const std::string MY_Z_MIN_COORD_ID("zmincoordinate");
+ return MY_Z_MIN_COORD_ID;
+ }
+
+ /// Attribute name for x max coodinate.
+ inline static const std::string& X_MAX_COORD_ID()
+ {
+ static const std::string MY_X_MAX_COORD_ID("xmaxcoordinate");
+ return MY_X_MAX_COORD_ID;
+ }
+
+ /// Attribute name for y max coodinate.
+ inline static const std::string& Y_MAX_COORD_ID()
+ {
+ static const std::string MY_Y_MAX_COORD_ID("ymaxcoordinate");
+ return MY_Y_MAX_COORD_ID;
+ }
+
+ /// Attribute name for z max coodinate.
+ inline static const std::string& Z_MAX_COORD_ID()
+ {
+ static const std::string MY_Z_MAX_COORD_ID("zmaxcoordinate");
+ return MY_Z_MAX_COORD_ID;
+ }
+
+ /// Attribute name for values of result.
+ inline static const std::string& RESULT_VALUES_ID()
+ {
+ static const std::string MY_RESULT_VALUES_ID("result_values");
+ return MY_RESULT_VALUES_ID;
+ }
+
+ /// Attribute name for indicate to compute the bounding box.
+ inline static const std::string& COMPUTE_ID()
+ {
+ static const std::string MY_COMPUTE_ID("compute");
+ return MY_COMPUTE_ID;
+ }
+
+ /// \return the kind of a feature.
+ virtual const std::string& getKind()
+ {
+ return ID();
+ }
+
+ /// Performs the algorithm and stores results it in the data structure.
+ FEATURESPLUGIN_EXPORT virtual void execute();
+
+ /// Request for initialization of data model of the feature: adding all attributes
+ FEATURESPLUGIN_EXPORT virtual void initAttributes();
+
+ /// Called on change of any argument-attribute of this object
+ /// \param theID identifier of changed attribute
+ FEATURESPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+
+ /// Return Attribut values of result.
+ FEATURESPLUGIN_EXPORT virtual AttributePtr attributResultValues();
+
+ /// Use plugin manager for features creation
+ FeaturesPlugin_CreateBoundingBox();
+
+private:
+ /// Update values displayed.
+ bool updateValues();
+
+};
+
+#endif
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
if (string(CREATION_METHOD())->value() == CREATION_METHOD_BY_SIZES()) {
theToSize = real(TO_SIZE_ID())->value();
theFromSize = real(FROM_SIZE_ID())->value();
- } if (string(CREATION_METHOD())->value() == CREATION_METHOD_BY_PLANES()) {
+ } else if (string(CREATION_METHOD())->value() == CREATION_METHOD_BY_PLANES()) {
theToSize = real(TO_OFFSET_ID())->value();
theFromSize = real(FROM_OFFSET_ID())->value();
} else {
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
/// Attribute name for creation method.
inline static const std::string& CREATION_METHOD_BY_SIZES()
{
- static const std::string MY_CREATION_METHOD_ID("BySizes");
- return MY_CREATION_METHOD_ID;
+ static const std::string MY_CREATION_METHOD_BY_SIZES("BySizes");
+ return MY_CREATION_METHOD_BY_SIZES;
}
/// Attribute name for creation method.
inline static const std::string& CREATION_METHOD_BY_PLANES()
{
- static const std::string MY_CREATION_METHOD_ID("ByPlanesAndOffsets");
- return MY_CREATION_METHOD_ID;
+ static const std::string MY_CREATION_METHOD_BY_PLANES("ByPlanesAndOffsets");
+ return MY_CREATION_METHOD_BY_PLANES;
}
/// Attribute name for creation method.
inline static const std::string& CREATION_METHOD_THROUGH_ALL()
{
- static const std::string MY_CREATION_METHOD_ID("ThroughAll");
- return MY_CREATION_METHOD_ID;
+ static const std::string MY_CREATION_METHOD_THROUGH_ALL("ThroughAll");
+ return MY_CREATION_METHOD_THROUGH_ALL;
}
/// Attribute name of an object to which the extrusion grows.
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#include "FeaturesPlugin_GeometryCalculation.h"
+
+#include <ModelAPI_AttributeSelection.h>
+#include <ModelAPI_AttributeDoubleArray.h>
+
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_Data.h>
+#include <ModelAPI_Session.h>
+
+#include <Config_PropManager.h>
+
+#include <GeomAPI_Shape.h>
+#include <GeomAlgoAPI_ShapeTools.h>
+
+
+#include <iomanip>
+#include <sstream>
+
+//=================================================================================================
+FeaturesPlugin_GeometryCalculation::FeaturesPlugin_GeometryCalculation()
+{
+}
+
+//=================================================================================================
+void FeaturesPlugin_GeometryCalculation::initAttributes()
+{
+ // attribute for point selected
+ data()->addAttribute(OBJECT_SELECTED_ID(), ModelAPI_AttributeSelection::typeId());
+
+ // attributes for result message and values
+ data()->addAttribute(LENGTH_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(AREA_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(VOLUME_ID(), ModelAPI_AttributeString::typeId());
+
+ data()->addAttribute(RESULT_VALUES_ID(), ModelAPI_AttributeDoubleArray::typeId());
+ data()->realArray(RESULT_VALUES_ID())->setSize(3);
+
+}
+
+//=================================================================================================
+void FeaturesPlugin_GeometryCalculation::execute()
+{
+}
+
+//=================================================================================================
+void FeaturesPlugin_GeometryCalculation::attributeChanged(const std::string& theID)
+{
+ if (theID == OBJECT_SELECTED_ID()) {
+
+ AttributeSelectionPtr aSelection = selection(OBJECT_SELECTED_ID());
+ AttributeDoubleArrayPtr aValues =
+ std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
+ std::stringstream streamL;
+ std::stringstream streamA;
+ std::stringstream streamV;
+ GeomShapePtr aShape;
+
+ if (aSelection && aSelection->isInitialized()) {
+ aShape = aSelection->value();
+ if (!aShape && aSelection->context())
+ aShape = aSelection->context()->shape();
+ }
+
+ if (aShape) {
+ double aTolerance = 0.0001;
+ double aLength;
+ double aSurfArea;
+ double aVolume;
+
+ aLength = GeomAlgoAPI_ShapeTools::length(aShape);
+ aSurfArea = GeomAlgoAPI_ShapeTools::area(aShape);
+ aVolume = GeomAlgoAPI_ShapeTools::volume(aShape);
+
+ streamL << std::setprecision(14) << aLength;
+ aValues->setValue(0, aLength);
+ streamA << std::setprecision(14) << aSurfArea;
+ aValues->setValue(1, aSurfArea);
+ streamV << std::setprecision(14) << aVolume;
+ aValues->setValue(2, aVolume);
+ }
+
+ string(LENGTH_ID())->setValue(streamL.str());
+ string(AREA_ID())->setValue(streamA.str());
+ string(VOLUME_ID())->setValue(streamV.str());
+ }
+}
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#ifndef FeaturesPlugin_GeometryCalculation_H_
+#define FeaturesPlugin_GeometryCalculation_H_
+
+#include "FeaturesPlugin.h"
+#include <ModelAPI_Feature.h>
+
+#include <GeomAPI_IPresentable.h>
+#include <GeomAPI_IScreenParams.h>
+
+/// \class FeaturesPlugin_GeometryCalculation
+/// \ingroup Plugins
+/// \brief Feature for geometry calculation.
+
+class FeaturesPlugin_GeometryCalculation : public ModelAPI_Feature
+{
+public:
+ inline static const std::string& ID()
+ {
+ static const std::string MY_ID("GeometryCalculation");
+ return MY_ID;
+ }
+
+ /// \return the kind of a feature.
+ virtual const std::string& getKind()
+ {
+ return ID();
+ }
+
+ /// Attribute name for object selected.
+ inline static const std::string& OBJECT_SELECTED_ID()
+ {
+ static const std::string MY_OBJECT_SELECTED_ID("main_object");
+ return MY_OBJECT_SELECTED_ID;
+ }
+
+ /// Attribute name for length
+ inline static const std::string& LENGTH_ID()
+ {
+ static const std::string MY_LENGTH_ID("length");
+ return MY_LENGTH_ID;
+ }
+
+ /// Attribute name for area
+ inline static const std::string& AREA_ID()
+ {
+ static const std::string MY_AREA_ID("area");
+ return MY_AREA_ID;
+ }
+
+ /// Attribute name for volume.
+ inline static const std::string& VOLUME_ID()
+ {
+ static const std::string MY_VOLUME_ID("volume");
+ return MY_VOLUME_ID;
+ }
+
+ /// Attribute name for values of result.
+ inline static const std::string& RESULT_VALUES_ID()
+ {
+ static const std::string MY_RESULT_VALUES_ID("result_values");
+ return MY_RESULT_VALUES_ID;
+ }
+
+ /// Performs the algorithm and stores results it in the data structure.
+ FEATURESPLUGIN_EXPORT virtual void execute();
+
+ /// Request for initialization of data model of the feature: adding all attributes
+ FEATURESPLUGIN_EXPORT virtual void initAttributes();
+
+ /// Called on change of any argument-attribute of this object
+ /// \param theID identifier of changed attribute
+ FEATURESPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+
+ /// Reimplemented from ModelAPI_Feature::isMacro(). Returns true.
+ FEATURESPLUGIN_EXPORT virtual bool isMacro() const { return true; }
+
+ /// Use plugin manager for features creation
+ FeaturesPlugin_GeometryCalculation();
+
+};
+
+#endif
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include <FeaturesPlugin_BooleanCommon.h>
#include <FeaturesPlugin_BooleanSmash.h>
#include <FeaturesPlugin_BooleanFill.h>
+#include <FeaturesPlugin_BoundingBox.h>
#include <FeaturesPlugin_Chamfer.h>
+#include <FeaturesPlugin_CreateBoundingBox.h>
#include <FeaturesPlugin_Defeaturing.h>
#include <FeaturesPlugin_Extrusion.h>
#include <FeaturesPlugin_ExtrusionCut.h>
#include <FeaturesPlugin_ExtrusionFuse.h>
#include <FeaturesPlugin_Fillet.h>
#include <FeaturesPlugin_Fillet1D.h>
+#include <FeaturesPlugin_GeometryCalculation.h>
#include <FeaturesPlugin_Intersection.h>
#include <FeaturesPlugin_Measurement.h>
+#include <FeaturesPlugin_PointCoordinates.h>
#include <FeaturesPlugin_MultiRotation.h>
#include <FeaturesPlugin_MultiTranslation.h>
#include <FeaturesPlugin_Partition.h>
return FeaturePtr(new FeaturesPlugin_ImportResult);
} else if (theFeatureID == FeaturesPlugin_Defeaturing::ID()) {
return FeaturePtr(new FeaturesPlugin_Defeaturing);
+ } else if (theFeatureID == FeaturesPlugin_PointCoordinates::ID()) {
+ return FeaturePtr(new FeaturesPlugin_PointCoordinates);
+ } else if (theFeatureID == FeaturesPlugin_GeometryCalculation::ID()) {
+ return FeaturePtr(new FeaturesPlugin_GeometryCalculation);
+ } else if (theFeatureID == FeaturesPlugin_BoundingBox::ID()) {
+ return FeaturePtr(new FeaturesPlugin_BoundingBox);
+ } else if (theFeatureID == FeaturesPlugin_CreateBoundingBox::ID()) {
+ return FeaturePtr(new FeaturesPlugin_CreateBoundingBox);
}
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#include "FeaturesPlugin_PointCoordinates.h"
+
+#include <ModelAPI_AttributeSelection.h>
+#include <ModelAPI_AttributeDoubleArray.h>
+
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_Data.h>
+#include <ModelAPI_Session.h>
+
+#include <Config_PropManager.h>
+
+#include <GeomAPI_Pnt.h>
+#include <GeomAPI_Shape.h>
+#include <GeomAPI_Vertex.h>
+
+#include <GeomAlgoAPI_PointBuilder.h>
+
+#include <iomanip>
+#include <sstream>
+
+FeaturesPlugin_PointCoordinates::FeaturesPlugin_PointCoordinates()
+{
+}
+
+void FeaturesPlugin_PointCoordinates::initAttributes()
+{
+ // attribute for point selected
+ data()->addAttribute(POINT_SELECTED_ID(), ModelAPI_AttributeSelection::typeId());
+
+ // attribute for x, y and z coordinates
+ data()->addAttribute(X_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(Y_COORD_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(Z_COORD_ID(), ModelAPI_AttributeString::typeId());
+
+ // attributes for result message and values
+ data()->addAttribute(RESULT_VALUES_ID(), ModelAPI_AttributeDoubleArray::typeId());
+ data()->realArray(RESULT_VALUES_ID())->setSize(3);
+}
+
+void FeaturesPlugin_PointCoordinates::execute()
+{
+}
+
+void FeaturesPlugin_PointCoordinates::attributeChanged(const std::string& theID)
+{
+ if (theID == POINT_SELECTED_ID()) {
+ AttributeSelectionPtr aSelection = selection(POINT_SELECTED_ID());
+ GeomShapePtr aShape;
+ GeomPointPtr aPoint;
+ if (aSelection && aSelection->isInitialized()) {
+ aShape = aSelection->value();
+ if (!aShape && aSelection->context())
+ aShape = aSelection->context()->shape();
+ }
+
+ AttributeDoubleArrayPtr aValues =
+ std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
+ std::stringstream streamx;
+ std::stringstream streamy;
+ std::stringstream streamz;
+ if (aShape) {
+ aPoint = GeomAlgoAPI_PointBuilder::point(aShape);
+ streamx << std::setprecision(14) << aPoint->x();
+ aValues->setValue(0, aPoint->x());
+ streamy << std::setprecision(14) << aPoint->y();
+ aValues->setValue(1, aPoint->y());
+ streamz << std::setprecision(14) << aPoint->z();
+ aValues->setValue(2, aPoint->z());
+ }
+
+ string(X_COORD_ID() )->setValue( "X = " + streamx.str() );
+ string(Y_COORD_ID() )->setValue( "Y = " + streamy.str() );
+ string(Z_COORD_ID() )->setValue( "Z = " + streamz.str() );
+ }
+
+}
--- /dev/null
+// Copyright (C) 2018-2021 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, 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
+// 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
+//
+
+#ifndef FeaturesPlugin_PointCoordinates_H_
+#define FeaturesPlugin_PointCoordinates_H_
+
+#include "FeaturesPlugin.h"
+#include <ModelAPI_Feature.h>
+
+#include <GeomAPI_IPresentable.h>
+#include <GeomAPI_IScreenParams.h>
+
+/// \class FeaturesPlugin_PointCoordinates
+/// \ingroup Plugins
+/// \brief Feature to view point coordinates.
+
+class FeaturesPlugin_PointCoordinates : public ModelAPI_Feature
+{
+public:
+ inline static const std::string& ID()
+ {
+ static const std::string MY_ID("PointCoordinates");
+ return MY_ID;
+ }
+
+ /// Attribute name for point selected.
+ inline static const std::string& POINT_SELECTED_ID()
+ {
+ static const std::string MY_POINT_SELECTED_ID("point_selected");
+ return MY_POINT_SELECTED_ID;
+ }
+
+ /// Attribute name for x coordinate.
+ inline static const std::string& X_COORD_ID()
+ {
+ static const std::string MY_X_COORD_ID("xcoordinate");
+ return MY_X_COORD_ID;
+ }
+
+ /// Attribute name for y coordinate.
+ inline static const std::string& Y_COORD_ID()
+ {
+ static const std::string MY_Y_COORD_ID("ycoordinate");
+ return MY_Y_COORD_ID;
+ }
+
+ /// Attribute name for z coordinate.
+ inline static const std::string& Z_COORD_ID()
+ {
+ static const std::string MY_Z_COORD_ID("zcoordinate");
+ return MY_Z_COORD_ID;
+ }
+
+ /// Attribute name for values of result.
+ inline static const std::string& RESULT_VALUES_ID()
+ {
+ static const std::string MY_RESULT_VALUES_ID("result_values");
+ return MY_RESULT_VALUES_ID;
+ }
+
+ /// \return the kind of a feature.
+ virtual const std::string& getKind()
+ {
+ return ID();
+ }
+
+ /// Performs the algorithm and stores results it in the data structure.
+ FEATURESPLUGIN_EXPORT virtual void execute();
+
+ /// Request for initialization of data model of the feature: adding all attributes
+ FEATURESPLUGIN_EXPORT virtual void initAttributes();
+
+ /// Called on change of any argument-attribute of this object
+ /// \param theID identifier of changed attribute
+ FEATURESPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+
+ /// Reimplemented from ModelAPI_Feature::isMacro(). Returns true.
+ FEATURESPLUGIN_EXPORT virtual bool isMacro() const { return true; }
+
+ /// Use plugin manager for features creation
+ FeaturesPlugin_PointCoordinates();
+
+};
+
+#endif
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
// Store result.
ResultBodyPtr aResultBody = document()->createBody(data());
- aResultBody->storeModified(aBaseShape, aResultShape);
+ std::list<GeomShapePtr> anOldShapes;
+ anOldShapes.push_back(aBaseShape);
+ aResultBody->storeModified(anOldShapes, aResultShape, aMakeShapeList);
for (std::set<GeomAPI_Shape::ShapeType>::iterator aTypeIter = aTypes.begin();
aTypeIter != aTypes.end();
++aTypeIter)
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
/// Attribute name for creation method.
inline static const std::string& CREATION_METHOD_THROUGH_ALL()
{
- static const std::string MY_CREATION_METHOD_ID("ThroughAll");
- return MY_CREATION_METHOD_ID;
+ static const std::string MY_CREATION_METHOD_THROUGH_ALL("ThroughAll");
+ return MY_CREATION_METHOD_THROUGH_ALL;
}
/// Attribute name for creation method.
inline static const std::string& CREATION_METHOD_BY_ANGLES()
{
- static const std::string MY_CREATION_METHOD_ID("ByAngles");
- return MY_CREATION_METHOD_ID;
+ static const std::string MY_CREATION_METHOD_BY_ANGLES("ByAngles");
+ return MY_CREATION_METHOD_BY_ANGLES;
}
/// Attribute name for creation method.
inline static const std::string& CREATION_METHOD_BY_PLANES()
{
- static const std::string MY_CREATION_METHOD_ID("ByPlanesAndOffsets");
- return MY_CREATION_METHOD_ID;
+ static const std::string MY_CREATION_METHOD_BY_PLANES("ByPlanesAndOffsets");
+ return MY_CREATION_METHOD_BY_PLANES;
}
/// Attribute name of an revolution axis.
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
<source>Measurement</source>
<translation>Mesure</translation>
</message>
+ <message>
+ <source>Point coordinates</source>
+ <translation>Coordonnées d'un point</translation>
+ </message>
+ <message>
+ <source>Geometry calculation</source>
+ <translation>Calcul de la géométrie</translation>
+ </message>
+ <message>
+ <source>Bounding box</source>
+ <translation>Boîte englobante</translation>
+ </message>
<message>
<source>Placement</source>
<translation>Placement</translation>
</message>
</context>
+ <!-- Bounding Box -->
+ <context>
+ <name>BoundingBox</name>
+ <message>
+ <source>BoundingBox</source>
+ <translation>Boîte englobante</translation>
+ </message>
+ <message>
+ <source>Create box</source>
+ <translation>Créer la boîte</translation>
+ </message>
+ </context>
+ <context>
+ <name>BoundingBoxMacro</name>
+ <message>
+ <source>BoundingBox</source>
+ <translation>Boîte englobante</translation>
+ </message>
+ <message>
+ <source>Create box</source>
+ <translation>Créer la boîte</translation>
+ </message>
+ </context>
+
<!-- Chamfer -->
<context>
<name>Chamfer</name>
</message>
</context>
+ <!--Bounding box-->
+ <context>
+ <name>BoundingBoxMacro</name>
+ <message>
+ <source>Bounding box</source>
+ <translation>Boîte englobante</translation>
+ </message>
+ </context>
+ <context>
+ <name>BoundingBoxMacro:main_object</name>
+ <message>
+ <source>Object</source>
+ <translation>Objet</translation>
+ </message>
+ </context>
+ <context>
+ <name>BoundingBoxMacro:createbox</name>
+ <message>
+ <source>Create box</source>
+ <translation>Créer la boîte</translation>
+ </message>
+ </context>
+ <context>
+ <name>BoundingBox</name>
+ <message>
+ <source>Bounding box</source>
+ <translation>Boîte englobante</translation>
+ </message>
+ </context>
+ <context>
+ <name>BoundingBox:main_object</name>
+ <message>
+ <source>Object</source>
+ <translation>Objet</translation>
+ </message>
+ </context>
+
+ <!--Geometry calculation-->
+ <context>
+ <name>GeometryCalculation</name>
+ <message>
+ <source>Geometry calculation</source>
+ <translation>Calcul de la géometrie</translation>
+ </message>
+ </context>
+ <context>
+ <name>GeometryCalculation:main_object</name>
+ <message>
+ <source>Object</source>
+ <translation>Objet</translation>
+ </message>
+ </context>
+ <context>
+ <name>GeometryCalculation</name>
+ <message>
+ <source>Length = </source>
+ <translation>Longueur = </translation>
+ </message>
+ <message>
+ <source>Area = </source>
+ <translation>Surface = </translation>
+ </message>
+ <message>
+ <source>Volume = </source>
+ <translation>Volume = </translation>
+ </message>
+ </context>
+
<!-- Measurement -->
<context>
<name>Measurement</name>
</message>
</context>
+ <!-- PointCoordinates -->
+ <context>
+ <name>PointCoordinates</name>
+ <message>
+ <source>Point coordinates</source>
+ <translation>Coordonnées d'un point</translation>
+ </message>
+ </context>
+
<!-- Rotation -->
<context>
<name>Rotation</name>
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [15])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [102])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [204])
-model.testResultsVolumes(Extrusion_1, [466.947878])
+model.testResultsAreas(Extrusion_1, [466.947878])
assert(model.checkPythonDump())
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Pipe_2, [280.91366299542733])
+model.testResultsAreas(Pipe_2, [280.91366299542733])
assert(model.checkPythonDump())
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [16])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [64])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [128])
-model.testResultsVolumes(Extrusion_1, [10242.31054])
+model.testResultsAreas(Extrusion_1, [10242.31054])
model.testNbResults(Extrusion_2, 1)
model.testNbSubResults(Extrusion_2, [16])
model.testNbSubShapes(Extrusion_2, GeomAPI_Shape.FACE, [16])
model.testNbSubShapes(Extrusion_2, GeomAPI_Shape.EDGE, [64])
model.testNbSubShapes(Extrusion_2, GeomAPI_Shape.VERTEX, [128])
-model.testResultsVolumes(Extrusion_2, [10242.31054])
+model.testResultsAreas(Extrusion_2, [10242.31054])
assert(model.checkPythonDump())
\ No newline at end of file
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.FACE, [5])
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.EDGE, [20])
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.VERTEX, [40])
-model.testResultsVolumes(Pipe_2, [26549.49767585])
+model.testResultsAreas(Pipe_2, [26549.49767585])
# Cut should have no results
model.testNbResults(Cut_1, 0)
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Pipe_1, GeomAPI_Shape.FACE, [12])
model.testNbSubShapes(Pipe_1, GeomAPI_Shape.EDGE, [48])
model.testNbSubShapes(Pipe_1, GeomAPI_Shape.VERTEX, [96])
-model.testResultsVolumes(Pipe_1, [27370.29819])
+model.testResultsAreas(Pipe_1, [27370.29819])
assert(model.checkPythonDump())
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2020-2021 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, 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
+# 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
+#
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+
+### Create Part
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(22, 23, 60, 70)
+SketchLine_2 = Sketch_1.addLine(60, 70, 90, 23)
+Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchLine_3 = Sketch_1.addLine(90, 23, 22, 23)
+Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_3.endPoint())
+Sketch_1.setHorizontal(SketchLine_3.result())
+SketchLine_4 = Sketch_1.addLine(60, 72, 54, 23)
+Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_3.result())
+Sketch_1.setCoincident(SketchLine_4.startPoint(), SketchLine_2.startPoint())
+model.do()
+
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "all-in-Sketch_1")], model.selection(), 10, 0, "Faces|Wires")
+LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("COMPSOLID", "Extrusion_1_1")], model.selection("EDGE", "PartSet/OY"), 60, 2, model.selection("EDGE", "PartSet/OX"), 75, 2, keepSubResults = True)
+
+### Create Group
+Group_1 = model.addGroup(Part_1_doc, "Faces", [model.selection("FACE", "LinearCopy_1_1_1_2/MF:Translated&Sketch_1/SketchLine_2")])
+
+### Create Remove_SubShapes
+Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPOUND", "LinearCopy_1_1"))
+Remove_SubShapes_1.setSubShapesToRemove([model.selection("SOLID", "LinearCopy_1_1_4_2")])
+model.end()
+
+# Move the group to the end of history
+model.begin()
+Part_1_doc.moveFeature(Group_1.feature(), Remove_SubShapes_1.feature())
+model.end()
+
+# check that all groups are correct
+from ModelAPI import *
+aFactory = ModelAPI_Session.get().validators()
+
+assert(aFactory.validate(Group_1.feature()))
+assert(Group_1.groupList().size() == 1)
+assert(Group_1.groupList().value(0).value().shapeTypeStr() == "FACE")
+assert(len(Group_1.groupList().value(0).namingName()) > 0)
+
+assert(model.checkPythonDump())
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2020-2021 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, 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
+# 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
+#
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+
+### Create Part
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+### Create Sketch
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+
+### Create SketchCircle
+SketchCircle_1 = Sketch_1.addCircle(45, 45, 28)
+model.do()
+
+### Create Sketch
+Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+
+### Create SketchCircle
+SketchCircle_2 = Sketch_2.addCircle(79, 72, 29.30)
+model.do()
+
+### Create Extrusion
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")], model.selection(), 10, 0, "Faces|Wires")
+
+### Create Extrusion
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_2_2r")], model.selection(), 10, 0, "Faces|Wires")
+
+### Create Compound
+Compound_1 = model.addCompound(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_2_1")])
+
+### Create ExtrusionCut
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [], model.selection(), [model.selection("SOLID", "Compound_1_1_2")])
+
+### Create Sketch
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Compound_1_1_2/Modified_Face&Extrusion_2_1/To_Face"))
+
+### Create SketchCircle
+SketchCircle_3 = Sketch_3.addCircle(88, 78, 6)
+ExtrusionCut_1.setNestedSketch(Sketch_3)
+
+model.end()
+
+from GeomAPI import GeomAPI_Shape
+
+model.testNbResults(ExtrusionCut_1, 1)
+model.testNbSubResults(ExtrusionCut_1, [2])
+model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.FACE, [7])
+model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.EDGE, [18])
+model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.VERTEX, [36])
+model.testResultsVolumes(ExtrusionCut_1, [50469.37182])
+
+assert(model.checkPythonDump())
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-## Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+## Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-## Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+## Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
--- /dev/null
+# Copyright (C) 2014-2021 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, 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
+# 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
+#
+
+"""
+ Unit test of ...
+"""
+#=========================================================================
+# Initialization of the test
+#=========================================================================
+
+
+import os
+import math
+
+from ModelAPI import *
+from salome.shaper import model
+
+
+__updated__ = "2020-11-12"
+
+
+#=========================================================================
+# test Bounding Box
+#=========================================================================
+def test_Bounding_Box():
+
+ model.begin()
+ partSet = model.moduleDocument()
+ Part_1 = model.addPart(partSet)
+ Part_1_doc = Part_1.document()
+ ### Create Cone
+ Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10)
+
+ model.do()
+ ### Create BoundingBox
+ BoundingBox_1 = model.getBoundingBox(Part_1_doc, model.selection("SOLID", "Cone_1_1"))
+ model.end()
+
+ myDelta = 1e-6
+ Props = model.getGeometryCalculation(Part_1_doc,model.selection("SOLID", "BoundingBox_1_1"))
+
+ print(" Basic Properties:")
+ print(" Wires length: ", Props[0])
+ print(" Surface area: ", Props[1])
+ print(" Volume : ", Props[2])
+
+ aReflength = 200
+ aReslength = Props[0]
+ assert (math.fabs(aReslength - aReflength) < myDelta), "The surface is wrong: expected = {0}, real = {1}".format(aReflength, aReslength)
+
+ aRefSurface = 1600
+ aResSurface = Props[1]
+ assert (math.fabs(aResSurface - aRefSurface) < myDelta), "The surface is wrong: expected = {0}, real = {1}".format(aRefSurface, aResSurface)
+
+ aRefVolume = 4000
+ aResVolume = Props[2]
+ assert (math.fabs(aResVolume - aRefVolume) < myDelta), "The volume is wrong: expected = {0}, real = {1}".format(aRefVolume, aResVolume)
+
+
+if __name__ == '__main__':
+
+ test_Bounding_Box()
+
+ #=========================================================================
+ # End of test
+ #=========================================================================
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [2377.030013, 800, 2377.030013, 916.515139])
+model.testResultsAreas(Extrusion_1, [2377.030013, 800, 2377.030013, 916.515139])
# change radius of cylinder
ParamR.setValue(10)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [1840.601542, 529.150262, 1840.601542, 692.820323])
+model.testResultsAreas(Extrusion_1, [1840.601542, 529.150262, 1840.601542, 692.820323])
# change offsetting "To" face
ParamTo.setValue(-20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [2899.292521, 1039.2304845, 2899.292521, 1131.3708499])
+model.testResultsAreas(Extrusion_1, [2899.292521, 1039.2304845, 2899.292521, 1131.3708499])
# offset "From" face
ParamFrom.setValue(20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [3899.292521, 1439.2304845, 3899.292521, 1531.3708499])
+model.testResultsAreas(Extrusion_1, [3899.292521, 1439.2304845, 3899.292521, 1531.3708499])
ParamFrom.setValue(-20)
model.do()
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [1899.292521, 639.2304845, 1899.292521, 731.3708499])
+model.testResultsAreas(Extrusion_1, [1899.292521, 639.2304845, 1899.292521, 731.3708499])
model.testHaveNamingSubshapes(Extrusion_1, model, Part_1_doc)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [4877.030013, 1800, 4877.030013, 1916.515139])
+model.testResultsAreas(Extrusion_1, [4877.030013, 1800, 4877.030013, 1916.515139])
# change radius of cylinder and check failure
ParamR.setValue(10)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [4340.6015418, 1529.1502622, 4340.6015418, 1692.820323])
+model.testResultsAreas(Extrusion_1, [4340.6015418, 1529.1502622, 4340.6015418, 1692.820323])
# change offsetting "To" face and check failure
ParamTo.setValue(-20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [5399.2925211, 2039.2304845, 5399.2925212, 2131.37085])
+model.testResultsAreas(Extrusion_1, [5399.2925211, 2039.2304845, 5399.2925212, 2131.37085])
# offset "From" face
ParamFrom.setValue(20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [6399.2925211, 2439.2304845, 6399.2925212, 2531.37085])
+model.testResultsAreas(Extrusion_1, [6399.2925211, 2439.2304845, 6399.2925212, 2531.37085])
ParamFrom.setValue(-20)
model.do()
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [4399.2925211, 1639.2304845, 4399.2925212, 1731.37085])
+model.testResultsAreas(Extrusion_1, [4399.2925211, 1639.2304845, 4399.2925212, 1731.37085])
model.testHaveNamingSubshapes(Extrusion_1, model, Part_1_doc)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [1911.43203298, 1911.43203298, 4564.43663366])
+model.testResultsAreas(Extrusion_1, [1911.43203298, 1911.43203298, 4564.43663366])
# change radius of sphere and check failure
ParamR.setValue(10)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [1034.989222291, 1034.989222291, 2276.43702246])
+model.testResultsAreas(Extrusion_1, [1034.989222291, 1034.989222291, 2276.43702246])
ParamR.setValue(40);
model.do()
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [1505.0174, 1505.0174, 3530.28837537636])
+model.testResultsAreas(Extrusion_1, [1505.0174, 1505.0174, 3530.28837537636])
# change size of the face
ParamSize.setValue(10)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [1505.0174, 1505.0174, 3530.28837537636])
+model.testResultsAreas(Extrusion_1, [1505.0174, 1505.0174, 3530.28837537636])
# change offsetting "To" face and check failure
ParamTo.setValue(-20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [2295.81450653, 2295.81450653, 5527.16645028])
+model.testResultsAreas(Extrusion_1, [2295.81450653, 2295.81450653, 5527.16645028])
# offset "From" face
ParamFrom.setValue(20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [1595.81450653, 1595.81450653, 3814.47306888])
+model.testResultsAreas(Extrusion_1, [1595.81450653, 1595.81450653, 3814.47306888])
ParamFrom.setValue(-20)
model.do()
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [2995.81450653, 2995.81450653, 7239.85983168])
+model.testResultsAreas(Extrusion_1, [2995.81450653, 2995.81450653, 7239.85983168])
model.testHaveNamingSubshapes(Extrusion_1, model, Part_1_doc)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [1708.843326299, 1708.843325768, 1895.559443038])
+model.testResultsAreas(Extrusion_1, [1708.843326299, 1708.843325768, 1895.559443038])
# offset "From" face
ParamFrom.setValue(20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [2915.069101129, 2915.069100598, 4138.27332218])
+model.testResultsAreas(Extrusion_1, [2915.069101129, 2915.069100598, 4138.27332218])
# check failure
ParamFrom.setValue(-20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 8])
-model.testResultsVolumes(Extrusion_1, [1105.7304388842, 1105.730438353, 774.2025034671])
+model.testResultsAreas(Extrusion_1, [1105.7304388842, 1105.730438353, 774.2025034671])
model.testHaveNamingSubshapes(Extrusion_1, model, Part_1_doc)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Extrusion_1, [2178.8497332])
+model.testResultsAreas(Extrusion_1, [2178.8497332])
# change radius of sketch circle
ParamRCir.setValue(17)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [10])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [20])
-model.testResultsVolumes(Extrusion_1, [3960.00723])
+model.testResultsAreas(Extrusion_1, [3960.00723])
# change radius of sphere
ParamRSph.setValue(10)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [5])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [10])
-model.testResultsVolumes(Extrusion_1, [3658.7714])
+model.testResultsAreas(Extrusion_1, [3658.7714])
# change radius of sketch circle and check failure
ParamRCir.setValue(10)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Extrusion_1, [1398.72992867])
+model.testResultsAreas(Extrusion_1, [1398.72992867])
# change radius of cylinder
ParamRCyl.setValue(10)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [6])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [12])
-model.testResultsVolumes(Extrusion_1, [4194.25709])
+model.testResultsAreas(Extrusion_1, [4194.25709])
ParamRCyl.setValue(50)
model.do()
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Extrusion_1, [1433.0518])
+model.testResultsAreas(Extrusion_1, [1433.0518])
# change offsetting "To" face
ParamTo.setValue(-20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [10])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [20])
-model.testResultsVolumes(Extrusion_1, [5078.347278])
+model.testResultsAreas(Extrusion_1, [5078.347278])
# revert failure
ParamTo.setValue(20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Extrusion_1, [1504.36096473])
+model.testResultsAreas(Extrusion_1, [1504.36096473])
# offset "From" face
ParamFrom.setValue(20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Extrusion_1, [4336.142699])
+model.testResultsAreas(Extrusion_1, [4336.142699])
ParamFrom.setValue(-20)
model.do()
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Extrusion_1, [1118.8887326])
+model.testResultsAreas(Extrusion_1, [1118.8887326])
model.testHaveNamingSubshapes(Extrusion_1, model, Part_1_doc)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 5])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 10])
-model.testResultsVolumes(Extrusion_1, [1309.42058662, 1016.82520496, 2589.5946928])
+model.testResultsAreas(Extrusion_1, [1309.42058662, 1016.82520496, 2589.5946928])
# change radius of sphere and check failure
ParamR.setValue(10)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 5])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 10])
-model.testResultsVolumes(Extrusion_1, [1081.93830116, 793.80218227, 2095.8021933])
+model.testResultsAreas(Extrusion_1, [1081.93830116, 793.80218227, 2095.8021933])
# change offsetting "To" face and check failure
ParamTo.setValue(-20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4, 4, 5])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8, 8, 10])
-model.testResultsVolumes(Extrusion_1, [1314.8586588, 1022.169915122, 2601.32913399])
+model.testResultsAreas(Extrusion_1, [1314.8586588, 1022.169915122, 2601.32913399])
# offset "From" face
ParamFrom.setValue(20)
model.testNbSubResults(Extrusion_1, [0, 0, 0])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.SOLID, [0, 0, 0])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
-model.testResultsVolumes(Extrusion_1, [825.71966141, 533.030917699, 1551.6191757579])
+model.testResultsAreas(Extrusion_1, [825.71966141, 533.030917699, 1551.6191757579])
ParamFrom.setValue(-20)
model.do()
model.testNbSubResults(Extrusion_1, [0, 0, 0])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.SOLID, [0, 0, 0])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [1, 1, 1])
-model.testResultsVolumes(Extrusion_1, [1803.997656259, 1511.308912545, 3651.0390970659])
+model.testResultsAreas(Extrusion_1, [1803.997656259, 1511.308912545, 3651.0390970659])
model.testHaveNamingSubshapes(Extrusion_1, model, Part_1_doc)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [16])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [32])
-model.testResultsVolumes(Extrusion_1, [6470.575165134267])
+model.testResultsAreas(Extrusion_1, [6470.575165134267])
# change radius of cylinder
ParamR.setValue(10)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Extrusion_1, [314.159265359])
+model.testResultsAreas(Extrusion_1, [314.159265359])
ParamR.setValue(30)
model.do()
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [3])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [10])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [20])
-model.testResultsVolumes(Extrusion_1, [2964.89877572])
+model.testResultsAreas(Extrusion_1, [2964.89877572])
# check the intersected boundaries are processed well
ParamR.setValue(40);
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [16])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [32])
-model.testResultsVolumes(Extrusion_1, [4903.173668915])
+model.testResultsAreas(Extrusion_1, [4903.173668915])
# change offsetting "To" face
ParamTo.setValue(-20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Extrusion_1, [1256.637061267])
+model.testResultsAreas(Extrusion_1, [1256.637061267])
ParamTo.setValue(20)
model.do()
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [16])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [32])
-model.testResultsVolumes(Extrusion_1, [7969.186376787])
+model.testResultsAreas(Extrusion_1, [7969.186376787])
# offset "From" face
ParamFrom.setValue(20)
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [16])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [32])
-model.testResultsVolumes(Extrusion_1, [5169.186376787])
+model.testResultsAreas(Extrusion_1, [5169.186376787])
ParamFrom.setValue(-20)
model.do()
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [4])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [16])
model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [32])
-model.testResultsVolumes(Extrusion_1, [10769.186376787])
+model.testResultsAreas(Extrusion_1, [10769.186376787])
model.testHaveNamingSubshapes(Extrusion_1, model, Part_1_doc)
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2014-2021 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, 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
+# 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
+#
+
+"""
+ Unit test of ...
+"""
+#=========================================================================
+# Initialization of the test
+#=========================================================================
+
+import salome
+
+import os
+import math
+
+from ModelAPI import *
+from salome.shaper import model
+
+
+
+__updated__ = "2020-11-12"
+
+
+#=========================================================================
+# test Geometry calculation
+#=========================================================================
+def test_Geometry_Calculation():
+
+ model.begin()
+ file_path = os.path.join(os.getenv("DATA_DIR"),"Shapes","Brep","box1.brep")
+ partSet = model.moduleDocument()
+ Part_1 = model.addPart(partSet)
+ Part_1_doc = Part_1.document()
+ Import_1 = model.addImport(Part_1_doc,file_path)
+ model.do()
+
+ myDelta = 1e-6
+ Props = model.getGeometryCalculation(Part_1_doc,model.selection("SOLID", "box1_1"))
+
+ print(" Geometry calculation:")
+ print(" Wires length: ", Props[0])
+ print(" Surface area: ", Props[1])
+ print(" Volume : ", Props[2])
+
+ aReflength = 2400
+ aReslength = Props[0]
+ assert (math.fabs(aReslength - aReflength) < myDelta), "The surface is wrong: expected = {0}, real = {1}".format(aReflength, aReslength)
+
+ aRefSurface = 240000
+ aResSurface = Props[1]
+ assert (math.fabs(aResSurface - aRefSurface) < myDelta), "The surface is wrong: expected = {0}, real = {1}".format(aRefSurface, aResSurface)
+
+ aRefVolume = 8000000
+ aResVolume = Props[2]
+ assert (math.fabs(aResVolume - aRefVolume) < myDelta), "The volume is wrong: expected = {0}, real = {1}".format(aRefVolume, aResVolume)
+
+
+if __name__ == '__main__':
+
+ test_Geometry_Calculation()
+
+ #=========================================================================
+ # End of test
+ #=========================================================================
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(MultiRotation_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(MultiRotation_1, GeomAPI_Shape.VERTEX, [COPIES])
model.testResultsVolumes(MultiRotation_1, [0])
+model.testResultsAreas(MultiRotation_1, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.setY(0)
refPoint.setZ(0)
model.testNbSubShapes(MultiRotation_2, GeomAPI_Shape.EDGE, [COPIES])
model.testNbSubShapes(MultiRotation_2, GeomAPI_Shape.VERTEX, [2 * COPIES])
model.testResultsVolumes(MultiRotation_2, [0])
+model.testResultsAreas(MultiRotation_2, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Edge_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setY(0)
model.testNbSubShapes(MultiRotation_3, GeomAPI_Shape.EDGE, [2 * COPIES])
model.testNbSubShapes(MultiRotation_3, GeomAPI_Shape.VERTEX, [4 * COPIES])
model.testResultsVolumes(MultiRotation_3, [0])
+model.testResultsAreas(MultiRotation_3, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Wire_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setY(0)
model.testNbSubShapes(MultiRotation_4, GeomAPI_Shape.FACE, [COPIES])
model.testNbSubShapes(MultiRotation_4, GeomAPI_Shape.EDGE, [4 * COPIES])
model.testNbSubShapes(MultiRotation_4, GeomAPI_Shape.VERTEX, [8 * COPIES])
-model.testResultsVolumes(MultiRotation_4, [109.154152964914914 * COPIES])
+model.testResultsVolumes(MultiRotation_4, [0])
+model.testResultsAreas(MultiRotation_4, [109.154152964914914 * COPIES])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.setY(0)
refPoint.setZ(0)
model.testNbSubShapes(MultiRotation_5, GeomAPI_Shape.FACE, [2 * COPIES])
model.testNbSubShapes(MultiRotation_5, GeomAPI_Shape.EDGE, [8 * COPIES])
model.testNbSubShapes(MultiRotation_5, GeomAPI_Shape.VERTEX, [16 * COPIES])
-model.testResultsVolumes(MultiRotation_5, [182.822012116 * COPIES])
+model.testResultsVolumes(MultiRotation_5, [0])
+model.testResultsAreas(MultiRotation_5, [182.822012116 * COPIES])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.setY(0)
refPoint.setZ(0)
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(MultiRotation_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(MultiRotation_1, GeomAPI_Shape.VERTEX, [COPIES])
model.testResultsVolumes(MultiRotation_1, [0])
+model.testResultsAreas(MultiRotation_1, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.setY(0)
refPoint.setZ(0)
model.testNbSubShapes(MultiRotation_2, GeomAPI_Shape.EDGE, [COPIES])
model.testNbSubShapes(MultiRotation_2, GeomAPI_Shape.VERTEX, [2 * COPIES])
model.testResultsVolumes(MultiRotation_2, [0])
+model.testResultsAreas(MultiRotation_2, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Edge_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setY(0)
model.testNbSubShapes(MultiRotation_3, GeomAPI_Shape.EDGE, [2 * COPIES])
model.testNbSubShapes(MultiRotation_3, GeomAPI_Shape.VERTEX, [4 * COPIES])
model.testResultsVolumes(MultiRotation_3, [0])
+model.testResultsAreas(MultiRotation_3, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Wire_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setY(0)
model.testNbSubShapes(MultiRotation_4, GeomAPI_Shape.FACE, [COPIES])
model.testNbSubShapes(MultiRotation_4, GeomAPI_Shape.EDGE, [4 * COPIES])
model.testNbSubShapes(MultiRotation_4, GeomAPI_Shape.VERTEX, [8 * COPIES])
-model.testResultsVolumes(MultiRotation_4, [109.154152964914914 * COPIES])
+model.testResultsVolumes(MultiRotation_4, [0])
+model.testResultsAreas(MultiRotation_4, [109.154152964914914 * COPIES])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.setY(0)
refPoint.setZ(0)
model.testNbSubShapes(MultiRotation_5, GeomAPI_Shape.FACE, [2 * COPIES])
model.testNbSubShapes(MultiRotation_5, GeomAPI_Shape.EDGE, [8 * COPIES])
model.testNbSubShapes(MultiRotation_5, GeomAPI_Shape.VERTEX, [16 * COPIES])
-model.testResultsVolumes(MultiRotation_5, [182.822012116 * COPIES])
+model.testResultsVolumes(MultiRotation_5, [0])
+model.testResultsAreas(MultiRotation_5, [182.822012116 * COPIES])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.setY(0)
refPoint.setZ(0)
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(MultiRotation_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(MultiRotation_1, GeomAPI_Shape.VERTEX, [COPIES])
model.testResultsVolumes(MultiRotation_1, [0])
+model.testResultsAreas(MultiRotation_1, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.setY(0)
refPoint.setZ(0)
model.testNbSubShapes(MultiRotation_2, GeomAPI_Shape.EDGE, [COPIES])
model.testNbSubShapes(MultiRotation_2, GeomAPI_Shape.VERTEX, [2 * COPIES])
model.testResultsVolumes(MultiRotation_2, [0])
+model.testResultsAreas(MultiRotation_2, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Edge_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setY(0)
model.testNbSubShapes(MultiRotation_3, GeomAPI_Shape.EDGE, [2 * COPIES])
model.testNbSubShapes(MultiRotation_3, GeomAPI_Shape.VERTEX, [4 * COPIES])
model.testResultsVolumes(MultiRotation_3, [0])
+model.testResultsAreas(MultiRotation_3, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Wire_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setY(0)
model.testNbSubShapes(MultiRotation_4, GeomAPI_Shape.FACE, [COPIES])
model.testNbSubShapes(MultiRotation_4, GeomAPI_Shape.EDGE, [4 * COPIES])
model.testNbSubShapes(MultiRotation_4, GeomAPI_Shape.VERTEX, [8 * COPIES])
-model.testResultsVolumes(MultiRotation_4, [109.154152964914914 * COPIES])
+model.testResultsVolumes(MultiRotation_4, [0])
+model.testResultsAreas(MultiRotation_4, [109.154152964914914 * COPIES])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.setY(0)
refPoint.setZ(0)
model.testNbSubShapes(MultiRotation_5, GeomAPI_Shape.FACE, [2 * COPIES])
model.testNbSubShapes(MultiRotation_5, GeomAPI_Shape.EDGE, [8 * COPIES])
model.testNbSubShapes(MultiRotation_5, GeomAPI_Shape.VERTEX, [16 * COPIES])
-model.testResultsVolumes(MultiRotation_5, [182.822012116 * COPIES])
+model.testResultsVolumes(MultiRotation_5, [0])
+model.testResultsAreas(MultiRotation_5, [182.822012116 * COPIES])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.setY(0)
refPoint.setZ(0)
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(MultiTranslation_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(MultiTranslation_1, GeomAPI_Shape.VERTEX, [COPIES])
model.testResultsVolumes(MultiTranslation_1, [0])
+model.testResultsAreas(MultiTranslation_1, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
midPoint = MultiTranslation_1.defaultResult().shape().middlePoint()
model.testNbSubShapes(MultiTranslation_2, GeomAPI_Shape.EDGE, [COPIES])
model.testNbSubShapes(MultiTranslation_2, GeomAPI_Shape.VERTEX, [2 * COPIES])
model.testResultsVolumes(MultiTranslation_2, [0])
+model.testResultsAreas(MultiTranslation_2, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Edge_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
model.testNbSubShapes(MultiTranslation_3, GeomAPI_Shape.EDGE, [2 * COPIES])
model.testNbSubShapes(MultiTranslation_3, GeomAPI_Shape.VERTEX, [4 * COPIES])
model.testResultsVolumes(MultiTranslation_3, [0])
+model.testResultsAreas(MultiTranslation_3, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Wire_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
model.testNbSubShapes(MultiTranslation_4, GeomAPI_Shape.FACE, [COPIES])
model.testNbSubShapes(MultiTranslation_4, GeomAPI_Shape.EDGE, [4 * COPIES])
model.testNbSubShapes(MultiTranslation_4, GeomAPI_Shape.VERTEX, [8 * COPIES])
-model.testResultsVolumes(MultiTranslation_4, [109.154152964914914 * COPIES])
+model.testResultsVolumes(MultiTranslation_4, [0])
+model.testResultsAreas(MultiTranslation_4, [109.154152964914914 * COPIES])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
midPoint = MultiTranslation_4.defaultResult().shape().middlePoint()
model.testNbSubShapes(MultiTranslation_5, GeomAPI_Shape.FACE, [2 * COPIES])
model.testNbSubShapes(MultiTranslation_5, GeomAPI_Shape.EDGE, [8 * COPIES])
model.testNbSubShapes(MultiTranslation_5, GeomAPI_Shape.VERTEX, [16 * COPIES])
-model.testResultsVolumes(MultiTranslation_5, [182.822012116 * COPIES])
+model.testResultsVolumes(MultiTranslation_5, [0])
+model.testResultsAreas(MultiTranslation_5, [182.822012116 * COPIES])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
midPoint = MultiTranslation_5.defaultResult().shape().middlePoint()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(MultiTranslation_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(MultiTranslation_1, GeomAPI_Shape.VERTEX, [COPIES])
model.testResultsVolumes(MultiTranslation_1, [0])
+model.testResultsAreas(MultiTranslation_1, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
midPoint = MultiTranslation_1.defaultResult().shape().middlePoint()
model.testNbSubShapes(MultiTranslation_2, GeomAPI_Shape.EDGE, [COPIES])
model.testNbSubShapes(MultiTranslation_2, GeomAPI_Shape.VERTEX, [2 * COPIES])
model.testResultsVolumes(MultiTranslation_2, [0])
+model.testResultsAreas(MultiTranslation_2, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Edge_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
model.testNbSubShapes(MultiTranslation_3, GeomAPI_Shape.EDGE, [2 * COPIES])
model.testNbSubShapes(MultiTranslation_3, GeomAPI_Shape.VERTEX, [4 * COPIES])
model.testResultsVolumes(MultiTranslation_3, [0])
+model.testResultsAreas(MultiTranslation_3, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Wire_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
model.testNbSubShapes(MultiTranslation_4, GeomAPI_Shape.FACE, [COPIES])
model.testNbSubShapes(MultiTranslation_4, GeomAPI_Shape.EDGE, [4 * COPIES])
model.testNbSubShapes(MultiTranslation_4, GeomAPI_Shape.VERTEX, [8 * COPIES])
-model.testResultsVolumes(MultiTranslation_4, [109.154152964914914 * COPIES])
+model.testResultsVolumes(MultiTranslation_4, [0])
+model.testResultsAreas(MultiTranslation_4, [109.154152964914914 * COPIES])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
midPoint = MultiTranslation_4.defaultResult().shape().middlePoint()
model.testNbSubShapes(MultiTranslation_5, GeomAPI_Shape.FACE, [2 * COPIES])
model.testNbSubShapes(MultiTranslation_5, GeomAPI_Shape.EDGE, [8 * COPIES])
model.testNbSubShapes(MultiTranslation_5, GeomAPI_Shape.VERTEX, [16 * COPIES])
-model.testResultsVolumes(MultiTranslation_5, [182.822012116 * COPIES])
+model.testResultsVolumes(MultiTranslation_5, [0])
+model.testResultsAreas(MultiTranslation_5, [182.822012116 * COPIES])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
midPoint = MultiTranslation_5.defaultResult().shape().middlePoint()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(MultiTranslation_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(MultiTranslation_1, GeomAPI_Shape.VERTEX, [COPIES])
model.testResultsVolumes(MultiTranslation_1, [0])
+model.testResultsAreas(MultiTranslation_1, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
midPoint = MultiTranslation_1.defaultResult().shape().middlePoint()
model.testNbSubShapes(MultiTranslation_2, GeomAPI_Shape.EDGE, [COPIES])
model.testNbSubShapes(MultiTranslation_2, GeomAPI_Shape.VERTEX, [2 * COPIES])
model.testResultsVolumes(MultiTranslation_2, [0])
+model.testResultsAreas(MultiTranslation_2, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Edge_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
model.testNbSubShapes(MultiTranslation_3, GeomAPI_Shape.EDGE, [2 * COPIES])
model.testNbSubShapes(MultiTranslation_3, GeomAPI_Shape.VERTEX, [4 * COPIES])
model.testResultsVolumes(MultiTranslation_3, [0])
+model.testResultsAreas(MultiTranslation_3, [0])
comp = GeomAlgoAPI_CompoundBuilder.compound([Wire_1.defaultResult().shape()])
refPoint = comp.middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
model.testNbSubShapes(MultiTranslation_4, GeomAPI_Shape.FACE, [COPIES])
model.testNbSubShapes(MultiTranslation_4, GeomAPI_Shape.EDGE, [4 * COPIES])
model.testNbSubShapes(MultiTranslation_4, GeomAPI_Shape.VERTEX, [8 * COPIES])
-model.testResultsVolumes(MultiTranslation_4, [109.154152964914914 * COPIES])
+model.testResultsVolumes(MultiTranslation_4, [0])
+model.testResultsAreas(MultiTranslation_4, [109.154152964914914 * COPIES])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
midPoint = MultiTranslation_4.defaultResult().shape().middlePoint()
model.testNbSubShapes(MultiTranslation_5, GeomAPI_Shape.FACE, [2 * COPIES])
model.testNbSubShapes(MultiTranslation_5, GeomAPI_Shape.EDGE, [8 * COPIES])
model.testNbSubShapes(MultiTranslation_5, GeomAPI_Shape.VERTEX, [16 * COPIES])
-model.testResultsVolumes(MultiTranslation_5, [182.822012116 * COPIES])
+model.testResultsVolumes(MultiTranslation_5, [0])
+model.testResultsAreas(MultiTranslation_5, [182.822012116 * COPIES])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE / 2 * (COPIES - 1))
midPoint = MultiTranslation_5.defaultResult().shape().middlePoint()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
-SketchLine_1 = Sketch_1.addLine(50, 15, 100, 20)
-SketchLine_2 = Sketch_1.addLine(30, 10, 50, 0)
+SketchLine_1 = Sketch_1.addLine(60, 15, 100, 20)
+SketchLine_2 = Sketch_1.addLine(35, 10, 50, 0)
SketchArc_1 = Sketch_1.addArc(30, 40, 60, 40, 30, 70, False)
model.do()
Compound_1 = model.addCompound(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchLine_1"), model.selection("EDGE", "Sketch_1/SketchLine_2")])
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
model.testNbSubShapes(Pipe_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Pipe_1, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Pipe_1, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Pipe_1, [3693.366575752712378744035959244])
+model.testResultsAreas(Pipe_1, [3693.366575752712378744035959244])
model.testNbResults(Pipe_2, 1)
model.testNbSubResults(Pipe_2, [0])
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Pipe_2, [3543.018638942841789685189723969])
+model.testResultsAreas(Pipe_2, [3543.018638942841789685189723969])
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.FACE, [3])
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.EDGE, [12])
model.testNbSubShapes(Pipe_2, GeomAPI_Shape.VERTEX, [24])
-model.testResultsVolumes(Pipe_2, [6000])
+model.testResultsAreas(Pipe_2, [6000])
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Placement_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Placement_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Placement_1, [0])
+model.testResultsAreas(Placement_1, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + Z_SHIFT)
midPoint = Placement_1.defaultResult().shape().middlePoint()
model.testNbSubShapes(Placement_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Placement_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Placement_2, [0])
+model.testResultsAreas(Placement_2, [0])
refPoint = Edge_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + Z_SHIFT)
midPoint = Placement_2.defaultResult().shape().middlePoint()
model.testNbSubShapes(Placement_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Placement_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Placement_3, [0])
+model.testResultsAreas(Placement_3, [0])
refPoint = Wire_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + Z_SHIFT)
midPoint = Placement_3.defaultResult().shape().middlePoint()
model.testNbSubShapes(Placement_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Placement_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Placement_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Placement_4, [109.154152964914914])
+model.testResultsVolumes(Placement_4, [0])
+model.testResultsAreas(Placement_4, [109.154152964914914])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + Z_SHIFT)
midPoint = Placement_4.defaultResult().shape().middlePoint()
model.testNbSubShapes(Placement_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Placement_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Placement_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Placement_5, [182.822012116])
+model.testResultsVolumes(Placement_5, [0])
+model.testResultsAreas(Placement_5, [182.822012116])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + Z_SHIFT)
midPoint = Placement_5.defaultResult().shape().middlePoint()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Placement_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Placement_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Placement_1, [0])
+model.testResultsAreas(Placement_1, [0])
midPoint = Placement_1.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Placement_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Placement_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Placement_2, [0])
+model.testResultsAreas(Placement_2, [0])
midPoint = Placement_2.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Placement_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Placement_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Placement_3, [0])
+model.testResultsAreas(Placement_3, [0])
midPoint = Placement_3.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Placement_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Placement_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Placement_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Placement_4, [109.154152964914914])
+model.testResultsVolumes(Placement_4, [0])
+model.testResultsAreas(Placement_4, [109.154152964914914])
midPoint = Placement_4.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Placement_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Placement_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Placement_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Placement_5, [182.822012116])
+model.testResultsVolumes(Placement_5, [0])
+model.testResultsAreas(Placement_5, [182.822012116])
midPoint = Placement_5.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Placement_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Placement_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Placement_1, [0])
+model.testResultsAreas(Placement_1, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + Z_SHIFT)
midPoint = Placement_1.defaultResult().shape().middlePoint()
model.testNbSubShapes(Placement_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Placement_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Placement_2, [0])
+model.testResultsAreas(Placement_2, [0])
refPoint = Edge_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + Z_SHIFT)
midPoint = Placement_2.defaultResult().shape().middlePoint()
model.testNbSubShapes(Placement_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Placement_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Placement_3, [0])
+model.testResultsAreas(Placement_3, [0])
refPoint = Wire_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + Z_SHIFT)
midPoint = Placement_3.defaultResult().shape().middlePoint()
model.testNbSubShapes(Placement_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Placement_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Placement_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Placement_4, [109.154152964914914])
+model.testResultsVolumes(Placement_4, [0])
+model.testResultsAreas(Placement_4, [109.154152964914914])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + Z_SHIFT)
midPoint = Placement_4.defaultResult().shape().middlePoint()
model.testNbSubShapes(Placement_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Placement_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Placement_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Placement_5, [182.822012116])
+model.testResultsVolumes(Placement_5, [0])
+model.testResultsAreas(Placement_5, [182.822012116])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + Z_SHIFT)
midPoint = Placement_5.defaultResult().shape().middlePoint()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2014-2021 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, 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
+# 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
+#
+
+"""
+ Unit test of ...
+"""
+#=========================================================================
+# Initialization of the test
+#=========================================================================
+
+import os
+import math
+
+from salome.shaper import model
+
+__updated__ = "2020-11-12"
+
+#=========================================================================
+# test get point coordinates
+#=========================================================================
+def test_point_coordinates():
+
+ model.begin()
+ file_path = os.path.join(os.getenv("DATA_DIR"),"Shapes","Brep","box1.brep")
+ partSet = model.moduleDocument()
+ Part_1 = model.addPart(partSet)
+ Part_1_doc = Part_1.document()
+ Import_1 = model.addImport(Part_1_doc,file_path)
+ model.do()
+
+ myDelta = 1e-6
+ coordinates = model.getPointCoordinates(Part_1_doc,model.selection("VERTEX", "[box1_1/Shape_2][box1_1/Shape_3][box1_1/Shape_6]"))
+
+ print(" x: ", coordinates[0])
+ print(" y: ", coordinates[1])
+ print(" z: ", coordinates[2])
+
+ aRef = 200
+ aRes = coordinates[0]
+ assert (math.fabs(aRes - aRef) < myDelta), "The coordinate X is wrong: expected = {0}, real = {1}".format(aRef, aRes)
+
+ aRef = 0
+ aRes= coordinates[1]
+ assert (math.fabs(aRes - aRef) < myDelta), "The coordinate Y is wrong: expected = {0}, real = {1}".format(aRef, aRes)
+
+ aRef = 200
+ aRes = coordinates[2]
+ assert (math.fabs(aRes - aRef) < myDelta), "The coordinate Z is wrong: expected = {0}, real = {1}".format(aRef, aRes)
+
+
+if __name__ == '__main__':
+
+ test_point_coordinates()
+
+ #=========================================================================
+ # End of test
+ #=========================================================================
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
model.testNbSubShapes(Revolution_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Revolution_1, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Revolution_1, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Revolution_1, [666.43244])
+model.testResultsAreas(Revolution_1, [666.43244])
Revolution_1.setPlanesAndOffsets(model.selection("FACE", "PartSet/YOZ"), 0, model.selection("FACE", "PartSet/XOZ"), 0)
model.testNbSubShapes(Revolution_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Revolution_1, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Revolution_1, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Revolution_1, [333.21622])
+model.testResultsAreas(Revolution_1, [333.21622])
model.end()
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Rotation_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Rotation_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Rotation_1, [0])
+model.testResultsAreas(Rotation_1, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_1.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Rotation_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Rotation_2, [0])
+model.testResultsAreas(Rotation_2, [0])
refPoint = Edge_1.defaultResult().shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_2.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Rotation_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Rotation_3, [0])
+model.testResultsAreas(Rotation_3, [0])
refPoint = Wire_1.defaultResult().shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_3.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Rotation_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Rotation_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Rotation_4, [109.154152964914914])
+model.testResultsVolumes(Rotation_4, [0])
+model.testResultsAreas(Rotation_4, [109.154152964914914])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_4.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Rotation_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Rotation_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Rotation_5, [182.822012116])
+model.testResultsVolumes(Rotation_5, [0])
+model.testResultsAreas(Rotation_5, [182.822012116])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_5.defaultResult().shape().middlePoint()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Rotation_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Rotation_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Rotation_1, [0])
+model.testResultsAreas(Rotation_1, [0])
refPoint = Compound_1.result().subResult(0).resultSubShapePair()[0].shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_1.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Rotation_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Rotation_2, [0])
+model.testResultsAreas(Rotation_2, [0])
refPoint = Compound_1.result().subResult(1).resultSubShapePair()[0].shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_2.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Rotation_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Rotation_3, [0])
+model.testResultsAreas(Rotation_3, [0])
refPoint = Compound_1.result().subResult(2).resultSubShapePair()[0].shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_3.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Rotation_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Rotation_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Rotation_4, [109.154152964914914])
+model.testResultsVolumes(Rotation_4, [0])
+model.testResultsAreas(Rotation_4, [109.154152964914914])
refPoint = Compound_1.result().subResult(3).resultSubShapePair()[0].shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_4.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Rotation_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Rotation_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Rotation_5, [182.822012116])
+model.testResultsVolumes(Rotation_5, [0])
+model.testResultsAreas(Rotation_5, [182.822012116])
refPoint = Compound_1.result().subResult(4).resultSubShapePair()[0].shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_5.defaultResult().shape().middlePoint()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Rotation_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Rotation_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Rotation_1, [0])
+model.testResultsAreas(Rotation_1, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_1.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Rotation_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Rotation_2, [0])
+model.testResultsAreas(Rotation_2, [0])
refPoint = Edge_1.defaultResult().shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_2.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Rotation_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Rotation_3, [0])
+model.testResultsAreas(Rotation_3, [0])
refPoint = Wire_1.defaultResult().shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_3.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Rotation_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Rotation_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Rotation_4, [109.154152964914914])
+model.testResultsVolumes(Rotation_4, [0])
+model.testResultsAreas(Rotation_4, [109.154152964914914])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_4.defaultResult().shape().middlePoint()
model.testNbSubShapes(Rotation_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Rotation_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Rotation_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Rotation_5, [182.822012116])
+model.testResultsVolumes(Rotation_5, [0])
+model.testResultsAreas(Rotation_5, [182.822012116])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.rotate(AXIS, ANGLE)
midPoint = Rotation_5.defaultResult().shape().middlePoint()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Scale_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Scale_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Scale_1, [0])
+model.testResultsAreas(Scale_1, [0])
refPoint = GeomAPI_Pnt(Vertex_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_1.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Scale_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Scale_2, [0])
+model.testResultsAreas(Scale_2, [0])
refPoint = GeomAPI_Pnt(Edge_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_2.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Scale_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Scale_3, [0])
+model.testResultsAreas(Scale_3, [0])
refPoint = GeomAPI_Pnt(Wire_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_3.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Scale_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Scale_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Scale_4, [109.154152964914914 * (SCALE**2)])
+model.testResultsVolumes(Scale_4, [0])
+model.testResultsAreas(Scale_4, [109.154152964914914 * (SCALE**2)])
refPoint = GeomAPI_Pnt(Face_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_4.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Scale_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Scale_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Scale_5, [182.822012116 * (SCALE**2)])
+model.testResultsVolumes(Scale_5, [0])
+model.testResultsAreas(Scale_5, [182.822012116 * (SCALE**2)])
refPoint = GeomAPI_Pnt(Shell_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_5.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Scale_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Scale_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Scale_1, [0])
+model.testResultsAreas(Scale_1, [0])
refPoint = GeomAPI_Pnt(Compound_1.result().subResult(0).resultSubShapePair()[0].shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_1.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Scale_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Scale_2, [0])
+model.testResultsAreas(Scale_2, [0])
refPoint = GeomAPI_Pnt(Compound_1.result().subResult(1).resultSubShapePair()[0].shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_2.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Scale_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Scale_3, [0])
+model.testResultsAreas(Scale_3, [0])
refPoint = GeomAPI_Pnt(Compound_1.result().subResult(2).resultSubShapePair()[0].shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_3.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Scale_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Scale_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Scale_4, [109.154152964914914 * (SCALE**2)])
+model.testResultsVolumes(Scale_4, [0])
+model.testResultsAreas(Scale_4, [109.154152964914914 * (SCALE**2)])
refPoint = GeomAPI_Pnt(Compound_1.result().subResult(3).resultSubShapePair()[0].shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_4.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Scale_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Scale_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Scale_5, [182.822012116 * (SCALE**2)])
+model.testResultsVolumes(Scale_5, [0])
+model.testResultsAreas(Scale_5, [182.822012116 * (SCALE**2)])
refPoint = GeomAPI_Pnt(Compound_1.result().subResult(4).resultSubShapePair()[0].shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_5.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Scale_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Scale_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Scale_1, [0])
+model.testResultsAreas(Scale_1, [0])
refPoint = GeomAPI_Pnt(Vertex_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_1.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Scale_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Scale_2, [0])
+model.testResultsAreas(Scale_2, [0])
refPoint = GeomAPI_Pnt(Edge_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_2.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Scale_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Scale_3, [0])
+model.testResultsAreas(Scale_3, [0])
refPoint = GeomAPI_Pnt(Wire_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_3.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Scale_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Scale_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Scale_4, [109.154152964914914 * (SCALE**2)])
+model.testResultsVolumes(Scale_4, [0])
+model.testResultsAreas(Scale_4, [109.154152964914914 * (SCALE**2)])
refPoint = GeomAPI_Pnt(Face_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_4.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Scale_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Scale_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Scale_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Scale_5, [182.822012116 * (SCALE**2)])
+model.testResultsVolumes(Scale_5, [0])
+model.testResultsAreas(Scale_5, [182.822012116 * (SCALE**2)])
refPoint = GeomAPI_Pnt(Shell_1.defaultResult().shape().middlePoint().xyz().multiplied(SCALE))
midPoint = Scale_5.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Symmetry_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Symmetry_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Symmetry_1, [0])
+model.testResultsAreas(Symmetry_1, [0])
refPoint = symmetryOZ(Vertex_1.defaultResult().shape().middlePoint())
midPoint = Symmetry_1.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Symmetry_2, [0])
+model.testResultsAreas(Symmetry_2, [0])
refPoint = symmetryOZ(Edge_1.defaultResult().shape().middlePoint())
midPoint = Symmetry_2.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Symmetry_3, [0])
+model.testResultsAreas(Symmetry_3, [0])
refPoint = symmetryOZ(Wire_1.defaultResult().shape().middlePoint())
midPoint = Symmetry_3.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Symmetry_4, [109.154152964914914])
+model.testResultsVolumes(Symmetry_4, [0])
+model.testResultsAreas(Symmetry_4, [109.154152964914914])
refPoint = symmetryOZ(Face_1.defaultResult().shape().middlePoint())
midPoint = Symmetry_4.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Symmetry_5, [182.822012116])
+model.testResultsVolumes(Symmetry_5, [0])
+model.testResultsAreas(Symmetry_5, [182.822012116])
refPoint = symmetryOZ(Shell_1.defaultResult().shape().middlePoint())
midPoint = Symmetry_5.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Symmetry_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Symmetry_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Symmetry_1, [0])
+model.testResultsAreas(Symmetry_1, [0])
midPoint = Symmetry_1.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Symmetry_2, [0])
+model.testResultsAreas(Symmetry_2, [0])
midPoint = Symmetry_2.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Symmetry_3, [0])
+model.testResultsAreas(Symmetry_3, [0])
midPoint = Symmetry_3.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Symmetry_4, [109.154152964914914])
+model.testResultsVolumes(Symmetry_4, [0])
+model.testResultsAreas(Symmetry_4, [109.154152964914914])
midPoint = Symmetry_4.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Symmetry_5, [182.822012116])
+model.testResultsVolumes(Symmetry_5, [0])
+model.testResultsAreas(Symmetry_5, [182.822012116])
midPoint = Symmetry_5.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Symmetry_1, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Symmetry_1, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Symmetry_1, [0])
+model.testResultsAreas(Symmetry_1, [0])
refPoint = symmetryOZ(Vertex_1.defaultResult().shape().middlePoint())
midPoint = Symmetry_1.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Symmetry_2, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Symmetry_2, [0])
+model.testResultsAreas(Symmetry_2, [0])
refPoint = symmetryOZ(Edge_1.defaultResult().shape().middlePoint())
midPoint = Symmetry_2.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Symmetry_3, [0])
+model.testResultsAreas(Symmetry_3, [0])
refPoint = symmetryOZ(Wire_1.defaultResult().shape().middlePoint())
midPoint = Symmetry_3.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Symmetry_4, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Symmetry_4, [109.154152964914914])
+model.testResultsVolumes(Symmetry_4, [0])
+model.testResultsAreas(Symmetry_4, [109.154152964914914])
refPoint = symmetryOZ(Face_1.defaultResult().shape().middlePoint())
midPoint = Symmetry_4.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Symmetry_5, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Symmetry_5, [182.822012116])
+model.testResultsVolumes(Symmetry_5, [0])
+model.testResultsAreas(Symmetry_5, [182.822012116])
refPoint = symmetryOZ(Shell_1.defaultResult().shape().middlePoint())
midPoint = Symmetry_5.defaultResult().shape().middlePoint()
assert(midPoint.distance(refPoint) < TOLERANCE)
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Translation_3, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Translation_3, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Translation_3, [0])
+model.testResultsAreas(Translation_3, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE)
midPoint = Translation_3.defaultResult().shape().middlePoint()
model.testNbSubShapes(Translation_4, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Translation_4, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Translation_4, [0])
+model.testResultsAreas(Translation_4, [0])
refPoint = Edge_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE)
midPoint = Translation_4.defaultResult().shape().middlePoint()
model.testNbSubShapes(Translation_5, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Translation_5, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Translation_5, [0])
+model.testResultsAreas(Translation_5, [0])
refPoint = Wire_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE)
midPoint = Translation_5.defaultResult().shape().middlePoint()
model.testNbSubShapes(Translation_6, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Translation_6, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Translation_6, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Translation_6, [109.154152964914914])
+model.testResultsVolumes(Translation_6, [0])
+model.testResultsAreas(Translation_6, [109.154152964914914])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE)
midPoint = Translation_6.defaultResult().shape().middlePoint()
model.testNbSubShapes(Translation_7, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Translation_7, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Translation_7, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Translation_7, [182.822012116])
+model.testResultsVolumes(Translation_7, [0])
+model.testResultsAreas(Translation_7, [182.822012116])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE)
midPoint = Translation_7.defaultResult().shape().middlePoint()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Translation_3, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Translation_3, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Translation_3, [0])
+model.testResultsAreas(Translation_3, [0])
midPoint = Translation_3.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Translation_4, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Translation_4, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Translation_4, [0])
+model.testResultsAreas(Translation_4, [0])
midPoint = Translation_4.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Translation_5, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Translation_5, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Translation_5, [0])
+model.testResultsAreas(Translation_5, [0])
midPoint = Translation_5.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Translation_6, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Translation_6, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Translation_6, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Translation_6, [109.154152964914914])
+model.testResultsVolumes(Translation_6, [0])
+model.testResultsAreas(Translation_6, [109.154152964914914])
midPoint = Translation_6.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
model.testNbSubShapes(Translation_7, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Translation_7, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Translation_7, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Translation_7, [182.822012116])
+model.testResultsVolumes(Translation_7, [0])
+model.testResultsAreas(Translation_7, [182.822012116])
midPoint = Translation_7.defaultResult().shape().middlePoint()
assert(midPoint.distance(REFERENCE[index]) < TOLERANCE)
index += 1
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Translation_3, GeomAPI_Shape.EDGE, [0])
model.testNbSubShapes(Translation_3, GeomAPI_Shape.VERTEX, [1])
model.testResultsVolumes(Translation_3, [0])
+model.testResultsAreas(Translation_3, [0])
refPoint = Vertex_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE)
midPoint = Translation_3.defaultResult().shape().middlePoint()
model.testNbSubShapes(Translation_4, GeomAPI_Shape.EDGE, [1])
model.testNbSubShapes(Translation_4, GeomAPI_Shape.VERTEX, [2])
model.testResultsVolumes(Translation_4, [0])
+model.testResultsAreas(Translation_4, [0])
refPoint = Edge_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE)
midPoint = Translation_4.defaultResult().shape().middlePoint()
model.testNbSubShapes(Translation_5, GeomAPI_Shape.EDGE, [2])
model.testNbSubShapes(Translation_5, GeomAPI_Shape.VERTEX, [4])
model.testResultsVolumes(Translation_5, [0])
+model.testResultsAreas(Translation_5, [0])
refPoint = Wire_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE)
midPoint = Translation_5.defaultResult().shape().middlePoint()
model.testNbSubShapes(Translation_6, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Translation_6, GeomAPI_Shape.EDGE, [4])
model.testNbSubShapes(Translation_6, GeomAPI_Shape.VERTEX, [8])
-model.testResultsVolumes(Translation_6, [109.154152964914914])
+model.testResultsVolumes(Translation_6, [0])
+model.testResultsAreas(Translation_6, [109.154152964914914])
refPoint = Face_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE)
midPoint = Translation_6.defaultResult().shape().middlePoint()
model.testNbSubShapes(Translation_7, GeomAPI_Shape.FACE, [2])
model.testNbSubShapes(Translation_7, GeomAPI_Shape.EDGE, [8])
model.testNbSubShapes(Translation_7, GeomAPI_Shape.VERTEX, [16])
-model.testResultsVolumes(Translation_7, [182.822012116])
+model.testResultsVolumes(Translation_7, [0])
+model.testResultsAreas(Translation_7, [182.822012116])
refPoint = Shell_1.defaultResult().shape().middlePoint()
refPoint.setZ(refPoint.z() + DISTANCE)
midPoint = Translation_7.defaultResult().shape().middlePoint()
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+<source>
+ <shape_selector id="main_object"
+ label="Object"
+ tooltip="Select a object"
+ shape_types="vertex edge face solid compsolid compound object"
+ default=""
+ geometrical_selection="true">
+ <validator id="GeomValidators_ConstructionComposite"/>
+ <validator id="GeomValidators_ShapeType" parameters="vertex,line,edge,wire,face,shell,solid,compsolid,compound"/>
+ </shape_selector>
+ <groupbox title="Min">
+ <label id="xmincoordinate" isSelectable = "true"/>
+ <label id="ymincoordinate" isSelectable = "true"/>
+ <label id="zmincoordinate" isSelectable = "true"/>
+ </groupbox>
+ <groupbox title="Max">
+ <label id="xmaxcoordinate" isSelectable = "true"/>
+ <label id="ymaxcoordinate" isSelectable = "true"/>
+ <label id="zmaxcoordinate" isSelectable = "true"/>
+ </groupbox>
+ <boolvalue id="createbox" label="Create box" default="false"/>
+</source>
--- /dev/null
+<source>
+ <shape_selector id="main_object"
+ label="Object"
+ tooltip="Select a object"
+ shape_types="vertex edge face solid compsolid compound object"
+ default=""
+ geometrical_selection="true">
+ <validator id="GeomValidators_ConstructionComposite"/>
+ <validator id="GeomValidators_ShapeType" parameters="vertex,line,edge,wire,face,shell,solid,compsolid,compound"/>
+ </shape_selector>
+ <groupbox title="Min">
+ <label id="xmincoordinate" isSelectable = "true"/>
+ <label id="ymincoordinate" isSelectable = "true"/>
+ <label id="zmincoordinate" isSelectable = "true"/>
+ </groupbox>
+ <groupbox title="Max">
+ <label id="xmaxcoordinate" isSelectable = "true"/>
+ <label id="ymaxcoordinate" isSelectable = "true"/>
+ <label id="zmaxcoordinate" isSelectable = "true"/>
+ </groupbox>
+</source>
booleanOperations.rst
angularCopyFeature.rst
+ boundingBoxFeature.rst
chamferFeature.rst
copyFeature.rst
defeaturingFeature.rst
extrusionCutFeature.rst
extrusionFeature.rst
extrusionFuseFeature.rst
- filletFeature.rst
fillet1dFeature.rst
+ filletFeature.rst
fuseFeatureFaces.rst
+ geometryCalculationFeature.rst
importResultFeature.rst
linearCopyFeature.rst
measurementFeature.rst
pipeFeature.rst
placementFeature.rst
+ pointCoordinatesFeature.rst
recoverFeature.rst
removeSubShapesFeature.rst
revolutionCutFeature.rst
--- /dev/null
+
+ .. _tui_create_Bounding_Box:
+
+Create bounding box
+===================
+
+.. literalinclude:: examples/create_bounding_box.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/create_bounding_box.py>`
--- /dev/null
+
+ .. _tui_geometry_calculation:
+
+Get Geometry Calculation
+========================
+
+.. literalinclude:: examples/geometry_calculation.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/geometry_calculation.py>`
+
--- /dev/null
+
+ .. _tui_point_coordinates:
+
+Get point coordinates
+=====================
+
+.. literalinclude:: examples/point_coordinates.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/point_coordinates.py>`
+
--- /dev/null
+.. |boundingBox.icon| image:: images/bounding.png
+
+Bounding box
+============
+
+The **Bounding box** feature displays the bounding box of sub-elements of a geometrical object (shape).
+
+The property panel displays the coordinates of inferior (**Min**) and superior (**Max**) points.
+the resulting bounding box can be created via a dedicated check-box **Create Box**. If this last is checked corresponding result and feature would be created.
+
+If the check-box **Create Box** isn't checked, **Apply** button does not generate any result and has the same effect as **Cancel** for this feature.
+
+To display the bounding box in the active part:
+
+#. select in the Main Menu *Inspection - > Bounding box* item or
+#. click |boundingBox.icon| **Bounding box** button in the toolbar
+
+Coordinates of the two points (inferior and superior) of the bounding box can be displayed for a selected object in the property panel :
+
+.. figure:: images/boundingBoxPropertyPanel.png
+ :align: center
+
+ Bounding Box
+
+
+Input fields:
+
+- **Object** contains object selected in 3D OCC viewer or object browser.
+- **Create box** check-box allow the creation of the bounding box (result and feature).
+
+Note, the coordinates of two points displayed can be selected.
+
+**TUI Command**:
+
+.. py:function:: model.getBoundingBox(Part_doc, shape)
+
+ :param part: The current part object.
+ :param object: A shape in format *model.selection("Type", shape)*.
+ :return: Created bounding box.
+
+Result
+""""""
+
+Result of **Bounding box** where **Create box** is checked.
+
+.. figure:: images/BoundingBoxResult.png
+ :align: center
+
+ Object selected
+
+**See Also** a sample TUI Script of :ref:`tui_create_Bounding_Box` operation.
--- /dev/null
+from salome.shaper import model
+import os
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+### Create Cone
+Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10)
+
+model.do()
+### Create BoundingBox
+BoundingBox_1 = model.getBoundingBox(Part_1_doc, model.selection("SOLID", "Cone_1_1"))
+model.end()
--- /dev/null
+import os
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+properties = model.getGeometryCalculation(Part_1_doc,model.selection("SOLID", "Box_1_1"))
+print(" length: ", properties[0])
+print(" area: ", properties[1])
+print(" volume: ", properties[2])
+model.end()
\ No newline at end of file
--- /dev/null
+import os
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+coordinates = model.getPointCoordinates(Part_1_doc,model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Left][Box_1_1/Top]"))
+print(" x: ", coordinates[0])
+print(" y: ", coordinates[1])
+print(" z: ", coordinates[2])
+model.end()
--- /dev/null
+.. |GeometryCalculation.icon| image:: images/geometryCalculation.png
+
+Geometry calculation
+====================
+
+The **Geometry calculation** feature displays basic properties of sub-elements of a geometrical object (shape).
+
+The geometry calculation displayed in the property panel are length, area and volume.
+
+**Apply** button does not generate any result and has the same effect as **Cancel** for this feature.
+
+To display geometry calculation in the active part:
+
+#. select in the Main Menu *Inspection - > Geometry calculation* item or
+#. click |GeometryCalculation.icon| **Geometry calculation** button in the toolbar
+
+The geometry calculation can be displayed for a selected object in the property panel :
+
+.. figure:: images/geometryCalculationPropertyPanel.png
+ :align: center
+
+ Geometry calculation
+
+Input fields:
+
+- **Object** contains an object selected in 3D OCC viewer or object browser.
+
+The geometry calculation displayed can be selected.
+
+**TUI Command**:
+
+.. py:function:: model.getGeometryCalculation(Part_doc, shape)
+
+ :param part: The current part object.
+ :param object: A shape in format *model.selection("type", shape)*.
+ :return: list containing length, area and volume.
+
+**See Also** a sample TUI Script of :ref:`tui_geometry_calculation` operation.
\ No newline at end of file
--- /dev/null
+.. |point_coord.icon| image:: images/point_coord.png
+
+Point Coordinates
+=================
+
+The **Points coordinates** feature displays the coordinates of a selected point.
+
+The coordinates are displayed in the property panel.
+
+**Apply** button does not generate any result and has the same effect as **Cancel** for this feature.
+
+To display Point coordinates in the active part:
+
+#. select in the Main Menu *Inspection - > Point coordinates* item or
+#. click |point_coord.icon| **Points coordinates** button in the toolbar
+
+The coordinates can be displayed for a selected point in the property panel :
+
+.. figure:: images/pointCoordinatesPropertyPanel.png
+ :align: center
+
+ Point coordinates
+
+Input fields:
+
+- Input field contains a point selected in 3D OCC viewer or object browser.
+
+Note, the coordinates displayed can be selected.
+
+**TUI Command**:
+
+.. py:function:: model.getPointCoordinates(Part_doc, point)
+
+ :param part: The current part object.
+ :param object: A point in format *model.selection("VERTEX", shape)*.
+ :return: list of coordinates.
+
+**See Also** a sample TUI Script of :ref:`tui_point_coordinates` operation.
\ No newline at end of file
--- /dev/null
+<source>
+ <shape_selector id="main_object"
+ label="Object"
+ tooltip="Select a object"
+ shape_types="edges faces solids compsolids"
+ default=""
+ geometrical_selection="true">
+ <validator id="GeomValidators_ShapeType" parameters="line,edge,wire,face,shell,solid,compsolid,compound"/>
+ </shape_selector>
+ <label id="length" label="Length = " isSelectable = "true"/>
+ <label id="area" label="Area = " isSelectable = "true"/>
+ <label id="volume" label="Volume = " isSelectable = "true"/>
+</source>
</group>
</workbench>
<workbench id="Inspection">
- <group id="Measurement">
+ <group id="PointCoordinates">
+ <feature id="PointCoordinates" title="Point coordinates" tooltip="View point coordinate"
+ icon="icons/Features/point_coord.png" helpfile="pointCoordinatesFeature.html" abort_confirmation="false">
+ <source path="point_coordinates_widget.xml"/>
+ </feature>
+ </group>
+ <group id="Calculation">
+ <feature id="GeometryCalculation" title="Geometry calculation" tooltip="Calculate properties of objects"
+ icon="icons/Features/geometryCalculation.png" helpfile="geometryCalculationFeature.html" abort_confirmation="false">
+ <source path="geometry_calculation_widget.xml"/>
+ </feature>
+ <feature id="BoundingBoxMacro" title="Bounding box" tooltip="Calculate the bounding box" auto_preview="true"
+ icon="icons/Features/bounding.png" helpfile="boundingBoxFeature.html">
+ <source path="bounding_box_widget.xml"/>
+ </feature>
+ <feature id="BoundingBox" title="Bounding box" tooltip="Calculate the bounding box" auto_preview="true"
+ icon="icons/Features/bounding.png" helpfile="boundingBoxFeature.html" internal="1">
+ <source path="create_bounding_box_widget.xml"/>
+ </feature>
<feature id="Measurement" title="Measurement" tooltip="Calculate properties of objects"
icon="icons/Features/measurement.png" helpfile="measurementFeature.html" abort_confirmation="false">
<source path="measurement_widget.xml"/>
--- /dev/null
+<source>
+ <shape_selector id="point_selected"
+ icon="icons/Features/point.png"
+ label="Edge"
+ tooltip="Select a point"
+ shape_types="vertex"
+ default="">
+ <validator id="GeomValidators_ShapeType" parameters="vertex"/>
+ <validator id="GeomValidators_ConstructionComposite"/>
+ </shape_selector>
+ <label id="xcoordinate" isSelectable="true"/>
+ <label id="ycoordinate" isSelectable="true"/>
+ <label id="zcoordinate" isSelectable="true"/>
+</source>
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestExtrusion.py
+ TestExtrusionOfCompound.py
+ TestExtrusionCut.py
+ TestExtrusionCut_BySize.py
+ TestExtrusionCut_ByPlanesAndOffsets.py
+ TestExtrusionCut_ByFaces.py
+ TestExtrusionCut_ThroughAll.py
+ TestExtrusionFuse.py
+ TestExtrusionFuse_BySize.py
+ TestExtrusionFuse_ByPlanesAndOffsets.py
+ TestExtrusionFuse_ThroughAll.py
+ TestExtrusion_ErrorMsg.py
+ TestExtrusion_ZeroOffsetError.py
+ TestExtrusion_ByFaces01.py
+ TestExtrusion_ByFaces02.py
+ TestExtrusion_ByFaces03.py
+ TestExtrusion_ByFaces04.py
+ TestExtrusion_ByFaces05.py
+ TestExtrusion_ByFaces06.py
+ TestExtrusion_ByFaces07.py
+ TestExtrusion_ByFaces08.py
+ TestExtrusion_ByFaces09.py
+ TestExtrusion_ByFaces10.py
+ TestExtrusion_ByFaces11.py
+ TestExtrusion_ByFaces12.py
+ TestExtrusion_ByFaces13.py
+ TestExtrusion_ByFaces14.py
+ TestExtrusion_ByFaces15.py
+ TestExtrusion_ByFaces16.py
+ TestExtrusion_ByFaces17.py
+ TestExtrusion_ByFaces18.py
+ TestExtrusion_ByFaces19.py
+ TestRevolution.py
+ TestRevolution_ByAngle.py
+ TestRevolutionOfPoint.py
+ TestRevolutionOfEdge.py
+ TestRevolutionOfCompound.py
+ TestRevolutionCut.py
+ TestRevolutionCut_ByAngle.py
+ TestRevolutionCut_ByPlanesAndOffsets.py
+ TestRevolutionCut_ThroughAll.py
+ TestRevolutionFuse.py
+ TestRevolutionFuse_ByAngle.py
+ TestRevolutionFuse_ByPlanesAndOffsets.py
+ TestRevolutionFuse_ThroughAll.py
+ TestCompositeFeaturesOnCompSolids.py
+ TestPartition.py
+ TestPartition_ErrorMsg.py
+ TestPlacement_Vertex_Vertex.py
+ TestPlacement_Edge_Vertex.py
+ TestPlacement_Edge_Edge.py
+ TestPlacement_Face_Vertex.py
+ TestPlacement_Face_Edge.py
+ TestPlacement_Face_Face.py
+ TestPlacement_Part_Part.py
+ TestPlacement_Complex.py
+ TestPlacement_ErrorMsg.py
+ TestPlacement_BodyShapesValidator.py
+ TestTranslation.py
+ TestTranslation_Part.py
+ TestRotation.py
+ TestRotation_ByAxis.py
+ TestRotation_ByPoints.py
+ TestRotation_ErrorMsg.py
+ TestMultiRotation_Part.py
+ TestMultiRotation_ErrorMsg.py
+ TestMultiTranslation_Part.py
+ TestMultiTranslation_ErrorMsg.py
+ TestSymmetry_Part.py
+ TestBoolean1.py
+ TestBoolean2.py
+ TestBoolean3.py
+ TestBooleanCompSolids.py
+ TestBooleanSmash.py
+ TestBooleanSplit.py
+ TestBooleanSplitWithPlane.py
+ TestBooleanSplit_ErrorMsg.py
+ TestMultiBoolean.py
+ TestSerialBoolean.py
+ TestBoolean_ErrorMsg.py
+ TestIntersection.py
+ TestIntersection_ErrorMsg.py
+ TestUnion.py
+ TestUnionFaces.py
+ TestUnion_ErrorMsg.py
+ TestRemoveSubShapes.py
+ TestRemoveSubShapes2.py
+ TestRemoveSubShapes3.py
+ TestRemoveSubShapes4.py
+ TestRemoveSubShapes5.py
+ TestRemoveSubShapes6.py
+ TestPipe.py
+ TestPipe_Edge.py
+ TestPipe_Wire.py
+ TestPipe_Compound.py
+ TestPipe_ErrorMsg.py
+ TestRecover.py
+ TestRecover_Compound.py
+ TestRecover_Compsolid1.py
+ TestRecover_Compsolid2.py
+ TestRecover1798.py
+ TestSplitEdgeVertex.py
+ TestSplitEdgeEdge.py
+ TestSplitEdgeEdgeIntersected.py
+ TestSplitEdgeWire.py
+ TestSplitEdgeFace.py
+ TestSplitEdgeShell.py
+ TestSplitEdgeSolid.py
+ TestSplitEdgeSolidIntersected.py
+ TestSplitWireVertex.py
+ TestSplitWireEdge.py
+ TestSplitWireWire.py
+ TestSplitWireFace.py
+ TestSplitWireShell.py
+ TestSplitWireSolid.py
+ TestSplitFaceVertex.py
+ TestSplitFaceEdge.py
+ TestSplitFaceEdgeInside.py
+ TestSplitFaceEdgePerpendicular.py
+ TestSplitFaceWire.py
+ TestSplitFaceFace.py
+ TestSplitFaceShell.py
+ TestSplitFaceSolid.py
+ TestSplitCompFaceSolid.py
+ TestSplitShellVertex.py
+ TestSplitShellEdge.py
+ TestSplitShellConstrPlane.py
+ TestSplitShellWire.py
+ TestSplitShellFace.py
+ TestSplitShellShell.py
+ TestSplitShellSolid.py
+ TestSplitSolid2ConstructionPlanes.py
+ TestSplitSolidEdge.py
+ TestSplitSolidFace.py
+ TestSplitSolidCompFace.py
+ TestSplitSolidShell.py
+ TestSplitSolidCompShell.py
+ TestSplitCompsolidPlane.py
+ TestPartition2Faces.py
+ TestPartition2Solids.py
+ TestPartition2Wires.py
+ TestPartitionBox4Planes.py
+ TestPartitionEdgeSolid.py
+ TestPartitionFace2Solid.py
+ TestPartitionFaceSolid.py
+ TestPartitionFaceWire.py
+ TestPartitionInclinedFaceSolid.py
+ TestPartitionWireFaceSolid.py
+ TestUnion4CurvedFaces.py
+ TestUnion4CurvedFaces_2.py
+ TestUnion4Faces.py
+ TestUnionOfUnion.py
+ TestMeasurementLength.py
+ TestMeasurementDistance.py
+ TestMeasurementRadius.py
+ TestMeasurementAngle.py
+ TestMeasurementAngle3Points.py
+ TestMeasurementPresentation.py
+ TestFusionFaces.py
+ TestFusionFaces2697.py
+ Test1379.py
+ Test1922.py
+ Test1942.py
+ Test1915.py
+ Test2023.py
+ Test2046.py
+ Test2038.py
+ Test2172.py
+ Test2194.py
+ Test2197_1.py
+ Test2197_2.py
+ Test2197_3.py
+ Test2197_4.py
+ Test2215.py
+ Test2222.py
+ Test2233.py
+ Test2231.py
+ Test2240.py
+ Test2246.py
+ Test2248.py
+ Test2251.py
+ Test2255.py
+ Test2289.py
+ Test2304.py
+ Test2304_2.py
+ Test2375.py
+ Test2377.py
+ Test2394.py
+ Test2395.py
+ Test2419_1.py
+ Test2419_2.py
+ Test2419_3.py
+ Test2465.py
+ Test2495.py
+ Test2514.py
+ Test2520.py
+ TestBooleanCut_CompSolid_CompSolid.py
+ TestBooleanCut_CompSolidCompound_CompSolidCompound.py
+ TestBooleanCut_Edge_Edge.py
+ TestBooleanCut_Edge_Face.py
+ TestBooleanCut_EdgeCompound_EdgeCompound.py
+ TestBooleanCut_EdgeCompound_Solid.py
+ TestBooleanCut_Face_Face.py
+ TestBooleanCut_Face_Solid.py
+ TestBooleanCut_FaceCompound_FaceCompound.py
+ TestBooleanCut_Shell_Shell.py
+ TestBooleanCut_ShellCompound_ShellCompound.py
+ TestBooleanCut_Solid_Solid.py
+ TestBooleanCut_SolidCompound_SolidCompound.py
+ TestBooleanCut_Vertex_Vertex.py
+ TestBooleanCut_VertexCompound_Solid.py
+ TestBooleanCut_VertexCompound_VertexCompound.py
+ TestBooleanCut_Wire_Face.py
+ TestBooleanCut_Wire_Wire.py
+ TestBooleanCut_WireCompound_WireCompound.py
+ TestBooleanCut_Compound_Solid.py
+ TestBooleanCut_ErrorMsg.py
+ TestBooleanCut_SolidsHistory.py
+ TestBooleanSmash_Face_Face.py
+ TestBooleanSmash_SubSolid_Solid.py
+ TestBooleanSmash_CompSolid_Solid.py
+ TestBooleanSmash_ErrorMsg.py
+ TestBooleanSmash_SolidsHistory.py
+ TestBooleanFuse_SimpleMode.py
+ TestBooleanFuse_RemoveEdges.py
+ TestBooleanFuse_ErrorMsg.py
+ TestBooleanCommon_Vertex_Vertex.py
+ TestBooleanCommon_VertexCompound_VertexCompound.py
+ TestBooleanCommon_Edge_Edge.py
+ TestBooleanCommon_EdgeCompound_EdgeCompound.py
+ TestBooleanCommon_Wire_Wire.py
+ TestBooleanCommon_WireCompound_WireCompound.py
+ TestBooleanCommon_Face_Face.py
+ TestBooleanCommon_Face_Plane.py
+ TestBooleanCommon_FaceCompound_FaceCompound.py
+ TestBooleanCommon_Shell_Shell.py
+ TestBooleanCommon_ShellCompound_ShellCompound.py
+ TestBooleanCommon_Solid_Face.py
+ TestBooleanCommon_Solid_Shell.py
+ TestBooleanCommon_Solid_Solid.py
+ TestBooleanCommon_SolidCompound_Face.py
+ TestBooleanCommon_SolidCompound_Shell.py
+ TestBooleanCommon_SolidCompound_SolidCompound.py
+ TestBooleanCommon_SubCompound_Solid.py
+ TestBooleanCommon_SubSolid_Solid.py
+ TestBooleanCommon_CompSolid_Face.py
+ TestBooleanCommon_CompSolid_Shell.py
+ TestBooleanCommon_CompSolid_CompSolid.py
+ TestBooleanCommon_CompSolidCompound_Face.py
+ TestBooleanCommon_CompSolidCompound_Shell.py
+ TestBooleanCommon_CompSolidCompound_CompSolidCompound.py
+ TestBooleanCommon_ErrorMsg.py
+ TestBooleanCommon_SolidsHistory.py
+ Test2596.py
+ Test2592.py
+ Test2588.py
+ Test1467.py
+ TestPartitionSubCompsolidWithCompSolid1.py
+ TestPartitionSubCompsolidWithCompSolid2.py
+ TestPartitionSubCompsolidWithCompSolid3.py
+ TestPartitionSubCompsolidWithSolid1.py
+ TestPartitionSubCompsolidWithSolid2.py
+ TestPartitionSubCompsolidWithSolid3.py
+ TestPartitionSubCompsolidWithSolid4.py
+ TestPartitionSubCompsolidWithSolid5.py
+ TestPartitionSubCompsolidWithFace1.py
+ TestPartitionSubCompsolidWithFace2.py
+ TestPartitionSubCompsolidWithFace3.py
+ TestPartitionSubCompsolidWithFace4.py
+ TestPartitionSubCompsolidWithFace5.py
+ TestPartitionSubCompsolidWithPlane1.py
+ TestPartitionSubCompsolidWithPlane2.py
+ TestPartitionSubCompsolidWithPlane3.py
+ TestPartitionSubCompsolidWithPlane4.py
+ TestPartitionSubCompsolidWithPlane5.py
+ TestPartitionArgsUpdate.py
+ TestPartition_SolidsHistory.py
+ TestBooleanFuse_Vertex_Vertex.py
+ TestBooleanFuse_VertexCompound_VertexCompound.py
+ TestBooleanFuse_Edge_Edge.py
+ TestBooleanFuse_EdgeCompound_EdgeCompound.py
+ TestBooleanFuse_Wire_Wire.py
+ TestBooleanFuse_WireCompound_WireCompound.py
+ TestBooleanFuse_Face_Face.py
+ TestBooleanFuse_FaceCompound_FaceCompound.py
+ TestBooleanFuse_Shell_Shell.py
+ TestBooleanFuse_ShellCompound_ShellCompound.py
+ TestBooleanFuse_Solid_Solid.py
+ TestBooleanFuse_SolidCompound_SolidCompound.py
+ TestBooleanFuse_CompSolid_Face.py
+ TestBooleanFuse_CompSolid_CompSolid.py
+ TestBooleanFuse_CompSolidCompound_CompSolidCompound.py
+ TestBooleanFuse_SolidsHistory.py
+ TestFillet.py
+ TestFillet1.py
+ TestFillet_ErrorMsg.py
+ TestFillet_History.py
+ TestScale1.py
+ TestScale2.py
+ Test1816.py
+ Test1876.py
+ Test2225.py
+ Test2631.py
+ Test2636.py
+ Test2650.py
+ Test2681.py
+ Test2686.py
+ Test2689.py
+ Test2693.py
+ Test2698.py
+ Test2701.py
+ Test2724.py
+ Test2692.py
+ Test2617.py
+ Test2729.py
+ Test2738.py
+ Test2751.py
+ Test2826.py
+ Test2854.py
+ Test2878.py
+ Test2920.py
+ Test2971.py
+ Test3014.py
+ TestBooleanCommon_MultiLevelCompound_v0_1.py
+ TestBooleanCommon_MultiLevelCompound_v0_2.py
+ TestBooleanCommon_MultiLevelCompound_v20190506_1.py
+ TestBooleanCommon_MultiLevelCompound_v20190506_2.py
+ TestBooleanCut_MultiLevelCompound_v0_1.py
+ TestBooleanCut_MultiLevelCompound_v0_2.py
+ TestBooleanCut_MultiLevelCompound_v20190506_1.py
+ TestBooleanCut_MultiLevelCompound_v20190506_2.py
+ TestBooleanFuse_MultiLevelCompound_v0_1.py
+ TestBooleanFuse_MultiLevelCompound_v0_2.py
+ TestBooleanFuse_MultiLevelCompound_v0_3.py
+ TestBooleanFuse_MultiLevelCompound_v0_4.py
+ TestBooleanFuse_MultiLevelCompound_v20190506_1.py
+ TestBooleanFuse_MultiLevelCompound_v20190506_2.py
+ TestBooleanFuse_MultiLevelCompound_v20190506_3.py
+ TestBooleanFuse_MultiLevelCompound_v20190506_4.py
+ TestBooleanSmash_MultiLevelCompound_v0_1.py
+ TestBooleanSmash_MultiLevelCompound_v0_2.py
+ TestBooleanSmash_MultiLevelCompound_v20190506_1.py
+ TestBooleanSmash_MultiLevelCompound_v20190506_2.py
+ TestBooleanSplit_MultiLevelCompound_v0_1.py
+ TestBooleanSplit_MultiLevelCompound_v0_2.py
+ TestBooleanSplit_MultiLevelCompound_v20190506_1.py
+ TestBooleanSplit_MultiLevelCompound_v20190506_2.py
+ TestPartition_MultiLevelCompound_v0_1.py
+ TestPartition_MultiLevelCompound_v0_2.py
+ TestPartition_MultiLevelCompound_v0_3.py
+ TestPartition_MultiLevelCompound_v20190506_1.py
+ TestPartition_MultiLevelCompound_v20190506_2.py
+ TestPartition_MultiLevelCompound_v20190506_3.py
+ TestUnion_MultiLevelCompound_v0.py
+ TestUnion_MultiLevelCompound_v20190506.py
+ TestUnionFaces_v20190506.py
+ TestRemoveResultsBody.py
+ TestRemoveResultsConstruction.py
+ TestRemoveResultsPart.py
+ Test17000.py
+ Test17261.py
+ Test17281.py
+ TestChamfer.py
+ Test3033.py
+ Test3076.py
+ Test17909.py
+ TestCopy_ErrorMsg.py
+ TestCopyFeature.py
+ TestCopyFeatureMoveGroupOfFeature.py
+ TestCopyMoveResult.py
+ TestCopyMoveSubShapes.py
+ TestCopyNames.py
+ TestCopySubShapes.py
+ TestCopyWholeFeature.py
+ TestImportResult.py
+ TestDefeaturing_ErrorMsg.py
+ TestDefeaturing_OnSolid1.py
+ TestDefeaturing_OnSolid2.py
+ TestDefeaturing_OnSolid3.py
+ TestDefeaturing_OnCompsolid1.py
+ TestDefeaturing_OnCompsolid2.py
+ TestDefeaturing_OnCompsolid3.py
+ TestDefeaturing_OnCompound.py
+ Test3137_1.py
+ Test3137_2.py
+ Test2918.py
+ Test3139.py
+ TestPlacement_MultiLevelCompound_v0_1.py
+ TestPlacement_MultiLevelCompound_v0_2.py
+ TestPlacement_MultiLevelCompound_v0_3.py
+ TestPlacement_MultiLevelCompound_v0_4.py
+ TestPlacement_MultiLevelCompound_v0_5.py
+ TestPlacement_MultiLevelCompound_v0_6.py
+ TestPlacement_MultiLevelCompound_v95_1.py
+ TestPlacement_MultiLevelCompound_v95_2.py
+ TestPlacement_MultiLevelCompound_v95_3.py
+ TestPlacement_MultiLevelCompound_v95_4.py
+ TestPlacement_MultiLevelCompound_v95_5.py
+ TestPlacement_MultiLevelCompound_v95_6.py
+ TestTranslation_MultiLevelCompound_v0_1.py
+ TestTranslation_MultiLevelCompound_v0_2.py
+ TestTranslation_MultiLevelCompound_v0_3.py
+ TestTranslation_MultiLevelCompound_v0_4.py
+ TestTranslation_MultiLevelCompound_v0_5.py
+ TestTranslation_MultiLevelCompound_v95_1.py
+ TestTranslation_MultiLevelCompound_v95_2.py
+ TestTranslation_MultiLevelCompound_v95_3.py
+ TestTranslation_MultiLevelCompound_v95_4.py
+ TestTranslation_MultiLevelCompound_v95_5.py
+ TestRotation_MultiLevelCompound_v0_1.py
+ TestRotation_MultiLevelCompound_v0_2.py
+ TestRotation_MultiLevelCompound_v0_3.py
+ TestRotation_MultiLevelCompound_v0_4.py
+ TestRotation_MultiLevelCompound_v95_1.py
+ TestRotation_MultiLevelCompound_v95_2.py
+ TestRotation_MultiLevelCompound_v95_3.py
+ TestRotation_MultiLevelCompound_v95_4.py
+ TestSymmetry_MultiLevelCompound_v0_1.py
+ TestSymmetry_MultiLevelCompound_v0_2.py
+ TestSymmetry_MultiLevelCompound_v0_3.py
+ TestSymmetry_MultiLevelCompound_v0_4.py
+ TestSymmetry_MultiLevelCompound_v0_5.py
+ TestSymmetry_MultiLevelCompound_v95_1.py
+ TestSymmetry_MultiLevelCompound_v95_2.py
+ TestSymmetry_MultiLevelCompound_v95_3.py
+ TestSymmetry_MultiLevelCompound_v95_4.py
+ TestSymmetry_MultiLevelCompound_v95_5.py
+ TestScale_MultiLevelCompound_v0_1.py
+ TestScale_MultiLevelCompound_v0_2.py
+ TestScale_MultiLevelCompound_v0_3.py
+ TestScale_MultiLevelCompound_v0_4.py
+ TestScale_MultiLevelCompound_v95_1.py
+ TestScale_MultiLevelCompound_v95_2.py
+ TestScale_MultiLevelCompound_v95_3.py
+ TestScale_MultiLevelCompound_v95_4.py
+ TestMultiTranslation_MultiLevelCompound_v0_1.py
+ TestMultiTranslation_MultiLevelCompound_v0_2.py
+ TestMultiTranslation_MultiLevelCompound_v0_3.py
+ TestMultiTranslation_MultiLevelCompound_v0_4.py
+ TestMultiTranslation_MultiLevelCompound_v95_1.py
+ TestMultiTranslation_MultiLevelCompound_v95_2.py
+ TestMultiTranslation_MultiLevelCompound_v95_3.py
+ TestMultiTranslation_MultiLevelCompound_v95_4.py
+ TestMultiRotation_MultiLevelCompound_v0_1.py
+ TestMultiRotation_MultiLevelCompound_v0_2.py
+ TestMultiRotation_MultiLevelCompound_v0_3.py
+ TestMultiRotation_MultiLevelCompound_v0_4.py
+ TestMultiRotation_MultiLevelCompound_v95_1.py
+ TestMultiRotation_MultiLevelCompound_v95_2.py
+ TestMultiRotation_MultiLevelCompound_v95_3.py
+ TestMultiRotation_MultiLevelCompound_v95_4.py
+ TestIntersection_MultiLevelCompound_v0_1.py
+ TestIntersection_MultiLevelCompound_v0_2.py
+ TestIntersection_MultiLevelCompound_v95_1.py
+ TestIntersection_MultiLevelCompound_v95_2.py
+ TestFillet_MultiLevelCompound_v0_1.py
+ TestFillet_MultiLevelCompound_v0_2.py
+ TestFillet_MultiLevelCompound_v0_3.py
+ TestFillet_MultiLevelCompound_v0_4.py
+ TestFillet_MultiLevelCompound_v95_1.py
+ TestFillet_MultiLevelCompound_v95_2.py
+ TestFillet_MultiLevelCompound_v95_3.py
+ TestFillet_MultiLevelCompound_v95_4.py
+ TestChamfer_MultiLevelCompound_v0_1.py
+ TestChamfer_MultiLevelCompound_v0_2.py
+ TestChamfer_MultiLevelCompound_v0_3.py
+ TestChamfer_MultiLevelCompound_v0_4.py
+ TestChamfer_MultiLevelCompound_v95_1.py
+ TestChamfer_MultiLevelCompound_v95_2.py
+ TestChamfer_MultiLevelCompound_v95_3.py
+ TestChamfer_MultiLevelCompound_v95_4.py
+ Test18836.py
+ Test2817.py
+ Test19065.py
+ Test19066.py
+ Test19115.py
+ Test19196.py
+ TestFillet1D_ErrorMsg.py
+ TestFillet1D_Vertices_1.py
+ TestFillet1D_Vertices_2.py
+ TestFillet1D_Vertices_3.py
+ TestFillet1D_Vertices_4.py
+ TestFillet1D_Vertices_5.py
+ TestFillet1D_Vertices_6.py
+ TestFillet1D_Vertices_7.py
+ TestFillet1D_Vertices_8.py
+ TestFillet1D_Vertices_9.py
+ TestFillet1D_Wire_1.py
+ TestFillet1D_Wire_2.py
+ TestFillet1D_Wire_3.py
+ TestFillet1D_Wire_4.py
+ TestFillet1D_Wire_5.py
+ Test19931.py
+ Test20027.py
+ Test20245_1.py
+ Test20245_2.py
+ Test20245_3.py
+ Test20247.py
+ Test22847.py
+ TestPointCoordinates.py
+ TestGeometryCalculation.py
+ TestBoundingBox.py
+ Test23885.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-## Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+## Copyright (C) 2014-2021 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
INSTALL(FILES ${PROJECT_PYFILES} DESTINATION ${SHAPER_INSTALL_ADDONS})
INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/FiltersPlugin")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
-ADD_UNIT_TESTS(
- TestFilters.py
- TestFilters_Mixed1.py
- TestFilters_Mixed2.py
- TestFilters_Supported.py
- TestFilters_Validator.py
- TestFilters_Xml.py
- TestFilters_FilterName.py
- TestFilters_IsReversed.py
- TestFilters_Remove.py
- TestFilter_BelongsTo.py
- TestFilter_BelongsTo_Exclude.py
- TestFilter_OnPlane.py
- TestFilter_OnPlane_Exclude.py
- TestFilter_OnPlane_Multi.py
- TestFilter_OnLine.py
- TestFilter_OnLine_Exclude.py
- TestFilter_OnLine_Multi.py
- TestFilter_OnGeometry_Edge1.py
- TestFilter_OnGeometry_Edge2.py
- TestFilter_OnGeometry_Face1.py
- TestFilter_OnGeometry_Face2.py
- TestFilter_OnGeometry_Face3.py
- TestFilter_OnGeometry_Face4.py
- TestFilter_OnGeometry_Exclude_Edge1.py
- TestFilter_OnGeometry_Exclude_Edge2.py
- TestFilter_OnGeometry_Exclude_Face1.py
- TestFilter_OnGeometry_Exclude_Face2.py
- TestFilter_OnGeometry_Exclude_Face3.py
- TestFilter_OnGeometry_Exclude_Face4.py
- TestFilter_OnPlaneSide_Face.py
- TestFilter_OnPlaneSide_Plane.py
- TestFilter_OnPlaneSide_Exclude_Face.py
- TestFilter_OnPlaneSide_Exclude_Plane.py
- TestFilter_OnPlaneSide_Multi.py
- TestFilter_OppositeToEdge.py
- TestFilter_OppositeToEdge_Exclude.py
- TestFilter_RelativeToSolid_In.py
- TestFilter_RelativeToSolid_Out.py
- TestFilter_RelativeToSolid_On.py
- TestFilter_RelativeToSolid_NotOn.py
- TestFilter_RelativeToSolid_InAndOn.py
- TestFilter_RelativeToSolid_OutAndOn.py
- TestFilter_RelativeToSolid_Exclude_In.py
- TestFilter_RelativeToSolid_Exclude_Out.py
- TestFilter_RelativeToSolid_Exclude_On.py
- TestFilter_RelativeToSolid_Exclude_NotOn.py
- TestFilter_RelativeToSolid_Exclude_InAndOn.py
- TestFilter_RelativeToSolid_Exclude_OutAndOn.py
- TestFilter_RelativeToSolid_Multi.py
- TestFilter_ExternalFaces1.py
- TestFilter_ExternalFaces2.py
- TestFilter_ExternalFaces_Exclude1.py
- TestFilter_ExternalFaces_Exclude2.py
- TestFilter_HorizontalFaces.py
- TestFilter_HorizontalFaces_Exclude.py
- TestFilter_VerticalFaces.py
- TestFilter_VerticalFaces_Exclude.py
- TestFilter_TopoConnectedFaces_Vertex1.py
- TestFilter_TopoConnectedFaces_Vertex2.py
- TestFilter_TopoConnectedFaces_Vertex3.py
- TestFilter_TopoConnectedFaces_Prop_Vertex1.py
- TestFilter_TopoConnectedFaces_Prop_Vertex2.py
- TestFilter_TopoConnectedFaces_Prop_Vertex3.py
- TestFilter_TopoConnectedFaces_Edge1.py
- TestFilter_TopoConnectedFaces_Edge2.py
- TestFilter_TopoConnectedFaces_Edge3.py
- TestFilter_TopoConnectedFaces_Prop_Edge1.py
- TestFilter_TopoConnectedFaces_Prop_Edge2.py
- TestFilter_TopoConnectedFaces_Prop_Edge3.py
- TestFilter_TopoConnectedFaces_Face1.py
- TestFilter_TopoConnectedFaces_Face2.py
- TestFilter_TopoConnectedFaces_Face3.py
- TestFilter_TopoConnectedFaces_Prop_Face1.py
- TestFilter_TopoConnectedFaces_Prop_Face2.py
- TestFilter_TopoConnectedFaces_Prop_Face3.py
- TestFilter_TopoConnectedFaces_Exclude_Vertex1.py
- TestFilter_TopoConnectedFaces_Exclude_Vertex2.py
- TestFilter_TopoConnectedFaces_Exclude_Vertex3.py
- TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex1.py
- TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex2.py
- TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex3.py
- TestFilter_TopoConnectedFaces_Exclude_Edge1.py
- TestFilter_TopoConnectedFaces_Exclude_Edge2.py
- TestFilter_TopoConnectedFaces_Exclude_Edge3.py
- TestFilter_TopoConnectedFaces_Prop_Exclude_Edge1.py
- TestFilter_TopoConnectedFaces_Prop_Exclude_Edge2.py
- TestFilter_TopoConnectedFaces_Prop_Exclude_Edge3.py
- TestFilter_TopoConnectedFaces_Exclude_Face1.py
- TestFilter_TopoConnectedFaces_Exclude_Face2.py
- TestFilter_TopoConnectedFaces_Exclude_Face3.py
- TestFilter_TopoConnectedFaces_Prop_Exclude_Face1.py
- TestFilter_TopoConnectedFaces_Prop_Exclude_Face2.py
- TestFilter_TopoConnectedFaces_Prop_Exclude_Face3.py
- TestFilter_TopoConnectedFaces_Multi.py
- Test2946.py
- Test2951.py
- Test3241.py
- Test17924.py
- Test17962.py
- Test19190.py
-)
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestFilters.py
+ TestFilters_Mixed1.py
+ TestFilters_Mixed2.py
+ TestFilters_Supported.py
+ TestFilters_Validator.py
+ TestFilters_Xml.py
+ TestFilters_FilterName.py
+ TestFilters_IsReversed.py
+ TestFilters_Remove.py
+ TestFilter_BelongsTo.py
+ TestFilter_BelongsTo_Exclude.py
+ TestFilter_OnPlane.py
+ TestFilter_OnPlane_Exclude.py
+ TestFilter_OnPlane_Multi.py
+ TestFilter_OnLine.py
+ TestFilter_OnLine_Exclude.py
+ TestFilter_OnLine_Multi.py
+ TestFilter_OnGeometry_Edge1.py
+ TestFilter_OnGeometry_Edge2.py
+ TestFilter_OnGeometry_Face1.py
+ TestFilter_OnGeometry_Face2.py
+ TestFilter_OnGeometry_Face3.py
+ TestFilter_OnGeometry_Face4.py
+ TestFilter_OnGeometry_Exclude_Edge1.py
+ TestFilter_OnGeometry_Exclude_Edge2.py
+ TestFilter_OnGeometry_Exclude_Face1.py
+ TestFilter_OnGeometry_Exclude_Face2.py
+ TestFilter_OnGeometry_Exclude_Face3.py
+ TestFilter_OnGeometry_Exclude_Face4.py
+ TestFilter_OnPlaneSide_Face.py
+ TestFilter_OnPlaneSide_Plane.py
+ TestFilter_OnPlaneSide_Exclude_Face.py
+ TestFilter_OnPlaneSide_Exclude_Plane.py
+ TestFilter_OnPlaneSide_Multi.py
+ TestFilter_OppositeToEdge.py
+ TestFilter_OppositeToEdge_Exclude.py
+ TestFilter_RelativeToSolid_In.py
+ TestFilter_RelativeToSolid_Out.py
+ TestFilter_RelativeToSolid_On.py
+ TestFilter_RelativeToSolid_NotOn.py
+ TestFilter_RelativeToSolid_InAndOn.py
+ TestFilter_RelativeToSolid_OutAndOn.py
+ TestFilter_RelativeToSolid_Exclude_In.py
+ TestFilter_RelativeToSolid_Exclude_Out.py
+ TestFilter_RelativeToSolid_Exclude_On.py
+ TestFilter_RelativeToSolid_Exclude_NotOn.py
+ TestFilter_RelativeToSolid_Exclude_InAndOn.py
+ TestFilter_RelativeToSolid_Exclude_OutAndOn.py
+ TestFilter_RelativeToSolid_Multi.py
+ TestFilter_ExternalFaces1.py
+ TestFilter_ExternalFaces2.py
+ TestFilter_ExternalFaces_Exclude1.py
+ TestFilter_ExternalFaces_Exclude2.py
+ TestFilter_HorizontalFaces.py
+ TestFilter_HorizontalFaces_Exclude.py
+ TestFilter_VerticalFaces.py
+ TestFilter_VerticalFaces_Exclude.py
+ TestFilter_TopoConnectedFaces_Vertex1.py
+ TestFilter_TopoConnectedFaces_Vertex2.py
+ TestFilter_TopoConnectedFaces_Vertex3.py
+ TestFilter_TopoConnectedFaces_Prop_Vertex1.py
+ TestFilter_TopoConnectedFaces_Prop_Vertex2.py
+ TestFilter_TopoConnectedFaces_Prop_Vertex3.py
+ TestFilter_TopoConnectedFaces_Edge1.py
+ TestFilter_TopoConnectedFaces_Edge2.py
+ TestFilter_TopoConnectedFaces_Edge3.py
+ TestFilter_TopoConnectedFaces_Prop_Edge1.py
+ TestFilter_TopoConnectedFaces_Prop_Edge2.py
+ TestFilter_TopoConnectedFaces_Prop_Edge3.py
+ TestFilter_TopoConnectedFaces_Face1.py
+ TestFilter_TopoConnectedFaces_Face2.py
+ TestFilter_TopoConnectedFaces_Face3.py
+ TestFilter_TopoConnectedFaces_Prop_Face1.py
+ TestFilter_TopoConnectedFaces_Prop_Face2.py
+ TestFilter_TopoConnectedFaces_Prop_Face3.py
+ TestFilter_TopoConnectedFaces_Exclude_Vertex1.py
+ TestFilter_TopoConnectedFaces_Exclude_Vertex2.py
+ TestFilter_TopoConnectedFaces_Exclude_Vertex3.py
+ TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex1.py
+ TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex2.py
+ TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex3.py
+ TestFilter_TopoConnectedFaces_Exclude_Edge1.py
+ TestFilter_TopoConnectedFaces_Exclude_Edge2.py
+ TestFilter_TopoConnectedFaces_Exclude_Edge3.py
+ TestFilter_TopoConnectedFaces_Prop_Exclude_Edge1.py
+ TestFilter_TopoConnectedFaces_Prop_Exclude_Edge2.py
+ TestFilter_TopoConnectedFaces_Prop_Exclude_Edge3.py
+ TestFilter_TopoConnectedFaces_Exclude_Face1.py
+ TestFilter_TopoConnectedFaces_Exclude_Face2.py
+ TestFilter_TopoConnectedFaces_Exclude_Face3.py
+ TestFilter_TopoConnectedFaces_Prop_Exclude_Face1.py
+ TestFilter_TopoConnectedFaces_Prop_Exclude_Face2.py
+ TestFilter_TopoConnectedFaces_Prop_Exclude_Face3.py
+ TestFilter_TopoConnectedFaces_Multi.py
+ Test2946.py
+ Test2951.py
+ Test3241.py
+ Test17924.py
+ Test17962.py
+ Test19190.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INSTALL(TARGETS GeomAPI DESTINATION ${SHAPER_INSTALL_BIN})
INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
-ADD_UNIT_TESTS(
- TestAx123.py
- TestBox.py
- TestBuilders.py
- TestCone.py
- TestCylinder.py
- TestEllipse2d.py
- TestLine.py
- TestPlanarEdge.py
- TestPolygon.py
- TestSphere.py
- TestTorus.py
- Test2675.py
- Test2879.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/GeomAPI")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
const std::shared_ptr<GeomAPI_Lin2d>& theLine) const
{
IntAna2d_AnaIntersection anInter(*MY_LIN2D, theLine->impl<gp_Lin2d>());
- if (!anInter.IsDone() || anInter.IsEmpty())
- return std::shared_ptr<GeomAPI_Pnt2d>();
+ if (!anInter.IsDone() || anInter.NbPoints() == 0)
+ return std::shared_ptr<GeomAPI_Pnt2d>();
const gp_Pnt2d& aResult = anInter.Point(1).Value();
return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aResult.X(), aResult.Y()));
}
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestAx123.py
+ TestBox.py
+ TestBuilders.py
+ TestCone.py
+ TestCylinder.py
+ TestEllipse2d.py
+ TestLine.py
+ TestPlanarEdge.py
+ TestPolygon.py
+ TestSphere.py
+ TestTorus.py
+ Test2675.py
+ Test2879.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
GeomAlgoAPI_Projection.h
GeomAlgoAPI_Chamfer.h
GeomAlgoAPI_Defeaturing.h
+ GeomAlgoAPI_BoundingBox.h
)
SET(PROJECT_SOURCES
GeomAlgoAPI_Projection.cpp
GeomAlgoAPI_Chamfer.cpp
GeomAlgoAPI_Defeaturing.cpp
+ GeomAlgoAPI_BoundingBox.cpp
)
SET(PROJECT_LIBRARIES
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
--- /dev/null
+// Copyright (C) 2014-2021 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, 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
+// 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
+//
+
+#include "GeomAlgoAPI_BoundingBox.h"
+
+#include <BRepBuilderAPI_Copy.hxx>
+#include <Bnd_Box.hxx>
+#include <BRepTools.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepBndLib.hxx>
+#include <BRep_Builder.hxx>
+#include <Geom_Circle.hxx>
+#include <ShapeAnalysis.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS.hxx>
+#include <gp_Pln.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+#include <Geom_RectangularTrimmedSurface.hxx>
+#include <BRepExtrema_DistShapeShape.hxx>
+#include <ShapeFix_Shape.hxx>
+#include <BRepBuilderAPI_Sewing.hxx>
+#include <Standard_ErrorHandler.hxx>
+#include <TopExp_Explorer.hxx>
+#include <BRepClass3d_SolidClassifier.hxx>
+#include <Geom_SphericalSurface.hxx>
+#include <Geom_ToroidalSurface.hxx>
+
+/**
+* This function constructs and returns modified shape from the original one
+* for singular cases. It is used for the method GetMinDistanceSingular.
+*
+* \param theShape the original shape
+* \param theModifiedShape output parameter. The modified shape.
+* \param theAddDist output parameter. The added distance for modified shape.
+* \retval true if the shape is modified; false otherwise.
+*
+* \internal
+*/
+Standard_Boolean ModifyShape(const TopoDS_Shape &theShape,
+ TopoDS_Shape &theModifiedShape,
+ Standard_Real &theAddDist)
+{
+ TopExp_Explorer anExp;
+ int nbf = 0;
+
+ theAddDist = 0.;
+ theModifiedShape.Nullify();
+
+ for ( anExp.Init( theShape, TopAbs_FACE ); anExp.More(); anExp.Next() ) {
+ nbf++;
+ theModifiedShape = anExp.Current();
+ }
+ if(nbf==1) {
+ TopoDS_Shape sh = theShape;
+ while(sh.ShapeType()==TopAbs_COMPOUND) {
+ TopoDS_Iterator it(sh);
+ sh = it.Value();
+ }
+ Handle(Geom_Surface) S = BRep_Tool::Surface(TopoDS::Face(theModifiedShape));
+ if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
+ S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ||
+ S->IsUPeriodic()) {
+ const Standard_Boolean isShell =
+ (sh.ShapeType()==TopAbs_SHELL || sh.ShapeType()==TopAbs_FACE);
+
+ if (!isShell && S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
+ Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(S);
+ gp_Pnt PC = SS->Location();
+ BRep_Builder B;
+ TopoDS_Vertex V;
+ B.MakeVertex(V,PC,1.e-7);
+ theModifiedShape = V;
+ theAddDist = SS->Radius();
+ return Standard_True;
+ }
+ if (!isShell && S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) {
+ Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(S);
+ gp_Ax3 ax3 = TS->Position();
+ Handle(Geom_Circle) C = new Geom_Circle(ax3.Ax2(),TS->MajorRadius());
+ BRep_Builder B;
+ TopoDS_Edge E;
+ B.MakeEdge(E,C,1.e-7);
+ theModifiedShape = E;
+ theAddDist = TS->MinorRadius();
+ return Standard_True;
+ }
+
+ // non solid case or any periodic surface (Mantis 22454).
+ double U1,U2,V1,V2;
+ // changes for 0020677: EDF 1219 GEOM: MinDistance gives 0 instead of 20.88
+ //S->Bounds(U1,U2,V1,V2); changed by
+ ShapeAnalysis::GetFaceUVBounds(TopoDS::Face(theModifiedShape),U1,U2,V1,V2);
+ // end of changes for 020677 (dmv)
+ Handle(Geom_RectangularTrimmedSurface) TrS1 =
+ new Geom_RectangularTrimmedSurface(S,U1,(U1+U2)/2.,V1,V2);
+ Handle(Geom_RectangularTrimmedSurface) TrS2 =
+ new Geom_RectangularTrimmedSurface(S,(U1+U2)/2.,U2,V1,V2);
+ TopoDS_Shape aMShape;
+
+ TopoDS_Face F1 = BRepBuilderAPI_MakeFace(TrS1, Precision::Confusion());
+ TopoDS_Face F2 = BRepBuilderAPI_MakeFace(TrS2, Precision::Confusion());
+
+ if (isShell) {
+ BRep_Builder B;
+ B.MakeCompound(TopoDS::Compound(aMShape));
+ B.Add(aMShape, F1);
+ B.Add(aMShape, F2);
+ } else {
+ // The original shape is a solid.
+ BRepBuilderAPI_Sewing aSewing (Precision::Confusion()*10.0);
+ aSewing.Add(F1);
+ aSewing.Add(F2);
+ aSewing.Perform();
+ aMShape = aSewing.SewedShape();
+ BRep_Builder B;
+ TopoDS_Solid aSolid;
+ B.MakeSolid(aSolid);
+ B.Add(aSolid, aMShape);
+ aMShape = aSolid;
+ }
+
+ Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;
+ sfs->Init(aMShape);
+ sfs->SetPrecision(1.e-6);
+ sfs->SetMaxTolerance(1.0);
+ sfs->Perform();
+ theModifiedShape = sfs->Shape();
+ return Standard_True;
+ }
+ }
+
+ theModifiedShape = theShape;
+ return Standard_False;
+ }
+
+//=======================================================================
+// function : GetMinDistanceSingular
+//=======================================================================
+double GetMinDistanceSingular(const TopoDS_Shape& aSh1,
+ const TopoDS_Shape& aSh2,
+ gp_Pnt& Ptmp1, gp_Pnt& Ptmp2)
+{
+ TopoDS_Shape tmpSh1;
+ TopoDS_Shape tmpSh2;
+ Standard_Real AddDist1 = 0.;
+ Standard_Real AddDist2 = 0.;
+ Standard_Boolean IsChange1 = ModifyShape(aSh1, tmpSh1, AddDist1);
+ Standard_Boolean IsChange2 = ModifyShape(aSh2, tmpSh2, AddDist2);
+
+ if( !IsChange1 && !IsChange2 )
+ return -2.0;
+
+ BRepExtrema_DistShapeShape dst(tmpSh1,tmpSh2);
+ if (dst.IsDone()) {
+ double MinDist = 1.e9;
+ gp_Pnt PMin1, PMin2, P1, P2;
+ for (int i = 1; i <= dst.NbSolution(); i++) {
+ P1 = dst.PointOnShape1(i);
+ P2 = dst.PointOnShape2(i);
+ Standard_Real Dist = P1.Distance(P2);
+ if (MinDist > Dist) {
+ MinDist = Dist;
+ PMin1 = P1;
+ PMin2 = P2;
+ }
+ }
+ if(MinDist<1.e-7) {
+ Ptmp1 = PMin1;
+ Ptmp2 = PMin2;
+ }
+ else {
+ gp_Dir aDir(gp_Vec(PMin1,PMin2));
+ if( MinDist > (AddDist1+AddDist2) ) {
+ Ptmp1 = gp_Pnt(PMin1.X() + aDir.X()*AddDist1,
+ PMin1.Y() + aDir.Y()*AddDist1,
+ PMin1.Z() + aDir.Z()*AddDist1);
+ Ptmp2 = gp_Pnt(PMin2.X() - aDir.X()*AddDist2,
+ PMin2.Y() - aDir.Y()*AddDist2,
+ PMin2.Z() - aDir.Z()*AddDist2);
+ return (MinDist - AddDist1 - AddDist2);
+ }
+ else {
+ if( AddDist1 > 0 ) {
+ Ptmp1 = gp_Pnt(PMin1.X() + aDir.X()*AddDist1,
+ PMin1.Y() + aDir.Y()*AddDist1,
+ PMin1.Z() + aDir.Z()*AddDist1);
+ Ptmp2 = Ptmp1;
+ }
+ else {
+ Ptmp2 = gp_Pnt(PMin2.X() - aDir.X()*AddDist2,
+ PMin2.Y() - aDir.Y()*AddDist2,
+ PMin2.Z() - aDir.Z()*AddDist2);
+ Ptmp1 = Ptmp2;
+ }
+ }
+ }
+ double res = MinDist - AddDist1 - AddDist2;
+ if(res<0.) res = 0.0;
+ return res;
+ }
+ return -2.0;
+}
+
+//=======================================================================
+// function : GetMinDistance
+//=======================================================================
+Standard_Real GetMinDistance(const TopoDS_Shape& theShape1,
+ const TopoDS_Shape& theShape2,
+ gp_Pnt& thePnt1, gp_Pnt& thePnt2)
+{
+ Standard_Real aResult = 1.e9;
+
+ // Issue 0020231: A min distance bug with torus and vertex.
+ // Make GetMinDistance() return zero if a sole VERTEX is inside any of SOLIDs
+
+ // which of shapes consists of only one vertex?
+ TopExp_Explorer exp1(theShape1,TopAbs_VERTEX), exp2(theShape2,TopAbs_VERTEX);
+ TopoDS_Shape V1 = exp1.More() ? exp1.Current() : TopoDS_Shape();
+ TopoDS_Shape V2 = exp2.More() ? exp2.Current() : TopoDS_Shape();
+ exp1.Next(); exp2.Next();
+ if ( exp1.More() ) V1.Nullify();
+ if ( exp2.More() ) V2.Nullify();
+ // vertex and container of solids
+ TopoDS_Shape V = V1.IsNull() ? V2 : V1;
+ TopoDS_Shape S = V1.IsNull() ? theShape1 : theShape2;
+ if ( !V.IsNull() ) {
+ // classify vertex against solids
+ gp_Pnt p = BRep_Tool::Pnt( TopoDS::Vertex( V ) );
+ for ( exp1.Init( S, TopAbs_SOLID ); exp1.More(); exp1.Next() ) {
+ BRepClass3d_SolidClassifier classifier( exp1.Current(), p, 1e-6);
+ if ( classifier.State() == TopAbs_IN ) {
+ thePnt1 = p;
+ thePnt2 = p;
+ return 0.0;
+ }
+ }
+ }
+
+ aResult = GetMinDistanceSingular(theShape1, theShape2, thePnt1, thePnt2);
+
+
+ BRepExtrema_DistShapeShape dst (theShape1, theShape2);
+ if (dst.IsDone()) {
+ gp_Pnt P1, P2;
+
+ for (int i = 1; i <= dst.NbSolution(); i++) {
+ P1 = dst.PointOnShape1(i);
+ P2 = dst.PointOnShape2(i);
+
+ Standard_Real Dist = P1.Distance(P2);
+ if (aResult < 0 || aResult > Dist) {
+ aResult = Dist;
+ thePnt1 = P1;
+ thePnt2 = P2;
+ }
+ }
+ }
+
+ return aResult;
+}
+
+//=======================================================================
+// function : PreciseBoundingBox
+//=======================================================================
+Standard_Boolean PreciseBoundingBox(const TopoDS_Shape &theShape, Bnd_Box &theBox)
+{
+ if (theBox.IsVoid()) BRepBndLib::Add( theShape, theBox );
+ if (theBox.IsVoid()) return Standard_False;
+
+ Standard_Real aBound[6];
+ theBox.Get(aBound[0], aBound[2], aBound[4], aBound[1], aBound[3], aBound[5]);
+
+ Standard_Integer i;
+ const gp_Pnt aMid(0.5*(aBound[1] + aBound[0]), // XMid
+ 0.5*(aBound[3] + aBound[2]), // YMid
+ 0.5*(aBound[5] + aBound[4])); // ZMid
+ const gp_XYZ aSize(aBound[1] - aBound[0], // DX
+ aBound[3] - aBound[2], // DY
+ aBound[5] - aBound[4]); // DZ
+ const gp_Pnt aPnt[6] =
+ {
+ gp_Pnt(aBound[0] - (aBound[1] - aBound[0]), aMid.Y(), aMid.Z()), // XMin
+ gp_Pnt(aBound[1] + (aBound[1] - aBound[0]), aMid.Y(), aMid.Z()), // XMax
+ gp_Pnt(aMid.X(), aBound[2] - (aBound[3] - aBound[2]), aMid.Z()), // YMin
+ gp_Pnt(aMid.X(), aBound[3] + (aBound[3] - aBound[2]), aMid.Z()), // YMax
+ gp_Pnt(aMid.X(), aMid.Y(), aBound[4] - (aBound[5] - aBound[4])), // ZMin
+ gp_Pnt(aMid.X(), aMid.Y(), aBound[5] + (aBound[5] - aBound[4])) // ZMax
+ };
+ const gp_Dir aDir[3] = { gp::DX(), gp::DY(), gp::DZ() };
+ const Standard_Real aPlnSize[3] =
+ {
+ 0.5*Max(aSize.Y(), aSize.Z()), // XMin, XMax planes
+ 0.5*Max(aSize.X(), aSize.Z()), // YMin, YMax planes
+ 0.5*Max(aSize.X(), aSize.Y()) // ZMin, ZMax planes
+ };
+ gp_Pnt aPMin[2];
+
+ for (i = 0; i < 6; i++) {
+ const Standard_Integer iHalf = i/2;
+ const gp_Pln aPln(aPnt[i], aDir[iHalf]);
+ BRepBuilderAPI_MakeFace aMkFace(aPln, -aPlnSize[iHalf], aPlnSize[iHalf],
+ -aPlnSize[iHalf], aPlnSize[iHalf]);
+
+ if (!aMkFace.IsDone()) {
+ return Standard_False;
+ }
+
+ TopoDS_Shape aFace = aMkFace.Shape();
+
+ // Get minimal distance between planar face and shape.
+ Standard_Real aMinDist = GetMinDistance(aFace, theShape, aPMin[0], aPMin[1]);
+
+ if (aMinDist < 0.) {
+ return Standard_False;
+ }
+
+ aBound[i] = aPMin[1].Coord(iHalf + 1);
+ }
+
+ // Update Bounding box with the new values.
+ theBox.SetVoid();
+ theBox.Update(aBound[0], aBound[2], aBound[4], aBound[1], aBound[3], aBound[5]);
+
+ return Standard_True;
+}
+
+//=================================================================================================
+bool GetBoundingBox(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ Standard_Real& theXmin,Standard_Real& theXmax,
+ Standard_Real& theYmin,Standard_Real& theYmax,
+ Standard_Real& theZmin,Standard_Real& theZmax,
+ std::string& theError)
+{
+ #ifdef _DEBUG
+ std::cout << "GetBoundingBox " << std::endl;
+ #endif
+
+ if (!theShape.get()) {
+ theError = "GetBoundingBox : An invalid argument";
+ return false;
+ }
+
+ TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
+
+ //Compute the parameters
+ Bnd_Box B;
+ try {
+ OCC_CATCH_SIGNALS;
+ BRepBuilderAPI_Copy aCopyTool (aShape);
+ if (!aCopyTool.IsDone()) {
+ theError = "GetBoundingBox Error: Bad shape detected";
+ return false;
+ }
+
+ aShape = aCopyTool.Shape();
+
+ // remove triangulation to obtain more exact boundaries
+ BRepTools::Clean(aShape);
+
+ BRepBndLib::Add(aShape, B);
+
+ if (!PreciseBoundingBox(aShape, B)) {
+ theError = "GetBoundingBox Error: Bounding box cannot be precised";
+ return false;
+ }
+
+ B.Get(theXmin, theYmin, theZmin, theXmax, theYmax, theZmax);
+ }
+ catch (Standard_Failure& aFail) {
+ theError = aFail.GetMessageString();
+ return false;
+ }
+ return true;
+}
--- /dev/null
+// Copyright (C) 2014-2021 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, 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
+// 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
+//
+
+#ifndef GeomAlgoAPI_BoundingBox_H_
+#define GeomAlgoAPI_BoundingBox_H_
+
+#include <GeomAlgoAPI.h>
+#include <GeomAPI_Shape.h>
+#include <Standard_TypeDef.hxx>
+
+/// get the boundin box of theshape.
+ /// \param theShape the shape
+ /// \param thePrecise precise TRUE for precise computation; FALSE for fast one.
+ /// \param theXmin X min of the box
+ /// \param theXmax X max of the box
+ /// \param theYmin Y min of the box
+ /// \param theYmax Y max of the box
+ /// \param theZmin Z min of the box
+ /// \param theZmax Z max of the box
+ /// \param theError error
+GEOMALGOAPI_EXPORT
+bool GetBoundingBox(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ Standard_Real& theXmin,Standard_Real& theXmax,
+ Standard_Real& theYmin,Standard_Real& theYmax,
+ Standard_Real& theZmin,Standard_Real& theZmax,
+ std::string& theError);
+
+#endif
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include <BRepOffsetAPI_MakePipe.hxx>
#include <BRepOffsetAPI_MakePipeShell.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
+#include <BOPAlgo_ArgumentAnalyzer.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <gp_Lin.hxx>
aPipeBuilder->Build();
// Checking result.
- if(!aPipeBuilder->IsDone() || aPipeBuilder->Shape().IsNull()) {
+ if (!aPipeBuilder->IsDone() || aPipeBuilder->Shape().IsNull()) {
delete aPipeBuilder;
return;
}
+
+ // Check for self-interfering result
+ BOPAlgo_ArgumentAnalyzer aChecker;
+ aChecker.SetShape1(aPipeBuilder->Shape());
+ aChecker.SelfInterMode() = Standard_True;
+ aChecker.StopOnFirstFaulty() = Standard_True;
+ aChecker.Perform();
+ if (aChecker.HasFaulty()) {
+ myError = "Self-interfering result.";
+ delete aPipeBuilder;
+ return;
+ }
+
this->initialize(aPipeBuilder);
// Setting naming.
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurface);
aSurface = aTrimSurface->BasisSurface();
}
- if(aSurface->DynamicType() != STANDARD_TYPE(Geom_Plane)) {
- return;
- }
- aPlane = Handle(Geom_Plane)::DownCast(aSurface);
- } else {
+ if (aSurface->DynamicType() == STANDARD_TYPE(Geom_Plane))
+ aPlane = Handle(Geom_Plane)::DownCast(aSurface);
+ }
+
+ if (aPlane.IsNull()) {
aPlane = aFindPlane.Plane();
checkOrientation = true;
}
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
STEPControl_Reader aReader = theReader.ChangeReader();
// BEGIN: reading materials of sub-shapes from file
- if ( theIsMaterials )
- {
+ if (theIsMaterials) {
TopTools_IndexedMapOfShape anIndices;
TopExp::MapShapes(ageom->impl<TopoDS_Shape>(), anIndices);
TopoDS_Shape aShape = aCompound;
// Check if any BRep entity has been read, there must be at least a vertex
- if ( !TopExp_Explorer( aShape, TopAbs_VERTEX ).More() )
- {
+ if (!TopExp_Explorer( aShape, TopAbs_VERTEX ).More()) {
theError = "No geometrical data in the imported file.";
std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
aGeomShape->setImpl(new TopoDS_Shape());
TopoDS_Shape aShape = theShapeTool->GetShape(theLabel);
std::shared_ptr<GeomAPI_Shape> aShapeGeom(new GeomAPI_Shape);
- if (!theLoc.IsIdentity()){
+ if (!theLoc.IsIdentity()) {
aShape.Move(theLoc);
}
aShapeGeom->setImpl(new TopoDS_Shape(aShape));
std::vector<int> aColRGB = {int(r*255),int(g*255),int(b*255)};
theResultBody->addShapeColor(aShapeName, aColRGB);
} else if (theColorTool->GetColor(theLabel, XCAFDoc_ColorCurv, aCol)) {
- double aR = aCol.Red(), aG = aCol.Green(), aB = aCol.Blue();
- std::vector<int> aColRGB = {int(aR*255),int(aG*255),int(aB*255)};
+ double aR = aCol.Red(), aG = aCol.Green(), aB = aCol.Blue();
+ std::vector<int> aColRGB = {int(aR*255),int(aG*255),int(aB*255)};
theResultBody->addShapeColor(aShapeName, aColRGB);
}
// check explicit coloring of boundary entities
if (aDim == 3) {
TopExp_Explorer aXp2(aShape, TopAbs_FACE);
- while(aXp2.More()) {
+ while (aXp2.More()) {
if (theColorTool->GetColor(aXp2.Current(), XCAFDoc_ColorGen, aCol) ||
- theColorTool->GetColor(aXp2.Current(), XCAFDoc_ColorSurf, aCol) ||
- theColorTool->GetColor(aXp2.Current(), XCAFDoc_ColorCurv, aCol)) {
+ theColorTool->GetColor(aXp2.Current(), XCAFDoc_ColorSurf, aCol) ||
+ theColorTool->GetColor(aXp2.Current(), XCAFDoc_ColorCurv, aCol)) {
double aR = aCol.Red(), aG = aCol.Green(), aB = aCol.Blue();
TopoDS_Face aFace = TopoDS::Face(aXp2.Current());
std::vector<int> aColRGB = {int(aR*255),int(aG*255),int(aB*255)};
aXp2.Next();
}
}
- if (aDim == 2) {
- TopExp_Explorer aXp1(aShape, TopAbs_EDGE);
- while(aXp1.More()) {
- if (theColorTool->GetColor(aXp1.Current(), XCAFDoc_ColorGen, aCol) ||
- theColorTool->GetColor(aXp1.Current(), XCAFDoc_ColorSurf, aCol) ||
- theColorTool->GetColor(aXp1.Current(), XCAFDoc_ColorCurv, aCol)) {
- double aR = aCol.Red(), aG = aCol.Green(), aB = aCol.Blue();
- std::vector<int> aColRGB = {int(aR*255),int(aG*255),int(aB*255)};
- std::wstringstream aNameEdge;
- aNameEdge << L"Edge_"<< aShapeName;
- aShapeGeom->setImpl(new TopoDS_Shape(aXp1.Current() ));
- theResultBody->addShapeColor(
- theResultBody->addShapeName(aShapeGeom , aNameEdge.str()), aColRGB);
- }
- aXp1.Next();
- }
- }
} else {
if (!theShapeTool->IsReference(theLabel) ){
TopoDS_Shape aShape = theShapeTool->GetShape(theLabel);
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include <BRepAlgo_FaceRestrictor.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepBndLib.hxx>
+#include <BRepBuilderAPI_Copy.hxx>
#include <BRepBuilderAPI_FindPlane.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
+#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <BRepExtrema_ExtCF.hxx>
return aGProps;
}
+//==================================================================================================
+double GeomAlgoAPI_ShapeTools::length(const std::shared_ptr<GeomAPI_Shape> theShape)
+{
+ GProp_GProps aGProps;
+ if(!theShape.get()) {
+ return 0.0;
+ }
+ const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
+ if(aShape.IsNull()) {
+ return 0.0;
+ }
+
+ BRepGProp::LinearProperties(aShape, aGProps, Standard_True);
+ return aGProps.Mass();
+}
+
//==================================================================================================
double GeomAlgoAPI_ShapeTools::volume(const std::shared_ptr<GeomAPI_Shape> theShape)
{
return 0.0;
}
const Standard_Real anEps = 1.e-6;
- TopExp_Explorer anExp(aShape, TopAbs_SOLID);
- if (anExp.More()) { // return volume if there is at least one solid
- double aVolume = 0.0;
- for (; anExp.More(); anExp.Next()) {
- GProp_GProps aGProps;
- BRepGProp::VolumeProperties(anExp.Current(), aGProps, anEps);
- aVolume += aGProps.Mass();
- }
- return aVolume;
+ double aVolume = 0.0;
+ for (TopExp_Explorer anExp(aShape, TopAbs_SOLID); anExp.More(); anExp.Next()) {
+ GProp_GProps aGProps;
+ BRepGProp::VolumeProperties(anExp.Current(), aGProps, anEps);
+ aVolume += aGProps.Mass();
}
- // return surfaces area
- GProp_GProps aGProps;
- BRepGProp::SurfaceProperties(aShape, aGProps, anEps);
- return aGProps.Mass();
+ return aVolume;
}
//==================================================================================================
TopoDS_Edge aNewEdge = aWExp.Current();
aWExp.Next();
if (aWExp.More()) {
+ // Workaround for the closed wire to avoid jumping of its start point:
+ // split this wire for two parts, convert them to edges, then compose together
+ if (BRep_Tool::IsClosed(aWire)) {
+ aWire = TopoDS::Wire(BRepBuilderAPI_Copy(aWire).Shape());
+ aWExp.Init(aWire);
+ aNewEdge = aWExp.Current();
+
+ BRep_Builder().Remove(aWire, aNewEdge);
+ GeomWirePtr aSplitWire(new GeomAPI_Wire);
+ aSplitWire->setImpl(new TopoDS_Wire(aWire));
+ GeomEdgePtr aMergedEdge = wireToEdge(aSplitWire);
+
+ aWire = BRepBuilderAPI_MakeWire(aNewEdge, aMergedEdge->impl<TopoDS_Edge>());
+ }
+
// Workaround: when concatenate a wire consisting of two edges based on the same B-spline
// curve (non-periodic, but having equal start and end points), first of which is placed
// at the end on the curve and second is placed at the start, this workaround copies
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
class GeomAlgoAPI_ShapeTools
{
public:
+ /// \return the lenth of the edges of the current shape or 0.0 if it can be computed.
+ GEOMALGOAPI_EXPORT static double length(const std::shared_ptr<GeomAPI_Shape> theShape);
+
/// \return the total volume of the solids of the current shape or 0.0 if it can be computed.
GEOMALGOAPI_EXPORT static double volume(const std::shared_ptr<GeomAPI_Shape> theShape);
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
if (!theAlgorithm->shape() || theAlgorithm->shape()->isNull()) {
theError = "Error: Resulting shape";
if (!theFeature.empty())
- theError += "of " + theFeature;
+ theError += " of " + theFeature;
theError += " is Null.";
return true;
}
if (!theAlgorithm->isValid()) {
theError = "Error: Resulting shape";
if (!theFeature.empty())
- theError += "of " + theFeature;
+ theError += " of " + theFeature;
theError += " is not valid.";
return true;
}
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021 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
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021 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
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INSTALL(TARGETS _GeomDataAPI DESTINATION ${SHAPER_INSTALL_SWIG})
INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
-ADD_UNIT_TESTS(TestConstants.py)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/GeomDataAPI")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+TestConstants.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
${PROJECT_SOURCE_DIR}/src/Events
${PROJECT_SOURCE_DIR}/src/GeomAPI
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/BuildPlugin
)
INSTALL(TARGETS GeomValidators DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include <Events_InfoMessage.h>
+#include <BuildPlugin_Interpolation.h>
+
#include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_AttributeString.h>
#include <ModelAPI_AttributeSelectionList.h>
//=================================================================================================
const std::list<std::string>& theArguments,
Events_InfoMessage& theError) const
{
- if(theArguments.size() != 2) {
+ if (theArguments.size() != 2) {
// LCOV_EXCL_START
theError =
"Error: Wrong number of arguments (expected 2): selection list id and min number of objects";
return false;
// LCOV_EXCL_STOP
}
+ //"Interpolation"
+ if (theFeature->name().substr(0, 6) == L"Interp")
+ {
+ AttributeStringPtr anAttr =theFeature->string(BuildPlugin_Interpolation::CREATION_METHOD_ID());
+ if (anAttr->isInitialized())
+ if (anAttr->value() == BuildPlugin_Interpolation::CREATION_METHOD_ANALYTICAL_ID())
+ return true;
+ }
std::string aSelectionListId = theArguments.front();
AttributeSelectionListPtr anAttrSelList = theFeature->selectionList(aSelectionListId);
- if(!anAttrSelList.get()) {
+ if (!anAttrSelList.get()) {
// LCOV_EXCL_START
theError = "Error: Could not get attribute \"%1\".";
theError.arg(aSelectionListId);
int aMinObjectsNb = atoi(theArguments.back().c_str());
- if(anObjectsNb < aMinObjectsNb) {
+ if (anObjectsNb < aMinObjectsNb) {
theError = "Error: Attribute \"%1\" should contain at least %2 items.";
theError.arg(aSelectionListId).arg(aMinObjectsNb);
return false;
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
${PROJECT_SOURCE_DIR}/src/Locale
${PROJECT_SOURCE_DIR}/src/ParametersPlugin
+ ${PROJECT_SOURCE_DIR}/src/BuildPlugin
${SUIT_INCLUDE}
${PYTHON_INCLUDE_DIR}
)
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include <pyconfig.h>
#include <InitializationPlugin_EvalListener.h>
-#include <ParametersPlugin_Parameter.h>
#include <InitializationPlugin_PyInterp.h>
+#include <BuildPlugin_Interpolation.h>
+
+#include <ParametersPlugin_Parameter.h>
+
#include <Events_InfoMessage.h>
#include <Locale_Convert.h>
#include <ModelAPI_AttributeInteger.h>
#include <ModelAPI_AttributeRefList.h>
#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_AttributeTables.h>
#include <ModelAPI_AttributeValidator.h>
#include <ModelAPI_Document.h>
#include <ModelAPI_Events.h>
#include <string>
#include <set>
#include <sstream>
+#include <iostream>
+#include <algorithm>
-//------------------------------------------------------------------------------
+//=================================================================================================
// Tools
std::wstring toString(double theValue)
return std::set<std::wstring>(theContainer.begin(), theContainer.end());
}
-//------------------------------------------------------------------------------
-
+//=================================================================================================
InitializationPlugin_EvalListener::InitializationPlugin_EvalListener()
{
Events_Loop* aLoop = Events_Loop::loop();
aLoop->registerListener(this, ModelAPI_AttributeEvalMessage::eventId(), NULL, true);
aLoop->registerListener(this, ModelAPI_ParameterEvalMessage::eventId(), NULL, true);
+ aLoop->registerListener(this, ModelAPI_BuildEvalMessage::eventId(), NULL, true);
aLoop->registerListener(this, ModelAPI_ComputePositionsMessage::eventId(), NULL, true);
myInterp = std::shared_ptr<InitializationPlugin_PyInterp>(new InitializationPlugin_PyInterp());
myInterp->initialize();
}
+//=================================================================================================
InitializationPlugin_EvalListener::~InitializationPlugin_EvalListener()
{
}
+//=================================================================================================
void InitializationPlugin_EvalListener::processEvent(
const std::shared_ptr<Events_Message>& theMessage)
{
std::shared_ptr<ModelAPI_ComputePositionsMessage> aMsg =
std::dynamic_pointer_cast<ModelAPI_ComputePositionsMessage>(theMessage);
aMsg->setPositions(myInterp->positions(aMsg->expression(), aMsg->parameter()));
+ } else if (theMessage->eventID() == ModelAPI_BuildEvalMessage::eventId()) {
+ std::shared_ptr<ModelAPI_BuildEvalMessage> aMsg =
+ std::dynamic_pointer_cast<ModelAPI_BuildEvalMessage>(theMessage);
+ FeaturePtr aParam = aMsg->parameter();
+
+ AttributeStringPtr anVariableAttr = aParam->string(BuildPlugin_Interpolation::VARIABLE_ID());
+ std::wstring anVar = anVariableAttr->isUValue() ?
+ Locale::Convert::toWString(anVariableAttr->valueU()) :
+ Locale::Convert::toWString(anVariableAttr->value());
+ AttributeTablesPtr anValueAttr = aParam->tables(BuildPlugin_Interpolation::VALUE_ID());
+ std::string anError;
+
+ std::list<std::shared_ptr<ModelAPI_ResultParameter> > aParamsList;
+
+ AttributeStringPtr anExprAttr;
+ ModelAPI_AttributeTables::Value aVal;
+ bool anIsFirstTime = true;
+ anExprAttr = aParam->string(BuildPlugin_Interpolation::XT_ID());
+ std::wstring anExpX = anExprAttr->isUValue() ?
+ Locale::Convert::toWString(anExprAttr->valueU()) :
+ Locale::Convert::toWString(anExprAttr->value());
+ anExpX.erase(std::remove(anExpX.begin(), anExpX.end(), ' '), anExpX.end());
+ anExprAttr = aParam->string(BuildPlugin_Interpolation::YT_ID());
+ std::wstring anExpY = anExprAttr->isUValue() ?
+ Locale::Convert::toWString(anExprAttr->valueU()) :
+ Locale::Convert::toWString(anExprAttr->value());
+ anExpY.erase(std::remove(anExpY.begin(), anExpY.end(), ' '), anExpY.end());
+ anExprAttr = aParam->string(BuildPlugin_Interpolation::ZT_ID());
+ std::wstring anExpZ = anExprAttr->isUValue() ?
+ Locale::Convert::toWString(anExprAttr->valueU()) :
+ Locale::Convert::toWString(anExprAttr->value());
+ anExpZ.erase(std::remove(anExpZ.begin(),anExpZ.end(), ' '), anExpZ.end());
+
+ for (int step =0; step < anValueAttr->rows(); step++) {
+ aVal.myDouble = evaluate(anVar,
+ anValueAttr->value(step,0).myDouble,
+ aParam,
+ anExpX,
+ anError,
+ aParamsList,
+ anIsFirstTime);
+ if (!anError.empty()) break;
+ anValueAttr->setValue(aVal,step,1);
+ aVal.myDouble = evaluate(anVar,
+ anValueAttr->value(step,0).myDouble,
+ aParam,
+ anExpY,
+ anError,
+ aParamsList,
+ anIsFirstTime);
+ if (!anError.empty()) break;
+ anValueAttr->setValue(aVal,step,2);
+ aVal.myDouble = evaluate(anVar,
+ anValueAttr->value(step,0).myDouble,
+ aParam,
+ anExpZ,
+ anError,
+ aParamsList,
+ anIsFirstTime);
+ if (!anError.empty()) break;
+ anValueAttr->setValue(aVal,step,3);
+ if (anIsFirstTime)
+ anIsFirstTime = false;
+ }
+ aMsg->setResults(aParamsList, anError);
+ }
+}
+
+//=================================================================================================
+double InitializationPlugin_EvalListener::evaluate(std::wstring& theVariable,
+ double theValueVariable,
+ FeaturePtr theParameter,
+ const std::wstring& theExpression,
+ std::string& theError,
+ std::list<std::shared_ptr<ModelAPI_ResultParameter> >& theParamsList,
+ bool theIsFirstTime)
+{
+ std::list<std::wstring> aContext;
+ aContext.push_back(theVariable + L"=" + toString(theValueVariable));
+ myInterp->extendLocalContext(aContext);
+ aContext.clear();
+
+ std::list<std::wstring> anExprParams = myInterp->compile(theExpression);
+ // find expression's params in the model
+ std::list<std::wstring>::iterator it = anExprParams.begin();
+ for (; it != anExprParams.end(); it++) {
+ double aValue;
+ ResultParameterPtr aParamRes;
+ // If variable does not exist python interpreter will generate an error.
+ if (!ModelAPI_Tools::findVariable(FeaturePtr(),
+ *it, aValue, aParamRes, theParameter->document()))
+ continue;
+
+ if (theIsFirstTime)
+ {
+ std::list<ResultParameterPtr>::iterator anIter =
+ std::find(theParamsList.begin(),theParamsList.end(), aParamRes);
+ if (anIter == theParamsList.end())
+ theParamsList.push_back(aParamRes);
+ }
+
+ aContext.push_back(*it + L"=" + toString(aValue));
}
+ myInterp->extendLocalContext(aContext);
+ double result = myInterp->evaluate(theExpression, theError);
+ myInterp->clearLocalContext();
+ return result;
}
+//=================================================================================================
double InitializationPlugin_EvalListener::evaluate(FeaturePtr theParameter,
const std::wstring& theExpression, std::string& theError,
std::list<std::shared_ptr<ModelAPI_ResultParameter> >& theParamsList,
// find expression's params in the model
std::list<std::wstring> aContext;
std::list<std::wstring>::iterator it = anExprParams.begin();
- for ( ; it != anExprParams.end(); it++) {
+ for (; it != anExprParams.end(); it++) {
double aValue;
ResultParameterPtr aParamRes;
// If variable does not exist python interpreter will generate an error. It is OK.
return result;
}
+//=================================================================================================
void InitializationPlugin_EvalListener::processEvaluationEvent(
const std::shared_ptr<Events_Message>& theMessage)
{
toSet(myInterp->compile(anAttribute->text())) : std::set<std::wstring>());
anAttribute->setExpressionInvalid(!isValid);
anAttribute->setExpressionError(anAttribute->text().empty() ? "" : anError);
- } else
- if (aMessage->attribute()->attributeType() == ModelAPI_AttributeDouble::typeId()) {
+ } else if (aMessage->attribute()->attributeType() == ModelAPI_AttributeDouble::typeId()) {
AttributeDoublePtr anAttribute =
std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(aMessage->attribute());
std::string anError;
toSet(myInterp->compile(anAttribute->text())) : std::set<std::wstring>());
anAttribute->setExpressionInvalid(!isValid);
anAttribute->setExpressionError(anAttribute->text().empty() ? "" : anError);
- } else
- if (aMessage->attribute()->attributeType() == GeomDataAPI_Point::typeId()) {
+ } else if (aMessage->attribute()->attributeType() == GeomDataAPI_Point::typeId()) {
AttributePointPtr anAttribute =
std::dynamic_pointer_cast<GeomDataAPI_Point>(aMessage->attribute());
std::wstring aText[] = {
anAttribute->setCalculatedValue(aCalculatedValue[0],
aCalculatedValue[1],
aCalculatedValue[2]);
- } else
- if (aMessage->attribute()->attributeType() == GeomDataAPI_Point2D::typeId()) {
+ } else if (aMessage->attribute()->attributeType() == GeomDataAPI_Point2D::typeId()) {
AttributePoint2DPtr anAttribute =
std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aMessage->attribute());
std::wstring aText[] = {
}
}
+//=================================================================================================
void InitializationPlugin_EvalListener::initDataModel()
{
myInterp->runString("import salome_iapp;salome_iapp.register_module_in_study(\"Shaper\")");
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
protected:
/// Evaluates theExpression and returns its value.
- double evaluate(std::shared_ptr<ModelAPI_Feature> theParameter,
+ double evaluate(std::shared_ptr<ModelAPI_Feature> theParameter,
const std::wstring& theExpression, std::string& theError,
std::list<std::shared_ptr<ModelAPI_ResultParameter> >& theParamsList,
const bool theIsParameter = false);
+ /// Evaluates theExpression with variable local and returns its value.
+ double evaluate(std::wstring& theVariable,
+ double theValueVariable,
+ std::shared_ptr<ModelAPI_Feature> theParameter,
+ const std::wstring& theExpression,
+ std::string& theError,
+ std::list<std::shared_ptr<ModelAPI_ResultParameter> >& theParamsList,
+ bool theIsFirstTime);
+
+
/// Processes Evaluation event.
void processEvaluationEvent(const std::shared_ptr<Events_Message>& theMessage);
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
INSTALL(TARGETS Locale DESTINATION ${SHAPER_INSTALL_BIN})
-ADD_UNIT_TESTS(
- TestUTF8.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/Locale")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Cut_1, GeomAPI_Shape.FACE, [3])
model.testNbSubShapes(Cut_1, GeomAPI_Shape.EDGE, [9])
model.testNbSubShapes(Cut_1, GeomAPI_Shape.VERTEX, [18])
-model.testResultsVolumes(Cut_1, [64.38055098])
+model.testResultsVolumes(Cut_1, [0.0])
+model.testResultsAreas(Cut_1, [64.38055098])
assert(model.checkPythonDump())
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+TestUTF8.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
if (aResult) { //check evolution and a label of this shape
for(TNaming_SameShapeIterator aShapes(theShape, theAccess1); aShapes.More(); aShapes.Next())
{
- static Handle(TNaming_NamedShape) aNS;
+ Handle(TNaming_NamedShape) aNS;
if (aShapes.Label().FindAttribute(TNaming_NamedShape::GetID(), aNS)) {
if (aNS->Evolution() != TNaming_SELECTED) {
theOriginalLabel = aNS->Label();
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
myDoc->CommitCommand();
}
+Model_Document::~Model_Document()
+{
+ if (!myDoc.IsNull())
+ {
+ myDoc->ClearUndos();
+ myDoc->ClearRedos();
+ }
+}
+
void Model_Document::setThis(DocumentPtr theDoc)
{
myObjs->setOwner(theDoc);
aSession->setCheckTransactions(false);
if (myObjs)
delete myObjs;
+ anOldDoc->ClearRedos();
+ anOldDoc->ClearUndos();
anOldDoc.Nullify();
myObjs = new Model_Objects(myDoc->Main()); // synchronization is inside
myObjs->setOwner(theThis);
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> nextFeature(
std::shared_ptr<ModelAPI_Feature> theCurrent, const bool theReverse = false) const;
+ //! Erases the document structure.
+ ~Model_Document();
+
protected:
//! Returns (creates if needed) the general label
TDF_Label generalLabel() const;
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
#include <ModelAPI_Result.h>
#include <ModelAPI_ResultParameter.h>
-#include <TDocStd_Document.hxx>
#include <NCollection_DataMap.hxx>
#include <TDF_Label.hxx>
#include <TDF_LabelList.hxx>
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INSTALL(TARGETS ModelAPI DESTINATION ${SHAPER_INSTALL_BIN})
INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
-ADD_UNIT_TESTS(TestConstants.py
- TestUndoRedo.py
- TestDocument.py
- Test1064.py
- TestResults.py
- TestIntArray.py
- Test1512.py
- Test1562.py
- TestDoubleArray.py
- Test1757.py
- Test1998.py
- Test1995.py
- Test2170.py
- TestExternalConstruction.py
- Test2228.py
- Test2241.py
- Test2252.py
- Test2276.py
- Test2389.py
- Test2391.py
- TestCustomName_BooleanCut.py
- TestCustomName_CommonCompSolid.py
- TestCustomName_CutCompSolid.py
- TestCustomName_CutGroup.py
- TestCustomName_DefaultName.py
- TestCustomName_ExtrudeFace.py
- TestCustomName_ExtrusionCut.py
- TestCustomName_ExtrusionCutFace.py
- TestCustomName_MultiTranslation.py
- TestCustomName_Partition.py
- TestCustomName_Placement.py
- TestCustomName_Recover.py
- TestCustomName_Rename.py
- TestCustomName_RotateGroup.py
- TestCustomName_Translation.py
- TestFolder_Create.py
- TestFolder_Update.py
- TestFolder_Remove.py
- TestFolder_Stability.py
- TestFolder_CustomName.py
- TestFolder_Empty.py
- TestFolder_Sketch.py
- Test2358_1.py
- Test2358_2.py
- Test2396.py
- Test2401.py
- Test2413.py
- Test2496.py
- Test2510.py
- TestFeatureSelection_1.py
- TestFeatureSelection_2.py
- Test2607.py
- TestBlockRecalculation.py
- TestSelectionScope.py
- TestSelectorShell.py
- TestWeakNaming2125.py
- TestWeakNaming2222.py
- TestWeakNaming2245.py
- TestWeakNaming2247.py
- TestWeakNaming2248.py
- TestWeakNaming2261.py
- TestWeakNaming2291.py
- TestWeakNaming2335.py
- TestWeakNaming2375.py
- TestWeakNaming2437.py
- TestWeakNaming2445.py
- TestWeakNaming2446.py
- TestWeakNaming2452.py
- TestWeakNamingSortOrder.py
- Test2685.py
- TestGeomNamingPlacement.py
- TestGeomNamingRevolution.py
- TestGeomNamingEdgeByFilter.py
- TestGeomNamingSketchPlane.py
- TestGeomNamingBoxWithFillet.py
- TestContainerSelector.py
- TestSaveOpen1.py
- TestSaveOpen2.py
- TestSelectionInitialization.py
- TestSelectionCircleCenter.py
- TestSelectionInPart.py
- Test2828.py
- TestSelectionRestore.py
- Test2491.py
- Test2493.py
- Test2627.py
- Test2859.py
- Test2873.py
- Test2901.py
- Test2903.py
- Test3020.py
- Test3116.py
- Test19019_1.py
- Test19019_2.py
- Test19031.py
- Test19058.py
- Test19217.py
- Test19707.py
- Test19726.py
- Test19912.py
- Test19932.py
- Test19989.py
- Test20170.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ModelAPI")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
return myError;
}
+ModelAPI_BuildEvalMessage::ModelAPI_BuildEvalMessage(
+ const Events_ID theID, const void* theSender)
+ : Events_Message(theID, theSender), myIsProcessed(false)
+{}
+
+ModelAPI_BuildEvalMessage::~ModelAPI_BuildEvalMessage()
+{}
+
+FeaturePtr ModelAPI_BuildEvalMessage::parameter() const
+{
+ return myParam;
+}
+
+void ModelAPI_BuildEvalMessage::setParameter(FeaturePtr theParam)
+{
+ myParam = theParam;
+}
+
+void ModelAPI_BuildEvalMessage::setResults(
+ const std::list<std::shared_ptr<ModelAPI_ResultParameter> >& theParamsList,
+ const std::string& theError)
+{
+ myParamsList = theParamsList;
+ myError = theError;
+ myIsProcessed = true;
+}
+
+const std::list<std::shared_ptr<ModelAPI_ResultParameter> >&
+ ModelAPI_BuildEvalMessage::params() const
+{
+ return myParamsList;
+}
+
+bool ModelAPI_BuildEvalMessage::isProcessed()
+{
+ return myIsProcessed;
+}
+
+const std::string& ModelAPI_BuildEvalMessage::error() const
+{
+ return myError;
+}
+
ModelAPI_ComputePositionsMessage::ModelAPI_ComputePositionsMessage(
const Events_ID theID, const void* theSender)
: Events_Message(theID, theSender)
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
MODELAPI_EXPORT const std::string& error() const;
};
+class ModelAPI_BuildEvalMessage : public Events_Message
+{
+ FeaturePtr myParam; ///< parameters that should be evaluated
+ bool myIsProcessed; ///< true if results were set
+ std::string myError; ///< error of processing, empty if there is no error
+ /// result of processing, list of parameters in expression found
+ std::list<std::shared_ptr<ModelAPI_ResultParameter> > myParamsList;
+
+ public:
+ /// Static. Returns EventID of the message.
+ MODELAPI_EXPORT static Events_ID& eventId()
+ {
+ static const char * MY_BUILD_EVALUATION_EVENT_ID("BuildEvaluationRequest");
+ static Events_ID anId = Events_Loop::eventByName(MY_BUILD_EVALUATION_EVENT_ID);
+ return anId;
+ }
+
+ /// Useful method that creates and sends the event.
+ /// Returns the message, processed, with the resulting fields filled.
+ MODELAPI_EXPORT static std::shared_ptr<ModelAPI_BuildEvalMessage>
+ send(FeaturePtr theParameter, const void* theSender)
+ {
+ std::shared_ptr<ModelAPI_BuildEvalMessage> aMessage =
+ std::shared_ptr<ModelAPI_BuildEvalMessage>(
+ new ModelAPI_BuildEvalMessage(eventId(), theSender));
+ aMessage->setParameter(theParameter);
+ Events_Loop::loop()->send(aMessage);
+ return aMessage;
+ }
+
+ /// Creates an empty message
+ MODELAPI_EXPORT ModelAPI_BuildEvalMessage(const Events_ID theID, const void* theSender = 0);
+ /// The virtual destructor
+ MODELAPI_EXPORT virtual ~ModelAPI_BuildEvalMessage();
+
+ /// Returns a parameter stored in the message
+ MODELAPI_EXPORT FeaturePtr parameter() const;
+ /// Sets a parameter to the message
+ MODELAPI_EXPORT void setParameter(FeaturePtr theParam);
+ /// Sets the results of processing
+ MODELAPI_EXPORT void setResults(
+ const std::list<std::shared_ptr<ModelAPI_ResultParameter> >& theParamsList,
+ const std::string& theError);
+ /// Returns the results of processing: list of parameters found in the expression
+ MODELAPI_EXPORT const std::list<std::shared_ptr<ModelAPI_ResultParameter> >& params() const;
+ /// Returns true if the expression is processed
+ MODELAPI_EXPORT bool isProcessed();
+
+ /// Returns the interpreter error (empty if no error)
+ MODELAPI_EXPORT const std::string& error() const;
+};
/// Message to ask compute the positions of parameters in the expression
class ModelAPI_ComputePositionsMessage : public Events_Message
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
model.testNbSubShapes(Part_1, GeomAPI_Shape.FACE, [1])
model.testNbSubShapes(Part_1, GeomAPI_Shape.EDGE, [3])
model.testNbSubShapes(Part_1, GeomAPI_Shape.VERTEX, [6])
-model.testResultsVolumes(Part_1, [3416.5596])
+model.testResultsAreas(Part_1, [3416.5596])
assert(model.checkPythonDump())
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestConstants.py
+ TestUndoRedo.py
+ TestDocument.py
+ Test1064.py
+ TestResults.py
+ TestIntArray.py
+ Test1512.py
+ Test1562.py
+ TestDoubleArray.py
+ Test1757.py
+ Test1998.py
+ Test1995.py
+ Test2170.py
+ TestExternalConstruction.py
+ Test2228.py
+ Test2241.py
+ Test2252.py
+ Test2276.py
+ Test2389.py
+ Test2391.py
+ TestCustomName_BooleanCut.py
+ TestCustomName_CommonCompSolid.py
+ TestCustomName_CutCompSolid.py
+ TestCustomName_CutGroup.py
+ TestCustomName_DefaultName.py
+ TestCustomName_ExtrudeFace.py
+ TestCustomName_ExtrusionCut.py
+ TestCustomName_ExtrusionCutFace.py
+ TestCustomName_MultiTranslation.py
+ TestCustomName_Partition.py
+ TestCustomName_Placement.py
+ TestCustomName_Recover.py
+ TestCustomName_Rename.py
+ TestCustomName_RotateGroup.py
+ TestCustomName_Translation.py
+ TestFolder_Create.py
+ TestFolder_Update.py
+ TestFolder_Remove.py
+ TestFolder_Stability.py
+ TestFolder_CustomName.py
+ TestFolder_Empty.py
+ TestFolder_Sketch.py
+ Test2358_1.py
+ Test2358_2.py
+ Test2396.py
+ Test2401.py
+ Test2413.py
+ Test2496.py
+ Test2510.py
+ TestFeatureSelection_1.py
+ TestFeatureSelection_2.py
+ Test2607.py
+ TestBlockRecalculation.py
+ TestSelectionScope.py
+ TestSelectorShell.py
+ TestWeakNaming2125.py
+ TestWeakNaming2222.py
+ TestWeakNaming2245.py
+ TestWeakNaming2247.py
+ TestWeakNaming2248.py
+ TestWeakNaming2261.py
+ TestWeakNaming2291.py
+ TestWeakNaming2335.py
+ TestWeakNaming2375.py
+ TestWeakNaming2437.py
+ TestWeakNaming2445.py
+ TestWeakNaming2446.py
+ TestWeakNaming2452.py
+ TestWeakNamingSortOrder.py
+ Test2685.py
+ TestGeomNamingPlacement.py
+ TestGeomNamingRevolution.py
+ TestGeomNamingEdgeByFilter.py
+ TestGeomNamingSketchPlane.py
+ TestGeomNamingBoxWithFillet.py
+ TestContainerSelector.py
+ TestSaveOpen1.py
+ TestSaveOpen2.py
+ TestSelectionInitialization.py
+ TestSelectionCircleCenter.py
+ TestSelectionInPart.py
+ Test2828.py
+ TestSelectionRestore.py
+ Test2491.py
+ Test2493.py
+ Test2627.py
+ Test2859.py
+ Test2873.py
+ Test2901.py
+ Test2903.py
+ Test3020.py
+ Test3116.py
+ Test19019_1.py
+ Test19019_2.py
+ Test19031.py
+ Test19058.py
+ Test19217.py
+ Test19707.py
+ Test19726.py
+ Test19912.py
+ Test19932.py
+ Test19989.py
+ Test20170.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INSTALL(TARGETS ModelGeomAlgo DESTINATION ${SHAPER_INSTALL_BIN})
INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
-ADD_UNIT_TESTS(TestPoint2D.py)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ModelGeomAlgo")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+TestPoint2D.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INCLUDE(UnitTest)
-ADD_UNIT_TESTS(
- TestDouble.py
- TestInteger.py
- TestRefAttr.py
- TestReference.py
- TestDeflectionDump.py
- TestUndoRedo.py
- Test2488.py
- Test18451.py
- Test19031.py
- Test19990_1.py
- Test19990_2.py
- Test20167.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ModelHighAPI")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
aResult<<std::fixed<<std::setprecision(3);
aResult<<aVolume<<std::endl;
}
+ double anArea = GeomAlgoAPI_ShapeTools::area(theShape);
+ if (anArea > 1.e-5) {
+ aResult << "Area: ";
+ // volumes of too huge shapes write in the scientific format
+ if (anArea >= 1.e5)
+ aResult << std::scientific << std::setprecision(7);
+ else
+ aResult << std::fixed << std::setprecision(3);
+ aResult << anArea << std::endl;
+ }
std::shared_ptr<GeomAPI_Pnt> aCenter = GeomAlgoAPI_ShapeTools::centreOfMass(theShape);
aResult<<"Center of mass: ";
double aCenterVals[3] = {aCenter->x(), aCenter->y(), aCenter->z()};
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestDouble.py
+ TestInteger.py
+ TestRefAttr.py
+ TestReference.py
+ TestDeflectionDump.py
+ TestUndoRedo.py
+ Test2488.py
+ Test18451.py
+ Test19031.py
+ Test19990_1.py
+ Test19990_2.py
+ Test20167.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
const Config_WidgetAPI* theData)
: QWidget(theParent),
myWidgetValidator(0),
- myIsEditing(false),
myState(Stored),
+ myIsEditing(false),
myIsValueStateBlocked(false),
myFlushUpdateBlocked(false)
{
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
/// A feature ID
std::string myFeatureId;
- /// Flag which shows that current operation is in editing mode
- bool myIsEditing;
-
/// Flag which shows whether current widget is obligatory
/// The non-obligatory widgets should not accept the focus in the property panel
bool myIsObligatory;
ValueState myState;
private:
+ /// Flag which shows that current operation is in editing mode
+ bool myIsEditing;
+
/// Value should be computed on execute, like radius for circle's constraint (can not be zero)
bool myIsComputedDefault;
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
AttributeStringPtr aStringAttr = aData->string(attributeID());
QString aCaseId;
if (aStringAttr->isInitialized()) {
- if (myIsEditing)
- aCaseId = QString::fromStdString(aStringAttr->value());
- else {
- aCaseId = QString::fromStdString(aDefVal.empty() ? aStringAttr->value() : aDefVal);
- }
+ aCaseId = QString::fromStdString(aStringAttr->value());
int idx = myCaseIds.indexOf(aCaseId);
if (idx == -1)
idx = currentPageIndex();
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
}
Set(aShape);
- // Activate individual repaintng if this is a part of compsolid
- ResultBodyPtr aResOwner = ModelAPI_Tools::bodyOwner(myResult);
- SetAutoHilight(aResOwner.get() == NULL);
+ // VSV: bos22744: The AutoHilight mode is swithced off because it produces different
+ // behaviour of selection for simple shape and compound. For example when selection mode
+ // is Vertex the shape is selected by vertex, but compound is selected by whole shape
+ //ResultBodyPtr aResOwner = ModelAPI_Tools::bodyOwner(myResult);
+ //SetAutoHilight(aResOwner.get() == NULL);
// Set own free boundaries aspect in order to have free
// and unfree boundaries with different colors
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
aMessageBox.setStandardButtons(QMessageBox::No | QMessageBox::Yes);
aMessageBox.setDefaultButton(QMessageBox::No);
- QString aText;
+ QString aText, aDetailedText;
if (!thePrefixInfo.empty())
aText = thePrefixInfo.c_str();
QString aSep = ", ";
if (!aNotActivatedDocWrn.isEmpty())
aText += aNotActivatedDocWrn;
if (!anOtherFeatureNames.empty()) {
- const char* aMsg = "Features are used in the following features: %1.\nThese "
- "features will be deleted.\n";
- aText += QString(QObject::tr(aMsg))
+ const char* aMsg = "The selected features are used in some\n"
+ "other features, which will also be deleted.\n";
+ const char* aMsgDetails = "The selected features are used"
+ " in the following features: %1.\n";
+ aText += QString(QObject::tr(aMsg));
+ aDetailedText += QString(QObject::tr(aMsgDetails))
.arg(anOtherFeatureNames.join(aSep));
}
if (!aParamFeatureNames.empty()) {
- const char* aMsg = "Parameters are used directly and through a sequence "
- "of dependencies in the following features: %1.\nThese features will "
- "be deleted.\nOr parameters could be replaced by their values.\n";
- aText += QString(QObject::tr(aMsg))
+ const char* aMsg = "The selected parameters are used directly or through\n"
+ "a sequence of dependencies in some features.\n"
+ "These features will be deleted.\n"
+ "Or parameters could be replaced by their values.\n";
+ const char* aMsgDetails = "Parameters are used in the following features: %1.\n";
+ aText += QString(QObject::tr(aMsg));
+ aDetailedText += QString(QObject::tr(aMsgDetails))
.arg(aParamFeatureNames.join(aSep));
#ifdef _DEBUG
QPushButton *aReplaceButton =
}
if (!aText.isEmpty()) {
- aText += "Would you like to continue?";
aMessageBox.setText(aText);
+ aMessageBox.setInformativeText(QObject::tr("Would you like to continue?"));
+ if (!aDetailedText.isEmpty())
+ aMessageBox.setDetailedText(aDetailedText);
aMessageBox.exec();
QMessageBox::ButtonRole aButtonRole = aMessageBox.buttonRole(aMessageBox.clickedButton());
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
: ModuleBase_ModelWidget(theParent, theData)
{
QString aText = translate(theData->getProperty("title"));
+
+ myPrefix = theData->getProperty(ATTR_LABEL);
+
bool aIsHtml = theData->getBooleanAttribute(ATTR_HTML_STYLE, false);
QString aLabelIcon = QString::fromStdString(theData->getProperty("icon"));
std::string aStyleSheet = theData->getProperty(ATTR_STYLE_SHEET);
if (!aStyleSheet.empty())
myLabel->setStyleSheet(QString("QLabel {%1}").arg(aStyleSheet.c_str()));
+
+ aStyleSheet = theData->getProperty(ATTR_IS_SELECTABLE);
+ if ( aStyleSheet == "true")
+ myLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
}
ModuleBase_WidgetLabel::~ModuleBase_WidgetLabel()
aText = ModuleBase_Tools::translate(myFeature->getKind(), aMsg);
}
}
- myLabel->setText(aText);
+ if (myPrefix == "") {
+ myLabel->setText(aText);
+ } else {
+ myLabel->setText(ModuleBase_Tools::translate(myFeature->getKind(), myPrefix) + aText);
+ }
}
return true;
}
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
/// A label control
QLabel* myLabel;
+ /// A prefix for label
+ std::string myPrefix;
};
#endif
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
-ADD_UNIT_TESTS(TestParameterCreation.py
- TestParameterRename.py
- TestParameterChangeValue.py
- TestParameterDelete.py
- TestParameterErrorMsg.py
- TestParametersMgr.py
- Test1806.py
- Test2392.py
- Test2474.py
- Test19036.py
- )
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ParametersPlugin")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestParameterCreation.py
+ TestParameterRename.py
+ TestParameterChangeValue.py
+ TestParameterDelete.py
+ TestParameterErrorMsg.py
+ TestParametersMgr.py
+ Test1806.py
+ Test2392.py
+ Test2474.py
+ Test19036.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INSTALL(TARGETS _PartSetAPI DESTINATION ${SHAPER_INSTALL_SWIG})
INSTALL(TARGETS PartSetAPI DESTINATION ${SHAPER_INSTALL_BIN})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/PartSetAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
-
-ADD_UNIT_TESTS(TestRemoveDuplicate.py)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/PartSetAPI")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+TestRemoveDuplicate.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
# --------- Unit tests -----------
INCLUDE(UnitTest)
-ADD_UNIT_TESTS(
- TestPythonAPI.py
- TestModel.py
-
- TestSketcherAddPoint.py
- TestSketcherAddLine.py
- TestSketcherAddArc.py
- TestSketcherAddCircle.py
- TestSketcherAddMirror.py
- TestSketcherSetCoincident.py
- TestSketcherSetTangent.py
- TestSketcherSetParallel.py
- TestSketcherSetPerpendicular.py
- TestSketcherSetHorizontal.py
- TestSketcherSetVertical.py
- TestSketcherSetFixed.py
- TestSketcherSetLength.py
- TestSketcherSetRadius.py
- TestSketcherSetAngle.py
- TestSketcherSetEqual.py
- TestSketcherSetFillet.py
-
- TestFeatures.py
- TestFeaturesExtrusion.py
- TestFeaturesRevolution.py
-
- TestPrimitivesBox.py
-
- TestMakeBrick1.py
- TestMakeBrick2.py
- TestPlatine.py
-
- Test2044.py
- )
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/PythonAPI")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/TestSketcher.py")
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
# All configuration values have a default; values that are commented out
# serve to show the default.
+import importlib
import sys
import os
import sphinx
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
- 'sphinx.ext.napoleon',
'sphinx.ext.autosummary',
]
-try:
- import sphinx_rtd_theme
- extensions += ['sphinx_rtd_theme']
- use_rtd_theme = True
-except:
- use_rtd_theme = False
+# Optional extensions
+extra_extensions = ['sphinx_rtd_theme']
+if sphinx.version_info[:2] < (1,3):
+ extra_extensions += ['sphinxcontrib.napoleon']
+else:
+ extra_extensions += ['sphinx.ext.napoleon']
+for ext in extra_extensions:
+ try:
+ importlib.import_module(ext)
+ extensions.append(ext)
+ globals().update({'use_{}'.format(ext):True})
+ except:
+ globals().update({'use_{}'.format(ext):False})
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# General information about the project.
project = 'Shaper python API'
-copyright = '2014-2020 CEA/DEN, EDF R&D'
+copyright = '2014-2021 CEA/DEN, EDF R&D'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-if use_rtd_theme:
+if use_sphinx_rtd_theme:
html_theme = 'sphinx_rtd_theme'
else:
html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic'
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
# needed on immediate start of SHAPER from SALOME: salome.naming_service is not initialized then
salome.salome_init()
-obj = salome.naming_service.Resolve('Kernel/ModulCatalog')
-catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog)
-aCorbaModules = catalog.GetComponentList()
+aCorbaModules = salome.modulcat.GetComponentList()
for aName in aCorbaModules:
ConfigAPI.Config_ModuleReader.addDependencyModule(aName)
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
from FeaturesAPI import addFillet, addChamfer
from FeaturesAPI import addFusionFaces
from FeaturesAPI import measureLength, measureDistance, measureRadius, measureAngle
+from FeaturesAPI import getPointCoordinates, getGeometryCalculation, getBoundingBox
from FeaturesAPI import addRemoveResults
from FeaturesAPI import addCopy, addImportResult
from FeaturesAPI import addDefeaturing
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
aResultsVolumes.append(GeomAlgoAPI_ShapeTools_volume(theFeature.results()[anIndex].resultSubShapePair()[0].shape()))
print("model.testResultsVolumes({}, [{}])".format(theFeatureName, ", ".join("{:0.27f}".format(i) for i in aResultsVolumes)))
+ if "testResultsAreas" in theTestsList or len(theTestsList) == 0:
+ aNbResults = len(theFeature.results())
+ aResultsAreas = []
+ for anIndex in range(0, aNbResults):
+ aResultsAreas.append(GeomAlgoAPI_ShapeTools_area(theFeature.results()[anIndex].resultSubShapePair()[0].shape()))
+ print("model.testResultsAreas({}, [{}])".format(theFeatureName, ", ".join("{:0.27f}".format(i) for i in aResultsAreas)))
+
def testNbResults(theFeature, theExpectedNbResults):
""" Tests number of feature results.
anExpectedResultVolumeStr = "{:0.27f}".format(anExpectedResultVolume).lstrip("0").lstrip(".").lstrip("0")
assert math.fabs(aResultVolume - anExpectedResultVolume) <= aTolerance * math.fabs(anExpectedResultVolume), "Volume of result[{}]: {:0.27f}. Expected: {:0.27f}. The first {} significant digits not equal.".format(anIndex, aResultVolume, anExpectedResultVolume, theNbSignificantDigits)
+
+def testResultsAreas(theFeature, theExpectedResultsVolumes, theNbSignificantDigits = 7):
+ """ Tests results areas.
+ :param theFeature: feature to test.
+ :param theExpectedResultsAreas: list of results areas. Size of list should be equal to len(theFeature.results()).
+ """
+ aTolerance = 10**(-theNbSignificantDigits)
+ aNbResults = len(theFeature.results())
+ aListSize = len(theExpectedResultsVolumes)
+ assert (aNbResults == aListSize), "Number of results: {} not equal to list size: {}.".format(aNbResults, aListSize)
+ for anIndex in range(0, aNbResults):
+ aResultVolume = GeomAlgoAPI_ShapeTools_area(theFeature.results()[anIndex].resultSubShapePair()[0].shape())
+ aResultVolumeStr = "{:0.27f}".format(aResultVolume).lstrip("0").lstrip(".").lstrip("0")
+ anExpectedResultVolume = theExpectedResultsVolumes[anIndex]
+ anExpectedResultVolumeStr = "{:0.27f}".format(anExpectedResultVolume).lstrip("0").lstrip(".").lstrip("0")
+ assert math.fabs(aResultVolume - anExpectedResultVolume) <= aTolerance * math.fabs(anExpectedResultVolume), "Area of result[{}]: {:0.27f}. Expected: {:0.27f}. The first {} significant digits not equal.".format(anIndex, aResultVolume, anExpectedResultVolume, theNbSignificantDigits)
+
+
def testHaveNamingFaces(theFeature, theModel, thePartDoc) :
""" Tests if all faces of result have a name
:param theFeature: feature to test.
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestPythonAPI.py
+ TestModel.py
+
+ TestSketcherAddPoint.py
+ TestSketcherAddLine.py
+ TestSketcherAddArc.py
+ TestSketcherAddCircle.py
+ TestSketcherAddMirror.py
+ TestSketcherSetCoincident.py
+ TestSketcherSetTangent.py
+ TestSketcherSetParallel.py
+ TestSketcherSetPerpendicular.py
+ TestSketcherSetHorizontal.py
+ TestSketcherSetVertical.py
+ TestSketcherSetFixed.py
+ TestSketcherSetLength.py
+ TestSketcherSetRadius.py
+ TestSketcherSetAngle.py
+ TestSketcherSetEqual.py
+ TestSketcherSetFillet.py
+
+ TestFeatures.py
+ TestFeaturesExtrusion.py
+ TestFeaturesRevolution.py
+
+ TestPrimitivesBox.py
+
+ TestMakeBrick1.py
+ TestMakeBrick2.py
+ TestPlatine.py
+
+ Test2044.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INCLUDE(UnitTest)
-ADD_UNIT_TESTS(
- TestRectangle.py
- TestRectangleCentered.py
- TestcompoundVertices.py
- TestimportParameters.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/PythonAddons")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestRectangle.py
+ TestRectangleCentered.py
+ TestcompoundVertices.py
+ TestimportParameters.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
TARGET_LINK_LIBRARIES(SHAPER ${PROJECT_LIBRARIES})
+#
+add_executable(shapergui_app shapergui_app.cpp)
+target_link_libraries(shapergui_app ${QT_LIBRARIES})
+
# configuration
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/resources/LightApp.xml.in"
"${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml"
)
+install(TARGETS shapergui_app DESTINATION ${SHAPER_INSTALL_EXE})
INSTALL(TARGETS SHAPER DESTINATION ${SHAPER_INSTALL_BIN})
INSTALL(FILES ${PROJECT_RESOURCES} DESTINATION ${SHAPER_INSTALL_RESOURCES})
+install(FILES resources/SalomeApp.xml RENAME SalomeAppSL.xml DESTINATION ${SHAPER_INSTALL_RESOURCES})
INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
}
int aMenu = createMenu(tr("Inspection"), -1, -1, 30);
- int aSubMenu = createMenu(tr("Information"), aMenu, -1, -1, 0);
int aId = getNextCommandId();
myActionsList.append(aId);
aTip, QKeySequence(), aDesk, true, this, SLOT(onWhatIs(bool)));
myWhatIsAction->setStatusTip(aTip);
myWhatIsAction->setData("INSPECTION_CMD");
- createMenu(aId, aSubMenu, 0);
+ createMenu(aId, aMenu, 0);
QString aToolName = tr("Inspection");
int aTool = createTool(aToolName);
#ifdef _DEBUG
int aItemId =
#endif
- createMenu(aId, aWBMenu);
+
+ if( theId == "PointCoordinates" )
+ createMenu(separator(), aWBMenu);
+
+ createMenu(aId, aWBMenu);
+
if (isAddSeparator)
createMenu(separator(), aWBMenu);
void SHAPERGUI::publishToStudy()
{
- if (isActiveModule() && ModelAPI_Session::get()->hasModuleDocument())
+ if (isActiveModule() && ModelAPI_Session::get()->hasModuleDocument()) {
myWorkshop->module()->launchOperation("PublishToStudy", false);
+
+ // update SHAPERSTUDY objects in OCC and VTK viewers
+ QStringList aVMList;
+ aVMList << "OCCViewer" << "VTKViewer";
+ getApp()->updatePresentations("SHAPERSTUDY", aVMList);
+ }
}
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
--- /dev/null
+// Copyright (C) 2021 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, 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
+// 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
+//
+
+#include <QProcessEnvironment>
+#include <QDir>
+#include <QProcess>
+
+#include <iostream>
+
+int main(int argc, char *argv[])
+{
+ constexpr char GUI_ROOT_DIR[]="GUI_ROOT_DIR";
+ constexpr char SHAPER_ROOT_DIR[]="SHAPER_ROOT_DIR";
+ constexpr char LIGHTAPPCONFIG[]="LightAppConfig";
+ QProcessEnvironment pe(QProcessEnvironment::systemEnvironment());
+ if(!pe.contains(SHAPER_ROOT_DIR))
+ {
+ std::cerr << SHAPER_ROOT_DIR << " is not defined in your environment !" << std::endl;
+ return 1;
+ }
+ if(!pe.contains(GUI_ROOT_DIR))
+ {
+ std::cerr << GUI_ROOT_DIR << " is not defined in your environment !" << std::endl;
+ return 1;
+ }
+ // fill LightAppConfig env var
+ QString gui_root_dir( QDir::fromNativeSeparators(pe.value(GUI_ROOT_DIR)) );
+ QString shaper_root_dir( QDir::fromNativeSeparators(pe.value(SHAPER_ROOT_DIR)) );
+ QString lightappconfig_val( QString("%1:%2")
+ .arg( QDir::toNativeSeparators( QString("%1/share/salome/resources/gui").arg(gui_root_dir) ) )
+ .arg( QDir::toNativeSeparators( QString("%1/share/salome/resources/shaper")
+ .arg(shaper_root_dir) ) ) );
+ pe.insert(LIGHTAPPCONFIG,lightappconfig_val);
+ //tells shutup to salome.salome_init invoked at shaper engine ignition
+ pe.insert("SALOME_EMB_SERVANT","1");
+ //
+ QProcess proc;
+ proc.setProcessEnvironment(pe);
+ proc.setProgram("suitexe");
+ proc.setArguments({"--modules=SHAPER"});
+ proc.setProcessChannelMode( QProcess::ForwardedErrorChannel );
+ proc.start();
+ proc.waitForFinished(-1);
+ return proc.exitCode();
+}
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2018-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INCLUDE(UnitTest)
-ADD_UNIT_TESTS(
- TestSketch.py
- TestFreePoints.py
-)
-
-# ADD_SUBDIRECTORY (Test)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/SketchAPI")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
}
theDumper << "] = " << theDumper.name(aBase) << ".offset()" << std::endl;
-//// // Set necessary "auxiliary" flag for created features
-//// // (flag is set if it differs to anAux)
-//// for (anIt = aList.begin(); anIt != aList.end(); ++anIt) {
-//// FeaturePtr aFeature = (*anIt)->feature();
-//// bool aFeatAux = aFeature->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value();
-//// if (aFeatAux != anAux->value())
-//// theDumper << theDumper.name((*anIt)->feature(), false)
-//// << ".setAuxiliary(" << aFeatAux << ")" <<std::endl;
-//// }
+ // Set necessary "auxiliary" flag for created features
+ for (anIt = aList.begin(); anIt != aList.end(); ++anIt) {
+ FeaturePtr aFeature = (*anIt)->feature();
+ bool aFeatAux = aFeature->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value();
+ if (aFeatAux)
+ theDumper << theDumper.name((*anIt)->feature(), false)
+ << ".setAuxiliary(" << aFeatAux << ")" <<std::endl;
+ }
}
-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ TestSketch.py
+ TestFreePoints.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch)
INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-ADD_UNIT_TESTS(
- Test1061.py
- Test1577.py
- Test1578.py
- Test1673.py
- Test1779.py
- Test1924.py
- Test1963.py
- Test1966.py
- Test1967.py
- Test2034_1.py
- Test2034_2.py
- Test2034_3.py
- Test2062.py
- Test2095.py
- Test2115.py
- Test2119.py
- Test2134.py
- Test2157.py
- Test2157_2.py
- Test2224.py
- Test2229.py
- Test2239.py
- Test2273.py
- Test2280.py
- Test2287.py
- Test2341.py
- Test2376.py
- Test2390.py
- Test2393.py
- Test2425.py
- Test2427.py
- Test2440.py
- Test2481.py
- Test2654.py
- Test2711.py
- Test2741.py
- Test2810.py
- Test2824.py
- Test2860.py
- Test2894.py
- Test3019.py
- Test3087_1.py
- Test3087_2.py
- Test3132.py
- Test3154.py
- Test3170.py
- Test3240.py
- Test19089.py
- Test19101.py
- Test20274_1.py
- Test20274_2.py
- Test20274_3.py
+include(tests.set)
- TestArcBehavior.py
- TestBSplineAddPole.py
- TestChangeSketchPlane1.py
- TestChangeSketchPlane2.py
- TestChangeSketchPlane3.py
- TestChangeSketchPlane4.py
- TestConstraintAngle.py
- TestConstraintAngle_v0_1.py
- TestConstraintAngle_v0_2.py
- TestConstraintAngle_v20191210_1.py
- TestConstraintAngle_v20191210_2.py
- TestConstraintAngleBehaviorDirect.py
- TestConstraintAngleBehaviorSupplementary_1.py
- TestConstraintAngleBehaviorSupplementary_2.py
- TestConstraintAngleBehaviorBackward_1.py
- TestConstraintAngleBehaviorBackward_2.py
- TestConstraintAngleEllipse.py
- TestConstraintCoincidence.py
- TestConstraintCoincidenceBSpline.py
- TestConstraintCoincidenceEllipse.py
- TestConstraintCoincidenceEllipticArc.py
- TestConstraintCollinear.py
- TestConstraintCollinearEllipse.py
- TestConstraintDistance.py
- TestConstraintDistanceEllipse.py
- TestConstraintDistanceBehavior.py
- TestConstraintDistanceHorizontal.py
- TestConstraintDistanceVertical.py
- TestConstraintDistanceZero.py
- TestConstraintDistanceHorizontalZero.py
- TestConstraintDistanceVerticalZero.py
- TestConstraintEqual.py
- TestConstraintEqualEllipse.py
- TestConstraintFixed.py
- TestConstraintHorizontal.py
- TestConstraintHorizontalValidator.py
- TestConstraintLength.py
- TestConstraintMiddlePoint.py
- TestConstraintMiddlePointOnArc.py
- TestConstraintMiddlePointOnEllipticArc.py
- TestConstraintParallel.py
- TestConstraintPerpendicular.py
- TestConstraintPerpendicularArcLine.py
- TestConstraintPerpendicularEllipseLine.py
- TestConstraintRadius.py
- TestConstraintRadiusFailure.py
- TestConstraintTangent.py
- TestConstraintTangentBSpline.py
- TestConstraintTangentEllipse.py
- TestConstraintTangentEllipticArc.py
- TestConstraintVertical.py
- TestCreateArcByCenterStartEnd.py
- TestCreateArcByTangentEdge.py
- TestCreateArcByThreePoints.py
- TestCreateArcByTransversalLine.py
- TestCreateArcChangeType.py
- TestCreateBSpline.py
- TestCreateBSplinePeriodic.py
- TestCreateCircleByCenterAndPassed.py
- TestCreateCircleByThreePoints.py
- TestCreateCircleChangeType.py
- TestCreateEllipseByCenterSemiaxisAndPassed.py
- TestCreateEllipseByMajorAxisAndPassed.py
- TestCreateEllipseByExternal.py
- TestCreateEllipticArc.py
- TestCreateEllipticArcByExternal.py
- TestCreateMacroBSpline.py
- TestCurveFitting1.py
- TestCurveFitting2.py
- TestCurveFitting3.py
- TestCurveFitting4.py
- TestDegeneratedGeometry.py
- TestDistanceDump.py
- TestDistanceSignedVsUnsigned01.py
- TestDistanceSignedVsUnsigned02.py
- TestDistanceSignedVsUnsigned03.py
- TestDistanceSignedVsUnsigned04.py
- TestDistanceSignedVsUnsigned05.py
- TestEdgesOrder.py
- TestFillet.py
- TestFilletAfterFolder.py
- TestFilletInteracting.py
- TestHighload.py
- TestIntersectionChangeEdge.py
- TestIntersectionWithCircle.py
- TestIntersectionWithLine.py
- TestIntersectionWithSpline.py
- TestMirror.py
- TestMultiRotation.py
- TestMultiRotation01.py
- TestMultiRotation02.py
- TestMultiRotation03.py
- TestMultiRotation04.py
- TestMultiRotation05.py
- TestMultiRotationWithParameter.py
- TestMultiTranslation.py
- TestOffset1.py
- TestOffset2.py
- TestPresentation.py
- TestProjection.py
- TestProjectionBSpline.py
- TestProjectionBSplinePeriodic.py
- TestProjectionBSplinePeriodicError.py
- TestProjectionEllipse.py
- TestProjectionEllipticArc.py
- TestProjectionIntoResult.py
- TestProjectionUpdate.py
- TestProjectionWithoutReference.py
- TestRectangle.py
- TestRemainingDoF.py
- TestRemoveBSpline.py
- TestRemoveBSplinePeriodic.py
- TestRemoveEllipse.py
- TestRemoveEllipticArc.py
- TestRemoveSketch.py
- TestSignedDistancePointLine.py
- TestSignedDistancePointPoint.py
- TestSketchCopy01.py
- TestSketchCopy02.py
- TestSketchCopy03.py
- TestSketchCopy04.py
- TestSketchCopy05.py
- TestSketchCopy06.py
- TestSketchCopy07.py
- TestSketchCopy08.py
- TestSketchCopy09.py
- TestSketchCopy10.py
- TestSketchCopy11.py
- TestSketchCopy12.py
- TestSketchCopy13.py
- TestSketchCopy14.py
- TestSketchDrawer.py
- TestSketchPointLine.py
- TestSnowflake.py
- TestSplit.py
- TestSplitEllipse.py
- TestSplitLine.py
- TestSplitPreview.py
- TestTrimArc01.py
- TestTrimArc02.py
- TestTrimArc03.py
- TestTrimArc04.py
- TestTrimArc05.py
- TestTrimArc06.py
- TestTrimArc07.py
- TestTrimArc08.py
- TestTrimCircle01.py
- TestTrimCircle02.py
- TestTrimCircle03.py
- TestTrimCircle04.py
- TestTrimCircle05.py
- TestTrimCircleAndArc01.py
- TestTrimEllipse.py
- TestTrimLine01.py
- TestTrimLine02.py
- TestTrimLine03.py
- TestTrimPreview.py
- TestUpdateSketch.py
-)
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+include(tests.set)
if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
- ADD_UNIT_TESTS(
- TestMoveArc.py
- TestMoveBSpline.py
- TestMoveBSplinePeriodic.py
- TestMoveCircle.py
- TestMoveEllipse.py
- TestMoveEllipticArc.py
- TestMoveLine.py
- TestMovementComplex.py
- TestMovePoint.py
- )
+ include(tests_change_radius.set)
+ ADD_UNIT_TESTS(${TEST_NAMES_CHANGE_RADIUS})
endif()
ADD_RESTRICTED_TESTS(
Test20204.py
)
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/SketchPlugin")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
+ set(TEST_NAMES ${TEST_NAMES} ${TEST_NAMES_CHANGE_RADIUS})
+ install(FILES tests_change_radius.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+ endif()
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+ set(TMP_TESTS_NAMES)
+ foreach(tfile ${TEST_NAMES})
+ list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
+ endforeach(tfile ${TEST_NAMES})
+
+ install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+include(tests_change_radius.set)
+
+set(TEST_NAMES ${TEST_NAMES} ${TEST_NAMES_CHANGE_RADIUS})
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${tfile})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+
+### Create Part
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+### Create Sketch
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("YOZ"))
+
+### Create SketchLine
+SketchLine_1 = Sketch_1.addLine(-62.43672548686145, -3.439140342201228, 39.05146750980462, 70.99404207935532)
+SketchLine_1.setAuxiliary(True)
+
+### Create SketchEllipse
+SketchEllipse_1 = Sketch_1.addEllipse(-11.02958888389993, 34.2637358599971, -5.505025597864623, 77.21113625278682, 25)
+[SketchPoint_1, SketchPoint_2, SketchPoint_3, SketchPoint_4, SketchPoint_5, SketchPoint_6, SketchPoint_7, SketchLine_2, SketchLine_3] = SketchEllipse_1.construction(center = "aux", firstFocus = "aux", secondFocus = "aux", majorAxisStart = "aux", majorAxisEnd = "aux", minorAxisStart = "aux", minorAxisEnd = "aux", majorAxis = "aux", minorAxis = "aux")
+Sketch_1.setCoincident(SketchLine_1.result(), SketchEllipse_1.center())
+Sketch_1.setLength(SketchLine_3.result(), 50)
+Sketch_1.setLength(SketchLine_2.result(), 100)
+
+### Create SketchConstraintAngle
+Sketch_1.setAngle(SketchLine_1.result(), SketchLine_2.result(), 0, type = "Direct")
+model.do()
+
+model.end()
+
+assert(Sketch_1.feature().error() == "")
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+
+### Create Part
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+l = model.addParameter(Part_1_doc, "l", "50")
+h = model.addParameter(Part_1_doc, "h", "20")
+
+### Create Sketch
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+
+### Create SketchProjection
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+
+### Create SketchLine
+SketchLine_1 = Sketch_1.addLine(-25, -10, 25, -10)
+
+### Create SketchLine
+SketchLine_2 = Sketch_1.addLine(-25, -10, 25, 10)
+SketchLine_2.setAuxiliary(True)
+
+### Create SketchLine
+SketchLine_3 = Sketch_1.addLine(25, -10, -25, 10)
+SketchLine_3.setAuxiliary(True)
+
+### Create SketchLine
+SketchLine_4 = Sketch_1.addLine(25, -10, 25, 10)
+
+### Create SketchLine
+SketchLine_5 = Sketch_1.addLine(25, 10, -25, 10)
+
+### Create SketchLine
+SketchLine_6 = Sketch_1.addLine(-25, 10, -25, -10)
+
+### Create SketchPoint
+SketchPoint_2 = Sketch_1.addPoint(0, 0)
+SketchPoint_2.setAuxiliary(True)
+Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_2.result())
+Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_3.result())
+Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_1.startPoint())
+Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchLine_1.startPoint())
+Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_4.startPoint())
+Sketch_1.setCoincident(SketchLine_3.startPoint(), SketchLine_4.startPoint())
+Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
+Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_5.startPoint())
+Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
+Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_6.startPoint())
+Sketch_1.setCoincident(SketchPoint_1.result(), SketchPoint_2.result())
+Sketch_1.setHorizontal(SketchLine_1.result())
+Sketch_1.setVertical(SketchLine_4.result())
+Sketch_1.setHorizontal(SketchLine_5.result())
+Sketch_1.setVertical(SketchLine_6.result())
+Sketch_1.setLength(SketchLine_5.result(), "l")
+Sketch_1.setLength(SketchLine_6.result(), "h")
+model.do()
+
+### Create Extrusion
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_4f-SketchLine_5f-SketchLine_6f")], model.selection(), 40, 0, "Faces|Wires")
+
+model.end()
+
+#=============================================================================================
+# Tests :
+#=============================================================================================
+from GeomDataAPI import *
+from ModelAPI import *
+from GeomAPI import *
+from SketchAPI import SketchAPI_Sketch, SketchAPI_SketchEntity
+
+def isSymetricX(line):
+ aStart = geomDataAPI_Point2D(line.attribute("StartPoint"))
+ aEnd = geomDataAPI_Point2D(line.attribute("EndPoint"))
+ return aStart.x() == -aEnd.x()
+
+def isSymetricY(line):
+ aStart = geomDataAPI_Point2D(line.attribute("StartPoint"))
+ aEnd = geomDataAPI_Point2D(line.attribute("EndPoint"))
+ return aStart.y() == -aEnd.y()
+
+def isSymetricXY(line):
+ aStart = geomDataAPI_Point2D(line.attribute("StartPoint"))
+ aEnd = geomDataAPI_Point2D(line.attribute("EndPoint"))
+ return (aStart.x() == -aEnd.x()) and (aStart.y() == -aEnd.y())
+
+#=========================================================================
+def checkLinesSymetry(aSketchFeature):
+#=========================================================================
+# Checks the lines of rectangle are symetric around the origin
+ aNbSubs = aSketchFeature.numberOfSubs()
+ aNbLines = 0
+ nbAux = 0
+ for i in range (0, aNbSubs):
+ aFeature = objectToFeature(aSketchFeature.subFeature(i))
+ if aFeature.getKind() == "SketchLine":
+ aLastLine = aFeature
+ entity = SketchAPI_SketchEntity(aLastLine)
+ if entity.auxiliary().value(): # auxiliary line
+ assert isSymetricXY(aLastLine)
+ nbAux +=1
+ else:
+ assert (isSymetricX(aLastLine) or isSymetricY(aLastLine))
+ aNbLines = aNbLines + 1
+ assert (nbAux == 2)
+ assert (aNbLines == 4)
+ assert (model.dof(aSketchFeature) == 0)
+
+Part_doc = model.activeDocument()
+for feat in Part_doc.allFeatures():
+ if feat.getKind() == "Sketch":
+ sketch = feat
+
+aSketchFeature = featureToCompositeFeature(sketch)
+#=========================================================================
+# Check the lines of rectangle are symetric around the origin
+#=========================================================================
+checkLinesSymetry(aSketchFeature)
+#=========================================================================
+# Change the dimensions of the rectangle
+#=========================================================================
+aSession = ModelAPI_Session.get()
+aSession.startOperation()
+l.setValue(80.)
+h.setValue(55.)
+aSession.finishOperation()
+#=========================================================================
+# Check the lines of rectangle are symetric around the origin
+#=========================================================================
+checkLinesSymetry(aSketchFeature)
+
+assert(model.checkPythonDump())
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
Part_1_doc = Part_1.document()
Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
Rectangle_1 = Sketch_1.addRectangle(5.5, 8.5, 31.3, 78.9)
-# rectangle from center and end points
+# rectangle from center and end points
center = geom.Pnt2d(10, 5)
corner = geom.Pnt2d(25, 75)
rectangle_2 = sketch.addRectangleCentered(center, corner)
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ Test1061.py
+ Test1577.py
+ Test1578.py
+ Test1673.py
+ Test1779.py
+ Test1924.py
+ Test1963.py
+ Test1966.py
+ Test1967.py
+ Test2034_1.py
+ Test2034_2.py
+ Test2034_3.py
+ Test2062.py
+ Test2095.py
+ Test2115.py
+ Test2119.py
+ Test2134.py
+ Test2157.py
+ Test2157_2.py
+ Test2224.py
+ Test2229.py
+ Test2239.py
+ Test2273.py
+ Test2280.py
+ Test2287.py
+ Test2341.py
+ Test2376.py
+ Test2390.py
+ Test2393.py
+ Test2425.py
+ Test2427.py
+ Test2440.py
+ Test2481.py
+ Test2654.py
+ Test2711.py
+ Test2741.py
+ Test2810.py
+ Test2824.py
+ Test2860.py
+ Test2894.py
+ Test3019.py
+ Test3087_1.py
+ Test3087_2.py
+ Test3132.py
+ Test3154.py
+ Test3170.py
+ Test3240.py
+ Test19089.py
+ Test19101.py
+ Test20274_1.py
+ Test20274_2.py
+ Test20274_3.py
+ Test24015.py
+
+ TestArcBehavior.py
+ TestBSplineAddPole.py
+ TestCenteredRectangle.py
+ TestChangeSketchPlane1.py
+ TestChangeSketchPlane2.py
+ TestChangeSketchPlane3.py
+ TestChangeSketchPlane4.py
+ TestConstraintAngle.py
+ TestConstraintAngle_v0_1.py
+ TestConstraintAngle_v0_2.py
+ TestConstraintAngle_v20191210_1.py
+ TestConstraintAngle_v20191210_2.py
+ TestConstraintAngleBehaviorDirect.py
+ TestConstraintAngleBehaviorSupplementary_1.py
+ TestConstraintAngleBehaviorSupplementary_2.py
+ TestConstraintAngleBehaviorBackward_1.py
+ TestConstraintAngleBehaviorBackward_2.py
+ TestConstraintAngleEllipse.py
+ TestConstraintCoincidence.py
+ TestConstraintCoincidenceBSpline.py
+ TestConstraintCoincidenceEllipse.py
+ TestConstraintCoincidenceEllipticArc.py
+ TestConstraintCollinear.py
+ TestConstraintCollinearEllipse.py
+ TestConstraintDistance.py
+ TestConstraintDistanceEllipse.py
+ TestConstraintDistanceBehavior.py
+ TestConstraintDistanceHorizontal.py
+ TestConstraintDistanceVertical.py
+ TestConstraintDistanceZero.py
+ TestConstraintDistanceHorizontalZero.py
+ TestConstraintDistanceVerticalZero.py
+ TestConstraintEqual.py
+ TestConstraintEqualEllipse.py
+ TestConstraintFixed.py
+ TestConstraintHorizontal.py
+ TestConstraintHorizontalValidator.py
+ TestConstraintLength.py
+ TestConstraintMiddlePoint.py
+ TestConstraintMiddlePointOnArc.py
+ TestConstraintMiddlePointOnEllipticArc.py
+ TestConstraintParallel.py
+ TestConstraintPerpendicular.py
+ TestConstraintPerpendicularArcLine.py
+ TestConstraintPerpendicularEllipseLine.py
+ TestConstraintRadius.py
+ TestConstraintRadiusFailure.py
+ TestConstraintTangent.py
+ TestConstraintTangentBSpline.py
+ TestConstraintTangentEllipse.py
+ TestConstraintTangentEllipticArc.py
+ TestConstraintVertical.py
+ TestCreateArcByCenterStartEnd.py
+ TestCreateArcByTangentEdge.py
+ TestCreateArcByThreePoints.py
+ TestCreateArcByTransversalLine.py
+ TestCreateArcChangeType.py
+ TestCreateBSpline.py
+ TestCreateBSplinePeriodic.py
+ TestCreateCircleByCenterAndPassed.py
+ TestCreateCircleByThreePoints.py
+ TestCreateCircleChangeType.py
+ TestCreateEllipseByCenterSemiaxisAndPassed.py
+ TestCreateEllipseByMajorAxisAndPassed.py
+ TestCreateEllipseByExternal.py
+ TestCreateEllipticArc.py
+ TestCreateEllipticArcByExternal.py
+ TestCreateMacroBSpline.py
+ TestCurveFitting1.py
+ TestCurveFitting2.py
+ TestCurveFitting3.py
+ TestCurveFitting4.py
+ TestDegeneratedGeometry.py
+ TestDistanceDump.py
+ TestDistanceSignedVsUnsigned01.py
+ TestDistanceSignedVsUnsigned02.py
+ TestDistanceSignedVsUnsigned03.py
+ TestDistanceSignedVsUnsigned04.py
+ TestDistanceSignedVsUnsigned05.py
+ TestEdgesOrder.py
+ TestFillet.py
+ TestFilletAfterFolder.py
+ TestFilletInteracting.py
+ TestHighload.py
+ TestIntersectionChangeEdge.py
+ TestIntersectionWithCircle.py
+ TestIntersectionWithLine.py
+ TestIntersectionWithSpline.py
+ TestMirror.py
+ TestMultiRotation.py
+ TestMultiRotation01.py
+ TestMultiRotation02.py
+ TestMultiRotation03.py
+ TestMultiRotation04.py
+ TestMultiRotation05.py
+ TestMultiRotationWithParameter.py
+ TestMultiTranslation.py
+ TestOffset1.py
+ TestOffset2.py
+ TestPresentation.py
+ TestProjection.py
+ TestProjectionBSpline.py
+ TestProjectionBSplinePeriodic.py
+ TestProjectionBSplinePeriodicError.py
+ TestProjectionEllipse.py
+ TestProjectionEllipticArc.py
+ TestProjectionIntoResult.py
+ TestProjectionUpdate.py
+ TestProjectionWithoutReference.py
+ TestRectangle.py
+ TestRemainingDoF.py
+ TestRemoveBSpline.py
+ TestRemoveBSplinePeriodic.py
+ TestRemoveEllipse.py
+ TestRemoveEllipticArc.py
+ TestRemoveSketch.py
+ TestSignedDistancePointLine.py
+ TestSignedDistancePointPoint.py
+ TestSketchCopy01.py
+ TestSketchCopy02.py
+ TestSketchCopy03.py
+ TestSketchCopy04.py
+ TestSketchCopy05.py
+ TestSketchCopy06.py
+ TestSketchCopy07.py
+ TestSketchCopy08.py
+ TestSketchCopy09.py
+ TestSketchCopy10.py
+ TestSketchCopy11.py
+ TestSketchCopy12.py
+ TestSketchCopy13.py
+ TestSketchCopy14.py
+ TestSketchDrawer.py
+ TestSketchPointLine.py
+ TestSnowflake.py
+ TestSplit.py
+ TestSplitEllipse.py
+ TestSplitLine.py
+ TestSplitPreview.py
+ TestTrimArc01.py
+ TestTrimArc02.py
+ TestTrimArc03.py
+ TestTrimArc04.py
+ TestTrimArc05.py
+ TestTrimArc06.py
+ TestTrimArc07.py
+ TestTrimArc08.py
+ TestTrimCircle01.py
+ TestTrimCircle02.py
+ TestTrimCircle03.py
+ TestTrimCircle04.py
+ TestTrimCircle05.py
+ TestTrimCircleAndArc01.py
+ TestTrimEllipse.py
+ TestTrimLine01.py
+ TestTrimLine02.py
+ TestTrimLine03.py
+ TestTrimPreview.py
+ TestUpdateSketch.py
+)
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES_CHANGE_RADIUS
+ TestMoveArc.py
+ TestMoveBSpline.py
+ TestMoveBSplinePeriodic.py
+ TestMoveCircle.py
+ TestMoveEllipse.py
+ TestMoveEllipticArc.py
+ TestMoveLine.py
+ TestMovementComplex.py
+ TestMovePoint.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2012-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2012-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-# Copyright (C) 2012-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2012-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2021 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
#!/bin/bash
-# Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2013-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
if (theOperation && theOperation->isModified()) {
ModuleBase_OperationFeature* aOp = dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
std::string aContext;
- if (aOp)
+ if (aOp && aOp->feature())
aContext = aOp->feature()->getKind();
QString aTitle = Config_Translator::translate(aContext,
theOperation->getDescription()->description().toStdString()).c_str();
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
INCLUDE(UnitTest)
-ADD_UNIT_TESTS_API(
- Primitives/TestBox.py
- Primitives/TestCone.py
- Primitives/TestCylinder.py
- Primitives/TestSphere.py
- Primitives/TestTorus.py
- Primitives/TestAPI_Box.py
- Primitives/TestAPI_Cone.py
- Primitives/TestAPI_Cylinder.py
- Primitives/TestAPI_Sphere.py
- Primitives/TestAPI_Torus.py
- #GDML/TestConeSegment.py
- #GDML/TestAPI_ConeSegment.py
- Transformations/TestAPI_MultiRotation.py
- Transformations/TestAPI_MultiTranslation.py
- Transformations/TestAPI_Rotation.py
- Transformations/TestAPI_Scale.py
- Transformations/TestAPI_Symmetry.py
- Transformations/TestAPI_Translation.py
- Transformations/TestMultiRotation.py
- Transformations/TestMultiTranslation.py
- Transformations/TestRotation.py
- Transformations/TestScale.py
- Transformations/TestSymmetry.py
- Transformations/TestTranslation_1.py
- Transformations/TestTranslation_2.py
- Transformations/TestTranslation_3.py
- Transformations/TestTranslation_4.py
- Transformations/TestTranslation_5.py
- Transformations/TestTranslation.py
-)
+include(tests.set)
+
+ADD_UNIT_TESTS(${TEST_NAMES})
+
+if(${HAVE_SALOME})
+ enable_testing()
+ set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/test_API")
+
+ install(FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
+ install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+ message(${TEST_NAMES})
+ install(FILES ${TEST_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
+endif(${HAVE_SALOME})
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+include(tests.set)
+
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ get_filename_component(tfile_without_dir ${tfile} NAME)
+ add_test(${TEST_NAME} python ${tfile_without_dir})
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+endforeach()
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+SET(TEST_NAMES
+ Primitives/TestBox.py
+ Primitives/TestCone.py
+ Primitives/TestCylinder.py
+ Primitives/TestSphere.py
+ Primitives/TestTorus.py
+ Primitives/TestAPI_Box.py
+ Primitives/TestAPI_Cone.py
+ Primitives/TestAPI_Cylinder.py
+ Primitives/TestAPI_Sphere.py
+ Primitives/TestAPI_Torus.py
+ #GDML/TestConeSegment.py
+ #GDML/TestAPI_ConeSegment.py
+ Transformations/TestAPI_MultiRotation.py
+ Transformations/TestAPI_MultiTranslation.py
+ Transformations/TestAPI_Rotation.py
+ Transformations/TestAPI_Scale.py
+ Transformations/TestAPI_Symmetry.py
+ Transformations/TestAPI_Translation.py
+ Transformations/TestMultiRotation.py
+ Transformations/TestMultiTranslation.py
+ Transformations/TestRotation.py
+ Transformations/TestScale.py
+ Transformations/TestSymmetry.py
+ Transformations/TestTranslation_1.py
+ Transformations/TestTranslation_2.py
+ Transformations/TestTranslation_3.py
+ Transformations/TestTranslation_4.py
+ Transformations/TestTranslation_5.py
+ Transformations/TestTranslation.py
+)
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
--- /dev/null
+# Copyright (C) 2021 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, 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
+# 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
+#
+
+if __name__ == "__main__":
+ aPartFeature = locals()["Part_1"]
+ model.testNbResults(aPartFeature, 1)
+ model.testNbSubResults(aPartFeature, [0])
+ model.testNbSubShapes(aPartFeature, GeomAPI_Shape.SOLID, [1])
+ model.testNbSubShapes(aPartFeature, GeomAPI_Shape.FACE, [115])
+ model.testNbSubShapes(aPartFeature, GeomAPI_Shape.EDGE, [890])
+ model.testNbSubShapes(aPartFeature, GeomAPI_Shape.VERTEX, [1780])
+ model.testResultsVolumes(aPartFeature, [1311.87963636394])
+ model.testResultsAreas(aPartFeature, [3765.24411189])
+
+ assert(model.checkPythonDump())
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
endif()
endforeach()
-SET(COMPONENT_NAME SHAPER)
SET(TIMEOUT 600)
SET(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/HDFs")
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2019-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2019-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2016-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2016-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
#!/usr/bin/env python3
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 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
-# Copyright (C) 2018-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2018-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2015-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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
-# Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2021 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