Comments (12)
Feel free to submit them now. Maybe it's already fixed.
from vtkbool.
@mallikarjun49 export the meshes (polydata_ and transformFilter_->GetOutput()) to files, upload them somewhere, and post the download links here. It is not possible to reproduce the meshes exactly based on your approximate instructions.
Also note that vtkCylinderSource creates meshes that are very efficient for rendering but almost unusable for 3D modeling, because it creates extremely ill-shaped triangles (that span between the top and bottom planes of the cylinder). Use vtkLineSource and vtkTubeFilter instead, because with that you can create better shaped triangles.
from vtkbool.
Great! Thank you for working on it.
from vtkbool.
Thank you very much @zippy84 !!
from vtkbool.
After adding a _s.empty()
check, I got an assert here:
vtkbool/libs/vp/RmTrivials.cxx
Line 355 in c0de9f6
because number of groups is 2. Replacing the assert with a if (grps.size() > 0) {}
check "fixes" the crash but I'm not sure if this is the right thing to do.
from vtkbool.
Hi Andras.
At first I have to say, that the master version is not crash safe. It mostly crashes at this line:
vtkbool/vtkPolyDataBooleanFilter.cxx
Line 2854 in c0de9f6
Currently I'm working on a new version that fixes that. The lib is also not type-safe. There are many warnings when -Wconversion
is enabled. My first changes could be found in the refactoring-branch, but it is not ready yet. The holes-merger an the decomposer are widely commented out.
I will take look for a solution of your issue.
from vtkbool.
Thank you for the quick response, looking forward to the fix.
We have found some additional issues (such as invalid comparator assert here because A>B and A<B did not provide consistent result), but if you are still working on some improvements then we'll hold this back until those get integrated.
from vtkbool.
vtkbool/vtkPolyDataBooleanFilter.cxx
Line 2854 in c0de9f6
Currently I'm working on a new version that fixes that.
Hi @zippy84,
Thank you very much for this library. I am trying to use boolean difference of this filter on my meshes. Most of the time it is working fine but some cases my program is crashing at the above mentioned line(#L2854 of vtkPolyDataBooleanFilter.cxx). I am using this filter in a loop and some times at the edge of the Sphere mesh if I do boolean diff operation I get an error message saying "Stripes are invalid" with some part of the mesh is left behind( Can see small parts of the mesh spiked at the edges in the attached image) and if I try to do difference operation on this area, then my program is crashing.
I see in this thread, you are already working on this issue. Do you have any suggestions to stop this crash until your fix is integrated into master branch?
from vtkbool.
@mallikarjun49 Can you supply two meshes that does not work?
from vtkbool.
@mallikarjun49 Can you supply two meshes that does not work?
Thank you very much for the quick response. I am basically using vtkSphereSource and vtkCylinderSource to do the difference operation. I am doing this operation in a loop. Basically my cylinder source translates to new position on key press and try to do difference operation on the output of the boolean filter in the previous step.
//loop
{
auto booleanFilter = vtkSmartPointer<vtkPolyDataBooleanFilter>::New();
booleanFilter->SetInputData(0,polydata_);
booleanFilter->SetInputData(1,transformFilter_->GetOutput()); //cylinder translates to new position in each iteration
booleanFilter->SetOperModeToDifference();
booleanFilter->Update();
if(booleanFilter->GetOutput()->GetNumberOfCells() > 0)
{
polydata_->Initialize();
polydata_->DeepCopy(booleanFilter->GetOutput());
}
}
from vtkbool.
@lassoan Thank you for your suggestions. I have now used vtkLineSource with vtkTubeFilter instead of vtkCylinderSource, and exported the mesh files.
@zippy84 , Please find the attached source code files and the Mesh files for your reference. Source code should work as it is or with minor tweaks to CMakelists.txt.
BoolDiff.zip
MeshFiles.zip
MeshFiles2.zip
from vtkbool.
I'm closing this as the code this refers to no longer exists.
from vtkbool.
Related Issues (20)
- please help install HOT 1
- Long road to version 3.0
- Question on vtkbool - the way to find error code HOT 2
- Way to turn off the console script. HOT 2
- Unable to import the module into a python script "Segmentation Fault". HOT 4
- How to build vtkbool for Python HOT 4
- Some complex grid data cannot get the correct Boolean operation result HOT 2
- Python work with Conda ModuleNotFoundError: No module named 'vtkBool' or ImportError: Initialization failed for vtkBool, not compatible with vtkmodules.vtkCommonCore HOT 1
- Cutting surfaces HOT 1
- Proper interface to allow generation of python wrappers. HOT 2
- Crash On CombineRegions( ) method when execute SetOperModeToDifference HOT 13
- How to resolve "Strips are invalid Issue" issues ? HOT 12
- Issues after introduction of "bad normals" HOT 6
- Contact ends suddenly issue HOT 4
- Difference operation performs an intersection and vice versa HOT 4
- Compilation Error when include vtkOpenGLRenderWindow HOT 1
- Difference boolean operation (e.g. A-B) leads to crash HOT 7
- Compute boolean operation only once for input polydatas that move? Would it achieve very quick subsequent updates? HOT 2
- SetOperMode is inconsistent with the final results HOT 5
- Union operation failed due to "Bad shape cells detected", but all cells are triangle-cells. HOT 1
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 vtkbool.