compas-dev / compas_slicer

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

Compas_cgal library is missing #98

Closed cheibasethz closed 3 years ago

cheibasethz commented 3 years ago

Describe the bug When I run the compas_slicer in Visual Studio it says that the compas_cgal library is missing. I have reinstalled the module in Anaconda Prompt, and it shows that the package is included. Furthermore, a week ago it worked just fine.

Error INFO-Mesh moved to: Point(0.000, 0.000, 0.000) INFO-Input Mesh with : 3478 vertices, 6768 Faces INFO- INFO-Planar slicing using CGAL ... Traceback (most recent call last): File "c:/Users/icheibas/Code/compas_slicer/compas_slicer/examples/1_planar_slicing_simple/example_1_planar_slicing_simple.py", line 125, in main() File "c:/Users/icheibas/Code/compas_slicer/compas_slicer/examples/1_planar_slicing_simple/example_1_planar_slicing_simple.py", line 56, in main slicer.slice_model() File "c:\users\icheibas\code\compas_slicer\compas_slicer\src\compas_slicer\slicers\base_slicer.py", line 73, in slice_model self.generate_paths() File "c:\users\icheibas\code\compas_slicer\compas_slicer\src\compas_slicer\slicers\planar_slicer.py", line 58, in generate_paths self.layers = compas_slicer.slicers.create_planar_paths_cgal(self.mesh, planes)
File "c:\users\icheibas\code\compas_slicer\compas_slicer\src\compas_slicer\slicers\planar_slicing\planar_slicing_cgal.py", line 36, in create_planar_paths_cgal or use another planar slicing method.") compas.plugins.PluginNotInstalledError: --------ATTENTION! ----------- Compas_cgal library is missing! You can't use this planar slicing method without it. Check the README instructions for how to install it, or use another planar slicing method.

Desktop:

ioannaMitropoulou commented 3 years ago

Hello! You are using the planar slicer with the 'cgal' method in your code. This requires the installation of the compas_cgal additional package. Open a conda prompt, activate your environment, and then type

conda install COMPAS compas_cgal

cheibasethz commented 3 years ago

Hi Ioanna! thank you for the fast reply, however, I tried it and it gives me the same error.

ioannaMitropoulou commented 3 years ago

Then you have a very old version of compas_slicer. Could you update the repository and try again?

cheibasethz commented 3 years ago

Hi Ioana! I reinstalled the compas_slicer, and still the same problem.

ioannaMitropoulou commented 3 years ago

Hmmm, but did you update your local compas_slicer repository? You don't need to re-install, only update the repository. Do the following: open a command line, navigate in the compas_slicer folder and type the command; git status Could you copy-paste here what it says?

cheibasethz commented 3 years ago

I did update the repository, this is what it says: Your branch is up to date with 'origin/master'. I re-installed the package, just to be sure.

ioannaMitropoulou commented 3 years ago

Ok, I officially don't know what's going on. Let's try this. Open a conda prompt , activate your environment and type: conda list Could you paste here the list that comes out?

cheibasethz commented 3 years ago

packages in environment at C:\Users\icheibas.conda\envs\compas_slicer:

#

Name Version Build Channel

