Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Libs/Analyze/MeshGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ MeshHandle MeshGenerator::build_mesh_from_image(ImageType::Pointer image, float

//---------------------------------------------------------------------------
MeshHandle MeshGenerator::build_mesh_from_file(std::string filename, float iso_value) {
// std::cerr << "build_mesh from " << filename << "\n";
MeshHandle mesh(new StudioMesh);

if (!QFileInfo(QString::fromStdString(filename)).exists()) {
Expand Down
10 changes: 10 additions & 0 deletions Libs/Mesh/Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ Mesh& Mesh::smoothSinc(int iterations, double passband) {
iterations = std::max<int>(iterations, 2);
smoother->SetNumberOfIterations(iterations);
smoother->SetPassBand(passband);

smoother->BoundarySmoothingOff();
smoother->FeatureEdgeSmoothingOff();
smoother->NonManifoldSmoothingOn();
smoother->NormalizeCoordinatesOn();

smoother->Update();
this->poly_data_ = smoother->GetOutput();

Expand Down Expand Up @@ -722,6 +728,10 @@ Mesh& Mesh::clipClosedSurface(const Plane plane) {
}

Mesh& Mesh::computeNormals() {
// Remove existing normals first
poly_data_->GetPointData()->SetNormals(nullptr);
poly_data_->GetCellData()->SetNormals(nullptr);

auto normal = vtkSmartPointer<vtkPolyDataNormals>::New();

normal->SetInputData(this->poly_data_);
Expand Down
6 changes: 4 additions & 2 deletions Studio/Interface/ShapeWorksStudioApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1335,15 +1335,17 @@ void ShapeWorksStudioApp::handle_groom_start() {
void ShapeWorksStudioApp::handle_groom_complete() {
update_view_combo();

// Clear cache BEFORE setting display mode, because set_display_mode triggers
// update_view_mode() which calls update_display() and would use stale cached meshes
session_->handle_clear_cache();

if (!session_->groomed_present()) {
// grooming may have failed, if so, we don't want to switch to groomed that don't exist
session_->set_display_mode(DisplayMode::Original);
} else {
session_->set_display_mode(DisplayMode::Groomed);
}

session_->handle_clear_cache();

update_display(true);
visualizer_->reset_camera();
enable_possible_actions();
Expand Down
4 changes: 2 additions & 2 deletions Testing/data/reconstruct_mean_surface.nrrd
Git LFS file not shown
4 changes: 2 additions & 2 deletions Testing/data/reconstruct_mean_surface.vtk
Git LFS file not shown
114 changes: 57 additions & 57 deletions Testing/data/shapeworksTests/analyze/analysis_baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1288,70 +1288,70 @@
"groups": [],
"good_bad_angles": [
[
9.84,
9.82,
4.17,
4.07,
10.96,
6.45,
7.3,
9.21,
8.39,
4.97,
10.62,
6.31,
4.74,
9.99,
7.71,
7.57,
8.0,
4.05,
10.88,
6.44,
7.45,
9.12,
8.36,
4.92,
10.55,
6.25,
4.64,
9.74,
7.68,
7.55,
7.95,
8.99,
3.93,
13.49,
9.03,
4.13,
13.58,
9.14,
3.43,
9.26,
8.82,
5.16,
9.76,
4.21,
8.78,
9.64,
4.23,
8.75,
4.56,
9.1,
7.51,
6.63,
9.97,
7.11,
11.15,
9.11,
7.6,
9.48,
9.06,
7.46,
6.54,
9.9,
7.1,
11.12,
8.98,
7.54,
9.38,
5.1,
17.11,
9.64,
5.94,
8.06,
7.9,
12.86,
7.06,
9.07,
3.91,
12.09,
5.81,
11.3,
12.96,
15.91,
12.14,
6.36,
12.83,
5.32,
11.5,
5.84,
6.2,
8.91,
6.27,
6.43,
4.98,
9.04,
8.81
9.62,
5.93,
8.02,
7.88,
12.76,
6.93,
9.02,
3.93,
11.97,
5.77,
11.3,
12.89,
15.77,
12.05,
6.33,
12.58,
5.36,
11.36,
5.86,
6.08,
8.86,
6.23,
6.26,
4.86,
8.64,
8.76
]
]
}
Git LFS file not shown
Git LFS file not shown
4 changes: 2 additions & 2 deletions Testing/data/smoothsinc.vtp
Git LFS file not shown
Loading