B3AFIH3FLHMURWVMMO55LYKW7GPQXZQCUNZ6ZUDNY4IOREHXVUVAC
#include <iostream>
#include <boost/format.hpp>
#include <QtGui>
#include <CGAL/Qt/GraphicsViewNavigation.h>
#include <QLineF>
#include <QRectF>
#include <QApplication>
#include <QGraphicsScene>
#include <QGraphicsView>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QGraphicsScene scene;
scene.setSceneRect(0,0, 100, 100);
scene.addRect(QRectF(0,0, 150, 100));
scene.addLine(QLineF(0,0, 100, 100));
scene.addLine(QLineF(0,100, 100, 0));
QGraphicsView* view = new QGraphicsView(&scene);
CGAL::Qt::GraphicsViewNavigation navigation;
view->installEventFilter(&navigation);
view->viewport()->installEventFilter(&navigation);
view->setRenderHint(QPainter::Antialiasing);
view->show();
return app.exec();
}
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.23)
project(Soupe3D)
find_package(CGAL REQUIRED COMPONENTS Qt5)
find_package(Qt5 REQUIRED COMPONENTS Script OpenGL Svg)
if(CGAL_Qt5_FOUND AND Qt5_FOUND)
add_definitions(-DQT_NO_KEYWORDS)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable(soupe3d soupe3d.cpp)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS soupe3d)
target_link_libraries(soupe3d PRIVATE CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Gui)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()
--- Installation/cmake/modules/CGAL_Qt5_moc_and_resource_files.cmake 2023-02-01 05:18:20.485369245 +0100
+++ Installation/cmake/modules/CGAL_Qt5_moc_and_resource_files.cmake.new 2023-02-03 11:07:23.165627320 +0100
@@ -14,7 +14,8 @@
file ( COPY
${CGAL_MODULES_DIR}/demo/resources
${CGAL_MODULES_DIR}/demo/icons
- DESTINATION ${CMAKE_BINARY_DIR})
+ DESTINATION ${CMAKE_BINARY_DIR}
+ NO_SOURCE_PERMISSIONS)
qt5_add_resources (_CGAL_Qt5_RESOURCE_FILES_private
${CMAKE_BINARY_DIR}/resources/CGAL.qrc
${CMAKE_BINARY_DIR}/icons/Input.qrc
(define-module (vfx packages soupe3d)
#:use-module (vfx packages cgal)
#:use-module (gnu packages qt)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (gnu packages cmake)
#:use-module (guix build-system cmake))
(define-public soupe3d
(package
(name "soupe3d")
(version "0.1")
(source (local-file "/home/poutine/DEV/soupe3d/src" #:recursive? #t))
(build-system cmake-build-system)
(inputs (list qtbase-5 qtscript qtsvg-5 cgal-5.5))
(arguments
'(#:tests? #f
#:configure-flags
(list (string-append "-DQt5_DIR="
(assoc-ref %build-inputs "qtbase")
"/lib/cmake/Qt5"))
#:phases
(modify-phases %standard-phases
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "soupe3d" bin))
#t)))))
(synopsis "Soupe 3D")
(description "Soupe 3D")
(home-page "https://nest.pijul.com/foolscreen/soupe3d")
(license #f)))
(define-module (vfx packages cgal)
#:use-module (gnu packages)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages boost)
#:use-module (guix)
#:use-module (guix gexp)
#:use-module (guix build utils)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix licenses:))
(define-public cgal-5.5
(package
(name "cgal")
(version "5.5.1")
(source (origin
(method url-fetch)
(uri (string-append
"https://github.com/CGAL/cgal/"
"releases/download/v" version "/"
"CGAL-" version ".tar.xz"))
(sha256
(base32
"1z7dcqah72pixs3nxjjwhldsrpcysy5bdd8fy35cvyi8y3g305h9"))
(patches (search-patches "vfx/patches/cgal-resources-perm.patch"))))
(build-system cmake-build-system)
(arguments
(list #:tests? #f
#:configure-flags
#~(list "-DWITH_demos=ON")))
(propagated-inputs
(list mpfr gmp boost))
(home-page "https://www.cgal.org/")
(synopsis "Computational geometry algorithms library")
(description
"CGAL provides easy access to efficient and reliable geometric algorithms
in the form of a C++ library. CGAL is used in various areas needing geometric
computation, such as: computer graphics, scientific visualization, computer
aided design and modeling, geographic information systems, molecular biology,
medical imaging, robotics and motion planning, mesh generation, numerical
methods, etc. It provides data structures and algorithms such as
triangulations, Voronoi diagrams, polygons, polyhedra, mesh generation, and
many more.")
(license licenses:gpl3+)))