Advertisement
Pol_M

opencascade

Apr 8th, 2018
761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 44.23 KB | None | 0 0
  1. HEAD ara és a 77133d2 Update to version 7.2
  2. Ja està al dia.
  3.  
  4. :: Package: opencascade
  5. :: AUR URL: https://aur.archlinux.org/packages.php?ID=501348
  6.  
  7. :: Content of /tmp/trizen-pol/opencascade/PKGBUILD
  8.  
  9. # Maintainer:  Gabriel Souza Franco <Z2FicmllbGZyYW5jb3NvdXphQGdtYWlsLmNvbQ==>
  10. # Contributor: Florian Pritz <bluewind@xinu.at>
  11. # Contributor: Giuseppe Borzi <gborzi@ieee.org>
  12. # Contributor: Brice Méalier <mealier_brice@yahoo.fr>
  13. # Contributor: Michele Mocciola <mickele>
  14.  
  15. pkgname=opencascade
  16. pkgver=7.2.0p1
  17. _pkgver=V${pkgver//./_}
  18. pkgrel=1
  19. pkgdesc="Open CASCADE Technology, 3D modeling & numerical simulation"
  20. arch=('x86_64')
  21. url="http://www.opencascade.org"
  22. license=('custom')
  23. depends=('tk' 'vtk' 'gl2ps' 'ffmpeg' 'freeimage' 'intel-tbb')
  24. makedepends=('cmake' 'qt5-base') # VTK requires Qt5 to build
  25. source=("opencascade-${pkgver}.tar.gz::http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_pkgver};sf=tgz"
  26.         'opencascade.sh' 'fix-install-dir-references.patch'
  27.         'configuration-problem-glibc-2.26.patch' 'vtk7.patch')
  28. sha256sums=('530f9981e6026e6cc04c462ab039b4977a568f943d6086dc502262d100a07a79'
  29.             '2064536a85d46fee368a8f1a712b2c6c77ca79c5bffcc68cba79d70d36efa2f4'
  30.             'afb584aa453993ae8d9e2b983594558531ede735a5892754b812be30650c9fb5'
  31.             '2850a1551085c43f88f134466e3acad950e05e8d46ad04057ea671db0c8a8138'
  32.             'bd230962173a80a971c8da9d3dc07238f249544bb67ee834be7d6466391d0315')
  33.  
  34. prepare() {
  35.   cd "occt-${_pkgver}"
  36.   patch -Np1 -i "$srcdir/fix-install-dir-references.patch"
  37.   patch -Np1 -i "$srcdir/configuration-problem-glibc-2.26.patch"
  38.   patch -Np1 -i "$srcdir/vtk7.patch"
  39. }
  40.  
  41. build() {
  42.   cd "occt-${_pkgver}"
  43.   mkdir -p build && cd build
  44.  
  45.   cmake .. \
  46.     -DCMAKE_BUILD_TYPE=Release \
  47.     -DCMAKE_INSTALL_PREFIX=/usr \
  48.     -DUSE_GL2PS=ON \
  49.     -DUSE_FREEIMAGE=ON \
  50.     -DUSE_FFMPEG=ON \
  51.     -DUSE_VTK=ON \
  52.     -DUSE_TBB=ON
  53.  
  54.   make
  55. }
  56.  
  57. package() {
  58.   cd "occt-${_pkgver}/build"
  59.  
  60.   make DESTDIR="$pkgdir" install
  61.  
  62.   cd ..
  63.  
  64.   install -D -m 755 "$srcdir/opencascade.sh" "$pkgdir/etc/profile.d/opencascade.sh"
  65.   install -dm755 "$pkgdir/usr/share/licenses/$pkgname/"
  66.   mv "$pkgdir/usr/share/doc/opencascade/"* "$pkgdir/usr/share/licenses/$pkgname"
  67.   rm -r "$pkgdir/usr/share/doc"
  68.  
  69.   rm "$pkgdir/usr/bin/"*.sh
  70. }
  71.  
  72. # vim:set ts=2 sw=2 et:
  73.  
  74. =>> Edit PKGBUILD? [y/N]:
  75.  
  76. :: Content of /tmp/trizen-pol/opencascade/configuration-problem-glibc-2.26.patch
  77.  
  78. From 59e353b75d51e88ac30ed37307a59b95a50146f8 Mon Sep 17 00:00:00 2001
  79. From: kgv <kgv@opencascade.com>
  80. Date: Sat, 21 Oct 2017 20:46:59 +0300
  81. Subject: [PATCH 1/1] 0029251: Configuration - problem compiling OCCT 7.2 with glibc 2.26
  82.  
  83. Standard_CLocaleSentry does not include xlocale.h when using glibc anymore.
  84. HAVE_XLOCALE_H has been renamed to OCCT_CLOCALE_POSIX2008 to avoid confusion.
  85.  
  86. Renamed macros OCC_CHECK_BASE_CLASS -> OCCT_CHECK_BASE_CLASS.
  87. ---
  88.  src/Standard/Standard_CLocaleSentry.cxx |   10 +++++-----
  89.  src/Standard/Standard_CLocaleSentry.hxx |   27 ++++++++++++++-------------
  90.  src/Standard/Standard_CString.cxx       |    2 +-
  91.  src/Standard/Standard_Type.hxx          |   16 ++++++++--------
  92.  4 files changed, 28 insertions(+), 27 deletions(-)
  93.  
  94. diff --git a/src/Standard/Standard_CLocaleSentry.cxx b/src/Standard/Standard_CLocaleSentry.cxx
  95. index ce3212f..8b30c2c 100644
  96. --- a/src/Standard/Standard_CLocaleSentry.cxx
  97. +++ b/src/Standard/Standard_CLocaleSentry.cxx
  98. @@ -30,7 +30,7 @@ namespace
  99.    public:
  100.  
  101.      CLocalePtr()
  102. -    #ifdef HAVE_XLOCALE_H
  103. +    #ifdef OCCT_CLOCALE_POSIX2008
  104.      : myLocale (newlocale (LC_ALL_MASK, "C", NULL))
  105.      #elif defined(_MSC_VER)
  106.      : myLocale (_create_locale (LC_ALL, "C"))
  107. @@ -41,7 +41,7 @@ namespace
  108.  
  109.      ~CLocalePtr()
  110.      {
  111. -    #ifdef HAVE_XLOCALE_H
  112. +    #ifdef OCCT_CLOCALE_POSIX2008
  113.        freelocale (myLocale);
  114.      #elif defined(_MSC_VER)
  115.        _free_locale (myLocale);
  116. @@ -72,7 +72,7 @@ Standard_CLocaleSentry::clocale_t Standard_CLocaleSentry::GetCLocale()
  117.  // purpose  :
  118.  // =======================================================================
  119.  Standard_CLocaleSentry::Standard_CLocaleSentry()
  120. -#ifdef HAVE_XLOCALE_H
  121. +#ifdef OCCT_CLOCALE_POSIX2008
  122.  : myPrevLocale (uselocale (theCLocale.myLocale)) // switch to C locale within this thread only using xlocale API
  123.  #else
  124.  : myPrevLocale (setlocale (LC_ALL, 0))
  125. @@ -81,7 +81,7 @@ Standard_CLocaleSentry::Standard_CLocaleSentry()
  126.  #endif
  127.  #endif
  128.  {
  129. -#if !defined(HAVE_XLOCALE_H)
  130. +#if !defined(OCCT_CLOCALE_POSIX2008)
  131.    const char* aPrevLocale = (const char* )myPrevLocale;
  132.    if (myPrevLocale == NULL
  133.     || (aPrevLocale[0] == 'C' && aPrevLocale[1] == '\0'))
  134. @@ -104,7 +104,7 @@ Standard_CLocaleSentry::Standard_CLocaleSentry()
  135.  // =======================================================================
  136.  Standard_CLocaleSentry::~Standard_CLocaleSentry()
  137.  {
  138. -#if defined(HAVE_XLOCALE_H)
  139. +#if defined(OCCT_CLOCALE_POSIX2008)
  140.    uselocale ((locale_t )myPrevLocale);
  141.  #else
  142.    if (myPrevLocale != NULL)
  143. diff --git a/src/Standard/Standard_CLocaleSentry.hxx b/src/Standard/Standard_CLocaleSentry.hxx
  144. index a94ade7..3b3beba 100755
  145. --- a/src/Standard/Standard_CLocaleSentry.hxx
  146. +++ b/src/Standard/Standard_CLocaleSentry.hxx
  147. @@ -20,24 +20,25 @@
  148.  
  149.  #include <locale.h>
  150.  
  151. -#ifndef HAVE_XLOCALE_H
  152. -  //! "xlocale.h" available in Mac OS X and glibc (Linux) for a long time as an extension
  153. -  //! and become part of POSIX since '2008.
  154. -  //! Notice that this is impossible to test (_POSIX_C_SOURCE >= 200809L)
  155. -  //! since POSIX didn't declared such identifier.
  156. +#if defined(__APPLE__)
  157. +  #include <xlocale.h>
  158. +#endif
  159. +
  160. +#ifndef OCCT_CLOCALE_POSIX2008
  161. +  //! @def OCCT_CLOCALE_POSIX2008
  162. +  //!
  163. +  //! POSIX.1-2008 extends C locale API by providing methods like newlocale/freelocale/uselocale.
  164. +  //! Presence of this extension cannot be checked in straightforward way (like (_POSIX_C_SOURCE >= 200809L))
  165. +  //! due to missing such declarations in standard.
  166. +  //! On macOS new functions are declared within "xlocale.h" header (the same is for glibc, but this header has been removed since glibc 2.26).
  167.    #if defined(__APPLE__)
  168. -    #define HAVE_XLOCALE_H
  169. +    #define OCCT_CLOCALE_POSIX2008
  170.    #endif
  171.  
  172.    //! We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler.
  173.    #if defined(_GNU_SOURCE) && !defined(__ANDROID__)
  174. -    #define HAVE_XLOCALE_H
  175. +    #define OCCT_CLOCALE_POSIX2008
  176.    #endif
  177. -#endif // ifndef HAVE_LOCALE_H
  178. -
  179. -#if defined(HAVE_XLOCALE_H) && !(defined(__GLIBC__) && (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 24))
  180. -  // xlocale.h is actually a non-standard header file; glibc 2.26 has removed it altogether (all definition comes from locale.h)
  181. -  #include <xlocale.h>
  182.  #endif
  183.  
  184.  #if !defined(__ANDROID__)
  185. @@ -64,7 +65,7 @@ public:
  186.  
  187.  public:
  188.  
  189. -#ifdef HAVE_XLOCALE_H
  190. +#ifdef OCCT_CLOCALE_POSIX2008
  191.    typedef  locale_t clocale_t;
  192.  #elif defined(_MSC_VER)
  193.    typedef _locale_t clocale_t;
  194. diff --git a/src/Standard/Standard_CString.cxx b/src/Standard/Standard_CString.cxx
  195. index dc0a222..d10974f 100755
  196. --- a/src/Standard/Standard_CString.cxx
  197. +++ b/src/Standard/Standard_CString.cxx
  198. @@ -76,7 +76,7 @@ Standard_Integer HashCodes (const Standard_CString Value,
  199.    // and newlocale/uselocale/freelocale to switch locale within current thread only.
  200.    // So we switch to C locale temporarily
  201.    #define SAVE_TL() Standard_CLocaleSentry aLocaleSentry;
  202. -  #ifndef HAVE_XLOCALE_H
  203. +  #ifndef OCCT_CLOCALE_POSIX2008
  204.      // glibc version for android platform use locale-independent implementation of
  205.      // strtod, strtol, strtoll functions. For other system with locale-depended
  206.      // implementations problems may appear if "C" locale is not set explicitly.
  207. --
  208. 1.7.2.5
  209.  
  210. =>> Edit configuration-problem-glibc-2.26.patch? [y/N]:
  211.  
  212. :: Content of /tmp/trizen-pol/opencascade/fix-install-dir-references.patch
  213.  
  214. diff -aur occt-V7_1_0/CMakeLists.txt occt-V7_1_0.new/CMakeLists.txt
  215. --- occt-V7_1_0/CMakeLists.txt  2016-11-25 11:50:18.000000000 +0100
  216. +++ occt-V7_1_0.new/CMakeLists.txt  2017-03-18 08:44:10.406668714 +0100
  217. @@ -906,7 +906,7 @@
  218.  endforeach()
  219.  # install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration
  220.  install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
  221. -install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
  222. +install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"\$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
  223.  
  224.  foreach (OCCT_MODULE ${OCCT_MODULES})
  225.    if (BUILD_MODULE_${OCCT_MODULE})
  226. diff -aur occt-V7_1_0/adm/cmake/occt_macros.cmake occt-V7_1_0.new/adm/cmake/occt_macros.cmake
  227. --- occt-V7_1_0/adm/cmake/occt_macros.cmake 2016-11-25 11:50:18.000000000 +0100
  228. +++ occt-V7_1_0.new/adm/cmake/occt_macros.cmake 2017-03-18 08:44:10.406668714 +0100
  229. @@ -558,7 +558,7 @@
  230.    "cmake_policy(PUSH)
  231.   cmake_policy(SET CMP0007 NEW)
  232.   string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE)
  233. -  file (GLOB ALL_OCCT_TARGET_FILES \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\")
  234. +  file (GLOB ALL_OCCT_TARGET_FILES \"\$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\")
  235.   foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES})
  236.     file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT)
  237.     file (REMOVE \"\${TARGET_FILENAME}\")
  238.  
  239. =>> Edit fix-install-dir-references.patch? [y/N]:
  240.  
  241. :: Content of /tmp/trizen-pol/opencascade/opencascade.sh
  242.  
  243. export CASROOT=/usr
  244.  
  245. export CSF_LANGUAGE=us
  246. export MMGT_CLEAR=1
  247. export CSF_EXCEPTION_PROMPT=1
  248.  
  249. export CSF_OCCTResourcePath=$CASROOT/share/opencascade/resources
  250. export CSF_SHMessage=$CSF_OCCTResourcePath/SHMessage
  251. export CSF_MDTVTexturesDirectory=$CSF_OCCTResourcePath/Textures
  252. export CSF_ShadersDirectory=$CSF_OCCTResourcePath/Shaders
  253. export CSF_XSMessage=$CSF_OCCTResourcePath/XSMessage
  254. export CSF_TObjMessage=$CSF_OCCTResourcePath/TObj
  255. export CSF_StandardDefaults=$CSF_OCCTResourcePath/StdResource
  256. export CSF_PluginDefaults=$CSF_OCCTResourcePath/StdResource
  257. export CSF_XCAFDefaults=$CSF_OCCTResourcePath/StdResource
  258. export CSF_TObjDefaults=$CSF_OCCTResourcePath/StdResource
  259. export CSF_StandardLiteDefaults=$CSF_OCCTResourcePath/StdResource
  260. export CSF_IGESDefaults=$CSF_OCCTResourcePath/XSTEPResource
  261. export CSF_STEPDefaults=$CSF_OCCTResourcePath/XSTEPResource
  262. export CSF_XmlOcafResource=$CSF_OCCTResourcePath/XmlOcafResource
  263. export CSF_MIGRATION_TYPES=$CSF_OCCTResourcePath/StdResource/MigrationSheet.txt
  264. export CSF_DrawPluginDefaults=$CSF_OCCTResourcePath/DrawResources
  265. export DRAWHOME=$CSF_OCCTResourcePath/DrawResources
  266. export DRAWDEFAULT=$CSF_OCCTResourcePath/DrawResources/DrawDefault
  267.  
  268. =>> Edit opencascade.sh? [y/N]:
  269.  
  270. :: Content of /tmp/trizen-pol/opencascade/pkgbuild.cmake
  271.  
  272. # Maintainer: Florian Pritz <bluewind@xinu.at>
  273. # Contributor: Giuseppe Borzi <gborzi@ieee.org>
  274. # Contributor: Brice M<E9>alier <mealier_brice@yahoo.fr>
  275. # Contributor: Michele Mocciola <mickele>
  276. pkgname=opencascade
  277. pkgver=6.9.1
  278. pkgrel=1
  279. pkgdesc="Open CASCADE Technology, 3D modeling & numerical simulation"
  280. arch=('i686' 'x86_64')
  281. url="http://www.opencascade.org"
  282. license=('custom')
  283. depends=('tk' 'mesa' 'java-runtime' 'libxmu' 'ftgl' 'vtk')
  284. makedepends=('java-environment' cmake)
  285. source=("occt-$pkgver.tar.gz::http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=V${pkgver//\./_};sf=tgz" "env.sh" "opencascade.sh" "opencascade.conf")
  286. md5sums=('ea47e4716791f005e40de09f5c416a87'
  287.         'a96f28ee7f4273ae1771ee033a2a3af3'
  288.         'd9368b8d348ced3ec4462012977552d2'
  289.         '2924ecf57c95d25888f51071fdc72ad0')
  290.  
  291. build() {
  292.  cd "$srcdir/occt-V${pkgver//\./_}-"*
  293.  
  294.  sed -i 's#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_modules")##' CMakeLists.txt
  295.  sed -i 's#OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_toolkits")##' CMakeLists.txt
  296.  sed -i 's#include (adm/cmake/occt_inc_toolkits.cmake)##' CMakeLists.txt
  297.  
  298.  cmake -DINSTALL_DIR="$pkgdir" .
  299.  
  300.  # fix for automake 1.13
  301.  #sed -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac
  302.  #./build_configure
  303.  #./configure --disable-debug --enable-production \
  304.    #--with-java-include=/usr/lib/jvm/default/include \
  305.    #--with-vtk-library=/usr/lib/ --with-vtk-include=/usr/include/vtk-6.1/ \
  306.    #--prefix=/opt/$pkgname
  307.  make
  308. }
  309.  
  310. package() {
  311.  cd "$srcdir/occt-V${pkgver//\./_}-"*
  312.  
  313.  # no DESTDIR support so use prefix. This has to suffix match the prefix in ./configure
  314.  make prefix="$pkgdir/opt/$pkgname" install
  315.  cp -r src/UnitsAPI/ "${pkgdir}/opt/$pkgname/src"
  316.  install -D -m644 "${srcdir}/opencascade.conf" "${pkgdir}/etc/ld.so.conf.d/opencascade.conf"
  317.  install -D -m 755 "${srcdir}/opencascade.sh" "${pkgdir}/etc/profile.d/opencascade.sh"
  318.  install -m 755 "${srcdir}/env.sh" "${pkgdir}/opt/$pkgname"
  319.  install -dm755 "$pkgdir/usr/share/licenses/$pkgname/"
  320.  install -m644 LICENSE_LGPL_21.txt OCCT_LGPL_EXCEPTION.txt "$pkgdir/usr/share/licenses/$pkgname"
  321. }
  322.  
  323. # vim:set ts=2 sw=2 et:
  324.  
  325. =>> Edit pkgbuild.cmake? [y/N]:
  326.  
  327. :: Content of /tmp/trizen-pol/opencascade/salome-occt-6.9.1.patch
  328.  
  329. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/drv/BRepFill/BRepFill_Pipe.jxx OCCT-6.9.1p1_SRC/drv/BRepFill/BRepFill_Pipe.jxx
  330. --- OCCT-6.9.1_SRC/drv/BRepFill/BRepFill_Pipe.jxx   2015-09-25 17:35:58.000000000 +0300
  331. +++ OCCT-6.9.1p1_SRC/drv/BRepFill/BRepFill_Pipe.jxx 2016-04-26 16:10:42.000000000 +0300
  332. @@ -4,6 +4,7 @@
  333. #include <StdFail_NotDone.hxx>
  334. #include <TopoDS_Wire.hxx>
  335. #include <TopoDS_Shape.hxx>
  336. +#include <TopTools_ListOfShape.hxx>
  337. #include <TopoDS_Face.hxx>
  338. #include <TopoDS_Edge.hxx>
  339. #include <TopoDS_Vertex.hxx>
  340. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/drv/BRepOffsetAPI/BRepOffsetAPI_MakePipe.jxx OCCT-6.9.1p1_SRC/drv/BRepOffsetAPI/BRepOffsetAPI_MakePipe.jxx
  341. --- OCCT-6.9.1_SRC/drv/BRepOffsetAPI/BRepOffsetAPI_MakePipe.jxx 2015-09-25 17:36:04.000000000 +0300
  342. +++ OCCT-6.9.1p1_SRC/drv/BRepOffsetAPI/BRepOffsetAPI_MakePipe.jxx   2016-04-26 16:10:47.000000000 +0300
  343. @@ -1,4 +1,5 @@
  344. #include <TopoDS_Wire.hxx>
  345. #include <TopoDS_Shape.hxx>
  346. #include <BRepFill_Pipe.hxx>
  347. +#include <TopTools_ListOfShape.hxx>
  348. #include <BRepOffsetAPI_MakePipe.hxx>
  349. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/inc/BRepFill_Pipe.hxx OCCT-6.9.1p1_SRC/inc/BRepFill_Pipe.hxx
  350. --- OCCT-6.9.1_SRC/inc/BRepFill_Pipe.hxx    2015-09-25 17:35:58.000000000 +0300
  351. +++ OCCT-6.9.1p1_SRC/inc/BRepFill_Pipe.hxx  2016-04-26 16:10:42.000000000 +0300
  352. @@ -18,6 +18,7 @@
  353. #include <TopTools_MapOfShape.hxx>
  354. #include <BRepFill_DataMapOfShapeHArray2OfShape.hxx>
  355. #include <Standard_Integer.hxx>
  356. +#include <TopTools_DataMapOfShapeListOfShape.hxx>
  357. #include <GeomAbs_Shape.hxx>
  358. #include <GeomFill_Trihedron.hxx>
  359. #include <Standard_Boolean.hxx>
  360. @@ -28,6 +29,7 @@
  361. class StdFail_NotDone;
  362. class TopoDS_Wire;
  363. class TopoDS_Shape;
  364. +class TopTools_ListOfShape;
  365. class TopoDS_Face;
  366. class TopoDS_Edge;
  367. class TopoDS_Vertex;
  368. @@ -65,6 +67,9 @@
  369.  
  370.   Standard_EXPORT  const  TopoDS_Shape& LastShape()  const;
  371.  
  372. +  //! Returns the list of shapes generated from the shape <S>.
  373. +  Standard_EXPORT   void Generated (const TopoDS_Shape& S, TopTools_ListOfShape& L) ;
  374. +  
  375.   //! Returns the face created from an edge of the spine
  376.   //! and an edge of the profile.
  377.   //! if the edges are not in the spine or the profile
  378. @@ -131,6 +136,7 @@
  379.   Standard_Integer myCurIndexOfSectionEdge;
  380.   TopoDS_Shape myFirst;
  381.   TopoDS_Shape myLast;
  382. +  TopTools_DataMapOfShapeListOfShape myGenMap;
  383.   Standard_Integer myDegmax;
  384.   Standard_Integer mySegmax;
  385.   GeomAbs_Shape myContinuity;
  386. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/inc/BRepOffsetAPI_MakePipe.hxx OCCT-6.9.1p1_SRC/inc/BRepOffsetAPI_MakePipe.hxx
  387. --- OCCT-6.9.1_SRC/inc/BRepOffsetAPI_MakePipe.hxx   2015-09-25 17:36:04.000000000 +0300
  388. +++ OCCT-6.9.1p1_SRC/inc/BRepOffsetAPI_MakePipe.hxx 2016-04-26 16:10:47.000000000 +0300
  389. @@ -18,6 +18,7 @@
  390. class TopoDS_Wire;
  391. class TopoDS_Shape;
  392. class BRepFill_Pipe;
  393. +class TopTools_ListOfShape;
  394.  
  395.  
  396. //! Describes functions to build pipes.
  397. @@ -68,6 +69,8 @@
  398.   //! Returns the TopoDS Shape of the top of the prism.
  399.   Standard_EXPORT   TopoDS_Shape LastShape() ;
  400.  
  401. +  Standard_EXPORT virtual  const  TopTools_ListOfShape& Generated (const TopoDS_Shape& S) ;
  402. +  
  403.   Standard_EXPORT   TopoDS_Shape Generated (const TopoDS_Shape& SSpine, const TopoDS_Shape& SProfile) ;
  404.  
  405.   Standard_EXPORT   Standard_Real ErrorOnSurface()  const;
  406. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/src/BRepFill/BRepFill_Pipe.cdl OCCT-6.9.1p1_SRC/src/BRepFill/BRepFill_Pipe.cdl
  407. --- OCCT-6.9.1_SRC/src/BRepFill/BRepFill_Pipe.cdl   2015-09-16 18:27:02.000000000 +0300
  408. +++ OCCT-6.9.1p1_SRC/src/BRepFill/BRepFill_Pipe.cdl 2016-04-26 15:51:10.000000000 +0300
  409. @@ -15,11 +15,11 @@
  410. -- commercial license or contractual agreement.
  411.  
  412.  
  413. -class Pipe from BRepFill
  414. +class Pipe from BRepFill
  415.  
  416.     ---Purpose: Create a  shape by sweeping a shape  (the profile)
  417.     --          along a wire (the spine).
  418. -   --          
  419. +   --
  420.     --          For each edge  or vertex from the spine  the  user
  421.     --          may ask for the shape generated from each subshape
  422.     --          of the profile.
  423. @@ -28,38 +28,40 @@
  424.  
  425.     HArray2OfShape from TopTools,
  426.     MapOfShape     from TopTools,
  427. +       ListOfShape from TopTools,
  428.     DataMapOfShapeHArray2OfShape from BRepFill,
  429. +       DataMapOfShapeListOfShape from TopTools,
  430.     LocationLaw  from BRepFill,
  431.     Shape  from TopoDS,
  432.     Face   from TopoDS,
  433.     Wire   from TopoDS,
  434.     Edge   from TopoDS,
  435. -    Vertex from TopoDS,  
  436. +    Vertex from TopoDS,
  437.     Pnt    from  gp,
  438.     Trsf   from  gp,
  439.     Shape  from GeomAbs,
  440.     Trihedron from GeomFill
  441.  
  442. raises
  443. -    DomainError from Standard,
  444. +    DomainError from Standard,
  445.     NotDone     from StdFail
  446.  
  447. is
  448.  
  449.     Create returns Pipe from BRepFill;
  450. -    
  451. -    Create ( Spine   : Wire from TopoDS;
  452. +
  453. +    Create ( Spine   : Wire from TopoDS;
  454.              Profile : Shape from TopoDS;
  455.          aMode   : Trihedron from GeomFill = GeomFill_IsCorrectedFrenet;
  456.          ForceApproxC1 : Boolean from Standard = Standard_False;
  457. -             GeneratePartCase : Boolean from Standard = Standard_False)
  458. +             GeneratePartCase : Boolean from Standard = Standard_False)
  459.     returns Pipe from BRepFill;
  460. -    
  461. -    Perform (me : in out;  Spine   : Wire from TopoDS;
  462. +
  463. +    Perform (me : in out;  Spine   : Wire from TopoDS;
  464.                            Profile : Shape from TopoDS;
  465. -                           GeneratePartCase : Boolean from Standard = Standard_False)
  466. +                           GeneratePartCase : Boolean from Standard = Standard_False)
  467.     is static;
  468. -    
  469. +
  470.     Spine(me) returns Shape from TopoDS
  471.     ---C++ : return const &
  472.     is static;
  473. @@ -74,7 +76,7 @@
  474.  
  475.     ErrorOnSurface (me)
  476.     returns Real from Standard;
  477. -    
  478. +
  479.     FirstShape(me) returns Shape from TopoDS
  480.     ---C++ : return const &
  481.     is static;
  482. @@ -83,27 +85,30 @@
  483.     ---C++ : return const &
  484.     is static;
  485.  
  486. +    Generated(me: in out; S: Shape from TopoDS; L: in out ListOfShape from TopTools);
  487. +    ---Purpose: Returns the list of shapes generated from the shape <S>.
  488. +
  489.     Face(me : in out; ESpine, EProfile : Edge from TopoDS)
  490.     returns Face from TopoDS
  491.     ---Purpose: Returns the face created from an edge of the spine
  492.     --          and an edge of the profile.
  493.     raises
  494. -       DomainError from Standard
  495. +       DomainError from Standard
  496.     ---Purpose: if the edges are not in the spine or the profile
  497. -  
  498. +
  499.     is static;
  500. -    
  501. +
  502.     Edge(me : in out; ESpine : Edge from TopoDS; VProfile : Vertex from TopoDS)
  503.     returns Edge from TopoDS
  504.     ---Purpose: Returns the edge created from an edge of the spine
  505.     --          and a vertex of the profile.
  506.     raises
  507. -       DomainError from Standard
  508. +       DomainError from Standard
  509.     ---Purpose: if the edge or the vertex are not in  the spine or
  510.     --          the profile.
  511. -  
  512. +
  513.     is static;
  514. -    
  515. +
  516.     Section(me; VSpine : Vertex from TopoDS)
  517.     returns Shape from TopoDS
  518.     ---Purpose: Returns  the shape created from the profile at the
  519. @@ -111,50 +116,50 @@
  520.     raises
  521.         DomainError from Standard
  522.     ---Purpose: if the vertex is not in the Spine
  523. -    is static;
  524. -    
  525. -    
  526. -    PipeLine(me : in out;  Point :  Pnt  from  gp)  
  527. +    is static;
  528. +
  529. +
  530. +    PipeLine(me : in out;  Point :  Pnt  from  gp)
  531.     ---Purpose: Create a Wire by sweeping the Point along the <spine>
  532. -    returns  Wire  from  TopoDS
  533. +    returns  Wire  from  TopoDS
  534.     raises
  535.         DomainError from Standard
  536. -   ---Purpose: if the <Spine> is undefined      
  537. +   ---Purpose: if the <Spine> is undefined
  538.     is  static;
  539.  
  540.  
  541.     --
  542.     --  Private methods
  543. -    --  
  544. -    
  545. -    MakeShape(me : in out; S : Shape from TopoDS;
  546. +    --
  547. +
  548. +    MakeShape(me : in out; S : Shape from TopoDS;
  549.                            FirstShape,  LastShape  :  Shape  from  TopoDS)
  550.     returns Shape from TopoDS
  551.     ---Purpose: Auxiliary  recursive  method  used  to  build  the
  552. -   --          result.
  553. +   --          result.
  554.     is static private;
  555.  
  556.  
  557. -    FindEdge(me;  S : Shape from TopoDS;  
  558. -                 E : Edge  from  TopoDS;  
  559. -         Init  : in  out Integer)   
  560. +    FindEdge(me;  S : Shape from TopoDS;
  561. +                 E : Edge  from  TopoDS;
  562. +         Init  : in  out Integer)
  563.     ---Purpose: Auxiliary recursive method used to find the edge's index
  564.     returns  Integer
  565.     is static private;
  566.  
  567. -    FindVertex(me;  S : Shape from TopoDS;  
  568. -                   V : Vertex  from  TopoDS;  
  569. -           Init  : in  out Integer)
  570. +    FindVertex(me;  S : Shape from TopoDS;
  571. +                   V : Vertex  from  TopoDS;
  572. +           Init  : in  out Integer)
  573.     returns  Integer
  574. -    is static private;
  575. -  
  576. +    is static private;
  577. +
  578.     DefineRealSegmax(me : in out)
  579. -    is static private;
  580. -    
  581. +    is static private;
  582. +
  583.     RebuildTopOrBottomFace(me; aFace: Shape from TopoDS;
  584.                                IsTop: Boolean from Standard)
  585. -    is static private;
  586. -    
  587. +    is static private;
  588. +
  589.     ShareFaces(me: in out; theShape: Shape from TopoDS;
  590.                            theInitialFacesLen: Integer;
  591.                            theInitialEdgesLen: Integer;
  592. @@ -164,30 +169,31 @@
  593.     --          Returns the shared shape. If theShape is not modified this
  594.     --          method returns it.
  595.     returns Shape from TopoDS
  596. -    is static private;
  597. -    
  598. +    is static private;
  599. +
  600. fields
  601.     mySpine   : Wire  from TopoDS;
  602.     myProfile : Shape from TopoDS;
  603. -    myShape   : Shape from TopoDS;
  604. -    myTrsf    : Trsf  from  gp;
  605. +    myShape   : Shape from TopoDS;
  606. +    myTrsf    : Trsf  from  gp;
  607.     myLoc     : LocationLaw  from BRepFill;
  608. -    mySections: HArray2OfShape from TopTools;
  609. -    myFaces   : HArray2OfShape from TopTools;  
  610. -    myEdges   : HArray2OfShape from TopTools;  
  611. -    myReversedEdges : MapOfShape from TopTools;  
  612. +    mySections: HArray2OfShape from TopTools;
  613. +    myFaces   : HArray2OfShape from TopTools;
  614. +    myEdges   : HArray2OfShape from TopTools;
  615. +    myReversedEdges : MapOfShape from TopTools;
  616.     myTapes   : DataMapOfShapeHArray2OfShape from BRepFill;
  617.     myRails   : DataMapOfShapeHArray2OfShape from BRepFill;
  618.     myCurIndexOfSectionEdge : Integer from Standard;
  619. -    myFirst   :  Shape  from  TopoDS;
  620. -    myLast    :  Shape  from  TopoDS;
  621. -    
  622. +    myFirst   :  Shape  from  TopoDS;
  623. +    myLast    :  Shape  from  TopoDS;
  624. +       myGenMap  : DataMapOfShapeListOfShape from TopTools;
  625. +
  626.     myDegmax  : Integer from Standard;
  627.     mySegmax  : Integer from Standard;
  628.     myContinuity : Shape from GeomAbs;
  629.     myMode    : Trihedron from GeomFill;
  630.     myForceApproxC1 : Boolean from Standard;
  631. -    
  632. +
  633.     myErrorOnSurf : Real from Standard;
  634. -    
  635. +
  636. end Pipe;
  637. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/src/BRepFill/BRepFill_Pipe.cxx OCCT-6.9.1p1_SRC/src/BRepFill/BRepFill_Pipe.cxx
  638. --- OCCT-6.9.1_SRC/src/BRepFill/BRepFill_Pipe.cxx   2015-09-16 18:27:02.000000000 +0300
  639. +++ OCCT-6.9.1p1_SRC/src/BRepFill/BRepFill_Pipe.cxx 2016-04-26 15:51:10.000000000 +0300
  640. @@ -69,6 +69,38 @@
  641. static Standard_Boolean Affich = 0;
  642. #endif
  643.  
  644. +// ---------------------------------------------------------------------------------
  645. +// static function: UpdateMap
  646. +// purpose:
  647. +// ---------------------------------------------------------------------------------
  648. +static Standard_Boolean UpdateMap(const TopoDS_Shape&                 theKey,
  649. +                                  const TopoDS_Shape&                 theValue,
  650. +                                  TopTools_DataMapOfShapeListOfShape& theMap)
  651. +{
  652. +  if(!theMap.IsBound(theKey))
  653. +  {
  654. +    TopTools_ListOfShape thelist;
  655. +    theMap.Bind(theKey, thelist);
  656. +  }
  657. +  TopTools_ListOfShape& aList = theMap.ChangeFind(theKey);
  658. +  TopTools_ListIteratorOfListOfShape anIt(aList);
  659. +  Standard_Boolean found = Standard_False;
  660. +
  661. +  for(; anIt.More(); anIt.Next())
  662. +  {
  663. +    if(theValue.IsSame(anIt.Value()))
  664. +    {
  665. +      found = Standard_True;
  666. +      break;
  667. +    }
  668. +  }
  669. +
  670. +  if(!found)
  671. +    aList.Append(theValue);
  672. +  
  673. +  return !found;
  674. +}
  675. +
  676. static void ReverseModifiedEdges(TopoDS_Shape& aShape,
  677.                                  TopTools_MapOfShape& Emap)
  678. {
  679. @@ -374,6 +406,47 @@
  680.   return myLast;
  681. }
  682.  
  683. +//=======================================================================
  684. +//function : Generated
  685. +//purpose  :
  686. +//=======================================================================
  687. +void BRepFill_Pipe::Generated(const TopoDS_Shape&   theShape,
  688. +                              TopTools_ListOfShape& theList)
  689. +{
  690. +  theList.Clear();
  691. +
  692. +  if (theShape.IsSame(myProfile))
  693. +    theList.Append(myShape);
  694. +  else
  695. +  {
  696. +    if (theShape.ShapeType() == TopAbs_FACE ||
  697. +        theShape.ShapeType() == TopAbs_WIRE)
  698. +    {
  699. +      if(myGenMap.IsBound(theShape))
  700. +        theList = myGenMap.Find(theShape);
  701. +    }
  702. +    else if (theShape.ShapeType() == TopAbs_EDGE)
  703. +    {
  704. +      TopoDS_Iterator itw(mySpine);
  705. +      for (; itw.More(); itw.Next())
  706. +      {
  707. +        const TopoDS_Edge& aSpineEdge = TopoDS::Edge(itw.Value());
  708. +        const TopoDS_Shape& aFace = Face(aSpineEdge, TopoDS::Edge(theShape));
  709. +        theList.Append(aFace);
  710. +      }
  711. +    }
  712. +    else if (theShape.ShapeType() == TopAbs_VERTEX)
  713. +    {
  714. +      TopoDS_Iterator itw(mySpine);
  715. +      for (; itw.More(); itw.Next())
  716. +      {
  717. +        const TopoDS_Edge& aSpineEdge = TopoDS::Edge(itw.Value());
  718. +        const TopoDS_Shape& anEdge = Edge(aSpineEdge, TopoDS::Vertex(theShape));
  719. +        theList.Append(anEdge);
  720. +      }
  721. +    }
  722. +  }
  723. +}
  724.  
  725. //=======================================================================
  726. //function : Face
  727. @@ -640,6 +713,7 @@
  728.       MkSw.Build( myReversedEdges, myTapes, myRails,
  729.                   BRepFill_Modified, myContinuity, GeomFill_Location, myDegmax, mySegmax );
  730.       result = MkSw.Shape();
  731. +      UpdateMap(TheS.Located(myProfile.Location()), result, myGenMap);
  732.       myErrorOnSurf = MkSw.ErrorOnSurface();
  733.  
  734.       Handle(TopTools_HArray2OfShape) aSections = MkSw.Sections();
  735. @@ -662,6 +736,7 @@
  736.       MkSw.Build( myReversedEdges, myTapes, myRails,
  737.                   BRepFill_Modified, myContinuity, GeomFill_Location, myDegmax, mySegmax );
  738.       result = MkSw.Shape();
  739. +      UpdateMap(TheS.Located(myProfile.Location()), result, myGenMap);
  740.       myErrorOnSurf = MkSw.ErrorOnSurface();
  741.       //Correct <myFirst> and <myLast>
  742.       ReverseModifiedEdges(myFirst, myReversedEdges);
  743. @@ -769,6 +844,7 @@
  744.       BS.Add(solid,TopoDS::Shell(aLocalShape));
  745. //      BS.Add(solid,TopoDS::Shell(result.Reversed()));
  746.     }
  747. +    UpdateMap(TheS.Located(myProfile.Location()), solid, myGenMap);
  748.     return solid;
  749.   }
  750.   else {
  751. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cdl OCCT-6.9.1p1_SRC/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cdl
  752. --- OCCT-6.9.1_SRC/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cdl 2015-09-16 18:27:03.000000000 +0300
  753. +++ OCCT-6.9.1p1_SRC/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cdl   2016-04-26 15:51:11.000000000 +0300
  754. @@ -36,8 +36,8 @@
  755.     ListOfShape from TopTools
  756.  
  757. is
  758. -
  759. -    
  760. +
  761. +
  762.     Create( Spine   : Wire  from TopoDS;
  763.             Profile : Shape from TopoDS )
  764.     ---Purpose: Constructs a pipe by sweeping the shape Profile along
  765. @@ -52,7 +52,7 @@
  766.         -- Standard_DomainError if the profile is a solid or a
  767.         -- composite solid.
  768.     returns MakePipe from BRepOffsetAPI;
  769. -    
  770. +
  771.     Create( Spine   : Wire  from TopoDS;
  772.             Profile : Shape from TopoDS;
  773.         aMode   : Trihedron from GeomFill;
  774. @@ -72,7 +72,7 @@
  775.     Build(me : in out)
  776.     is redefined;
  777.     ---Purpose: Builds the resulting shape (redefined from MakeShape).
  778. -   ---Level: Public    
  779. +   ---Level: Public
  780.  
  781.  
  782.     FirstShape (me : in out)
  783. @@ -84,6 +84,11 @@
  784.     ---Purpose: Returns the TopoDS Shape of the top of the prism.
  785.     returns Shape from TopoDS;
  786.  
  787. +    Generated (me: in out; S: Shape from TopoDS)
  788. +    returns ListOfShape from TopTools
  789. +    is redefined;
  790. +    ---C++: return const &
  791. +    ---Level: Public
  792.  
  793.     Generated (me: in out; SSpine, SProfile : Shape from TopoDS)
  794.         ---Level: Public
  795. @@ -99,4 +104,4 @@
  796.  
  797.     myPipe : Pipe from BRepFill;
  798.  
  799. -end MakePipe;
  800. +end MakePipe;
  801. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx OCCT-6.9.1p1_SRC/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx
  802. --- OCCT-6.9.1_SRC/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx 2015-09-16 18:27:03.000000000 +0300
  803. +++ OCCT-6.9.1p1_SRC/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx   2016-04-26 15:51:11.000000000 +0300
  804. @@ -109,14 +109,23 @@
  805.   return myPipe.LastShape();
  806. }
  807.  
  808. +//=======================================================================
  809. +//function : Generated
  810. +//purpose  : standard method
  811. +//=======================================================================
  812. +const TopTools_ListOfShape& BRepOffsetAPI_MakePipe::Generated(const TopoDS_Shape& S)
  813. +{
  814. +  myPipe.Generated(S, myGenerated);
  815. +  return myGenerated;
  816. +}
  817.  
  818. //=======================================================================
  819. //function : Generated
  820. -//purpose  :
  821. +//purpose  : returns generated elementary subshape
  822. //=======================================================================
  823.  
  824. -TopoDS_Shape BRepOffsetAPI_MakePipe::Generated (const TopoDS_Shape& SSpine,
  825. -                     const TopoDS_Shape& SProfile)
  826. +TopoDS_Shape BRepOffsetAPI_MakePipe::Generated(const TopoDS_Shape& SSpine,
  827. +                                               const TopoDS_Shape& SProfile)
  828. {
  829.   if (SProfile.ShapeType () == TopAbs_EDGE) {
  830.     return myPipe.Face (TopoDS::Edge (SSpine), TopoDS::Edge (SProfile));
  831. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/src/QABugs/QABugs_19.cxx OCCT-6.9.1p1_SRC/src/QABugs/QABugs_19.cxx
  832. --- OCCT-6.9.1_SRC/src/QABugs/QABugs_19.cxx 2015-09-16 18:27:29.000000000 +0300
  833. +++ OCCT-6.9.1p1_SRC/src/QABugs/QABugs_19.cxx   2016-04-26 15:51:28.000000000 +0300
  834. @@ -53,6 +53,7 @@
  835. #include <GeomFill_Trihedron.hxx>
  836. #include <BRepOffsetAPI_MakePipe.hxx>
  837. #include <Standard_Atomic.hxx>
  838. +#include <TopTools_ListIteratorOfListOfShape.hxx>
  839.  
  840. #include <Standard_Version.hxx>
  841.  
  842. @@ -4306,6 +4307,95 @@
  843.   return 0;
  844. }
  845.  
  846. +//========================================================================
  847. +//function : OCC27065
  848. +//purpose  : Tests overloaded method "Generated" of BRepOffsetAPI_MakePipe
  849. +//========================================================================
  850. +static Standard_Integer OCC27065(Draw_Interpretor& di,
  851. +                                 Standard_Integer n, const char** a)
  852. +{
  853. +  if (n < 3) return 1;
  854. +  BRep_Builder BB;
  855. +
  856. +  TopoDS_Shape SpineShape = DBRep::Get(a[1],TopAbs_WIRE);
  857. +  if ( SpineShape.IsNull()) return 1;
  858. +  TopoDS_Wire Spine = TopoDS::Wire(SpineShape);
  859. +
  860. +  TopoDS_Shape Profile = DBRep::Get(a[2]);
  861. +  if ( Profile.IsNull()) return 1;
  862. +
  863. +  BRepOffsetAPI_MakePipe aPipeBuilder(Spine, Profile);
  864. +  if (!aPipeBuilder.IsDone())
  865. +  {
  866. +    di << "Error: failed to create pipe\n";
  867. +    return 1;
  868. +  }
  869. +
  870. +  TopExp_Explorer Explo(Profile, TopAbs_SHELL);
  871. +  TopoDS_Shape aShape;
  872. +  TopTools_ListIteratorOfListOfShape itl;
  873. +  if (Explo.More())
  874. +  {
  875. +    aShape = Explo.Current();
  876. +    TopoDS_Compound res1;
  877. +    BB.MakeCompound(res1);
  878. +    itl.Initialize(aPipeBuilder.Generated(aShape));
  879. +    for (; itl.More(); itl.Next())
  880. +      BB.Add(res1, itl.Value());
  881. +    DBRep::Set("res_shell", res1);
  882. +  }
  883. +
  884. +  Explo.Init(Profile, TopAbs_FACE);
  885. +  if (Explo.More())
  886. +  {
  887. +    aShape = Explo.Current();
  888. +    TopoDS_Compound res2;
  889. +    BB.MakeCompound(res2);
  890. +    itl.Initialize(aPipeBuilder.Generated(aShape));
  891. +    for (; itl.More(); itl.Next())
  892. +      BB.Add(res2, itl.Value());
  893. +    DBRep::Set("res_face", res2);
  894. +  }
  895. +
  896. +  Explo.Init(Profile, TopAbs_WIRE);
  897. +  if (Explo.More())
  898. +  {
  899. +    aShape = Explo.Current();
  900. +    TopoDS_Compound res3;
  901. +    BB.MakeCompound(res3);
  902. +    itl.Initialize(aPipeBuilder.Generated(aShape));
  903. +    for (; itl.More(); itl.Next())
  904. +      BB.Add(res3, itl.Value());
  905. +    DBRep::Set("res_wire", res3);
  906. +  }
  907. +
  908. +  Explo.Init(Profile, TopAbs_EDGE);
  909. +  if (Explo.More())
  910. +  {
  911. +    aShape = Explo.Current();
  912. +    TopoDS_Compound res4;
  913. +    BB.MakeCompound(res4);
  914. +    itl.Initialize(aPipeBuilder.Generated(aShape));
  915. +    for (; itl.More(); itl.Next())
  916. +      BB.Add(res4, itl.Value());
  917. +    DBRep::Set("res_edge", res4);
  918. +  }
  919. +
  920. +  Explo.Init(Profile, TopAbs_VERTEX);
  921. +  if (Explo.More())
  922. +  {
  923. +    aShape = Explo.Current();
  924. +    TopoDS_Compound res5;
  925. +    BB.MakeCompound(res5);
  926. +    itl.Initialize(aPipeBuilder.Generated(aShape));
  927. +    for (; itl.More(); itl.Next())
  928. +      BB.Add(res5, itl.Value());
  929. +    DBRep::Set("res_vertex", res5);
  930. +  }
  931. +
  932. +  return 0;
  933. +}
  934. +
  935. void QABugs::Commands_19(Draw_Interpretor& theCommands) {
  936.   const char *group = "QABugs";
  937.  
  938. @@ -4397,5 +4487,9 @@
  939.  
  940.   theCommands.Add ("OCC26313", "OCC26313 result shape", __FILE__, OCC26313, group);
  941.  
  942. +  theCommands.Add ("OCC27065",
  943. +                   "OCC27065 spine profile",
  944. +                   __FILE__, OCC27065, group);
  945. +
  946.   return;
  947. }
  948. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/src/SelectMgr/SelectMgr_SelectionManager.cxx OCCT-6.9.1p1_SRC/src/SelectMgr/SelectMgr_SelectionManager.cxx
  949. --- OCCT-6.9.1_SRC/src/SelectMgr/SelectMgr_SelectionManager.cxx 2015-09-16 18:27:36.000000000 +0300
  950. +++ OCCT-6.9.1p1_SRC/src/SelectMgr/SelectMgr_SelectionManager.cxx   2016-04-26 15:51:32.000000000 +0300
  951. @@ -687,6 +687,7 @@
  952.   for(theObject->Init(); theObject->More(); theObject->Next())
  953.   {
  954.     const Handle(SelectMgr_Selection)& aSelection = theObject->CurrentSelection();
  955. +    aSelection->UpdateStatus (SelectMgr_TOU_Full);
  956.     Standard_Integer aSelMode = aSelection->Mode();
  957.  
  958.     for (TColStd_MapIteratorOfMapOfTransient aSelectorIter (mySelectors); aSelectorIter.More(); aSelectorIter.Next())
  959. @@ -697,10 +698,10 @@
  960.           ClearSelectionStructures (theObject, aSelMode, aCurSelector);
  961.           theObject->RecomputePrimitives(aSelMode);
  962.           RestoreSelectionStructures (theObject, aSelMode, aCurSelector);
  963. +          aSelection->UpdateStatus (SelectMgr_TOU_None);
  964. +          aSelection->UpdateBVHStatus (SelectMgr_TBU_None);
  965.       }
  966.     }
  967. -    aSelection->UpdateStatus (SelectMgr_TOU_None);
  968. -    aSelection->UpdateBVHStatus (SelectMgr_TBU_None);
  969.   }
  970. }
  971.  
  972. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/tests/bugs/modalg_6/bug27065_1 OCCT-6.9.1p1_SRC/tests/bugs/modalg_6/bug27065_1
  973. --- OCCT-6.9.1_SRC/tests/bugs/modalg_6/bug27065_1   1970-01-01 03:00:00.000000000 +0300
  974. +++ OCCT-6.9.1p1_SRC/tests/bugs/modalg_6/bug27065_1 2016-04-26 14:43:27.000000000 +0300
  975. @@ -0,0 +1,24 @@
  976. +puts "============"
  977. +puts "OCC27065"
  978. +puts "============"
  979. +puts ""
  980. +###############################
  981. +## BRepOffsetAPI_MakePipe misses definition of virtual method Generated()
  982. +###############################
  983. +
  984. +pload QAcommands
  985. +
  986. +restore [locate_data_file bug24840_comp.brep] sh
  987. +explode sh
  988. +OCC27065 sh_1 sh_2
  989. +fit
  990. +
  991. +checknbshapes res_shell -vertex 56 -edge 130 -wire 99 -face 99 -shell 24 -solid 24 -compsolid 1 -compound 1 -shape 434
  992. +
  993. +checknbshapes res_face -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 35
  994. +
  995. +checknbshapes res_wire -vertex 8 -edge 12 -wire 4 -face 4 -shell 1 -solid 0 -compsolid 0 -compound 1 -shape 30
  996. +
  997. +checknbshapes res_edge -vertex 4 -edge 4 -wire 1 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 11
  998. +
  999. +checknbshapes res_vertex -vertex 2 -edge 1 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 4
  1000. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/tests/bugs/modalg_6/bug27065_2 OCCT-6.9.1p1_SRC/tests/bugs/modalg_6/bug27065_2
  1001. --- OCCT-6.9.1_SRC/tests/bugs/modalg_6/bug27065_2   1970-01-01 03:00:00.000000000 +0300
  1002. +++ OCCT-6.9.1p1_SRC/tests/bugs/modalg_6/bug27065_2 2016-04-26 14:43:27.000000000 +0300
  1003. @@ -0,0 +1,28 @@
  1004. +puts "============"
  1005. +puts "OCC27065"
  1006. +puts "============"
  1007. +puts ""
  1008. +###############################
  1009. +## BRepOffsetAPI_MakePipe misses definition of virtual method Generated()
  1010. +###############################
  1011. +
  1012. +pload QAcommands
  1013. +
  1014. +restore [locate_data_file bug23903_base.brep] base
  1015. +restore [locate_data_file bug23903_path.brep] sp
  1016. +explode base
  1017. +shape pr Sh
  1018. +add base_1 pr
  1019. +add base_2 pr
  1020. +OCC27065 sp pr
  1021. +fit
  1022. +
  1023. +checknbshapes res_shell -vertex 2 -edge 5 -wire 3 -face 3 -shell 2 -solid 2 -compsolid 1 -compound 1 -shape 19
  1024. +
  1025. +checknbshapes res_face -vertex 2 -edge 4 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 13
  1026. +
  1027. +checknbshapes res_wire -vertex 2 -edge 4 -wire 2 -face 2 -shell 1 -solid 0 -compsolid 0 -compound 1 -shape 12
  1028. +
  1029. +checknbshapes res_edge -vertex 2 -edge 3 -wire 1 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 8
  1030. +
  1031. +checknbshapes res_vertex -vertex 1 -edge 1 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 3
  1032. diff -Naur --exclude=CVS --exclude=.git --exclude=samples --exclude=cmake --exclude=Makefile.am --exclude=CMakeLists.txt --exclude=adm OCCT-6.9.1_SRC/tests/bugs/vis/bug26870 OCCT-6.9.1p1_SRC/tests/bugs/vis/bug26870
  1033. --- OCCT-6.9.1_SRC/tests/bugs/vis/bug26870  1970-01-01 03:00:00.000000000 +0300
  1034. +++ OCCT-6.9.1p1_SRC/tests/bugs/vis/bug26870    2016-04-26 15:52:06.000000000 +0300
  1035. @@ -0,0 +1,37 @@
  1036. +puts "============"
  1037. +puts "CR26870"
  1038. +puts "============"
  1039. +puts ""
  1040. +
  1041. +##########################################################################################
  1042. +puts "Visualization - deactivated selections are not updated after object's re-computation"
  1043. +##########################################################################################
  1044. +
  1045. +pload VISUALIZATION MODELING
  1046. +
  1047. +vinit
  1048. +box b 1 1 1
  1049. +vdisplay b
  1050. +vfit
  1051. +
  1052. +vselmode b 2 1
  1053. +vselmode b 4 1
  1054. +vselmode b 4 0
  1055. +
  1056. +box b 3 3 3
  1057. +vdisplay b
  1058. +vfit
  1059. +
  1060. +vselmode 4 1
  1061. +
  1062. +# pick a point onto previously computed face
  1063. +vmoveto 80 265
  1064. +if {[vreadpixel 90 206 name] == "CYAN1 1"} {
  1065. +  puts "ERROR: previously computed entities are highlighted! Selection mode 4 was not updated after redisplaying the box."
  1066. +}
  1067. +# pick a point onto box
  1068. +if {[vreadpixel 29 216 name] == "YELLOW 1"} {
  1069. +  puts "ERROR: the box's face is not highlighted! Selection mode 4 was not updated after redisplaying the box."
  1070. +}
  1071. +
  1072. +set only_screen 1
  1073.  
  1074. =>> Edit salome-occt-6.9.1.patch? [y/N]:
  1075.  
  1076. :: Content of /tmp/trizen-pol/opencascade/vtk7.patch
  1077.  
  1078. --- a/src/IVtkVTK/IVtkVTK_ShapeData.cxx 2017-10-04 14:26:07.000000000 +0200
  1079. +++ b/src/IVtkVTK/IVtkVTK_ShapeData.cxx 2018-04-07 14:43:32.920435032 +0200
  1080. @@ -80,9 +80,9 @@
  1081.   vtkIdType aPointIdVTK = thePointId;
  1082.   myPolyData->InsertNextCell (VTK_VERTEX, 1, &aPointIdVTK);
  1083.   const vtkIdType aShapeIDVTK = theShapeID;
  1084. -  mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK);
  1085. +  mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK);
  1086.   const vtkIdType aType = theMeshType;
  1087. -  myMeshTypes->InsertNextTupleValue (&aType);
  1088. +  myMeshTypes->InsertNextTypedTuple (&aType);
  1089. }
  1090.  
  1091. //================================================================
  1092. @@ -97,9 +97,9 @@
  1093.   vtkIdType aPoints[2] = { thePointId1, thePointId2 };
  1094.   myPolyData->InsertNextCell (VTK_LINE, 2, aPoints);
  1095.   const vtkIdType aShapeIDVTK = theShapeID;
  1096. -  mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK);
  1097. +  mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK);
  1098.   const vtkIdType aType = theMeshType;
  1099. -  myMeshTypes->InsertNextTupleValue (&aType);
  1100. +  myMeshTypes->InsertNextTypedTuple (&aType);
  1101. }
  1102.  
  1103. //================================================================
  1104. @@ -124,9 +124,9 @@
  1105.  
  1106.     myPolyData->InsertNextCell (VTK_POLY_LINE, anIdList);
  1107.     const vtkIdType aShapeIDVTK = theShapeID;
  1108. -    mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK);
  1109. +    mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK);
  1110.     const vtkIdType aType = theMeshType;
  1111. -    myMeshTypes->InsertNextTupleValue (&aType);
  1112. +    myMeshTypes->InsertNextTypedTuple (&aType);
  1113.   }
  1114. }
  1115.  
  1116. @@ -143,7 +143,7 @@
  1117.   vtkIdType aPoints[3] = { thePointId1, thePointId2, thePointId3 };
  1118.   myPolyData->InsertNextCell (VTK_TRIANGLE, 3, aPoints);
  1119.   const vtkIdType aShapeIDVTK = theShapeID;
  1120. -  mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK);
  1121. +  mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK);
  1122.   const vtkIdType aType = theMeshType;
  1123. -  myMeshTypes->InsertNextTupleValue (&aType);
  1124. +  myMeshTypes->InsertNextTypedTuple (&aType);
  1125. }
  1126.  
  1127. =>> Edit vtk7.patch? [y/N]:
  1128.  
  1129. Repository      : AUR
  1130. Name            : opencascade
  1131. Version         : 7.2.0p1-1
  1132. Maintainer      : gbs
  1133. URL             : http://www.opencascade.org
  1134. AUR URL         : https://aur.archlinux.org/packages.php?ID=501348
  1135. License         : custom
  1136. Votes           : 3
  1137. Popularity      : 2.6%
  1138. Installed       : Yes
  1139. Out Of Date     : No
  1140. Depends On      : tk
  1141.                  vtk
  1142.                  gl2ps
  1143.                  ffmpeg
  1144.                  freeimage
  1145.                  intel-tbb
  1146. Make Deps       : cmake
  1147.                  qt5-base
  1148. Check Deps      : None
  1149. Optional Deps   : None
  1150. Provides        : None
  1151. Conflicts With  : None
  1152. Replaces        : None
  1153. Package Base    : opencascade
  1154. Last Update     : Sun Apr  8 17:21:05 2018
  1155. Description     : Open CASCADE Technology, 3D modeling & numerical simulation
  1156.  
  1157. ==> Fent el paquet: opencascade 7.2.0p1-1 (dg abr  8 22:57:14 CEST 2018)
  1158. ==> Comprovant les dependències en temps d'execució ...
  1159. ==> Comprovant de dependències per a l'assemblatge...
  1160. ==> Recuperant els codis font...
  1161.  -> Baixant opencascade-7.2.0p1.tar.gz...
  1162. ** Resuming transfer from byte position 3121152
  1163.  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  1164.                                 Dload  Upload   Total   Spent    Left  Speed
  1165.  0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0
  1166. curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.
  1167. ==> ERROR: Fallada mentre es baixava http://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_2_0p1;sf=tgz
  1168.    Cancel·lant...
  1169. :: Unable to build opencascade - makepkg exited with code: 1
  1170. =>> Do you want to try again? [y/N]:
  1171. =>> Do you want to exit now? [Y/n]:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement