compas-dev / compas_slicer

Slicing package for FDM 3D Printing with COMPAS.
https://compas.dev/compas_slicer/
MIT License
30 stars 16 forks source link

matplotlib dependencies prevents from use in Rhino #153

Open jf--- opened 2 years ago

jf--- commented 2 years ago

the following import statement:

from compas_slicer.post_processing import generate_brim

seems to rely on matplotlib

Expected behavior matplotlib is tricky / impossible to install to on IronPython hence this dependency renders compas_slicer incompatible with Rhino moreover, since matplotlib is a pretty hefty package ( can depend on Qt5 in turn ) it takes a whopping ~10s to load

Desktop (please complete the following information):

Screenshots

image

jf--- commented 2 years ago

https://github.com/compas-dev/compas_slicer/blob/58dedfbebd123258506174453d5f73d18d745819/src/compas_slicer/__init__.py#L63-L71

https://github.com/compas-dev/compas_slicer/blob/58dedfbebd123258506174453d5f73d18d745819/src/compas_slicer/post_processing/__init__.py#L45-L65

joburger commented 2 years ago

Hi Jelle, so actually compas slicer is, at the moment, not designed to work directly within Rhino. Reason for this is to avoid all of the constraints of IronPython. So the envisioned workflow is as follows:

This is somehow described here (https://compas.dev/compas_slicer/latest/tutorials/02_grasshopper_visualization.html), but I realize it's probably not clear enough so will add some documentation to describe this workflow better.

Also, we are not considering making compas slicer available for current versions of Rhino, since CPython will be introduced in Rhino8, we would probably wait until R8 is out and then direct some efforts to integrate compas slicer into a Rhino workflow.

Cheers, Joris