argh 0.26.2 pyh9f0ad1d_1002 conda-forge attrs 20.3.0 pyhd3deb0d_0 conda-forge boost-cpp 1.74.0 h54f0996_1 conda-forge bzip2 1.0.8 h8ffe710_4 conda-forge ca-certificates 2020.11.8 h5b45459_0 conda-forge certifi 2020.11.8 py37h03978a9_0 conda-forge cgal-cpp 5.1.1 h3c2f9b9_0 conda-forge compas 0.16.9 pypi_0 pypi compas-slicer 0.1.0 dev_0 compas-viewers 0.1.0 dev_0 compas_cgal 0.1.1 py37he95b3cd_5 conda-forge contextlib2 0.5.5 py_2 conda-forge cycler 0.10.0 py_2 conda-forge cython 0.29.21 py37h8e8dfb5_1 conda-forge decorator 4.4.2 py_0 conda-forge eigen 3.3.9 h2d74725_0 conda-forge ezdxf 0.14.2 py_0 conda-forge freetype 2.10.4 h546665d_0 conda-forge igl 2.2.1 py37h69a44b3_1 conda-forge imageio 2.9.0 py_0 conda-forge importlib-metadata 3.1.1 pyhd8ed1ab_0 conda-forge importlib_metadata 3.1.1 hd8ed1ab_0 conda-forge intel-openmp 2020.3 h57928b3_311 conda-forge jpeg 9d h8ffe710_0 conda-forge jsonschema 3.2.0 py_2 conda-forge kiwisolver 1.3.1 py37h8c56517_0 conda-forge laspy 1.7.0 pyh5ca1d4c_0 conda-forge lastools 20171231 h0e60522_1001 conda-forge laszip 3.4.3 h6538335_1 conda-forge libblas 3.8.0 21_mkl conda-forge libcblas 3.8.0 21_mkl conda-forge liblapack 3.8.0 21_mkl conda-forge libpng 1.6.37 h1d00b33_2 conda-forge libtiff 4.1.0 hc10be44_6 conda-forge llvmlite 0.35.0 py37habb0c8c_0 conda-forge lz4-c 1.9.2 h62dcd97_2 conda-forge m2w64-gcc-libgfortran 5.3.0 6 m2w64-gcc-libs 5.3.0 7 m2w64-gcc-libs-core 5.3.0 7 m2w64-gmp 6.1.0 2 m2w64-libwinpthread-git 5.0.0.4634.697f757 2 matplotlib-base 3.0.3 py37h3e3dc42_1 conda-forge meshcut 0.2.1 pypi_0 pypi mkl 2020.4 hb70f87d_311 conda-forge mpfr 4.0.2 h62dcd97_1 conda-forge mpir 3.0.0 he025d50_1002 conda-forge mpmath 1.1.0 py_0 conda-forge msys2-conda-epoch 20160418 1 networkx 2.5 py_0 conda-forge numba 0.52.0 py37h08fd248_0 conda-forge numpy 1.19.4 py37hd20adf4_1 conda-forge numpy-stl 2.13.0 pypi_0 pypi olefile 0.46 pyh9f0ad1d_1 conda-forge openssl 1.1.1h he774522_0 conda-forge pathtools 0.1.2 py_1 conda-forge pillow 8.0.1 py37hdec93a9_0 conda-forge pip 20.3.1 pyhd8ed1ab_0 conda-forge planarity 3.0.0.5 hfa6e2cd_1002 conda-forge progressbar2 3.53.1 pypi_0 pypi pyclipper 1.2.0 pypi_0 pypi pycollada 0.7.1 py_0 conda-forge pyopengl 3.1.5 pypi_0 pypi pyopengl-accelerate 3.1.5 pypi_0 pypi pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pyrsistent 0.17.3 py37hcc03f2d_1 conda-forge pyside2 5.15.0 pypi_0 pypi python 3.7.8 h7840368_3_cpython conda-forge python-dateutil 2.8.1 py_0 conda-forge python-planarity 0.4.1 py37h4ab8f01_4 conda-forge python-utils 2.4.0 pypi_0 pypi python_abi 3.7 1_cp37m conda-forge pyyaml 5.3.1 py37h0013d47_1 conda-forge rdp 0.8 pypi_0 pypi schema 0.7.3 pyh9f0ad1d_0 conda-forge scipy 1.5.3 py37h6db1a17_0 conda-forge setuptools 49.6.0 py37hf50a25e_2 conda-forge shiboken2 5.15.0 pypi_0 pypi six 1.15.0 pyh9f0ad1d_0 conda-forge sqlite 3.34.0 h8ffe710_0 conda-forge sympy 1.7 py37h03978a9_1 conda-forge tk 8.6.10 he774522_1 conda-forge tornado 6.1 py37hcc03f2d_0 conda-forge vc 14.1 h869be7e_1 conda-forge vs2015_runtime 14.16.27012 h30e32a0_2 conda-forge watchdog 0.10.4 py37h03978a9_0 conda-forge wheel 0.36.1 pyhd3deb0d_0 conda-forge wincertstore 0.2 py37hc8dfbb8_1005 conda-forge xz 5.2.5 h62dcd97_1 conda-forge yaml 0.2.5 he774522_0 conda-forge zipp 3.4.0 py_0 conda-forge zlib 1.2.11 h62dcd97_1010 conda-forge zstd 1.4.5 h1f3a1b7_2 conda-forge

cheibasethz commented 3 years ago

the compas_cgal package is there, but not in visual studio

ioannaMitropoulou commented 3 years ago

Yes indeed, everything is installed. I suggest you do the following two things

Does either of those have an unexpected outcome?

cheibasethz commented 3 years ago

Is this the right outcome? There were no errors:

PS C:\Users\icheibas\Code\compas_slicer> conda activate compas_slicer
PS C:\Users\icheibas\Code\compas_slicer> where python PS C:\Users\icheibas\Code\compas_slicer>

PS C:\Users\icheibas\Code\compas_slicer\compas_slicer> git pull Already up to date.

ioannaMitropoulou commented 3 years ago

It didn't return the path to the python it uses though, so I don't know if it uses the environment. In any case, since we can't find the bottom of this, I would suggest is that you just use the default slicer instead of the cgal slicer. Then you shouldn't get any errors. To do that you can replace the line

slicer = PlanarSlicer(compas_mesh, slicer_type="cgal", layer_height=layer_height)

with

slicer = PlanarSlicer(compas_mesh, slicer_type="default", layer_height=layer_height)

cheibasethz commented 3 years ago

I am using the default now. It just takes too long to slice, so my hope was that maybe there is a solution to it :)

cheibasethz commented 3 years ago

Thank you Ioanna!