Python and Windows support for libfive

44 views
Skip to first unread message

Matthew Keeter

unread,
Mar 19, 2021, 7:55:12 PM3/19/21
to cu...@googlegroups.com
Hey folks,

Since libfive has come up a few times on this list, I figure you would like to hear about the latest updates!

libfive is a kernel for solid modeling with functional expressions (repo).  Unlike Curv, it’s focused on pure arithmetic trees, without functional features like loops or conditionals.  It targets CPU-side mesh generation, and is a pure backend library, without a dedicated DSL like Curv.

(I also spun off an experimental libfive-based GPU renderer that turned into a research paper, but that’s a separate topic)

Anyways, there’s a new libfive standard shapes library written in C/C++.  Higher-level language bindings are now autogenerated from the C header, which means it’s easier to maintain them.  I used this to write Python bindings, since that’s more approachable than Scheme.  The Python bindings also let people use the Studio GUI on Windows (where Guile Scheme won't compile), and includes support for push-pull direct modeling by hacking the Python AST.

Happy to answer questions here or on Github issues!

Regards,
Matt

Doug Moen

unread,
Mar 20, 2021, 12:12:53 PM3/20/21
to Curv
Hi Matt. Congratulations on the new features. Does your new Python environment provide any solution for sandboxing malicious code?
--
You received this message because you are subscribed to the Google Groups "Curv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to curv+uns...@googlegroups.com.

Matthew Keeter

unread,
Mar 20, 2021, 12:47:15 PM3/20/21
to Doug Moen, Curv
Sadly, no – last time I looked, the consensus was that it’s very challenging.

(a quick search today finds RestrictedPython, but I haven’t looked into it yet)

My tentative plan is to store a persistent list of trusted scripts, as a mapping of “script path → hash”.  Then, any script which isn’t in this list will have to be explicitly trusted before it's evaluated.

-Matt

Reply all
Reply to author
Forward
0 new messages