This commit is contained in:
Laurent Rineau 2024-03-26 18:22:46 +01:00
parent 3f434a21e3
commit 9e6433ff06
559 changed files with 1551 additions and 1549 deletions

4
.github/test.sh vendored
View File

@ -2,8 +2,8 @@
/usr/local/bin/cmake --version
FACTOR=$1
set -ex
cd Polyhedron/demo
/usr/local/bin/cmake -S Polyhedron -B build -DCGAL_DIR=$2
cd Lab/demo
/usr/local/bin/cmake -S Lab -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[@]}

View File

@ -1,4 +1,4 @@
name: Test Polyhedron Demo
name: Compile CGAL Lab
on: [push, pull_request,workflow_dispatch]

View File

@ -11,9 +11,9 @@ set(list_of_whitelisted_headers_txt [=[
CGAL/Three/Edge_container.h
CGAL/Three/exceptions.h
CGAL/Three/Point_container.h
CGAL/Three/Polyhedron_demo_io_plugin_interface.h
CGAL/Three/Polyhedron_demo_plugin_helper.h
CGAL/Three/Polyhedron_demo_plugin_interface.h
CGAL/Three/CGAL_Lab_io_plugin_interface.h
CGAL/Three/CGAL_Lab_plugin_helper.h
CGAL/Three/CGAL_Lab_plugin_interface.h
CGAL/Three/Primitive_container.h
CGAL/Three/Scene_draw_interface.h
CGAL/Three/Scene_group_item.h

View File

@ -3,7 +3,7 @@
#include "config.h"
#include "Plugins/Mesh_3/config_mesh_3.h"
// as otherwise it gets set via inclusion of Polyhedron_3.h
// as otherwise it gets set via inclusion of cgallab.h
#include <CGAL/Default.h>
#include "SMesh_type.h"

View File

@ -1,4 +1,4 @@
#include "Polyhedron_demo.h"
#include "cgallab.h"
#include "MainWindow.h"
#include <QMessageBox>
#include <CGAL/Qt/resources.h>
@ -11,12 +11,12 @@
#include <clocale>
struct Polyhedron_demo_impl {
struct CGAL_Lab_impl {
bool catch_exceptions;
QScopedPointer<MainWindow> mainWindow;
Polyhedron_demo_impl() : catch_exceptions(true) {}
}; // end struct Polyhedron_demo_impl
CGAL_Lab_impl() : catch_exceptions(true) {}
}; // end struct CGAL_Lab_impl
int& code_to_call_before_creation_of_QCoreApplication(int& i) {
QSurfaceFormat fmt;
@ -35,7 +35,7 @@ int& code_to_call_before_creation_of_QCoreApplication(int& i) {
return i;
}
Polyhedron_demo::Polyhedron_demo(int& argc, char **argv,
CGAL_Lab::CGAL_Lab(int& argc, char **argv,
QString application_name,
QString main_window_title,
QStringList input_keywords)
@ -45,7 +45,7 @@ Polyhedron_demo::Polyhedron_demo(int& argc, char **argv,
// object.
argv)
, d_ptr_is_initialized(false)
, d_ptr(new Polyhedron_demo_impl)
, d_ptr(new CGAL_Lab_impl)
{
//We set the locale to avoid any trouble with VTK
std::setlocale(LC_ALL, "C");
@ -129,7 +129,7 @@ Polyhedron_demo::Polyhedron_demo(int& argc, char **argv,
}
#endif
mainWindow.loadScript(":/cgal/Polyhedron_3/javascript/lib.js");
mainWindow.loadScript(":/cgal/Lab/javascript/lib.js");
QFileInfo autostart_js("autostart.js");
if(!parser.isSet(no_autostart) && autostart_js.exists()) {
mainWindow.loadScript(autostart_js);
@ -140,14 +140,14 @@ Polyhedron_demo::Polyhedron_demo(int& argc, char **argv,
}
Polyhedron_demo::~Polyhedron_demo() {}
CGAL_Lab::~CGAL_Lab() {}
void Polyhedron_demo::do_not_catch_exceptions() {
void CGAL_Lab::do_not_catch_exceptions() {
d_ptr->catch_exceptions = false;
setProperty("no-try-catch", true);
}
bool Polyhedron_demo::notify(QObject* receiver, QEvent* event)
bool CGAL_Lab::notify(QObject* receiver, QEvent* event)
{
if(!d_ptr_is_initialized || !d_ptr->catch_exceptions)
return QApplication::notify(receiver, event);
@ -171,7 +171,7 @@ bool Polyhedron_demo::notify(QObject* receiver, QEvent* event)
return false;
}
int Polyhedron_demo::try_exec()
int CGAL_Lab::try_exec()
{
// A Qt Script may have closed the main window.
// The following loop launch app.exec() only if the main window is visible.

View File

@ -1,6 +1,6 @@
#ifndef POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H
#define POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H
#ifndef LAB_DEMO_DETECT_SHARP_EDGES_H
#define LAB_DEMO_DETECT_SHARP_EDGES_H
#include <CGAL/Polygon_mesh_processing/detect_features.h>
@ -29,4 +29,4 @@ namespace CGAL
}//end namespace CGAL
#endif //POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H
#endif //LAB_DEMO_DETECT_SHARP_EDGES_H

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.1...3.23)
project(Polyhedron_Demo)
project(CGAL_Lab)
include(FeatureSummary)
@ -32,9 +32,6 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
include_directories(BEFORE ./ ./include ./CGAL_demo)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}")
option(POLYHEDRON_QTSCRIPT_DEBUGGER
"Activate the use of Qt Script Debugger in Polyhedron_3 demo" OFF)
# Find CGAL
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6 ImageIO)
set_package_properties(CGAL PROPERTIES TYPE REQUIRED)
@ -73,8 +70,8 @@ set_package_properties(
PURPOSE "Required for the partition plugin.")
# Activate concurrency?
option(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON)
if(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY)
option(LAB_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON)
if(LAB_DEMO_ACTIVATE_CONCURRENCY)
find_package(TBB QUIET)
include(CGAL_TBB_support)
if(NOT TARGET CGAL::TBB_support)
@ -130,9 +127,9 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
qt6_generate_moc("File_loader_dialog.h"
"${CMAKE_CURRENT_BINARY_DIR}/File_loader_dialog_moc.cpp")
include(${CMAKE_CURRENT_SOURCE_DIR}/polyhedron_demo_macros.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cgallab_macros.cmake)
qt6_add_resources(CGAL_Qt6_RESOURCE_FILES Polyhedron_3.qrc)
qt6_add_resources(CGAL_Qt6_RESOURCE_FILES cgallab.qrc)
find_path(
CGAL_THREE_HEADERS_PATH
NAMES CGAL/Three/Scene_item.h
@ -162,8 +159,8 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
# put plugins (which are shared libraries) at the same location as
# executable files
set(CGAL_POLYHEDRON_DEMO_PLUGINS_DIR "${RUNTIME_OUTPUT_PATH}")
set(LIBRARY_OUTPUT_PATH "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}")
set(CGAL_LAB_DEMO_PLUGINS_DIR "${RUNTIME_OUTPUT_PATH}")
set(LIBRARY_OUTPUT_PATH "${CGAL_LAB_DEMO_PLUGINS_DIR}")
add_library(
demo_framework SHARED
@ -187,7 +184,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
Scene_item_rendering_helper.cpp
Scene_item_rendering_helper_moc.cpp
Primitive_container.cpp
Polyhedron_demo_plugin_helper.cpp
cgallab_plugin_helper.cpp
CGAL_double_edit.cpp)
target_link_libraries(demo_framework PUBLIC Qt6::OpenGLWidgets Qt6::Widgets Qt6::Gui Qt6::Qml
CGAL::CGAL_Qt6)
@ -350,9 +347,9 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
add_definitions(-DUSE_FORWARD_DECL)
add_library(
polyhedron_demo SHARED
cgal_lab SHARED
MainWindow.cpp
Polyhedron_demo.cpp
CGAL_Lab.cpp
File_loader_dialog_moc.cpp
Use_ssh.cpp
${CGAL_Qt6_RESOURCE_FILES}
@ -363,30 +360,30 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
${statisticsUI_FILES}
${SubViewerUI_files})
target_link_libraries(
polyhedron_demo PUBLIC demo_framework point_dialog Qt6::Gui Qt6::OpenGLWidgets
cgal_lab PUBLIC demo_framework point_dialog Qt6::Gui Qt6::OpenGLWidgets
Qt6::Widgets )
if(LIBSSH_FOUND)
target_compile_definitions(polyhedron_demo PRIVATE -DCGAL_USE_SSH)
target_link_libraries(polyhedron_demo PRIVATE ${LIBSSH_LIBRARIES})
target_include_directories(polyhedron_demo SYSTEM PRIVATE ${LIBSSH_INCLUDE_DIR})
target_compile_definitions(cgal_lab PRIVATE -DCGAL_USE_SSH)
target_link_libraries(cgal_lab PRIVATE ${LIBSSH_LIBRARIES})
target_include_directories(cgal_lab SYSTEM PRIVATE ${LIBSSH_INCLUDE_DIR})
endif() #libssh
if(TARGET Qt6::WebSockets)
target_compile_definitions(polyhedron_demo PRIVATE -DCGAL_USE_WEBSOCKETS)
target_compile_definitions(cgal_lab PRIVATE -DCGAL_USE_WEBSOCKETS)
target_compile_definitions(demo_framework PRIVATE -DCGAL_USE_WEBSOCKETS)
target_link_libraries(polyhedron_demo PRIVATE Qt6::WebSockets)
target_link_libraries(cgal_lab PRIVATE Qt6::WebSockets)
endif()
cgal_add_compilation_test(polyhedron_demo)
add_executable(Polyhedron_3 Polyhedron_3.cpp)
target_link_libraries(Polyhedron_3 PRIVATE polyhedron_demo)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS Polyhedron_3)
cgal_add_compilation_test(Polyhedron_3)
cgal_add_compilation_test(cgal_lab)
add_executable(cgallab cgallab.cpp)
target_link_libraries(cgallab PRIVATE cgal_lab)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS cgallab)
cgal_add_compilation_test(cgallab)
target_link_libraries(Polyhedron_3 PRIVATE demo_framework)
target_link_libraries(cgallab PRIVATE demo_framework)
# Link with CGAL
target_link_libraries(Polyhedron_3 PUBLIC CGAL::CGAL_Qt6)
target_link_libraries(cgallab PUBLIC CGAL::CGAL_Qt6)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS Polyhedron_3)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS cgallab)
###########
# PLUGINS #
@ -407,17 +404,17 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
#
add_executable(CGAL_Mesh_3 Mesh_3.cpp)
add_dependencies(CGAL_Mesh_3 Mesh_3)
target_link_libraries(CGAL_Mesh_3 PRIVATE polyhedron_demo)
target_link_libraries(CGAL_Mesh_3 PRIVATE cgal_lab)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_Mesh_3)
add_executable(CGAL_Classification Classification.cpp)
add_dependencies(CGAL_Classification Classification)
target_link_libraries(CGAL_Classification PRIVATE polyhedron_demo)
target_link_libraries(CGAL_Classification PRIVATE cgal_lab)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_Classification)
add_executable(CGAL_PMP PMP.cpp)
add_dependencies(CGAL_PMP PMP)
target_link_libraries(CGAL_PMP PRIVATE polyhedron_demo)
target_link_libraries(CGAL_PMP PRIVATE cgal_lab)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_PMP)
#WS Server
@ -432,14 +429,14 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
if(TARGET CGAL_Qt6)
export(
TARGETS CGAL CGAL_Qt6 CGAL_ImageIO
FILE polyhedron_demo_targets.cmake
NAMESPACE Polyhedron_)
FILE cgal_lab_targets.cmake
NAMESPACE Lab_)
endif()
if(TARGET CGAL_Qt6_moc_and_resources)
export(
TARGETS CGAL_Qt6_moc_and_resources
NAMESPACE Polyhedron_ APPEND
FILE polyhedron_demo_targets.cmake)
NAMESPACE Lab_ APPEND
FILE cgal_lab_targets.cmake)
endif()
export(
TARGETS demo_framework
@ -452,26 +449,26 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND)
scene_selection_item
scene_item_decorator
scene_k_ring_selection
NAMESPACE Polyhedron_ APPEND
FILE polyhedron_demo_targets.cmake)
NAMESPACE Lab_ APPEND
FILE cgal_lab_targets.cmake)
configure_file(CGAL_polyhedron_demoConfig.cmake.in
CGAL_polyhedron_demoConfig.cmake)
configure_file(cgallabConfig.cmake.in
cgallabConfig.cmake)
#TO DO script the activation of all the plugins.
else(CGAL_Qt6_FOUND AND Qt6_FOUND)
set(POLYHEDRON_MISSING_DEPS "")
set(Lab_MISSING_DEPS "")
if(NOT CGAL_Qt6_FOUND)
set(POLYHEDRON_MISSING_DEPS "the CGAL Qt6 library, ${POLYHEDRON_MISSING_DEPS}")
set(Lab_MISSING_DEPS "the CGAL Qt6 library, ${Lab_MISSING_DEPS}")
endif()
if(NOT Qt6_FOUND)
set(POLYHEDRON_MISSING_DEPS "Qt6, ${POLYHEDRON_MISSING_DEPS}")
set(Lab_MISSING_DEPS "Qt6, ${Lab_MISSING_DEPS}")
endif()
message("NOTICE: XX This demo requires ${POLYHEDRON_MISSING_DEPS} and will not be compiled.")
message("NOTICE: XX This demo requires ${Lab_MISSING_DEPS} and will not be compiled.")
endif(CGAL_Qt6_FOUND AND Qt6_FOUND)

View File

@ -1,4 +1,4 @@
#include "Polyhedron_demo.h"
#include "CGAL_Lab.h"
#include <clocale>
#include <CGAL/Qt/resources.h>
#include <QSurfaceFormat>
@ -10,7 +10,7 @@
*/
int main(int argc, char **argv)
{
Polyhedron_demo app(argc, argv,
CGAL_Lab app(argc, argv,
"Classification demo",
"CGAL Classification Demo",
QStringList() << "Classification");

View File

@ -52,8 +52,8 @@
#include <CGAL/Three/Three.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Scene_item_with_properties.h>
#include "ui_SubViewer.h"
#include "ui_MainWindow.h"
@ -247,7 +247,7 @@ MainWindow::MainWindow(const QStringList &keywords, bool verbose, QWidget* paren
// add the "About CGAL..." and "About demo..." entries
this->addAboutCGAL();
this->addAboutDemo(":/cgal/Polyhedron_3/about.html");
this->addAboutDemo(":/cgal/Lab/about.html");
// Connect the button "addButton" with actionLoad
ui->addButton->setDefaultAction(ui->actionLoad);
@ -662,7 +662,7 @@ void MainWindow::loadPlugins()
}
}
}
QString env_path = qgetenv("POLYHEDRON_DEMO_PLUGINS_PATH");
QString env_path = qgetenv("LAB_DEMO_PLUGINS_PATH");
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
QChar separator = QDir::listSeparator();
#else
@ -734,8 +734,8 @@ bool MainWindow::hasPlugin(const QString& pluginName) const
bool MainWindow::initPlugin(QObject* obj)
{
QObjectList childs = this->children();
CGAL::Three::Polyhedron_demo_plugin_interface* plugin =
qobject_cast<CGAL::Three::Polyhedron_demo_plugin_interface*>(obj);
CGAL::Three::CGAL_Lab_plugin_interface* plugin =
qobject_cast<CGAL::Three::CGAL_Lab_plugin_interface*>(obj);
if(plugin) {
// Call plugin's init() method
obj->setParent(this);
@ -759,8 +759,8 @@ bool MainWindow::initPlugin(QObject* obj)
bool MainWindow::initIOPlugin(QObject* obj)
{
CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin =
qobject_cast<CGAL::Three::Polyhedron_demo_io_plugin_interface*>(obj);
CGAL::Three::CGAL_Lab_io_plugin_interface* plugin =
qobject_cast<CGAL::Three::CGAL_Lab_io_plugin_interface*>(obj);
if(plugin) {
plugin->init();
io_plugins << plugin;
@ -973,7 +973,7 @@ void MainWindow::reloadItem() {
continue;
}
CGAL::Three::Polyhedron_demo_io_plugin_interface* fileloader = findLoader(loader_name);
CGAL::Three::CGAL_Lab_io_plugin_interface* fileloader = findLoader(loader_name);
QFileInfo fileinfo(filename);
bool ok;
QList<Scene_item*> new_items = loadItem(fileinfo, fileloader, ok, false);
@ -1017,8 +1017,8 @@ void MainWindow::reloadItem() {
}
}
CGAL::Three::Polyhedron_demo_io_plugin_interface* MainWindow::findLoader(const QString& loader_name) const {
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* io_plugin :
CGAL::Three::CGAL_Lab_io_plugin_interface* MainWindow::findLoader(const QString& loader_name) const {
for(CGAL::Three::CGAL_Lab_io_plugin_interface* io_plugin :
io_plugins) {
if(io_plugin->name() == loader_name) {
return io_plugin;
@ -1103,7 +1103,7 @@ void MainWindow::open(QString filename)
{
// collect all io_plugins and offer them to load if the file extension match one name filter
// also collect all available plugins in case of a no extension match
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* io_plugin : io_plugins) {
for(CGAL::Three::CGAL_Lab_io_plugin_interface* io_plugin : io_plugins) {
if ( file_matches_filter(io_plugin->loadNameFilters(), filename.toLower()) )
{
if ( !io_plugin->canLoad(fileinfo) ) continue;
@ -1115,7 +1115,7 @@ void MainWindow::open(QString filename)
}
}
//if no plugin is correct, offer them all.
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* io_plugin : io_plugins) {
for(CGAL::Three::CGAL_Lab_io_plugin_interface* io_plugin : io_plugins) {
all_items << io_plugin->name();
}
}
@ -1183,7 +1183,7 @@ bool MainWindow::open(QString filename, QString loader_name) {
QList<Scene_item*> MainWindow::loadItem(QFileInfo fileinfo,
CGAL::Three::Polyhedron_demo_io_plugin_interface* loader,
CGAL::Three::CGAL_Lab_io_plugin_interface* loader,
bool &ok,
bool add_to_scene) {
if(!fileinfo.isFile() || !fileinfo.isReadable()) {
@ -1834,10 +1834,10 @@ void MainWindow::on_actionLoad_triggered()
filters << "All Files (*)";
typedef QMap<QString, CGAL::Three::Polyhedron_demo_io_plugin_interface*> FilterPluginMap;
typedef QMap<QString, CGAL::Three::CGAL_Lab_io_plugin_interface*> FilterPluginMap;
FilterPluginMap filterPluginMap;
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin : io_plugins) {
for(CGAL::Three::CGAL_Lab_io_plugin_interface* plugin : io_plugins) {
QStringList split_filters = plugin->loadNameFilters().split(";;");
for(const QString& filter : split_filters) {
FilterPluginMap::iterator it = filterPluginMap.find(filter);
@ -1868,7 +1868,7 @@ void MainWindow::on_actionLoad_triggered()
FilterPluginMap::iterator it =
filterPluginMap.find(dialog.selectedNameFilter());
CGAL::Three::Polyhedron_demo_io_plugin_interface* selectedPlugin = nullptr;
CGAL::Three::CGAL_Lab_io_plugin_interface* selectedPlugin = nullptr;
if(it != filterPluginMap.end()) {
selectedPlugin = it.value();
@ -1927,10 +1927,10 @@ void MainWindow::on_actionSaveAs_triggered()
while(!to_save.empty())
{
Scene_item* item = to_save.front();
QVector<CGAL::Three::Polyhedron_demo_io_plugin_interface*> canSavePlugins;
QVector<CGAL::Three::CGAL_Lab_io_plugin_interface*> canSavePlugins;
QStringList filters;
QString sf;
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin : io_plugins) {
for(CGAL::Three::CGAL_Lab_io_plugin_interface* plugin : io_plugins) {
if(plugin->canSave(item)) {
canSavePlugins << plugin;
filters += plugin->saveNameFilters();
@ -2046,7 +2046,7 @@ void MainWindow::on_actionSaveAs_triggered()
void MainWindow::save(QString filename, QList<CGAL::Three::Scene_item*>& to_save) {
QFileInfo fileinfo(filename);
bool saved = false;
for(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin : io_plugins) {
for(CGAL::Three::CGAL_Lab_io_plugin_interface* plugin : io_plugins) {
if( plugin->canSave(to_save.front()) &&
file_matches_filter(plugin->saveNameFilters(),filename.toLower()) )
{
@ -2879,14 +2879,14 @@ void MainWindow::on_actionSa_ve_Scene_as_Script_triggered()
std::vector<QColor> colors;
std::vector<int> rendering_modes;
QStringList not_saved;
Polyhedron_demo_io_plugin_interface* camera_plugin = nullptr;
CGAL_Lab_io_plugin_interface* camera_plugin = nullptr;
QMap<QString, QVector<QString> > group_children_map;
for(int i = 0; i < scene->numberOfEntries(); ++i)
{
Scene_item* item = scene->item(i);
QString loader;// = item->property("loader_name").toString();
QString ext;
for(Polyhedron_demo_io_plugin_interface* iop : io_plugins)
for(CGAL_Lab_io_plugin_interface* iop : io_plugins)
{
if(iop->name() == "camera_positions_plugin")
camera_plugin = iop;
@ -3087,8 +3087,8 @@ void MainWindow::on_actionSa_ve_Scene_as_Script_triggered()
tr("Enter the name of your scene file."));
if(path.isEmpty())
return;
if(!path.contains("/tmp/Polyhedron_demo_"))
path.prepend("/tmp/Polyhedron_demo_");
if(!path.contains("/tmp/CGAL_Lab_"))
path.prepend("/tmp/CGAL_Lab_");
try{
ssh_session session = nullptr;
bool res = establish_ssh_session_from_agent(session,
@ -3608,7 +3608,7 @@ void MainWindow::test_all_actions()
selectSceneItem(0);
for(PluginNamePair pnp : plugins)
{
Polyhedron_demo_plugin_interface* plugin = pnp.first;
CGAL_Lab_plugin_interface* plugin = pnp.first;
for(QAction* action : plugin->actions()){
if(plugin->applicable(action)){
qDebug()<<"Testing "<<pnp.second<<"and "<<action->text()<<" on";
@ -3724,7 +3724,7 @@ void MainWindow::on_actionLoad_a_Scene_from_a_Script_File_triggered()
ssh_free(session);
return;
}
path.prepend("Polyhedron_demo_");
path.prepend("CGAL_Lab_");
path = tr("/tmp/%2").arg(path);
res = pull_file(session,path.toStdString().c_str(), filename.toStdString().c_str());
if(!res)

View File

@ -33,8 +33,8 @@ class QMenu;
class QWidgetAction;
namespace CGAL {
namespace Three{
class Polyhedron_demo_io_plugin_interface;
class Polyhedron_demo_plugin_interface;
class CGAL_Lab_io_plugin_interface;
class CGAL_Lab_plugin_interface;
class Scene_item;
class Viewer_interface;
}
@ -88,14 +88,14 @@ public:
/*! Finds an I/O plugin.
* throws std::invalid_argument if no loader with that argument can be found
@returns the I/O plugin associated with `loader_name`*/
CGAL::Three::Polyhedron_demo_io_plugin_interface* findLoader(const QString& loader_name) const;
CGAL::Three::CGAL_Lab_io_plugin_interface* findLoader(const QString& loader_name) const;
/*! \brief loads on or more item with a given loader.
*
* throws `std::logic_error` if loading does not succeed or
* `std::invalid_argument` if `fileinfo` specifies an invalid file*/
QList<CGAL::Three::Scene_item *> loadItem(QFileInfo fileinfo,
CGAL::Three::Polyhedron_demo_io_plugin_interface*,
CGAL::Three::CGAL_Lab_io_plugin_interface*,
bool& ok,
bool add_to_scene=true);
@ -418,11 +418,11 @@ private:
QSortFilterProxyModel* proxyModel;
QTreeView* sceneView;
Ui::MainWindow* ui;
QVector<CGAL::Three::Polyhedron_demo_io_plugin_interface*> io_plugins;
QVector<CGAL::Three::CGAL_Lab_io_plugin_interface*> io_plugins;
QString last_saved_dir;
QMap<QString,QString> default_plugin_selection;
// typedef to make Q_FOREACH work
typedef QPair<CGAL::Three::Polyhedron_demo_plugin_interface*, QString> PluginNamePair;
typedef QPair<CGAL::Three::CGAL_Lab_plugin_interface*, QString> PluginNamePair;
QVector<PluginNamePair > plugins;
//!Called when "Add new group" in the file menu is triggered.
QAction* actionAddToGroup;

View File

@ -14,7 +14,7 @@
<string>CGAL Three</string>
</property>
<property name="windowIcon">
<iconset resource="Polyhedron_3.qrc">
<iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/resources/cgal_logo.xpm</normaloff>:/cgal/icons/resources/cgal_logo.xpm</iconset>
</property>
<widget class="QWidget" name="centralwidget">
@ -132,7 +132,7 @@
<string>+</string>
</property>
<property name="icon">
<iconset resource="Polyhedron_3.qrc">
<iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
</property>
</widget>
@ -143,7 +143,7 @@
<string>-</string>
</property>
<property name="icon">
<iconset resource="Polyhedron_3.qrc">
<iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
</property>
</widget>
@ -154,7 +154,7 @@
<string>...</string>
</property>
<property name="icon">
<iconset resource="Polyhedron_3.qrc">
<iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/duplicate</normaloff>:/cgal/icons/duplicate</iconset>
</property>
</widget>
@ -165,7 +165,7 @@
<string>...</string>
</property>
<property name="icon">
<iconset resource="Polyhedron_3.qrc">
<iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/resources/up.png</normaloff>:/cgal/icons/resources/up.png</iconset>
</property>
</widget>
@ -176,7 +176,7 @@
<string>...</string>
</property>
<property name="icon">
<iconset resource="Polyhedron_3.qrc">
<iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/resources/down.png</normaloff>:/cgal/icons/resources/down.png</iconset>
</property>
</widget>
@ -344,7 +344,7 @@
</action>
<action name="actionLoad">
<property name="icon">
<iconset resource="Polyhedron_3.qrc">
<iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
</property>
<property name="text">
@ -356,7 +356,7 @@
</action>
<action name="actionErase">
<property name="icon">
<iconset resource="Polyhedron_3.qrc">
<iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
</property>
<property name="text">
@ -368,7 +368,7 @@
</action>
<action name="actionDuplicate">
<property name="icon">
<iconset resource="Polyhedron_3.qrc">
<iconset resource="cgallab.qrc">
<normaloff>:/cgal/icons/duplicate</normaloff>:/cgal/icons/duplicate</iconset>
</property>
<property name="text">
@ -471,8 +471,8 @@
</action>
</widget>
<resources>
<include location="Polyhedron_3.qrc"/>
<include location="Polyhedron_3.qrc"/>
<include location="cgallab.qrc"/>
<include location="cgallab.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -3,7 +3,7 @@
#include <QtCore/qglobal.h>
#ifdef polyhedron_demo_EXPORTS
#ifdef cgal_lab_EXPORTS
# define mainwindow_EXPORTS
#endif

View File

@ -1,9 +1,9 @@
Main Page {#mainpage}
============
These pages are not documenting the whole Polyhedron demo but only the API that can be useful to create and add a new plugin.
These pages are not documenting the whole Lab but only the API that can be useful to create and add a new plugin.
Understanding the Polyhedron demo
Understanding the Lab
============
There are several levels in this demo.
@ -18,19 +18,19 @@ A plugin usually defines an object that inherits from Scene_item or uses some of
Creating a simple Plugin
============
A basic plugin will inherit from Polyhedron_demo_plugin_interface. It can also inherits from the Polyhedron_demo_plugin_helper instead, for a more detailed model of plugin.
Its name must be of the form Polyhedron_demo_xxxx_yyyy_plugin. \n
A basic plugin will inherit from CGAL_Lab_plugin_interface. It can also inherits from the CGAL_Lab_plugin_helper instead, for a more detailed model of plugin.
Its name must be of the form CGAL_Lab_xxxx_yyyy_plugin. \n
<b>In the CMakeList.txt file, in the section Plugins, add the following lines :</b>
polyhedron_demo_plugin(xxxx_yyyy_plugin Polyhedron_demo_xxxx_yyyy_plugin)
cgal_lab_plugin(xxxx_yyyy_plugin CGAL_Lab_xxxx_yyyy_plugin)
target_link_libraries(xxxx_yyyy_plugin scene_polyhedron_item)
[init]: @ref Polyhedron_demo_plugin_helper#init(QMainWindow *, Scene_interface *)
[init]: @ref CGAL_Lab_plugin_helper#init(QMainWindow *, Scene_interface *)
The class must contain the following lines :\n
Q_OBJECT\n
Q_INTERFACES(Polyhedron_demo_plugin_interface)\n
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")\n
Q_INTERFACES(CGAL_Lab_plugin_interface)\n
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")\n
In the function [init], get a reference to the Scene and to the MainWindow. Then, create and link the actions of the plugin.\n
Create a list of QActions containing the actions of the plugin.\n
@ -43,7 +43,7 @@ If the plugin implements a new Scene_item, please notice that a Scene_itam have
A plugin must always contain
~~~~~~~~~~~~~{.cpp}
#include "Polyhedron_demo_xxxx_yyyy_plugin.moc"
#include "CGAL_Lab_xxxx_yyyy_plugin.moc"
~~~~~~~~~~~~~
List of useful classes :
@ -52,8 +52,8 @@ List of useful classes :
- Viewer_interface
- Scene_interface
- Scene_item
- Polyhedron_demo_plugin_helper
- Polyhedron_demo_plugin_interface
- CGAL_Lab_plugin_helper
- CGAL_Lab_plugin_interface
Example :
@ -184,21 +184,21 @@ private:
}; //end of class Scene_triangle_item
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
class Polyhedron_demo_example_plugin :
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
class CGAL_Lab_example_plugin :
public QObject,
public Polyhedron_demo_plugin_helper
public CGAL_Lab_plugin_helper
{
//Configures CMake to use MOC correctly
Q_OBJECT
Q_INTERFACES(Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public :
// To silent a warning -Woverloaded-virtual
// See https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
using Polyhedron_demo_plugin_helper::init;
using CGAL_Lab_plugin_helper::init;
void init(QMainWindow* mainWindow,
Scene_interface* scene_interface) {
@ -233,8 +233,8 @@ private:
Scene_item* triangle;
QAction* actionDrawTriangle;
}; //end of class Polyhedron_demo_example_plugin
}; //end of class CGAL_Lab_example_plugin
#include "Polyhedron_demo_example_plugin.moc"
#include "CGAL_Lab_example_plugin.moc"
~~~~~~~~~~~~~

View File

@ -1,4 +1,4 @@
#include "Polyhedron_demo.h"
#include "CGAL_Lab.h"
#include <clocale>
#include <CGAL/Qt/resources.h>
#include <QSurfaceFormat>
@ -10,7 +10,7 @@
*/
int main(int argc, char **argv)
{
Polyhedron_demo app(argc, argv,
CGAL_Lab app(argc, argv,
"Mesh_3 demo",
"CGAL Mesh_3 Demo",
QStringList() << "Mesh_3");

View File

@ -13,6 +13,6 @@ public:
};
Q_DECLARE_INTERFACE(Messages_interface,
"com.geometryfactory.PolyhedronDemo.MessagesInterface/1.0")
"com.geometryfactory.CGALLab.MessagesInterface/1.0")
#endif // MESSAGES_INTERFACE_H

View File

@ -1,4 +1,4 @@
#include "Polyhedron_demo.h"
#include "CGAL_Lab.h"
#include <clocale>
#include <CGAL/Qt/resources.h>
#include <QSurfaceFormat>
@ -19,7 +19,7 @@ int main(int argc, char **argv)
QSurfaceFormat::setDefaultFormat(fmt);
QStringList keywords;
keywords << "PMP";
Polyhedron_demo app(argc, argv,
CGAL_Lab app(argc, argv,
"PMP demo",
"CGAL Polygon Mesh Processing Demo",
keywords);

View File

@ -1,10 +1,10 @@
include(polyhedron_demo_macros)
include(cgallab_macros)
polyhedron_demo_plugin(do_trees_intersect_plugin Do_trees_intersect_plugin)
cgal_lab_plugin(do_trees_intersect_plugin Do_trees_intersect_plugin)
target_link_libraries(do_trees_intersect_plugin PUBLIC scene_surface_mesh_item
scene_movable_sm_item)
polyhedron_demo_plugin(cut_plugin Cut_plugin)
cgal_lab_plugin(cut_plugin Cut_plugin)
target_link_libraries(cut_plugin PUBLIC scene_surface_mesh_item
scene_basic_objects scene_color_ramp)
if(TARGET CGAL::TBB_support)

View File

@ -8,8 +8,8 @@
#include "Messages_interface.h"
#include "Scene_plane_item.h"
#include "Scene_surface_mesh_item.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Scene_interface.h>
#include <CGAL/Three/Scene_item_rendering_helper.h>
#include <CGAL/Three/Viewer_interface.h>
@ -923,22 +923,22 @@ private:
}; // end class Scene_edges_item
using namespace CGAL::Three;
class Polyhedron_demo_cut_plugin :
class CGAL_Lab_cut_plugin :
public QObject,
public Polyhedron_demo_plugin_interface,
public Polyhedron_demo_io_plugin_interface
public CGAL_Lab_plugin_interface,
public CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90")
public:
Polyhedron_demo_cut_plugin() : QObject(), edges_item(nullptr) {
CGAL_Lab_cut_plugin() : QObject(), edges_item(nullptr) {
}
~Polyhedron_demo_cut_plugin();
~CGAL_Lab_cut_plugin();
bool applicable(QAction*) const override{
// returns true if one surface_mesh is in the entries
@ -1007,7 +1007,7 @@ public:
return false;
}
using Polyhedron_demo_io_plugin_interface::init;
using CGAL_Lab_io_plugin_interface::init;
void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface,
Messages_interface* m) override;
QList<QAction*> actions() const override;
@ -1124,10 +1124,10 @@ private:
Edge_sm_trees edge_sm_trees;
template<typename Item, typename Mesh, typename Facets_traits, typename Facets_tree, typename Edges_tree>
void apply(Item* item, QMap< QObject*, Facets_tree*>& f_trees, QMap<QObject*, Edges_tree*>& e_trees);
}; // end Polyhedron_demo_cut_plugin
}; // end CGAL_Lab_cut_plugin
Polyhedron_demo_cut_plugin::~Polyhedron_demo_cut_plugin()
CGAL_Lab_cut_plugin::~CGAL_Lab_cut_plugin()
{
for(Facet_sm_tree *tree : facet_sm_trees.values())
{
@ -1140,7 +1140,7 @@ Polyhedron_demo_cut_plugin::~Polyhedron_demo_cut_plugin()
}
void Polyhedron_demo_cut_plugin::init(QMainWindow* mainWindow,
void CGAL_Lab_cut_plugin::init(QMainWindow* mainWindow,
CGAL::Three::Scene_interface* scene_interface,
Messages_interface* m)
{
@ -1190,11 +1190,11 @@ void Polyhedron_demo_cut_plugin::init(QMainWindow* mainWindow,
}
QList<QAction*> Polyhedron_demo_cut_plugin::actions() const {
QList<QAction*> CGAL_Lab_cut_plugin::actions() const {
return _actions;
}
void Polyhedron_demo_cut_plugin::updateTrees(int id)
void CGAL_Lab_cut_plugin::updateTrees(int id)
{
if(plane_item &&
qobject_cast<Scene_surface_mesh_item*>(scene->item(id)))
@ -1202,7 +1202,7 @@ if(plane_item &&
}
template<typename Item, typename Mesh, typename Facets_traits, typename Facets_tree, typename Edges_tree>
void Polyhedron_demo_cut_plugin::apply(Item* item, QMap< QObject*, Facets_tree*>& f_trees, QMap<QObject*, Edges_tree*>& e_trees)
void CGAL_Lab_cut_plugin::apply(Item* item, QMap< QObject*, Facets_tree*>& f_trees, QMap<QObject*, Edges_tree*>& e_trees)
{
const Mesh& mesh = *item->polyhedron();
if(!CGAL::is_triangle_mesh(mesh))
@ -1252,7 +1252,7 @@ void Polyhedron_demo_cut_plugin::apply(Item* item, QMap< QObject*, Facets_tree*>
}
}
void Polyhedron_demo_cut_plugin::createCutPlane() {
void CGAL_Lab_cut_plugin::createCutPlane() {
bool updating = false;
Scene_aabb_plane_item::Cut_planes_types type;
int plane_id = -1;
@ -1313,7 +1313,7 @@ void Polyhedron_demo_cut_plugin::createCutPlane() {
cut();
}
void Polyhedron_demo_cut_plugin::Intersection()
void CGAL_Lab_cut_plugin::Intersection()
{
QApplication::setOverrideCursor(Qt::WaitCursor);
if(!plane_item)
@ -1325,7 +1325,7 @@ void Polyhedron_demo_cut_plugin::Intersection()
QApplication::restoreOverrideCursor();
}
void Polyhedron_demo_cut_plugin::SignedFacets() {
void CGAL_Lab_cut_plugin::SignedFacets() {
QApplication::setOverrideCursor(Qt::WaitCursor);
if(!plane_item)
createCutPlane();
@ -1340,7 +1340,7 @@ void Polyhedron_demo_cut_plugin::SignedFacets() {
QApplication::restoreOverrideCursor();
}
void Polyhedron_demo_cut_plugin::UnsignedFacets() {
void CGAL_Lab_cut_plugin::UnsignedFacets() {
QApplication::setOverrideCursor(Qt::WaitCursor);
if(!plane_item)
createCutPlane();
@ -1354,7 +1354,7 @@ void Polyhedron_demo_cut_plugin::UnsignedFacets() {
}
QApplication::restoreOverrideCursor();
}
void Polyhedron_demo_cut_plugin::UnsignedEdges() {
void CGAL_Lab_cut_plugin::UnsignedEdges() {
QApplication::setOverrideCursor(Qt::WaitCursor);
if(!plane_item)
createCutPlane();
@ -1369,7 +1369,7 @@ void Polyhedron_demo_cut_plugin::UnsignedEdges() {
QApplication::restoreOverrideCursor();
}
void Polyhedron_demo_cut_plugin::computeIntersection()
void CGAL_Lab_cut_plugin::computeIntersection()
{
QApplication::setOverrideCursor(Qt::WaitCursor);
if(!edges_item) {
@ -1417,7 +1417,7 @@ void Polyhedron_demo_cut_plugin::computeIntersection()
QApplication::restoreOverrideCursor();
}
void Polyhedron_demo_cut_plugin::cut()
void CGAL_Lab_cut_plugin::cut()
{
if(!plane_item)
return;

View File

@ -1,4 +1,4 @@
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <QApplication>
#include <QObject>
#include <QAction>
@ -18,11 +18,11 @@
class DoTreesIntersectplugin:
public QObject,
public CGAL::Three::Polyhedron_demo_plugin_interface
public CGAL::Three::CGAL_Lab_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public:
bool eventFilter(QObject *, QEvent *event) override

View File

@ -1,7 +1,7 @@
#include <QtCore/qglobal.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include "Scene_surface_mesh_item.h"
#include "Scene_polygon_soup_item.h"
@ -293,13 +293,13 @@ Q_SIGNALS:
void status_report(QString);
};
class Polyhedron_demo_alpha_wrap_3_plugin
class CGAL_Lab_alpha_wrap_3_plugin
: public QObject,
public CGAL::Three::Polyhedron_demo_plugin_helper
public CGAL::Three::CGAL_Lab_plugin_helper
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
using Triangles = std::vector<Kernel::Triangle_3>;
using Segments = std::vector<Kernel::Segment_3>;

View File

@ -1,8 +1,8 @@
include(polyhedron_demo_macros)
include(cgallab_macros)
#if the plugin has a UI file
qt6_wrap_ui(alpha_wrap_3UI_FILES alpha_wrap_3_dialog.ui)
polyhedron_demo_plugin(alpha_wrap_3_plugin Alpha_wrap_3_plugin ${alpha_wrap_3UI_FILES})
cgal_lab_plugin(alpha_wrap_3_plugin Alpha_wrap_3_plugin ${alpha_wrap_3UI_FILES})
#if the plugin uses external libraries like scene_items
target_link_libraries(alpha_wrap_3_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item scene_points_with_normal_item scene_selection_item scene_polylines_item)

View File

@ -1,7 +1,7 @@
include( polyhedron_demo_macros )
include( cgallab_macros )
qt6_wrap_ui( cameraUI_FILES Camera_positions_list.ui )
polyhedron_demo_plugin(camera_positions_plugin
cgal_lab_plugin(camera_positions_plugin
Camera_positions_plugin
Camera_positions_list.cpp
${cameraUI_FILES}

View File

@ -43,7 +43,7 @@
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/plus</normaloff>:/cgal/icons/plus</iconset>
</property>
</widget>
@ -54,7 +54,7 @@
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/minus</normaloff>:/cgal/icons/minus</iconset>
</property>
</widget>
@ -72,7 +72,7 @@
<string>&amp;Up</string>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/up.png</normaloff>:/cgal/icons/resources/up.png</iconset>
</property>
<property name="shortcut">
@ -86,7 +86,7 @@
<string>&amp;Down</string>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/down.png</normaloff>:/cgal/icons/resources/down.png</iconset>
</property>
<property name="shortcut">
@ -120,7 +120,7 @@
<string>PushButton</string>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/front.png</normaloff>:/cgal/icons/resources/front.png</iconset>
</property>
</widget>
@ -134,7 +134,7 @@
<string>PushButton</string>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/back.png</normaloff>:/cgal/icons/resources/back.png</iconset>
</property>
</widget>
@ -148,7 +148,7 @@
<string>PushButton</string>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/top.png</normaloff>:/cgal/icons/resources/top.png</iconset>
</property>
</widget>
@ -162,7 +162,7 @@
<string>PushButton</string>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/bot.png</normaloff>:/cgal/icons/resources/bot.png</iconset>
</property>
</widget>
@ -176,7 +176,7 @@
<string>PushButton</string>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/left.png</normaloff>:/cgal/icons/resources/left.png</iconset>
</property>
</widget>
@ -190,7 +190,7 @@
<string>PushButton</string>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/right.png</normaloff>:/cgal/icons/resources/right.png</iconset>
</property>
</widget>
@ -217,7 +217,7 @@
</widget>
</widget>
<resources>
<include location="../../Polyhedron_3.qrc"/>
<include location="../../cgallab.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -1,6 +1,6 @@
#include <QtCore/qglobal.h>
#include "Messages_interface.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include "Camera_positions_list.h"
@ -9,13 +9,13 @@
#include <QMainWindow>
using namespace CGAL::Three;
class Polyhedron_demo_camera_positions_plugin :
class CGAL_Lab_camera_positions_plugin :
public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface
public CGAL::Three::CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90")
public:
void init() override;
@ -40,7 +40,7 @@ private:
Camera_positions_list* cpl;
};
void Polyhedron_demo_camera_positions_plugin::init()
void CGAL_Lab_camera_positions_plugin::init()
{
cpl = new Camera_positions_list(CGAL::Three::Three::mainWindow());

View File

@ -1,4 +1,4 @@
include(polyhedron_demo_macros)
include(cgallab_macros)
if(TARGET CGAL::Eigen3_support)
@ -22,7 +22,7 @@ if(TARGET CGAL::Eigen3_support)
qt6_wrap_ui(classificationUI_FILES Classification_widget.ui
Classification_advanced_widget.ui)
polyhedron_demo_plugin(
cgal_lab_plugin(
classification_plugin
Classification_plugin
Point_set_item_classification.cpp

View File

@ -19,7 +19,7 @@
#include "Scene_polygon_soup_item.h"
#include <CGAL/Three/Scene_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h>
#include <CGAL/Random.h>
@ -48,13 +48,13 @@
using namespace CGAL::Three;
class Polyhedron_demo_classification_plugin :
class CGAL_Lab_classification_plugin :
public QObject,
public Polyhedron_demo_plugin_helper
public CGAL_Lab_plugin_helper
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
struct LabelButton
{
@ -136,7 +136,7 @@ public:
void print_message(QString message) { CGAL::Three::Three::information(message); }
QList<QAction*> actions() const { return QList<QAction*>() << actionClassification; }
using Polyhedron_demo_plugin_helper::init;
using CGAL_Lab_plugin_helper::init;
void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m) {
mw = mainWindow;
@ -1714,6 +1714,6 @@ private:
Item_map item_map;
}; // end Polyhedron_demo_classification_plugin
}; // end CGAL_Lab_classification_plugin
#include "Classification_plugin.moc"

View File

@ -64,7 +64,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/resources/help_button.png</normaloff>:/cgal/icons/resources/help_button.png</iconset>
</property>
</widget>
@ -75,7 +75,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="../../Polyhedron_3.qrc">
<iconset resource="../../cgallab.qrc">
<normaloff>:/cgal/icons/check-off.png</normaloff>:/cgal/icons/check-off.png</iconset>
</property>
</widget>
@ -195,7 +195,7 @@
</widget>
</widget>
<resources>
<include location="../../Polyhedron_3.qrc"/>
<include location="../../cgallab.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -0,0 +1,4 @@
include(cgallab_macros)
cgal_lab_plugin(nef_plugin Nef_plugin)
target_link_libraries(nef_plugin PUBLIC scene_nef_polyhedron_item)

View File

@ -1,7 +1,7 @@
#include "Scene_surface_mesh_item.h"
#include "Scene_nef_polyhedron_item.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <QString>
#include <QAction>
@ -11,13 +11,13 @@
#include <QElapsedTimer>
#include <QMessageBox>
using namespace CGAL::Three;
class Polyhedron_demo_nef_plugin :
class CGAL_Lab_nef_plugin :
public QObject,
public Polyhedron_demo_plugin_interface
public CGAL_Lab_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public:
@ -100,10 +100,10 @@ public Q_SLOTS:
void on_actionDifference_triggered();
void on_actionMinkowskiSum_triggered();
void on_actionConvexDecomposition_triggered();
}; // end class Polyhedron_demo_nef_plugin
}; // end class CGAL_Lab_nef_plugin
void
Polyhedron_demo_nef_plugin::on_actionToNef_triggered()
CGAL_Lab_nef_plugin::on_actionToNef_triggered()
{
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
@ -133,7 +133,7 @@ Polyhedron_demo_nef_plugin::on_actionToNef_triggered()
void
Polyhedron_demo_nef_plugin::on_actionConvexDecomposition_triggered()
CGAL_Lab_nef_plugin::on_actionConvexDecomposition_triggered()
{
QApplication::setOverrideCursor(Qt::WaitCursor);
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
@ -178,7 +178,7 @@ Polyhedron_demo_nef_plugin::on_actionConvexDecomposition_triggered()
}
void
Polyhedron_demo_nef_plugin::on_actionToPoly_triggered()
CGAL_Lab_nef_plugin::on_actionToPoly_triggered()
{
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
@ -213,21 +213,21 @@ Polyhedron_demo_nef_plugin::on_actionToPoly_triggered()
}
}
void Polyhedron_demo_nef_plugin::on_actionUnion_triggered()
void CGAL_Lab_nef_plugin::on_actionUnion_triggered()
{
QApplication::setOverrideCursor(Qt::WaitCursor);
boolean_operation(BOOLEAN_UNION);
QApplication::restoreOverrideCursor();
}
void Polyhedron_demo_nef_plugin::on_actionIntersection_triggered()
void CGAL_Lab_nef_plugin::on_actionIntersection_triggered()
{
QApplication::setOverrideCursor(Qt::WaitCursor);
boolean_operation(BOOLEAN_INTERSECTION);
QApplication::restoreOverrideCursor();
}
void Polyhedron_demo_nef_plugin::on_actionDifference_triggered()
void CGAL_Lab_nef_plugin::on_actionDifference_triggered()
{
QApplication::setOverrideCursor(Qt::WaitCursor);
boolean_operation(BOOLEAN_DIFFERENCE);
@ -235,14 +235,14 @@ void Polyhedron_demo_nef_plugin::on_actionDifference_triggered()
}
void
Polyhedron_demo_nef_plugin::on_actionMinkowskiSum_triggered()
CGAL_Lab_nef_plugin::on_actionMinkowskiSum_triggered()
{
QApplication::setOverrideCursor(Qt::WaitCursor);
boolean_operation(MINKOWSKI_SUM);
QApplication::restoreOverrideCursor();
}
void Polyhedron_demo_nef_plugin::boolean_operation(const Boolean_operation operation)
void CGAL_Lab_nef_plugin::boolean_operation(const Boolean_operation operation)
{
const int indexA = scene->selectionAindex();
const int indexB = scene->selectionBindex();

View File

@ -1,12 +1,12 @@
include(polyhedron_demo_macros)
include(cgallab_macros)
polyhedron_demo_plugin(convex_hull_plugin Convex_hull_plugin KEYWORDS
cgal_lab_plugin(convex_hull_plugin Convex_hull_plugin KEYWORDS
PointSetProcessing)
target_link_libraries(
convex_hull_plugin PUBLIC scene_points_with_normal_item scene_polylines_item
scene_selection_item scene_surface_mesh_item)
polyhedron_demo_plugin(kernel_plugin Kernel_plugin)
cgal_lab_plugin(kernel_plugin Kernel_plugin)
target_link_libraries(kernel_plugin PUBLIC scene_surface_mesh_item)

View File

@ -9,19 +9,19 @@
#include "Scene_polyhedron_selection_item.h"
#include "SMesh_type.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/convex_hull_3.h>
#include <CGAL/boost/graph/copy_face_graph.h>
#include <CGAL/boost/iterator/transform_iterator.hpp>
using namespace CGAL::Three;
class Polyhedron_demo_convex_hull_plugin :
class CGAL_Lab_convex_hull_plugin :
public QObject,
public Polyhedron_demo_plugin_interface
public CGAL_Lab_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public:
void init(QMainWindow*mw,
Scene_interface* scene_interface,
@ -51,10 +51,10 @@ private:
QList<QAction*> _actions;
Scene_interface* scene;
QMainWindow* mw;
}; // end Polyhedron_demo_convex_hull_plugin
}; // end CGAL_Lab_convex_hull_plugin
void Polyhedron_demo_convex_hull_plugin::on_actionConvexHull_triggered()
void CGAL_Lab_convex_hull_plugin::on_actionConvexHull_triggered()
{
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
Scene_points_with_normal_item* pts_item =

View File

@ -8,7 +8,7 @@
#include "Scene_surface_mesh_item.h"
#include "SMesh_type.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Exact_rational.h>
#include <CGAL/Polyhedron_kernel.h>
#include <CGAL/convex_hull_3.h>
@ -24,13 +24,13 @@ typedef Kernel::Vector_3 Vector;
typedef Kernel::Plane_3 Plane;
typedef Kernel::FT FT;
using namespace CGAL::Three;
class Polyhedron_demo_kernel_plugin :
class CGAL_Lab_kernel_plugin :
public QObject,
public Polyhedron_demo_plugin_interface
public CGAL_Lab_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public:
QList<QAction*> actions() const {
@ -57,10 +57,10 @@ private:
CGAL::Three::Scene_interface* scene;
QMainWindow* mw;
}; // end Polyhedron_demo_kernel_plugin
}; // end CGAL_Lab_kernel_plugin
void Polyhedron_demo_kernel_plugin::on_actionKernel_triggered()
void CGAL_Lab_kernel_plugin::on_actionKernel_triggered()
{
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();

View File

@ -1,14 +1,14 @@
include(polyhedron_demo_macros)
include(cgallab_macros)
qt6_wrap_ui(display_propertyUI_FILES Display_property.ui)
polyhedron_demo_plugin(display_property_plugin Display_property_plugin ${display_propertyUI_FILES} KEYWORDS Viewer)
cgal_lab_plugin(display_property_plugin Display_property_plugin ${display_propertyUI_FILES} KEYWORDS Viewer)
target_link_libraries(display_property_plugin PUBLIC scene_surface_mesh_item
scene_points_with_normal_item
scene_color_ramp)
if(TARGET CGAL::Eigen3_support)
qt6_wrap_ui(heat_methodUI_FILES Heat_method.ui)
polyhedron_demo_plugin(heat_method_plugin Heat_method_plugin ${heat_methodUI_FILES} KEYWORDS Viewer)
cgal_lab_plugin(heat_method_plugin Heat_method_plugin ${heat_methodUI_FILES} KEYWORDS Viewer)
target_link_libraries(heat_method_plugin PUBLIC scene_surface_mesh_item
scene_selection_item
scene_color_ramp

View File

@ -11,8 +11,8 @@
#include "Scene_points_with_normal_item.h"
#include "triangulate_primitive.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h>
#include <CGAL/Three/Triangle_container.h>
#include <CGAL/Buffer_for_vao.h>
@ -67,11 +67,11 @@ public:
class Display_property_plugin
: public QObject,
public Polyhedron_demo_plugin_helper
public CGAL_Lab_plugin_helper
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
private:
QAction* actionDisplayProperties;

View File

@ -9,8 +9,8 @@
#include "Scene_polyhedron_selection_item.h"
#include "Scene_surface_mesh_item.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h>
#include <CGAL/Three/Triangle_container.h>
#include <CGAL/Buffer_for_vao.h>
@ -207,11 +207,11 @@ public:
class Heat_method_plugin
: public QObject,
public Polyhedron_demo_plugin_helper
public CGAL_Lab_plugin_helper
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
using Vertex_distance_map = SMesh::Property_map<vertex_descriptor, double>;
using Heat_method = CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3<SMesh>;

View File

@ -1,5 +1,5 @@
#include <CGAL/Three/Three.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
@ -21,11 +21,11 @@ using namespace NMR;
class Io_3mf_plugin:
public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface
public CGAL::Three::CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "3mf_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "3mf_io_plugin.json")
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef std::vector<Kernel::Point_3> PointRange;

View File

@ -1,4 +1,4 @@
include(polyhedron_demo_macros)
include(cgallab_macros)
find_package(LASLIB QUIET)
set_package_properties(
@ -8,39 +8,39 @@ set_package_properties(
include(CGAL_LASLIB_support)
polyhedron_demo_plugin(gocad_plugin GOCAD_io_plugin KEYWORDS Viewer)
cgal_lab_plugin(gocad_plugin GOCAD_io_plugin KEYWORDS Viewer)
target_link_libraries(gocad_plugin PUBLIC scene_surface_mesh_item)
qt6_wrap_ui( funcUI_FILES Function_dialog.ui )
polyhedron_demo_plugin(io_implicit_function_plugin
cgal_lab_plugin(io_implicit_function_plugin
Implicit_function_io_plugin
${funcUI_FILES}
KEYWORDS Viewer Mesh_3)
target_link_libraries(io_implicit_function_plugin PUBLIC scene_implicit_function_item)
polyhedron_demo_plugin(nef_io_plugin Nef_io_plugin KEYWORDS Viewer)
cgal_lab_plugin(nef_io_plugin Nef_io_plugin KEYWORDS Viewer)
target_link_libraries(nef_io_plugin PUBLIC scene_nef_polyhedron_item)
polyhedron_demo_plugin(off_plugin OFF_io_plugin
cgal_lab_plugin(off_plugin OFF_io_plugin
KEYWORDS Viewer Mesh_3 PointSetProcessing Classification PMP)
target_link_libraries(off_plugin PUBLIC scene_polygon_soup_item scene_points_with_normal_item scene_surface_mesh_item)
polyhedron_demo_plugin(off_to_nef_plugin OFF_to_nef_io_plugin KEYWORDS Viewer)
cgal_lab_plugin(off_to_nef_plugin OFF_to_nef_io_plugin KEYWORDS Viewer)
target_link_libraries(off_to_nef_plugin PUBLIC scene_nef_polyhedron_item)
polyhedron_demo_plugin(polylines_io_plugin Polylines_io_plugin KEYWORDS Viewer Mesh_3)
cgal_lab_plugin(polylines_io_plugin Polylines_io_plugin KEYWORDS Viewer Mesh_3)
target_link_libraries(polylines_io_plugin PUBLIC scene_polylines_item)
polyhedron_demo_plugin(wkt_plugin WKT_io_plugin KEYWORDS Viewer PointSetProcessing Mesh_3)
cgal_lab_plugin(wkt_plugin WKT_io_plugin KEYWORDS Viewer PointSetProcessing Mesh_3)
target_link_libraries(wkt_plugin PUBLIC scene_polylines_item)
polyhedron_demo_plugin(stl_plugin STL_io_plugin KEYWORDS Viewer PMP)
cgal_lab_plugin(stl_plugin STL_io_plugin KEYWORDS Viewer PMP)
target_link_libraries(stl_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item)
polyhedron_demo_plugin(surf_io_plugin Surf_io_plugin KEYWORDS Viewer PMP)
cgal_lab_plugin(surf_io_plugin Surf_io_plugin KEYWORDS Viewer PMP)
target_link_libraries(surf_io_plugin PUBLIC scene_surface_mesh_item)
polyhedron_demo_plugin(lcc_io_plugin lcc_io_plugin KEYWORDS Viewer)
cgal_lab_plugin(lcc_io_plugin lcc_io_plugin KEYWORDS Viewer)
target_link_libraries(lcc_io_plugin PUBLIC scene_lcc_item)
find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML
@ -50,7 +50,7 @@ set_package_properties(
DESCRIPTION "A library for image processing."
PURPOSE "Can be used for I/O (DICOM, VTU, VTP.")
polyhedron_demo_plugin(triangulation_3_io_plugin triangulation_3_io_plugin KEYWORDS Viewer)
cgal_lab_plugin(triangulation_3_io_plugin triangulation_3_io_plugin KEYWORDS Viewer)
target_link_libraries(triangulation_3_io_plugin PUBLIC scene_triangulation_3_item)
if(VTK_FOUND)
@ -63,7 +63,7 @@ if(VTK_FOUND)
VTK::FiltersCore VTK::FiltersSources)
endif()
if(VTK_LIBRARIES)
polyhedron_demo_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3)
cgal_lab_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3)
target_link_libraries(vtk_plugin PUBLIC scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item
${VTK_LIBRARIES})
target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
@ -76,7 +76,7 @@ if(VTK_FOUND)
else()
message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled.")
endif()
polyhedron_demo_plugin(xyz_plugin XYZ_io_plugin KEYWORDS Viewer PointSetProcessing Classification)
cgal_lab_plugin(xyz_plugin XYZ_io_plugin KEYWORDS Viewer PointSetProcessing Classification)
target_link_libraries(xyz_plugin PUBLIC scene_points_with_normal_item)
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_rvalue_references has_cxx_rvalues)
@ -87,12 +87,12 @@ if(has_cxx_rvalues LESS 0 OR has_cxx_variadic LESS 0)
else()
set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates)
polyhedron_demo_plugin(ply_plugin PLY_io_plugin KEYWORDS Viewer PointSetProcessing Classification PMP)
cgal_lab_plugin(ply_plugin PLY_io_plugin KEYWORDS Viewer PointSetProcessing Classification PMP)
target_link_libraries(ply_plugin PUBLIC scene_points_with_normal_item scene_polygon_soup_item scene_surface_mesh_item scene_textured_item)
target_compile_features(ply_plugin PRIVATE ${needed_cxx_features})
if (TARGET CGAL::LASLIB_support)
polyhedron_demo_plugin(las_plugin LAS_io_plugin KEYWORDS Viewer PointSetProcessing Classification)
cgal_lab_plugin(las_plugin LAS_io_plugin KEYWORDS Viewer PointSetProcessing Classification)
target_link_libraries(las_plugin PUBLIC scene_points_with_normal_item CGAL::LASLIB_support)
target_compile_features(las_plugin PRIVATE ${needed_cxx_features})
if(MSVC)
@ -119,7 +119,7 @@ if(3MF_LIBRARIES
AND 3MF_INCLUDE_DIR
AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/NMR_DLLInterfaces.h")
include_directories(${3MF_INCLUDE_DIR})
polyhedron_demo_plugin(io_3mf_plugin 3mf_io_plugin KEYWORDS Viewer PMP)
cgal_lab_plugin(io_3mf_plugin 3mf_io_plugin KEYWORDS Viewer PMP)
target_link_libraries(io_3mf_plugin PRIVATE scene_surface_mesh_item scene_points_with_normal_item scene_polylines_item ${3MF_LIBRARIES})
target_compile_definitions(io_3mf_plugin PRIVATE -DCGAL_LINKED_WITH_3MF)
else()

View File

@ -5,9 +5,9 @@
#include "SMesh_type.h"
#include <CGAL/Timer.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h>
#include <CGAL/boost/graph/io.h>
@ -18,14 +18,14 @@
using namespace CGAL::Three;
class Polyhedron_demo_gocad_plugin :
class CGAL_Lab_gocad_plugin :
public QObject,
public Polyhedron_demo_io_plugin_interface
public CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "gocad_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "gocad_io_plugin.json")
public:
@ -38,17 +38,17 @@ public:
bool save(QFileInfo fileinfo, QList<CGAL::Three::Scene_item*>& );
};
QString Polyhedron_demo_gocad_plugin::nameFilters() const {
QString CGAL_Lab_gocad_plugin::nameFilters() const {
return "GOCAD files (*.ts)";
}
bool Polyhedron_demo_gocad_plugin::canLoad(QFileInfo) const {
bool CGAL_Lab_gocad_plugin::canLoad(QFileInfo) const {
return true;
}
QList<Scene_item*>
Polyhedron_demo_gocad_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
CGAL_Lab_gocad_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
// Open file
std::ifstream in(fileinfo.filePath().toUtf8());
@ -101,13 +101,13 @@ Polyhedron_demo_gocad_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_sce
return QList<Scene_item*>()<<item;
}
bool Polyhedron_demo_gocad_plugin::canSave(const CGAL::Three::Scene_item* item)
bool CGAL_Lab_gocad_plugin::canSave(const CGAL::Three::Scene_item* item)
{
// This plugin supports polyhedrons
return qobject_cast<const Scene_surface_mesh_item*>(item);
}
bool Polyhedron_demo_gocad_plugin::
bool CGAL_Lab_gocad_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{
Scene_item* item = items.front();

View File

@ -14,8 +14,8 @@
// File Description :
//******************************************************************************
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include "implicit_functions/Implicit_function_interface.h"
#include "Scene_implicit_function_item.h"
@ -33,11 +33,11 @@
using namespace CGAL::Three;
class Io_implicit_function_plugin :
public QObject,
protected Polyhedron_demo_plugin_helper
protected CGAL_Lab_plugin_helper
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0" FILE "implicit_function_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0" FILE "implicit_function_io_plugin.json")
public:
Io_implicit_function_plugin();
@ -50,7 +50,7 @@ public:
// bool canLoad() const { return false; }
typedef Polyhedron_demo_plugin_helper Plugin_helper;
typedef CGAL_Lab_plugin_helper Plugin_helper;
using Plugin_helper::init;
virtual void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface*);

View File

@ -1,17 +1,17 @@
#include "Scene_points_with_normal_item.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h>
#include <CGAL/Three/Scene_item.h>
#include <CGAL/Point_set_3/IO.h>
#include <fstream>
using namespace CGAL::Three;
class Polyhedron_demo_las_plugin :
class CGAL_Lab_las_plugin :
public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface
public CGAL::Three::CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "las_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "las_io_plugin.json")
public:
QString name() const { return "las_plugin"; }
@ -23,11 +23,11 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& );
};
bool Polyhedron_demo_las_plugin::canLoad(QFileInfo ) const {
bool CGAL_Lab_las_plugin::canLoad(QFileInfo ) const {
return true;
}
QList<Scene_item*> Polyhedron_demo_las_plugin::
QList<Scene_item*> CGAL_Lab_las_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
std::ifstream in(fileinfo.filePath().toUtf8(), std::ios_base::binary);
@ -70,12 +70,12 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
return QList<Scene_item*>()<<item;
}
bool Polyhedron_demo_las_plugin::canSave(const CGAL::Three::Scene_item* item)
bool CGAL_Lab_las_plugin::canSave(const CGAL::Three::Scene_item* item)
{
return qobject_cast<const Scene_points_with_normal_item*>(item);
}
bool Polyhedron_demo_las_plugin::save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
bool CGAL_Lab_las_plugin::save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{
Scene_item* item = items.front();
// Check extension (quietly)

View File

@ -1,18 +1,18 @@
#include "Scene_nef_polyhedron_item.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h>
#include <fstream>
#include <limits>
using namespace CGAL::Three;
class Polyhedron_demo_io_nef_plugin :
class CGAL_Lab_io_nef_plugin :
public QObject,
public Polyhedron_demo_io_plugin_interface
public CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0" FILE "nef_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0" FILE "nef_io_plugin.json")
public:
QString nameFilters() const override;
@ -29,16 +29,16 @@ public:
}
};
QString Polyhedron_demo_io_nef_plugin::nameFilters() const {
QString CGAL_Lab_io_nef_plugin::nameFilters() const {
return "nef files (*.nef3)";
}
bool Polyhedron_demo_io_nef_plugin::canLoad(QFileInfo) const {
bool CGAL_Lab_io_nef_plugin::canLoad(QFileInfo) const {
return true;
}
QList<Scene_item*> Polyhedron_demo_io_nef_plugin::
QList<Scene_item*> CGAL_Lab_io_nef_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
//do not try file with extension different from nef3
if (fileinfo.suffix() != "nef3")
@ -79,13 +79,13 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
return QList<Scene_item*>()<<item;
}
bool Polyhedron_demo_io_nef_plugin::canSave(const CGAL::Three::Scene_item* item)
bool CGAL_Lab_io_nef_plugin::canSave(const CGAL::Three::Scene_item* item)
{
// This plugin supports polyhedrons and polygon soups
return qobject_cast<const Scene_nef_polyhedron_item*>(item);
}
bool Polyhedron_demo_io_nef_plugin::save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
bool CGAL_Lab_io_nef_plugin::save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{
Scene_item* item = items.front();
// This plugin supports polyhedrons and polygon soups

View File

@ -3,7 +3,7 @@
#include "Scene_points_with_normal_item.h"
#include <CGAL/Three/Three.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h>
#include <CGAL/exceptions.h>
@ -20,13 +20,13 @@
using namespace CGAL::Three;
class Polyhedron_demo_off_plugin :
class CGAL_Lab_off_plugin :
public QObject,
public Polyhedron_demo_io_plugin_interface
public CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "off_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "off_io_plugin.json")
public:
bool isDefaultLoader(const Scene_item *item) const override
@ -53,11 +53,11 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& ) override;
};
bool Polyhedron_demo_off_plugin::canLoad(QFileInfo) const {
bool CGAL_Lab_off_plugin::canLoad(QFileInfo) const {
return true;
}
QList<Scene_item*> Polyhedron_demo_off_plugin::
QList<Scene_item*> CGAL_Lab_off_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
if(fileinfo.size() == 0)
@ -105,7 +105,7 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
CGAL::Three::Scene_item*
Polyhedron_demo_off_plugin::load_off(QFileInfo fileinfo) {
CGAL_Lab_off_plugin::load_off(QFileInfo fileinfo) {
// Open file
std::ifstream in(fileinfo.filePath().toUtf8());
if(!in) {
@ -207,7 +207,7 @@ Polyhedron_demo_off_plugin::load_off(QFileInfo fileinfo) {
}
CGAL::Three::Scene_item*
Polyhedron_demo_off_plugin::load_obj(QFileInfo fileinfo) {
CGAL_Lab_off_plugin::load_obj(QFileInfo fileinfo) {
// Open file
std::ifstream in(fileinfo.filePath().toUtf8());
if(!in) {
@ -230,7 +230,7 @@ Polyhedron_demo_off_plugin::load_obj(QFileInfo fileinfo) {
return nullptr;
}
bool Polyhedron_demo_off_plugin::canSave(const CGAL::Three::Scene_item* item)
bool CGAL_Lab_off_plugin::canSave(const CGAL::Three::Scene_item* item)
{
// This plugin supports surface_meshes and polygon soups
return qobject_cast<const Scene_surface_mesh_item*>(item) ||
@ -240,7 +240,7 @@ bool Polyhedron_demo_off_plugin::canSave(const CGAL::Three::Scene_item* item)
bool
Polyhedron_demo_off_plugin::
CGAL_Lab_off_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{
Scene_item* item = items.front();

View File

@ -1,17 +1,17 @@
#include "Scene_nef_polyhedron_item.h"
#include "Nef_type.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h>
#include <fstream>
using namespace CGAL::Three;
class Polyhedron_demo_off_to_nef_plugin :
class CGAL_Lab_off_to_nef_plugin :
public QObject,
public Polyhedron_demo_io_plugin_interface
public CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "off_to_nef_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "off_to_nef_io_plugin.json")
public:
QString name() const { return "off_to_nef_plugin"; }
@ -23,11 +23,11 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& );
};
bool Polyhedron_demo_off_to_nef_plugin::canLoad(QFileInfo) const {
bool CGAL_Lab_off_to_nef_plugin::canLoad(QFileInfo) const {
return true;
}
QList<Scene_item*> Polyhedron_demo_off_to_nef_plugin::
QList<Scene_item*> CGAL_Lab_off_to_nef_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
std::ifstream in(fileinfo.filePath().toUtf8());
@ -57,12 +57,12 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
return QList<Scene_item*>()<<item;
}
bool Polyhedron_demo_off_to_nef_plugin::canSave(const CGAL::Three::Scene_item*)
bool CGAL_Lab_off_to_nef_plugin::canSave(const CGAL::Three::Scene_item*)
{
return false;
}
bool Polyhedron_demo_off_to_nef_plugin::
bool CGAL_Lab_off_to_nef_plugin::
save(QFileInfo ,QList<CGAL::Three::Scene_item*>&)
{
return false;

View File

@ -4,7 +4,7 @@
#include "Scene_points_with_normal_item.h"
#include <CGAL/IO/PLY.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Surface_mesh/IO/PLY.h>
#include <CGAL/Three/Three.h>
@ -21,13 +21,13 @@
using namespace CGAL::Three;
class Polyhedron_demo_ply_plugin :
class CGAL_Lab_ply_plugin :
public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface
public CGAL::Three::CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "ply_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "ply_io_plugin.json")
public:
bool isDefaultLoader(const CGAL::Three::Scene_item *item) const override
@ -46,13 +46,13 @@ public:
};
bool Polyhedron_demo_ply_plugin::
bool CGAL_Lab_ply_plugin::
canLoad(QFileInfo) const {
return true;
}
QList<Scene_item*>
Polyhedron_demo_ply_plugin::
CGAL_Lab_ply_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
std::ifstream in(fileinfo.filePath().toUtf8(), std::ios_base::binary);
@ -175,7 +175,7 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
return QList<Scene_item*>();
}
bool Polyhedron_demo_ply_plugin::canSave(const CGAL::Three::Scene_item* item)
bool CGAL_Lab_ply_plugin::canSave(const CGAL::Three::Scene_item* item)
{
// This plugin supports point sets and any type of surface
return (qobject_cast<const Scene_points_with_normal_item*>(item)
@ -184,7 +184,7 @@ bool Polyhedron_demo_ply_plugin::canSave(const CGAL::Three::Scene_item* item)
|| qobject_cast<const Scene_textured_surface_mesh_item*>(item));
}
bool Polyhedron_demo_ply_plugin::
bool CGAL_Lab_ply_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{
Scene_item* item = items.front();

View File

@ -1,9 +1,9 @@
#include "Scene_polylines_item.h"
#include <QMainWindow>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Polygon_mesh_processing/internal/simplify_polyline.h>
#include <CGAL/boost/graph/split_graph_into_polylines.h>
#include <CGAL/Mesh_3/polylines_to_protect.h>
@ -14,22 +14,22 @@
#include <QMessageBox>
#include <QInputDialog>
using namespace CGAL::Three;
class Polyhedron_demo_polylines_io_plugin :
class CGAL_Lab_polylines_io_plugin :
public QObject,
public Polyhedron_demo_io_plugin_interface,
public Polyhedron_demo_plugin_helper
public CGAL_Lab_io_plugin_interface,
public CGAL_Lab_plugin_helper
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0" FILE "polylines_io_plugin.json")
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0" FILE "polylines_io_plugin.json")
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90")
public:
// To silent a warning -Woverloaded-virtual
// See https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
using Polyhedron_demo_io_plugin_interface::init;
using CGAL_Lab_io_plugin_interface::init;
//! Configures the widget
void init(QMainWindow* mainWindow,
CGAL::Three::Scene_interface* scene_interface,
@ -54,10 +54,10 @@ public:
actionSimplify_polylines->setProperty("subMenuName", "Operations on Polylines");
actionSimplify_polylines->setObjectName("actionSimplifyPolylines");
connect(actionSplit_polylines, &QAction::triggered, this, &Polyhedron_demo_polylines_io_plugin::split);
connect(actionSplit_polylines_graph, &QAction::triggered, this, &Polyhedron_demo_polylines_io_plugin::split_graph);
connect(actionJoin_polylines, &QAction::triggered, this, &Polyhedron_demo_polylines_io_plugin::join);
connect(actionSimplify_polylines, &QAction::triggered, this, &Polyhedron_demo_polylines_io_plugin::simplify);
connect(actionSplit_polylines, &QAction::triggered, this, &CGAL_Lab_polylines_io_plugin::split);
connect(actionSplit_polylines_graph, &QAction::triggered, this, &CGAL_Lab_polylines_io_plugin::split_graph);
connect(actionJoin_polylines, &QAction::triggered, this, &CGAL_Lab_polylines_io_plugin::join);
connect(actionSimplify_polylines, &QAction::triggered, this, &CGAL_Lab_polylines_io_plugin::simplify);
}
@ -118,7 +118,7 @@ private:
QAction* actionSimplify_polylines;
};
bool Polyhedron_demo_polylines_io_plugin::canLoad(QFileInfo fileinfo) const{
bool CGAL_Lab_polylines_io_plugin::canLoad(QFileInfo fileinfo) const{
if(!fileinfo.suffix().contains("cgal"))
return true;
std::ifstream in(fileinfo.filePath().toUtf8());
@ -134,7 +134,7 @@ bool Polyhedron_demo_polylines_io_plugin::canLoad(QFileInfo fileinfo) const{
QList<Scene_item*>
Polyhedron_demo_polylines_io_plugin::
CGAL_Lab_polylines_io_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
// Open file
@ -212,12 +212,12 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
return QList<Scene_item*>()<<item;
}
bool Polyhedron_demo_polylines_io_plugin::canSave(const CGAL::Three::Scene_item* item)
bool CGAL_Lab_polylines_io_plugin::canSave(const CGAL::Three::Scene_item* item)
{
return qobject_cast<const Scene_polylines_item*>(item) != 0;
}
bool Polyhedron_demo_polylines_io_plugin::
bool CGAL_Lab_polylines_io_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{
Scene_item* item = items.front();
@ -259,7 +259,7 @@ save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
return res;
}
void Polyhedron_demo_polylines_io_plugin::split()
void CGAL_Lab_polylines_io_plugin::split()
{
Scene_polylines_item* item = qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex()));
Scene_group_item* group = new Scene_group_item("Split Polylines");
@ -324,7 +324,7 @@ polylines_to_split(std::vector<std::vector<P> >& polylines,
CGAL::split_graph_into_polylines(const_graph, visitor);
}
void Polyhedron_demo_polylines_io_plugin::split_graph()
void CGAL_Lab_polylines_io_plugin::split_graph()
{
Scene_item* main_item = scene->item(scene->mainSelectionIndex());
Scene_polylines_item* polylines_item =
@ -339,7 +339,7 @@ void Polyhedron_demo_polylines_io_plugin::split_graph()
scene->addItem(new_item);
}
void Polyhedron_demo_polylines_io_plugin::simplify()
void CGAL_Lab_polylines_io_plugin::simplify()
{
Scene_polylines_item* item = qobject_cast<Scene_polylines_item*>(scene->item(scene->mainSelectionIndex()));
bool ok;
@ -362,7 +362,7 @@ void Polyhedron_demo_polylines_io_plugin::simplify()
item->redraw();
}
void Polyhedron_demo_polylines_io_plugin::join()
void CGAL_Lab_polylines_io_plugin::join()
{
std::vector<Scene_polylines_item*> items;

View File

@ -4,7 +4,7 @@
#include "Kernel_type.h"
#include "Scene.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h>
#include <CGAL/IO/polygon_soup_io.h>
@ -26,13 +26,13 @@
#include <vector>
using namespace CGAL::Three;
class Polyhedron_demo_stl_plugin :
class CGAL_Lab_stl_plugin :
public QObject,
public Polyhedron_demo_io_plugin_interface
public CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "stl_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "stl_io_plugin.json")
public:
QString nameFilters() const;
@ -44,18 +44,18 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&);
};
QString Polyhedron_demo_stl_plugin::nameFilters() const {
QString CGAL_Lab_stl_plugin::nameFilters() const {
return "STL files (*.stl)";
}
bool Polyhedron_demo_stl_plugin::canLoad(QFileInfo) const {
bool CGAL_Lab_stl_plugin::canLoad(QFileInfo) const {
return true;
}
QList<Scene_item*>
Polyhedron_demo_stl_plugin::
CGAL_Lab_stl_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
// Open file
@ -120,12 +120,12 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
return QList<Scene_item*>()<<item;
}
bool Polyhedron_demo_stl_plugin::canSave(const CGAL::Three::Scene_item* item)
bool CGAL_Lab_stl_plugin::canSave(const CGAL::Three::Scene_item* item)
{
return qobject_cast<const Scene_surface_mesh_item*>(item);
}
bool Polyhedron_demo_stl_plugin::
bool CGAL_Lab_stl_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{
Scene_item* item = items.front();

View File

@ -2,7 +2,7 @@
#include <QMainWindow>
#include <QObject>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Scene_group_item.h>
#include <CGAL/Three/Three.h>
@ -18,11 +18,11 @@
using namespace CGAL::Three;
class Surf_io_plugin:
public QObject,
public Polyhedron_demo_io_plugin_interface
public CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "surf_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "surf_io_plugin.json")
public:

View File

@ -18,8 +18,8 @@
#include "Scene_polylines_item.h"
#include "Scene_points_with_normal_item.h"
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h>
#include <QApplication>
@ -183,13 +183,13 @@ namespace CGAL{
}//end namespace CGAL
class Polyhedron_demo_vtk_plugin :
class CGAL_Lab_vtk_plugin :
public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface
public CGAL::Three::CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "vtk_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "vtk_io_plugin.json")
public:
typedef boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
@ -543,7 +543,7 @@ public:
CGAL::Three::Three::scene()->addItem(point_item);
return QList<Scene_item*>()<<point_item;
}
}; // end Polyhedron_demo_vtk_plugin
}; // end CGAL_Lab_vtk_plugin
#include "VTK_io_plugin.moc"

View File

@ -1,6 +1,6 @@
#include "Scene_polylines_item.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h>
#include <QInputDialog>
#include <QApplication>
@ -10,13 +10,13 @@
#include <QMessageBox>
using namespace CGAL::Three;
class Polyhedron_demo_wkt_plugin :
class CGAL_Lab_wkt_plugin :
public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface
public CGAL::Three::CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "wkt_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "wkt_io_plugin.json")
public:
bool isDefaultLoader(const CGAL::Three::Scene_item *item) const
@ -37,13 +37,13 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&);
};
bool Polyhedron_demo_wkt_plugin::
bool CGAL_Lab_wkt_plugin::
canLoad(QFileInfo) const {
return true;
}
QList<Scene_item*>
Polyhedron_demo_wkt_plugin::
CGAL_Lab_wkt_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
std::ifstream in(fileinfo.filePath().toUtf8(), std::ios_base::binary);
@ -77,13 +77,13 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene) {
return QList<Scene_item*>() << item;
}
bool Polyhedron_demo_wkt_plugin::canSave(const CGAL::Three::Scene_item* item)
bool CGAL_Lab_wkt_plugin::canSave(const CGAL::Three::Scene_item* item)
{
// This plugin supports polylines
return (qobject_cast<const Scene_polylines_item*>(item));
}
bool Polyhedron_demo_wkt_plugin::
bool CGAL_Lab_wkt_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{
Scene_item* item = items.front();

View File

@ -2,20 +2,20 @@
#include "Kernel_type.h"
#include <QMainWindow>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h>
#include <fstream>
#include <QMessageBox>
#include <QMenu>
using namespace CGAL::Three;
class Polyhedron_demo_xyz_plugin :
class CGAL_Lab_xyz_plugin :
public QObject,
public Polyhedron_demo_io_plugin_interface
public CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "xyz_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "xyz_io_plugin.json")
public:
@ -28,13 +28,13 @@ public:
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&);
};
bool Polyhedron_demo_xyz_plugin::canLoad(QFileInfo) const {
bool CGAL_Lab_xyz_plugin::canLoad(QFileInfo) const {
return true;
}
QList<Scene_item*>
Polyhedron_demo_xyz_plugin::
CGAL_Lab_xyz_plugin::
load(QFileInfo fileinfo, bool& ok, bool add_to_scene)
{
// Open file
@ -74,13 +74,13 @@ load(QFileInfo fileinfo, bool& ok, bool add_to_scene)
return QList<Scene_item*>()<<point_set_item;
}
bool Polyhedron_demo_xyz_plugin::canSave(const CGAL::Three::Scene_item* item)
bool CGAL_Lab_xyz_plugin::canSave(const CGAL::Three::Scene_item* item)
{
// This plugin supports point sets
return qobject_cast<const Scene_points_with_normal_item*>(item);
}
bool Polyhedron_demo_xyz_plugin::
bool CGAL_Lab_xyz_plugin::
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
{
Scene_item* item = items.front();

View File

@ -1,5 +1,5 @@
#include <CGAL/Three/Three.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Combinatorial_map_save_load.h>
#include <CGAL/Polyhedron_3_to_lcc.h>
@ -10,11 +10,11 @@
class LCC_io_plugin :
public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface
public CGAL::Three::CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "lcc_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "lcc_io_plugin.json")
public:
bool isDefaultLoader(const CGAL::Three::Scene_item *item) const override

View File

@ -1,6 +1,6 @@
#include <CGAL/IO/io.h>
#include <CGAL/Three/Three.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include "T3_type.h"
#include <iostream>
#include <fstream>
@ -8,11 +8,11 @@
class Triangulation_3_io_plugin :
public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface
public CGAL::Three::CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "triangulation_3_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "triangulation_3_io_plugin.json")
public:

View File

@ -1,6 +1,6 @@
include(polyhedron_demo_macros)
include(cgallab_macros)
polyhedron_demo_plugin(isosurface_3_plugin Isosurface_3_plugin KEYWORDS
cgal_lab_plugin(isosurface_3_plugin Isosurface_3_plugin KEYWORDS
Isosurface_3)
target_link_libraries(
isosurface_3_plugin PUBLIC scene_polygon_soup_item scene_image_item )

View File

@ -7,18 +7,18 @@
#include "SMesh_type.h"
#include "Image_type.h"
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
using namespace CGAL::Three;
class Polyhedron_demo_isosurface_3_plugin :
class CGAL_Lab_isosurface_3_plugin :
public QObject,
public Polyhedron_demo_plugin_interface
public CGAL_Lab_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public:
void init(QMainWindow*mw,
Scene_interface* scene_interface,
@ -45,9 +45,9 @@ private:
QList<QAction*> _actions;
Scene_interface* scene;
QMainWindow* mw;
}; // end Polyhedron_demo_convex_hull_plugin
}; // end CGAL_Lab_convex_hull_plugin
class Polyhedron_demo_isosurface_3_plugin_helper {
class CGAL_Lab_isosurface_3_plugin_helper {
typedef float Word_type;
typedef std::size_t vertex_descriptor;
typedef std::pair<Word_type, Word_type> surface_descriptor;
@ -121,7 +121,7 @@ class Polyhedron_demo_isosurface_3_plugin_helper {
};
public:
Polyhedron_demo_isosurface_3_plugin_helper(const Image* image)
CGAL_Lab_isosurface_3_plugin_helper(const Image* image)
{
image_ = image;
}
@ -322,7 +322,7 @@ private:
}
};
void Polyhedron_demo_isosurface_3_plugin::on_actionDualLabel_triggered()
void CGAL_Lab_isosurface_3_plugin::on_actionDualLabel_triggered()
{
const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex();
@ -340,7 +340,7 @@ void Polyhedron_demo_isosurface_3_plugin::on_actionDualLabel_triggered()
time_per_op.start();
std::cout << "Dual contour label image...";
Polyhedron_demo_isosurface_3_plugin_helper helper(img_item->image());
CGAL_Lab_isosurface_3_plugin_helper helper(img_item->image());
helper.dual_contouring_label_image();
std::vector<Point_3> vertices;

View File

@ -1,7 +1,7 @@
include(polyhedron_demo_macros)
include(cgallab_macros)
#if the plugin has a UI file
qt6_wrap_ui(mesh_2UI_FILES mesh_2_dialog.ui)
polyhedron_demo_plugin(mesh_2_plugin Mesh_2_plugin ${mesh_2UI_FILES})
cgal_lab_plugin(mesh_2_plugin Mesh_2_plugin ${mesh_2UI_FILES})
#if the plugin uses external libraries like scene_items
target_link_libraries(
mesh_2_plugin PUBLIC scene_surface_mesh_item scene_polylines_item

View File

@ -11,8 +11,8 @@
#include <QtCore/qglobal.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include "Scene_surface_mesh_item.h"
@ -139,13 +139,13 @@ void cdt2_to_face_graph(const CDT& cdt, TriangleMesh& tm, int constant_coordinat
}
}
class Polyhedron_demo_mesh_2_plugin :
class CGAL_Lab_mesh_2_plugin :
public QObject,
public CGAL::Three::Polyhedron_demo_plugin_helper
public CGAL::Three::CGAL_Lab_plugin_helper
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public:
void init(QMainWindow* mainWindow,

View File

@ -1,7 +1,7 @@
#include <CGAL/SMDS_3/io_signature.h>
#include "Scene_c3t3_item.h"
#include <CGAL/SMDS_3/tet_soup_to_c3t3.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include <CGAL/Three/Three.h>
#include <CGAL/IO/File_avizo.h>
#include <iostream>
@ -9,13 +9,13 @@
#include <QMessageBox>
class Polyhedron_demo_c3t3_binary_io_plugin :
class CGAL_Lab_c3t3_binary_io_plugin :
public QObject,
public CGAL::Three::Polyhedron_demo_io_plugin_interface
public CGAL::Three::CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "c3t3_io_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "c3t3_io_plugin.json")
public:
QString name() const override { return "C3t3_io_plugin"; }
@ -42,7 +42,7 @@ private:
};
bool Polyhedron_demo_c3t3_binary_io_plugin::canLoad(QFileInfo fi) const {
bool CGAL_Lab_c3t3_binary_io_plugin::canLoad(QFileInfo fi) const {
if(!fi.suffix().contains("cgal"))
return true;
std::ifstream in(fi.filePath().toUtf8(),
@ -71,7 +71,7 @@ bool Polyhedron_demo_c3t3_binary_io_plugin::canLoad(QFileInfo fi) const {
}
QList<Scene_item*>
Polyhedron_demo_c3t3_binary_io_plugin::load(
CGAL_Lab_c3t3_binary_io_plugin::load(
QFileInfo fileinfo, bool& ok, bool add_to_scene) {
// Open file
@ -185,14 +185,14 @@ Polyhedron_demo_c3t3_binary_io_plugin::load(
return QList<Scene_item*>();
}
bool Polyhedron_demo_c3t3_binary_io_plugin::canSave(const CGAL::Three::Scene_item* item)
bool CGAL_Lab_c3t3_binary_io_plugin::canSave(const CGAL::Three::Scene_item* item)
{
// This plugin supports c3t3 items.
return qobject_cast<const Scene_c3t3_item*>(item);
}
bool
Polyhedron_demo_c3t3_binary_io_plugin::
CGAL_Lab_c3t3_binary_io_plugin::
save(QFileInfo fileinfo, QList<Scene_item *> &items)
{
Scene_item* item = items.front();
@ -481,7 +481,7 @@ struct Update_cell_from_CDT_3 {
}; // end struct Update_cell
bool
Polyhedron_demo_c3t3_binary_io_plugin::
CGAL_Lab_c3t3_binary_io_plugin::
try_load_a_cdt_3(std::istream& is, C3t3& c3t3)
{
std::cerr << "Try load a CDT_3...";
@ -522,7 +522,7 @@ try_load_a_cdt_3(std::istream& is, C3t3& c3t3)
}
void
Polyhedron_demo_c3t3_binary_io_plugin::
CGAL_Lab_c3t3_binary_io_plugin::
update_c3t3(C3t3& c3t3)
{
using Cell_handle = C3t3::Triangulation::Cell_handle;
@ -563,7 +563,7 @@ update_c3t3(C3t3& c3t3)
//Generates a compilation error.
bool
Polyhedron_demo_c3t3_binary_io_plugin::
CGAL_Lab_c3t3_binary_io_plugin::
try_load_other_binary_format(std::istream& is, C3t3& c3t3)
{
CGAL::IO::set_ascii_mode(is);
@ -583,7 +583,7 @@ try_load_other_binary_format(std::istream& is, C3t3& c3t3)
std::getline(is, s);
if(s != "") {
if(s != std::string(" ") + CGAL::Get_io_signature<Fake_c3t3>()()) {
std::cerr << "Polyhedron_demo_c3t3_binary_io_plugin::try_load_other_binary_format:"
std::cerr << "CGAL_Lab_c3t3_binary_io_plugin::try_load_other_binary_format:"
<< "\n expected format: " << CGAL::Get_io_signature<Fake_c3t3>()()
<< "\n got format:" << s << std::endl;
return false;

View File

@ -6,8 +6,8 @@
#endif
#include <CGAL/Three/Viewer_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/Three.h>
#include "Scene_c3t3_item.h"
@ -33,11 +33,11 @@ using namespace CGAL::Three;
class C3t3_rib_exporter_plugin :
public QObject,
protected Polyhedron_demo_plugin_helper
protected CGAL_Lab_plugin_helper
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0" FILE "c3t3_rib_exporter_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0" FILE "c3t3_rib_exporter_plugin.json")
public:
C3t3_rib_exporter_plugin();

View File

@ -1,4 +1,4 @@
include(polyhedron_demo_macros)
include(cgallab_macros)
remove_definitions(-DQT_STATICPLUGIN)
@ -8,7 +8,7 @@ qt6_wrap_cpp(VOLUME_MOC_OUTFILES
${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_interface.h)
qt6_wrap_ui(meshingUI_FILES Meshing_dialog.ui Smoother_dialog.ui
Local_optimizers_dialog.ui)
polyhedron_demo_plugin(
cgal_lab_plugin(
mesh_3_plugin
Mesh_3_plugin
Mesh_3_plugin_cgal_code.cpp
@ -59,7 +59,7 @@ endif()
find_package(Boost QUIET OPTIONAL_COMPONENTS filesystem system)
if(Boost_FILESYSTEM_FOUND)
qt6_wrap_ui( imgUI_FILES Image_res_dialog.ui raw_image.ui)
polyhedron_demo_plugin(io_image_plugin Io_image_plugin
cgal_lab_plugin(io_image_plugin Io_image_plugin
Volume_plane_intersection.cpp
Raw_image_dialog.cpp
${imgUI_FILES}
@ -78,7 +78,7 @@ if(Boost_FILESYSTEM_FOUND)
else()
message(STATUS "NOTICE: the Io_image_plugin requires boost-filesystem, and will not be compiled")
endif()
polyhedron_demo_plugin(
cgal_lab_plugin(
mesh_3_optimization_plugin
Optimization_plugin
Optimization_plugin_cgal_code.cpp
@ -101,15 +101,15 @@ else()
"A deprecated class will be used to replace it. Warnings are to be expected.")
endif()
polyhedron_demo_plugin(c3t3_io_plugin C3t3_io_plugin KEYWORDS Viewer Mesh_3)
cgal_lab_plugin(c3t3_io_plugin C3t3_io_plugin KEYWORDS Viewer Mesh_3)
target_link_libraries(c3t3_io_plugin PUBLIC scene_c3t3_item)
qt6_wrap_ui(tetraUI_FILES Tetrahedra_filter_widget.ui)
polyhedron_demo_plugin(tetrahedra_filtering_plugin Tetrahedra_filtering_plugin ${tetraUI_FILES} KEYWORDS Mesh_3 Viewer)
cgal_lab_plugin(tetrahedra_filtering_plugin Tetrahedra_filtering_plugin ${tetraUI_FILES} KEYWORDS Mesh_3 Viewer)
target_link_libraries(tetrahedra_filtering_plugin PUBLIC scene_c3t3_item scene_tetrahedra_item)
qt6_wrap_ui(ribUI_FILES Rib_dialog.ui)
polyhedron_demo_plugin(c3t3_rib_exporter_plugin C3t3_rib_exporter_plugin
cgal_lab_plugin(c3t3_rib_exporter_plugin C3t3_rib_exporter_plugin
${ribUI_FILES} KEYWORDS Mesh_3)
target_link_libraries(c3t3_rib_exporter_plugin PUBLIC scene_c3t3_item)
@ -121,7 +121,7 @@ if(TBB_FOUND)
endif()
qt6_wrap_ui(offsetMeshingUI_FILES Offset_meshing_dialog.ui)
polyhedron_demo_plugin(offset_meshing_plugin Offset_meshing_plugin
cgal_lab_plugin(offset_meshing_plugin Offset_meshing_plugin
${offsetMeshingUI_FILES})
target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item
scene_polygon_soup_item

View File

@ -17,8 +17,8 @@
#include <CGAL/Image_3.h>
#include <CGAL/ImageIO.h>
#include <CGAL/SEP_to_ImageIO.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/Scene_interface.h>
#include <CGAL/Three/Scene_item.h>
#include <CGAL/Three/Scene_group_item.h>
@ -48,7 +48,7 @@
#include <QSettings>
#include <QUrl>
#include "Raw_image_dialog.h"
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#ifdef CGAL_USE_VTK
#include <CGAL/IO/read_vtk_image_data.h>
@ -253,13 +253,13 @@ enum class Directory_extension_type
class Io_image_plugin :
public QObject,
public CGAL::Three::Polyhedron_demo_plugin_helper,
public CGAL::Three::Polyhedron_demo_io_plugin_interface
public CGAL::Three::CGAL_Lab_plugin_helper,
public CGAL::Three::CGAL_Lab_io_plugin_interface
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_io_plugin_interface)
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "io_image_plugin.json")
Q_INTERFACES(CGAL::Three::CGAL_Lab_io_plugin_interface)
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90" FILE "io_image_plugin.json")
public:
bool applicable(QAction*) const override
@ -267,7 +267,7 @@ public:
return qobject_cast<Scene_image_item*>(scene->item(scene->mainSelectionIndex()));
}
using Polyhedron_demo_io_plugin_interface::init;
using CGAL_Lab_io_plugin_interface::init;
void init(QMainWindow* mainWindow,
CGAL::Three::Scene_interface* scene_interface,
Messages_interface *mi) override

View File

@ -16,8 +16,8 @@
//#include <CGAL_demo/Plugin_interface.h>
//#include <CGAL_demo/Plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_plugin_helper.h>
#include <CGAL/Three/Polyhedron_demo_io_plugin_interface.h>
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
#include "implicit_functions/Implicit_function_interface.h"
#include "Scene_implicit_function_item.h"
@ -36,11 +36,11 @@
using namespace CGAL::Three;
class Io_implicit_function_plugin :
public QObject,
protected Polyhedron_demo_plugin_helper
protected CGAL_Lab_plugin_helper
{
Q_OBJECT
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0")
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0")
public:
Io_implicit_function_plugin();
@ -53,7 +53,7 @@ public:
// bool canLoad() const { return false; }
typedef Polyhedron_demo_plugin_helper Plugin_helper;
typedef CGAL_Lab_plugin_helper Plugin_helper;
using Plugin_helper::init;
virtual void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface*);

Some files were not shown because too many files have changed in this diff Show More