通过vtkSTLReader加载了两个STL模型,通过vtkBooleanOperationPolyDataFilter进行差集运算,结果崩溃到了vtkGenericDataArray里面,请问有人遇到同样的问题么?最后怎么解决?
![](http://tiebapic.baidu.com/forum/w%3D580/sign=4041917e5b086e066aa83f4332097b5a/aa846a3e6709c93d881703b8883df8dcd000542f.jpg?tbpicau=2024-09-19-05_1a70f0fb6ce4973b7bdea284543a78af)
vtkSmartPointer<vtkSTLReader> reader = vtkSmartPointer<vtkSTLReader>::New();
reader->SetFileName("ball.stl");
reader->Update();
vtkSmartPointer<vtkSTLReader> reader1 = vtkSmartPointer<vtkSTLReader>::New();
reader1->SetFileName("ball_test2.stl");
reader1->Update();
vtkSmartPointer<vtkBooleanOperationPolyDataFilter> boolFilter = vtkSmartPointer<vtkBooleanOperationPolyDataFilter>::New();
boolFilter->SetOperation(vtkBooleanOperationPolyDataFilter::VTK_DIFFERENCE);
boolFilter->SetInputConnection(0, reader->GetOutputPort());
boolFilter->SetInputConnection(1, reader1->GetOutputPort());boolFilter->Update();
![](http://tiebapic.baidu.com/forum/w%3D580/sign=4041917e5b086e066aa83f4332097b5a/aa846a3e6709c93d881703b8883df8dcd000542f.jpg?tbpicau=2024-09-19-05_1a70f0fb6ce4973b7bdea284543a78af)
vtkSmartPointer<vtkSTLReader> reader = vtkSmartPointer<vtkSTLReader>::New();
reader->SetFileName("ball.stl");
reader->Update();
vtkSmartPointer<vtkSTLReader> reader1 = vtkSmartPointer<vtkSTLReader>::New();
reader1->SetFileName("ball_test2.stl");
reader1->Update();
vtkSmartPointer<vtkBooleanOperationPolyDataFilter> boolFilter = vtkSmartPointer<vtkBooleanOperationPolyDataFilter>::New();
boolFilter->SetOperation(vtkBooleanOperationPolyDataFilter::VTK_DIFFERENCE);
boolFilter->SetInputConnection(0, reader->GetOutputPort());
boolFilter->SetInputConnection(1, reader1->GetOutputPort());boolFilter->Update();