Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to export shape from pure guile #514

Open
Kreyren opened this issue Nov 11, 2022 · 1 comment
Open

Unable to export shape from pure guile #514

Kreyren opened this issue Nov 11, 2022 · 1 comment

Comments

@Kreyren
Copy link
Contributor

Kreyren commented Nov 11, 2022

Description

Using the code:

(define-module (some cool module)
  #:use-module (libfive shapes)
  #:use-module (libfive transforms)
  #:use-module (libfive csg)
  #:use-module (libfive text))

(difference (sphere 1 [0 0 0])
  (sphere 0.6 [0 0 0])
  (cylinder-z 0.6 2 [0 0 -1])
  (reflect-xz (cylinder-z 0.6 2 [0 0 -1]))
  (reflect-yz (cylinder-z 0.6 2 [0 0 -1])))
; => Shape

I am unable to export the STL file..

In C++ there seems to be an API to use Mesh::render(out, bounds)->saveSTL("sphere.stl"); to get the STL file from the shape, but i can't find the guile eqvivalent to this feature without using Studio that seems to be reinterpreting the guile code to C++

Versions

  • Operating system: GNU Guix (ba8679fb2452f4466a98a99edf050ea7452c83f4)
  • libfive commit hash: 0-4.8ca1b86
    • Is this the latest commit to master? no
  • Qt version (if applicable): dunno

CC @mkeeter

@mkeeter
Copy link
Member

mkeeter commented Nov 11, 2022

Have you seen the export-meshes script? Take a look and see if it works for your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants