pyvista: Incorrect result of boolean_difference
Describe the bug, what’s wrong, and what you expected.
Hello, I’ve encountered a bug, Incorrect result of boolean_difference as the following code
Steps to reproduce the bug.
import pyvista as pv
cube1 = pv.Cube(x_length=1.1, y_length=10, z_length=10)
cube1 = cube1.triangulate()
cube2 = pv.Cube(x_length=1, y_length=18, z_length=27)
cube2 = cube2.triangulate()
out_mesh = cube2 - cube1
plotter = pv.Plotter()
plotter.add_mesh(out_mesh, color='white')
plotter.show()
System Information
--------------------------------------------------------------------------------
Date: Mon Sep 04 17:39:21 2023
OS : Windows
CPU(s) : 64
Machine : AMD64
Architecture : 64bit
Environment : Python
GPU Vendor : NVIDIA Corporation
GPU Renderer : NVIDIA GeForce RTX 3080/PCIe/SSE2
GPU Version : 4.5.0 NVIDIA 516.94
MathText Support : False
Python 3.9.12 (tags/v3.9.12:b28265d, Mar 23 2022, 23:52:46) [MSC v.1929 64
bit (AMD64)]
pyvista : 0.41.1
vtk : 9.2.6
numpy : 1.25.2
matplotlib : 3.7.2
scooby : 0.7.2
pooch : v1.7.0
PyQt5 : 5.15.9
scipy : 1.11.1
--------------------------------------------------------------------------------
Screenshots
About this issue
- Original URL
- State: open
- Created 10 months ago
- Comments: 16 (14 by maintainers)
I am preoccupied with prior commitments, I will update you in 2 to 3 days.
@Arnav-2004 Thanks!
This has been posted on the forum here.
Reproducing the above bug using vtk:
Got it, I will do it.
This seems to be an issue with vtk itself, I tried to reproduce the same code with vtk and it is similar.
Yes, we have not been able to determine the cause of this problem. First, we need to isolate whether it is a PyVista or vtk issue. If it is a vtk issue, we will reproduce this in the vtk code and report to the vtk project.
@tkoyama010,Thank you very much!!! But this is indeed a bug, will it be fixed in the future? Maybe some one just want to do boolean operations on two cubes with 8 vertices, and don’t want to complicate the graphic, although he can use decimate to simplify it after boolean operations .