[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/11: gnu: Add discregrid.
From: |
guix-commits |
Subject: |
08/11: gnu: Add discregrid. |
Date: |
Thu, 6 Oct 2022 10:11:03 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit 52b9f0ef1e1d80275ea39ba146f286f6a91c9585
Author: Paul A. Patience <paul@apatience.com>
AuthorDate: Thu Sep 15 13:16:25 2022 +0000
gnu: Add discregrid.
* gnu/packages/graphics.scm (discregrid): New variable.
Signed-off-by: Christopher Baines <mail@cbaines.net>
---
gnu/packages/graphics.scm | 69 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index fe38e7d03f..93cbb23620 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -2202,6 +2202,75 @@ Features include:
")
(license license:gpl3+)))
+(define-public discregrid
+ (let ((commit "4c27e1cc88be828c6ac5b8a05759ac7e01cf79e9")
+ (revision "0"))
+ (package
+ (name "discregrid")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
"https://github.com/InteractiveComputerGraphics/Discregrid")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "01cwfpw19rc9k5glx9dhnqpihd0is28a9b53qvzp5kgjmdq2v1p0"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (delete-file-recursively "extern/cxxopts")
+ (substitute* '("cmd/discrete_field_to_bitmap/main.cpp"
+ "cmd/generate_density_map/main.cpp"
+ "cmd/generate_sdf/main.cpp")
+ (("^#include <cxxopts/cxxopts\\.hpp>")
+ "#include <cxxopts.hpp>"))))))
+ (build-system cmake-build-system)
+ (outputs '("out" "bin"))
+ (arguments
+ (list #:tests? #f ; No tests
+ #:configure-flags
+ #~(list (string-append "-DCMAKE_INSTALL_BINDIR="
+ #$output:bin "/bin")
+ ;; Bespoke version of BUILD_SHARED_LIBS.
+ "-DBUILD_AS_SHARED_LIBS=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-cmake
+ (lambda _
+ (let ((port (open-file "cmd/CMakeLists.txt" "a")))
+ (display "install(TARGETS
+ DiscreteFieldToBitmap
+ GenerateDensityMap
+ GenerateSDF)
+"
+ port)
+ (close-port port)))))))
+ (inputs
+ (list cxxopts eigen))
+ (home-page "https://github.com/InteractiveComputerGraphics/Discregrid")
+ (synopsis "Discretize functions on regular grids")
+ (description "Discregrid is a C++ library for the parallel discretization
+of (preferably smooth) functions on regular grids. It generates a (cubic)
+polynomial discretization given a box-shaped domain, a grid resolution, and a
+3D scalar field. The library can also serialize and deserialize the generated
+discrete grid, and compute and discretize the signed distance field
+corresponding to a triangle mesh. The following programs are included with
+Discregrid:
+
+@itemize
+@item @code{GenerateSDF}: Computes a discrete (cubic) signed distance field
+from a triangle mesh in OBJ format.
+
+@item @code{DiscreteFieldToBitmap}: Generates an image in bitmap format of a
+two-dimensional slice of a previously computed discretization.
+
+@item @code{GenerateDensityMap}: Generates a density map from a previously
+generated discrete signed distance field using the cubic spline kernel.
+@end itemize")
+ (license license:expat))))
+
(define-public mmg
(package
(name "mmg")
- branch master updated (b86867417f -> 5b42b64ea8), guix-commits, 2022/10/06
- 07/11: gnu: Add r-gldex., guix-commits, 2022/10/06
- 10/11: gnu: Add waybar-cpu-histogram., guix-commits, 2022/10/06
- 03/11: gnu: Add rust-os-pipe-0.8., guix-commits, 2022/10/06
- 02/11: gnu: Add rust-greetd-ipc-0.8., guix-commits, 2022/10/06
- 09/11: gnu: libdaemon: Fix targeting riscv64., guix-commits, 2022/10/06
- 04/11: gnu: Add wlgreet., guix-commits, 2022/10/06
- 08/11: gnu: Add discregrid.,
guix-commits <=
- 01/11: gnu: plink: Change origin URL., guix-commits, 2022/10/06
- 05/11: gnu: Add cpass., guix-commits, 2022/10/06
- 06/11: gnu: Add r-spacefillr., guix-commits, 2022/10/06
- 11/11: doc: Fix missing package name., guix-commits, 2022/10/06