Closed cheibasethz closed 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
Hi Ioanna! thank you for the fast reply, however, I tried it and it gives me the same error.
Then you have a very old version of compas_slicer. Could you update the repository and try again?
Hi Ioana! I reinstalled the compas_slicer, and still the same problem.
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?
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.
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?
#
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
the compas_cgal package is there, but not in visual studio
Yes indeed, everything is installed. I suggest you do the following two things
On your Visual Studio Code activate your environment and type on its terminal where python
. It should give you the path inside your compas_slicer environment. If not, it means it falls back to some other environment for running your script.
On the compas_slicer repository do a git pull
and see if it gives you an error. It could be that you are not in the latest version, but it says you are up to date because there's some access problem with your credentials. If that is the case, the git pull should give you an error. I insist on having the final version, because we had that error before, and we fixed it on a previous commit.
Does either of those have an unexpected outcome?
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.
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)
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 :)
Thank you Ioanna!
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: