Code Monkey home page Code Monkey logo

Comments (5)

mikedh avatar mikedh commented on May 28, 2024

It looks like it can't find openscad. If you run openscad from the command line does it work? I'll change the command to use find_executable which will help if it isn't installed into your PATH environment variable.

I'm guessing that blender error is probably because your version of blender is either older or newer than the one I've tested with. Are you on Ubuntu 14.04 and did you run the 'Optional Dependencies' bit from the readme?

from trimesh.

tomaso909 avatar tomaso909 commented on May 28, 2024

Openscad works fine when I type openscad, however I get the following warning in a textbox:

> Warning: You may experience OpenCSG rendering errors.
> It is highly recommended to use OpenSCAD on a system with OpenGL 2.0 or later.
> Your renderer information is as follows:
> GLEW version 1.9.0
> AMD Radeon R9 200 Series                          (ATI Technologies Inc.)
> OpenGL version 1.4 (2.1 (4.3.12798 Compatibility Profile Context 14.20))

I am using Ubuntu 12.04 64bit. This is the output of blender --version:

> Blender 2.62 (sub 0)
>   build date: 2012-04-03
>   build time: 07:08:03
>   build revision: unknown
>   build platform: Linux
>   build type: Release
>   build c flags: -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security  -fopenmp  -msse2  -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing  -Wall -Wcast-align -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type -Wstrict-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wno-error=unused-but-set-variable
>   build c++ flags: -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security  -D__STDC_CONSTANT_MACROS -fopenmp  -msse2  -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing  -Wall -Wno-invalid-offsetof -Wno-sign-compare
>   build link flags: -pthread
>   build system: CMake

I will update OpenGL and check the 'Optional Dependencies' which I don't remember if I did.

from trimesh.

mikedh avatar mikedh commented on May 28, 2024

Gotcha- not sure why check_call didn't find openscad but I just committed a change which uses distutils.spawn.find_executable so that may fix openscad. I assume the blender thing didn't work as that is a pretty old build.

I would try updating trimesh (pip install --upgrade trimesh) to check the scad fix. I would also probably install a newer version of blender from a ppa:

sudo apt-get remove blender
sudo add-apt-repository ppa:thomas-schiex/blender
sudo apt-get update
sudo apt-get install blender

from trimesh.

tomaso909 avatar tomaso909 commented on May 28, 2024

After upgrading trimesh I got this error when using the scad engine:

> Traceback (most recent call last):
>   File "/home/tomas/Synology/Documents/Python/VPPy/VPPy-2.1.2/LPP.py", line 649, in <module>
>     d = geo.difference(sea, engine=engine)
>   File "/usr/local/lib/python2.7/dist-packages/trimesh/base.py", line 1029, in difference
>     engine = engine))
>   File "/usr/local/lib/python2.7/dist-packages/trimesh/boolean.py", line 19, in difference
>     result = _engines[engine](meshes, operation='difference')
>   File "/usr/local/lib/python2.7/dist-packages/trimesh/interfaces/scad.py", line 37, in boolean
>     return interface_scad(meshes, script)
>   File "/usr/local/lib/python2.7/dist-packages/trimesh/interfaces/scad.py", line 24, in interface_scad
>     raise ValueError('No SCAD available!')
> ValueError: No SCAD available!

Since ValueError: No SCAD available! is quite meaningful it occurred to me that the problem is that Sublime Text (my lovely text editor/IDE) uses an independent $path when building scripts so I added /opt/openscad-2014.03/bin to Sublime Text path and now trimesh can find the scad engine but I get this error:

> Geo is watertight: True
> Sea is watertight: True
> INFO:trimesh:Exporting 86930 faces as STL
> INFO:trimesh:Exporting 12 faces as STL
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> Error !!!!!!!!!!!!!!!!!!!!!!!
> openscad: ../openscad_deps/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = CGAL::Nef_polyhedron_3<CGAL::Cartesian<CGAL::Gmpq> >; typename boost::detail::sp_member_access<T>::type = CGAL::Nef_polyhedron_3<CGAL::Cartesian<CGAL::Gmpq> >*]: Assertion `px != 0' failed.
> Traceback (most recent call last):
>   File "/home/tomas/Synology/Documents/Python/VPPy/VPPy-2.1.2/LPP.py", line 652, in <module>
>     d = geo.difference(sea, engine=engine)
>   File "/usr/local/lib/python2.7/dist-packages/trimesh/base.py", line 1029, in difference
>     engine = engine))
>   File "/usr/local/lib/python2.7/dist-packages/trimesh/boolean.py", line 19, in difference
>     result = _engines[engine](meshes, operation='difference')
>   File "/usr/local/lib/python2.7/dist-packages/trimesh/interfaces/scad.py", line 37, in boolean
>     return interface_scad(meshes, script)
>   File "/usr/local/lib/python2.7/dist-packages/trimesh/interfaces/scad.py", line 26, in interface_scad
>     result = scad.run(_scad_executable + ' $script -o $mesh_post')
>   File "/usr/local/lib/python2.7/dist-packages/trimesh/interfaces/generic.py", line 39, in run
>     check_call(command_run)
>   File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
>     raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['/opt/openscad-2014.03/bin/openscad', '/tmp/tmpzACX1H', '-o', '/tmp/tmpmXhgmJ.STL']' returned non-zero exit status -6

Which I guess is a problem of my geometry, so I will try to perform the boolean operation in openscad directly and see if it works. Anyway, I will be using Blender engine because I believe is faster than openscad and reducing the computational time of the boolean operations is critical for my application.

I cannot upgrade Blender from the repo ppa:thomas-schiex/blender because it doesn't find a version for Ubuntu 12.04. I will upgrade to 14.04 which is something I was looking forward to do anyway and update Blender to see what happens.

from trimesh.

mikedh avatar mikedh commented on May 28, 2024

Yikes, that openscad error is pretty exciting. Yeah the boolean operations require watertight inputs and can be finicky depending on the geometry. I'm going to close this issue as it looks like the interfaces are connecting to scad/blender.

from trimesh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.