Skip to content

Instantly share code, notes, and snippets.

@caioaao
Created July 8, 2020 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caioaao/6aad00147096f05f0f20412dc693c010 to your computer and use it in GitHub Desktop.
Save caioaao/6aad00147096f05f0f20412dc693c010 to your computer and use it in GitHub Desktop.
(load-extension "libfive-guile" "scm_init_libfive_modules")
(use-modules (libfive kernel) (libfive vec) (libfive csg) (libfive shapes) (libfive transforms))
(define test-shape
(difference
(sphere 1 #[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->mesh test-shape "out.stl" 10 '((-2 . 2) (-2 . 2) (-2 . 2)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment