Comments (7)
Hey Shawn, I haven't actually tested booleans on windows, but the interface is using distutils.spawn.find_executable('blender'). I think that if you add blender to your windows PATH (control panel -> system -> advanced settings -> environment variables) it should be able to find it, you can check to see if trimesh.interfaces.blender.exist is True. If 'blender' from a cmd finds it it seems like distutils probably can too.
I'm not sure if the windows version has the same command line options. I'll try verify it works then add it to the appveyor Windows tests at some point.
from trimesh.
Thank you Mike for the quick reply!
I did try to add C:\Program Files\Blender Foundation\Blender
to the path and in cmd if I do where blender
it showed up; but still, when I try to do boolean, it says:
File "<ipython-input-5-3a440a9b7264>", line 1, in <module>
cmesh = trimesh.boolean.union([tmesh, amesh], 'blender')
File "C:\Anaconda3\envs\py34\lib\site-packages\trimesh\boolean.py", line 36, in union
result = _engines[engine](meshes, operation='union')
File "C:\Anaconda3\envs\py34\lib\site-packages\trimesh\interfaces\blender.py", line 14, in boolean
raise ValueError('No blender available!')
ValueError: No blender available!
I'll dig into the code base a bit later.
Thanks again!
Shawn
from trimesh.
Hey Shawn- amongst other things, I added some additional search paths in 954c9f0, and boolean ops work for me in windows with it.
Best,
Mike
from trimesh.
Hi Mike,
Thank you for your response!
I tried it, and initially it was still not working. I then checked my _search_path
in trimesh.interfaces.blender
, and it shows
ipdb> _search_path
'C:\\Anaconda3\\envs\\py34\\Library\\bin;C:\\Anaconda3\\envs\\py34\\Library\\bin;C:\\Anaconda3\\envs\\py34;C:\\Anaconda3\\envs\\py34\\Library\\mingw-w64\\bin;C:\\Anaconda3\\envs\\py34\\Library\\usr\\bin;C:\\Anaconda3\\envs\\py34\\Library\\bin;C:\\Anaconda3\\envs\\py34\\Scripts;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\SIMULIA\\Commands;C:\\Program Files\\Microsoft MPI\\Bin\\;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Git\\cmd;C:\\Program Files (x86)\\GitExtensions\\;C:\\Program Files\\MATLAB\\R2016b\\bin;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\MATLAB\\MATLAB Compiler Runtime\\v82\\runtime\\win64;C:\\SIMULIA\\Abaqus\\Commands;C:\\Program Files\\MATLAB\\R2013b\\bin;C:\\WINDOWS\\system32\\config\\systemprofile\\.dnx\\bin;C:\\Program Files\\Microsoft DNX\\Dnvm\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Anaconda3;C:\\Anaconda3\\Scripts;C:\\Anaconda3\\Library\\bin;C:\\cygwin64\\bin;C:\\cygwin64\\lib;C:\\Users\\shwang\\AppData\\Local\\atom\\bin;C:\\Program Files\\Blender Foundation\\BlenderC:\\Program Files\\Blender Foundation\\Blender;C:\\Program Files (x86)\\Blender Foundation\\Blender;'
Notice that it has:
;C:\\Program Files\\Blender Foundation\\BlenderC:\\Program Files\\Blender Foundation\\Blender;
So when appending the search path, it is missing a ';'.
A quick and dirty fix that I did is to change https://github.com/mikedh/trimesh/blob/master/trimesh/interfaces/blender.py#L11
to
_search_path += ';C:\Program Files\Blender Foundation\Blender;'
This might be dirty... I'd be interested in knowing a neater way :)
By the way - in
Line 34 in 954c9f0
Trimesh
object by passing some kwargs
. Could you briefly elaborate on how to do that?
Thanks!
Shawn
from trimesh.
Ah my bad, thanks for the find! I fixed the search path issue in 423cca9 and added blender to the windows appveyor tests in 8d11d81, which should yell at me if it breaks again.
from trimesh.
Oh as to the returning a Trimesh object, if you use the mesh.union(other)
member function instead of trimesh.boolean.union
you'll get a Trimesh object (function in base).
from trimesh.
@mikedh Great! Thank you so much. And thanks for having the split-and-join method - it is nice and clean! :)
from trimesh.
Related Issues (20)
- Type Hint Issues: Pyright + Mypy
- add texture to the sides of cylinder
- Likely a bug in `trimesh.visual.gloss.specular_to_pbr`
- The quick start example triggers typing errors
- Warning when instantiating primitive
- Trimesh trimesh.intersections.slice_mesh_plane returns non-manifold mesh HOT 2
- Select connected faces to a FACET HOT 4
- [Beginner Question] Is there a way to check if a given vertex is manifold or not in trimesh ? HOT 2
- `EXCEPTION_ACCESS_VIOLATION` error when using `CollisionManager` integrated within Blender 4.0.0 Alpha environment HOT 1
- how to deal with "emission.jpg" and "normal.jpg" using trimesh
- Obtaining the area of a mesh section HOT 5
- NumPy 2.0 compatibility HOT 14
- Loading GLB (GLTF) faces index out of bounds error HOT 2
- Collision Detection Inaccuracy
- In the slicing algorythm loops are in some edge case not correctly detected
- Pass resolver to _read_buffers() when loading a .GLB file
- Add new vertices to the mesh HOT 1
- Project area discrepency question
- High CPU Usage and Performance Issues with windowed.SceneViewer HOT 3
- I can use it to export the model normally, and other displays are also normal. However, when I put the model in the WeChat mini program, an error occurred. How can I set it when exporting the model to avoid this problem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trimesh.