Skip to content

Commit

Permalink
Merge branch 'master' into Env_3-fixes-efif
Browse files Browse the repository at this point in the history
  • Loading branch information
efifogel committed Jan 29, 2024
2 parents 199fc8e + 96f698c commit a4bc759
Show file tree
Hide file tree
Showing 1,312 changed files with 267,960 additions and 177,133 deletions.
32 changes: 25 additions & 7 deletions .github/install.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
#!/bin/bash

set -ex

sudo apt-get update
sudo apt-get install -y libmpfr-dev \
libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \
libqt5svg5-dev qttools5-dev qttools5-dev-tools libboost-dev libinsighttoolkit4-dev zsh
#update cmake to 3.18.4
sudo apt-get install -y \
libmpfr-dev \
libtbb-dev \
libmetis-dev \
libssh-dev \
libeigen3-dev \
qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev libqt5websockets5-dev \
libqt5svg5-dev qttools5-dev qttools5-dev-tools \
libboost-dev libboost-serialization-dev libboost-iostreams-dev libboost-filesystem-dev libboost-filesystem-dev \
libvtk9-dev libgdcm-tools libvtkgdcm-dev libunwind-dev \
libinsighttoolkit5-dev \
libceres-dev \
libglpk-dev \
libopencv-dev \
zsh \
qt6-base-dev qt6-declarative-dev libqt6svg6-dev libqt6websockets6-dev

#update CMake
sudo apt purge --auto-remove cmake
cd /tmp
wget https://cmake.org/files/v3.18/cmake-3.18.4-Linux-x86_64.sh
sudo sh cmake-3.18.4-Linux-x86_64.sh --skip-license --prefix=/usr/local
rm cmake-3.18.4-Linux-x86_64.sh
CMAKE_VER=$(curl --silent https://cmake.org/files/LatestRelease/cmake-latest-files-v1.json | jq -r .version.string)
wget https://cmake.org/files/LatestRelease/cmake-$CMAKE_VER-linux-x86_64.sh
sudo sh cmake-*.sh --skip-license --prefix=/usr/local
rm cmake-*.sh
5 changes: 2 additions & 3 deletions .github/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
FACTOR=$1
set -ex
cd Polyhedron/demo
LIST_OF_PLUGINS=$(/usr/local/bin/cmake --build . -t help | egrep 'plugin$' |& cut -d\ -f2)
/usr/local/bin/cmake -S Polyhedron -B build -DCGAL_DIR=$2
LIST_OF_PLUGINS=$(/usr/local/bin/cmake --build build -t help | egrep 'plugin$' |& cut -d\ -f2)
PLUGINS_ARRAY=(${LIST_OF_PLUGINS});
NB_OF_PLUGINS=${#PLUGINS_ARRAY[@]}
DEL=$(($NB_OF_PLUGINS / 4))
mkdir build
cd build
/usr/local/bin/cmake -DCGAL_DIR=$2 ../Polyhedron
make -j2 ${PLUGINS_ARRAY[@]:$(($FACTOR * $DEL)):$((($FACTOR + 1) * $DEL))}
4 changes: 2 additions & 2 deletions .github/workflows/Remove_labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: remove label
steps:
- name: removelabel
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -21,7 +21,7 @@ jobs:
name: "Tested",
});
- name: Post address
uses: actions/github-script@v6
uses: actions/github-script@v7
if: ${{ success() }}
with:
script: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
id: get_round
with:
result-encoding: string
Expand All @@ -38,7 +38,7 @@ jobs:
}
}
return 'stop'
- uses: actions/github-script@v6
- uses: actions/github-script@v7
if: steps.get_round.outputs.result != 'stop'
id: get_pr_number
with:
Expand All @@ -49,7 +49,7 @@ jobs:
return pr_number
- name: Emoji-comment
uses: actions/github-script@v6
uses: actions/github-script@v7
if: steps.get_round.outputs.result != 'stop'
with:
script: |
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
fi
- name: Post address
uses: actions/github-script@v6
uses: actions/github-script@v7
if: ${{ success() && steps.get_round.outputs.result != 'stop' }}
with:
script: |
Expand All @@ -154,7 +154,7 @@ jobs:
- name: Post error
env:
ERRORMSG: ${{steps.build_and_run.outputs.DoxygenError}}
uses: actions/github-script@v6
uses: actions/github-script@v7
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
with:
script: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cmake-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: configure all
run: |
set -e
mkdir build && cd build && CXX=clang++ cmake -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON -DBUILD_TESTING=ON ..
mkdir build && cd build && CXX=clang++ cmake -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON -DCGAL_ENABLE_TESTING=ON ..
ctest -L Installation -j $(getconf _NPROCESSORS_ONLN)
cmake-testsuite-with-qt5:
cmake-testsuite-with-qt:

runs-on: ubuntu-latest

Expand All @@ -31,5 +31,5 @@ jobs:
- name: configure all
run: |
set -e
mkdir build && cd build && CXX=clang++ cmake -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON -DBUILD_TESTING=ON ..
mkdir build && cd build && CXX=clang++ cmake -DWITH_examples=ON -DWITH_tests=ON -DWITH_demos=ON -DCGAL_ENABLE_TESTING=ON ..
ctest -L Installation -j $(getconf _NPROCESSORS_ONLN)
4 changes: 2 additions & 2 deletions .github/workflows/filter_testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: (github.event.comment.user.login == 'sloriot' || github.event.comment.user.login == 'lrineau') && contains(github.event.comment.body, '/testme')
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
id: get_label
with:
result-encoding: string
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
ssh ${HOST} "${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER"
done
- name: Post address
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const address = "Testsuite launched. Results will appear on the following page: https://cgal.geometryfactory.com/~cgaltest/test_suite/TESTRESULTS/index.shtml "
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wiki_notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
messages: ${{ steps.set-result.outputs.result }}
steps:
- name: get informations and prepare email
uses: actions/github-script@v6
uses: actions/github-script@v7
id: set-result
with:
result-encoding: string
Expand Down
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ GraphicsView/demo/Triangulation_2/Makefile
GraphicsView/demo/Triangulation_2/Regular_triangulation_2
GraphicsView/demo/Triangulation_2/qrc_*.cxx
GraphicsView/demo/Triangulation_2/ui_*.h
GraphicsView/src/CGAL_Qt5/*.dll
GraphicsView/src/CGAL_Qt5/*.lib
GraphicsView/src/CGAL_Qt5/*.so
GraphicsView/src/CGAL_Qt5/Makefile
GraphicsView/src/CGAL_Qt5/moc_*.cxx
GraphicsView/src/CGAL_Qt5/qrc_*.cxx
HalfedgeDS/test/HalfedgeDS/cgal_test_with_cmake
HalfedgeDS/test/HalfedgeDS/test_hds
HalfedgeDS/test/HalfedgeDS/test_hds_decorator
Expand Down Expand Up @@ -879,7 +873,6 @@ Surface_mesher/demo/Surface_mesher/.*.deps
Surface_mesher/demo/Surface_mesher/.qglviewer.xml
Surface_mesher/demo/Surface_mesher/Makefile
Surface_mesher/demo/Surface_mesher/Surface_mesher
Surface_mesher/demo/Surface_mesher/Surface_mesher_Qt5_Demo
Surface_mesher/demo/Surface_mesher/VTK/Makefile
Surface_mesher/demo/Surface_mesher/VTK/mesh_a_3D_image
Surface_mesher/demo/Surface_mesher/VTK/mesh_a_VTK_3D_image
Expand All @@ -894,7 +887,6 @@ Surface_mesher/demo/Surface_mesher/out*.off
Surface_mesher/demo/Surface_mesher/polyhedron_remesher
Surface_mesher/demo/Surface_mesher/polyhedron_remesher_with_edges
Surface_mesher/demo/Surface_mesher/qrc_*.c*
Surface_mesher/demo/Surface_mesher/qt5-demo
Surface_mesher/demo/Surface_mesher/ui_*.h
Surface_mesher/doxygen
Surface_mesher/examples/Surface_mesher/.*.deps
Expand Down
11 changes: 1 addition & 10 deletions AABB_tree/demo/AABB_tree/AABB_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int main(int argc, char **argv)
app.setOrganizationName("INRIA");
app.setApplicationName("AABB tree demo");

// Import resources from libCGALQt (Qt5).
// Import resources from libCGALQt (Qt6).
CGAL_QT_INIT_RESOURCES;

MainWindow mainWindow;
Expand All @@ -49,12 +49,3 @@ int main(int argc, char **argv)

return app.exec();
}

# include "Scene.cpp"
# include "Scene_moc.cpp"
# include "benchmarks.cpp"
# include "Viewer.cpp"
# include "Viewer_moc.cpp"
# include "MainWindow.cpp"
# include "MainWindow_moc.cpp"

69 changes: 21 additions & 48 deletions AABB_tree/demo/AABB_tree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,73 +6,46 @@ project(AABB_tree_Demo)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
if(NOT POLICY CMP0070 AND POLICY CMP0053)
# Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning.
cmake_policy(SET CMP0053 OLD)
endif()
# Find CGAL and CGAL Qt6
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6)

if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()
# Find Qt6 itself
find_package(Qt6 QUIET COMPONENTS Gui OpenGL)

# Include this package's headers first
include_directories(BEFORE ./ ./include)
if(CGAL_Qt6_FOUND AND Qt6_FOUND)

# Find CGAL and CGAL Qt5
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5)
add_definitions(-DQT_NO_KEYWORDS)

# Find Qt5 itself
find_package(Qt5 QUIET COMPONENTS Widgets OpenGL)
# Instruct CMake to run moc/ui/rcc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

if(CGAL_Qt5_FOUND AND Qt5_FOUND)

qt5_wrap_ui(UI_FILES MainWindow.ui)

include(AddFileDependencies)

qt5_generate_moc("MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
add_file_dependencies(MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h")

qt5_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp")
add_file_dependencies(Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h")

qt5_generate_moc("Scene.h" "${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp")
add_file_dependencies(Scene_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Scene.h")

qt5_add_resources(CGAL_Qt5_RESOURCE_FILES AABB_demo.qrc)

add_file_dependencies(
AABB_demo.cpp "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp"
"${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp"
"${CMAKE_CURRENT_BINARY_DIR}/Scene_moc.cpp")

add_executable(
AABB_demo AABB_demo.cpp ${UI_FILES} ${CGAL_Qt5_RESOURCE_FILES}
#${CGAL_Qt5_MOC_FILES}
qt_add_executable(
AABB_demo AABB_demo.cpp Scene.cpp benchmarks.cpp Viewer.cpp MainWindow.cpp
MainWindow.ui AABB_demo.qrc
)
# Link with Qt libraries
target_link_libraries(AABB_demo PRIVATE Qt5::Widgets Qt5::OpenGL
CGAL::CGAL CGAL::CGAL_Qt5)
target_link_libraries(AABB_demo PRIVATE Qt6::Gui Qt6::OpenGL
CGAL::CGAL CGAL::CGAL_Qt6)

add_to_cached_list(CGAL_EXECUTABLE_TARGETS AABB_demo)

include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
cgal_add_compilation_test(AABB_demo)

else(CGAL_Qt5_FOUND AND Qt5_FOUND)
else(CGAL_Qt6_FOUND AND Qt6_FOUND)

set(AABB_MISSING_DEPS "")

if(NOT CGAL_Qt5_FOUND)
set(AABB_MISSING_DEPS "CGAL_Qt5, ${AABB_MISSING_DEPS}")
if(NOT CGAL_Qt6_FOUND)
set(AABB_MISSING_DEPS "CGAL_Qt6, ${AABB_MISSING_DEPS}")
endif()

if(NOT Qt5_FOUND)
set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}")
if(NOT Qt6_FOUND)
set(AABB_MISSING_DEPS "Qt6, ${AABB_MISSING_DEPS}")
endif()

message("NOTICE: This demo requires ${AABB_MISSING_DEPS}, and will not be compiled.")

endif(CGAL_Qt5_FOUND AND Qt5_FOUND)
endif(CGAL_Qt6_FOUND AND Qt6_FOUND)
10 changes: 5 additions & 5 deletions AABB_tree/demo/AABB_tree/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
#include <QSettings>
#include <QHeaderView>
#include <QClipboard>
#include <QInputDialog>

#include "ui_MainWindow.h"

MainWindow::MainWindow(QWidget* parent)
: CGAL::Qt::DemosMainWindow(parent)
: CGAL::Qt::DemosMainWindow(parent)
{
ui = new Ui::MainWindow;
ui->setupUi(this);

this->addAboutDemo(":/cgal/AABB_demo/about.html");
this->addAboutCGAL();

// saves some pointers from ui, for latter use.
m_pViewer = ui->viewer;

Expand Down Expand Up @@ -418,7 +422,3 @@ void MainWindow::on_actionCopy_snapshot_triggered()
qb->setImage(snapshot);
QApplication::restoreOverrideCursor();
}




6 changes: 2 additions & 4 deletions AABB_tree/demo/AABB_tree/MainWindow.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtOpenGL/qgl.h>
#include <CGAL/Qt/DemosMainWindow.h>

class QDragEnterEvent;
Expand All @@ -12,7 +11,6 @@ namespace Ui {
class MainWindow;
}


class MainWindow :
public CGAL::Qt::DemosMainWindow
{
Expand All @@ -21,12 +19,12 @@ class MainWindow :
MainWindow(QWidget* parent = nullptr);
~MainWindow();

public slots:
public Q_SLOTS:
void updateViewerBBox();
void open(QString filename);
void setAddKeyFrameKeyboardModifiers(Qt::KeyboardModifiers);

protected slots:
protected Q_SLOTS:

// settings
void quit();
Expand Down
6 changes: 3 additions & 3 deletions AABB_tree/demo/AABB_tree/Scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ void Scene::draw(CGAL::QGLViewer* viewer)
vao[0].bind();
attrib_buffers(viewer);
rendering_program.bind();
color.setRgbF(0.7,0.0,0.0);
color.setRgbF(0.7f,0.0f,0.0f);
rendering_program.setUniformValue(colorLocation, color);
rendering_program.setUniformValue(fLocation, fMatrix);
gl->glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(pos_points.size()/3));
Expand All @@ -631,7 +631,7 @@ void Scene::draw(CGAL::QGLViewer* viewer)
vao[1].bind();
attrib_buffers(viewer);
rendering_program.bind();
color.setRgbF(0.0,0.7,0.0);
color.setRgbF(0.0f,0.7f,0.0f);
rendering_program.setUniformValue(colorLocation, color);
rendering_program.setUniformValue(fLocation, fMatrix);
gl->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_lines.size()/3));
Expand Down Expand Up @@ -669,7 +669,7 @@ void Scene::draw(CGAL::QGLViewer* viewer)
vao[3].bind();
attrib_buffers(viewer);
rendering_program.bind();
color.setRgbF(1.0,0.0,0.0);
color.setRgbF(1.0f,0.0f,0.0f);
rendering_program.setUniformValue(colorLocation, color);
rendering_program.setUniformValue(fLocation, fMatrix);
gl->glDrawArrays(GL_LINES, 0, static_cast<GLsizei>(pos_cut_segments.size()/3));
Expand Down
Loading

0 comments on commit a4bc759

Please sign in to comment.