GNU bug report logs - #57828
[PATCH] gnu: Add discregrid.

Previous Next

Package: guix-patches;

Reported by: "Paul A. Patience" <paul <at> apatience.com>

Date: Thu, 15 Sep 2022 13:17:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57828 in the body.
You can then email your comments to 57828 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#57828; Package guix-patches. (Thu, 15 Sep 2022 13:17:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Paul A. Patience" <paul <at> apatience.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 15 Sep 2022 13:17:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: guix-patches <at> gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH] gnu: Add discregrid.
Date: Thu, 15 Sep 2022 13:16:25 +0000
* gnu/packages/graphics.scm (discregrid): New variable.
---
 gnu/packages/graphics.scm | 69 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index ef17f059e6..cb03cc36e5 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -2202,6 +2202,75 @@ (define-public azpainter
 ")
     (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")
--
2.37.3






Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Thu, 06 Oct 2022 14:20:01 GMT) Full text and rfc822 format available.

Notification sent to "Paul A. Patience" <paul <at> apatience.com>:
bug acknowledged by developer. (Thu, 06 Oct 2022 14:20:02 GMT) Full text and rfc822 format available.

Message #10 received at 57828-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: "Paul A. Patience" <paul <at> apatience.com>
Cc: 57828-done <at> debbugs.gnu.org
Subject: Re: [bug#57828] [PATCH] gnu: Add discregrid.
Date: Thu, 06 Oct 2022 15:18:37 +0100
[Message part 1 (text/plain, inline)]
"Paul A. Patience" <paul <at> apatience.com> writes:

> * gnu/packages/graphics.scm (discregrid): New variable.
> ---
>  gnu/packages/graphics.scm | 69 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 69 insertions(+)

Thanks Paul, good job especially with replacing the bundled
cxxopts. I've pushed this to master as
5b42b64ea89564c58325d16d3d0f4a0a03ebae0f.

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Nov 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 171 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.