Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions include/geode/inspector/information.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace geode
{
if( issues_.empty() )
{
return absl::StrCat( description_, " -> No Issues :) \n" );
return absl::StrCat( "No issues with ", description_, "\n" );
}
auto message = absl::StrCat( description_ );
for( const auto& issue : messages_ )
Expand Down Expand Up @@ -137,7 +137,7 @@ namespace geode
{
if( issues_map_.empty() )
{
return absl::StrCat( description_, " -> No Issues :) \n" );
return absl::StrCat( "No issues with ", description_, "\n" );
}
auto message = absl::StrCat( description_ );
for( const auto& issues : issues_map_ )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace geode
{
return message;
}
return "No adjacency issues in model component meshes \n";
return "No adjacency issues in model \n";
}

std::string BRepMeshesAdjacencyInspectionResult::inspection_type() const
Expand All @@ -89,8 +89,9 @@ namespace geode
auto wrong_adjacencies =
inspector.polyhedron_facets_with_wrong_adjacency();
wrong_adjacencies.set_description(
absl::StrCat( "Block with uuid ", block.id().string(),
" polyhedron facets adjacencies issues" ) );
absl::StrCat( "Block ", block.name(),
" polyhedron facets adjacencies issues - uuid ",
block.id().string() ) );
const auto& mesh = block.mesh();
for( const auto polyhedron_id : Range{ mesh.nb_polyhedra() } )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace geode
{
return surfaces_edges_with_wrong_adjacencies.string();
}
return "No adjacency issues in model component meshes \n";
return "No adjacency issues in model \n";
}

std::string SectionMeshesAdjacencyInspectionResult::inspection_type() const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ namespace
if( !colocated_pts.empty() )
{
geode::InspectionIssues< std::vector< geode::index_t > >
line_issues{ absl::StrCat( "Line with uuid ",
line.id().string(), " colocated vertices" ) };
line_issues{ absl::StrCat( "Line ", line.name(),
" colocated vertices - uuid ", line.id().string() ) };
const auto& line_mesh = line.mesh();
for( const auto& colocated_points_group : colocated_pts )
{
Expand All @@ -124,12 +124,12 @@ namespace
&point_group_string, " ", point_index );
}
line_issues.add_issue( colocated_points_group,
absl::StrCat( "Line with uuid ", line.id().string(),
absl::StrCat( "Line ", line.name(),
" has vertices with indices", point_group_string,
" which are colocated at position [",
line_mesh.point( colocated_points_group[0] )
.string(),
"]." ) );
"] - uuid ", line.id().string() ) );
}
components_colocated_points.add_issues_to_map(
line.id(), std::move( line_issues ) );
Expand All @@ -147,8 +147,9 @@ namespace
if( !colocated_pts.empty() )
{
geode::InspectionIssues< std::vector< geode::index_t > >
surface_issues{ absl::StrCat( "Surface with uuid ",
surface.id().string(), " colocated vertices" ) };
surface_issues{ absl::StrCat( "Surface ", surface.name(),
" colocated vertices - uuid ",
surface.id().string() ) };
const auto& surface_mesh = surface.mesh();
for( const auto& colocated_points_group : colocated_pts )
{
Expand All @@ -159,13 +160,12 @@ namespace
&point_group_string, " ", point_index );
}
surface_issues.add_issue( colocated_points_group,
absl::StrCat( "Surface with uuid ",
surface.id().string(), " has vertices with indices",
point_group_string,
absl::StrCat( "Surface ", surface.name(),
" has vertices with indices", point_group_string,
" which are colocated at position [",
surface_mesh.point( colocated_points_group[0] )
.string(),
"]." ) );
"] - uuid ", surface.id().string() ) );
}
components_colocated_points.add_issues_to_map(
surface.id(), std::move( surface_issues ) );
Expand Down Expand Up @@ -198,8 +198,8 @@ namespace
if( !colocated_pts.empty() )
{
geode::InspectionIssues< std::vector< geode::index_t > >
block_issues{ absl::StrCat( "Block with uuid ",
block.id().string(), " colocated vertices" ) };
block_issues{ absl::StrCat( "Block ", block.name(),
" colocated vertices - uuid ", block.id().string() ) };
const auto& block_mesh = block.mesh();
for( const auto& colocated_points_group : colocated_pts )
{
Expand All @@ -210,12 +210,12 @@ namespace
&point_group_string, " ", point_index );
}
block_issues.add_issue( colocated_points_group,
absl::StrCat( "Block with uuid ", block.id().string(),
absl::StrCat( "Block ", block.name(),
" has vertices with indices", point_group_string,
" which are colocated at position [",
block_mesh.point( colocated_points_group[0] )
.string(),
"]." ) );
"] - uuid ", block.id().string() ) );
}
components_colocated_points.add_issues_to_map(
block.id(), std::move( block_issues ) );
Expand All @@ -238,7 +238,7 @@ namespace geode
{
return colocated_points_groups.string();
}
return "No issues of colocation in model component meshes \n";
return "No issues of colocation in model \n";
}

std::string MeshesColocationInspectionResult::inspection_type() const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace geode
}
if( message.empty() )
{
return "No degeneration issues in model component meshes \n";
return "No degeneration issues in model \n";
}
return message;
}
Expand Down Expand Up @@ -101,14 +101,16 @@ namespace geode
}
const geode::SolidMeshDegeneration3D inspector{ mesh };
auto small_edges = inspector.small_edges( threshold );
small_edges.set_description( absl::StrCat(
"Block ", block.id().string(), " small edges" ) );
small_edges.set_description(
absl::StrCat( "Block ", block.name(),
" small edges - uuid ", block.id().string() ) );
small_edges_map.add_issues_to_map(
block.id(), std::move( small_edges ) );
auto small_polyhedra =
inspector.small_height_polyhedra( threshold );
small_polyhedra.set_description( absl::StrCat( "Block ",
block.id().string(), " small height polyhedra" ) );
block.name(), " small height polyhedra - uuid ",
block.id().string() ) );
small_polyhedra_map.add_issues_to_map(
block.id(), std::move( small_polyhedra ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace geode
InspectionIssues< index_t > small_edges( double threshold ) const
{
InspectionIssues< index_t > degenerated_edges_index{
"Degenerated Edges of EdgeCurve " + mesh_.id().string() + "."
"Degenerated Edges."
};
for( const auto edge_id : Range{ mesh_.nb_edges() } )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace geode
{
return message;
}
return "No degeneration issues in model component meshes \n";
return "No degeneration issues in model \n";
}

std::string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ namespace geode
{
wrong_polyhedra.add_issue( polyhedron_id,
absl::StrCat( "Polyhedron ", polyhedron_id,
" of Solid ", this->mesh().id().string(),
" is degenerated." ) );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ namespace geode
if( this->mesh().polygon_minimum_height( polygon_id )
<= threshold )
{
wrong_polygons.add_issue( polygon_id,
absl::StrCat( "Polygon ", polygon_id, " of Surface ",
this->mesh().id().string(), " is degenerated." ) );
wrong_polygons.add_issue(
polygon_id, absl::StrCat( "Polygon ", polygon_id,
" is degenerated." ) );
}
}
return wrong_polygons;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ namespace geode
surface.mesh()
};
auto issues = inspector.polygon_edges_with_wrong_adjacency();
issues.set_description(
absl::StrCat( "Surface ", surface.id().string(),
" polygon edges adjacency issues." ) );
issues.set_description( absl::StrCat( "Surface ",
surface.name(), " polygon edges adjacency issues - uuid ",
surface.id().string() ) );
const auto& mesh = surface.mesh();
for( const auto polygon_id : Range{ mesh.nb_polygons() } )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ namespace geode
line.mesh()
};
auto issues = inspector.small_edges( threshold );
issues.set_description( absl::StrCat(
"Line ", line.id().string(), " small edges" ) );
issues.set_description( absl::StrCat( "Line ", line.name(),
" small edges - uuid ", line.id().string() ) );
return std::make_pair( line.id(), std::move( issues ) );
} ) );
}
Expand Down Expand Up @@ -103,7 +103,8 @@ namespace geode
inspector{ surface.mesh() };
auto issues = inspector.small_edges( threshold );
issues.set_description( absl::StrCat( "Surface ",
surface.id().string(), " small edges" ) );
surface.name(), " small edges - uuid ",
surface.id().string() ) );
return std::make_pair(
surface.id(), std::move( issues ) );
} ) );
Expand Down Expand Up @@ -141,7 +142,8 @@ namespace geode
inspector{ surface.mesh() };
auto issues = inspector.small_height_polygons( threshold );
issues.set_description( absl::StrCat( "Surface ",
surface.id().string(), " small polygons" ) );
surface.name(), " small polygons - uuid ",
surface.id().string() ) );
return std::make_pair( surface.id(), std::move( issues ) );
} ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ namespace geode
};
auto issues = inspector.non_manifold_vertices();
issues.set_description( absl::StrCat( "Surface ",
surface.id().string(), " non manifold vertices" ) );
surface.name(), " non manifold vertices - uuid ",
surface.id().string() ) );
surfaces_non_manifold_vertices.add_issues_to_map(
surface.id(), std::move( issues ) );
}
Expand All @@ -78,7 +79,8 @@ namespace geode
};
auto issues = inspector.non_manifold_edges();
issues.set_description( absl::StrCat( "Surface ",
surface.id().string(), " non manifold edges" ) );
surface.name(), " non manifold edges - uuid ",
surface.id().string() ) );
surfaces_non_manifold_edges.add_issues_to_map(
surface.id(), std::move( issues ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,17 @@ namespace geode
AllModelSurfacesIntersection< Model > >();
for( const auto& polygon_pair : intersections )
{
const auto& surface1 =
model_.surface( polygon_pair.first.component_id.id() );
const auto& surface2 =
model_.surface( polygon_pair.second.component_id.id() );
intersection_issues.add_issue( polygon_pair,
absl::StrCat( "Polygons ", polygon_pair.first.element_id,
" of surface ",
absl::StrCat( surface1.name(), " and ", surface2.name(),
" intersect each other on polygons ",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

respective?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pas sure de comprendre

polygon_pair.first.element_id, " and ",
polygon_pair.second.element_id, " - uuids ",
polygon_pair.first.component_id.id().string(), " and ",
polygon_pair.second.element_id, " of surface ",
polygon_pair.second.component_id.id().string(),
" intersect each other." ) );
polygon_pair.second.component_id.id().string() ) );
}
}

Expand All @@ -534,11 +538,14 @@ namespace geode
AllModelSurfacesAutoIntersection< Model > >();
for( const auto& polygon_pair : intersections )
{
const auto& surface =
model_.surface( polygon_pair.first.component_id.id() );
intersection_issues.add_issue( polygon_pair,
absl::StrCat( "Polygons ", polygon_pair.first.element_id,
"and ", polygon_pair.second.element_id, " of surface ",
polygon_pair.first.component_id.id().string(),
" intersect each other." ) );
absl::StrCat( "Surface ", surface.name(),
"have self intersection on polygons ",
polygon_pair.first.element_id, "and ",
polygon_pair.second.element_id, " - uuid ",
polygon_pair.first.component_id.id().string() ) );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace geode
{
return message;
}
return "No manifold issues in model component meshes \n";
return "No manifold issues in model \n";
}

std::string SectionMeshesManifoldInspectionResult::inspection_type() const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ namespace geode
"between vertices with index ",
polyhedron_edge_vertices[0], " and index ",
polyhedron_edge_vertices[1],
"; There are probably issues with solid "
"adjacencies." ) );
"; Check issues with solid adjacencies." ) );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace geode
{
return negative_polyhedra.string();
}
return "No negative elements issues in model component meshes \n";
return "No negative polyhedra issues in model \n";
}

std::string
Expand All @@ -68,8 +68,9 @@ namespace geode
block.mesh()
};
auto negative_elements = inspector.negative_polyhedra();
negative_elements.set_description( absl::StrCat(
"Block ", block.id().string(), " negative polyhedra" ) );
negative_elements.set_description(
absl::StrCat( "Block ", block.name(),
" negative polyhedra - uuid ", block.id().string() ) );
result.negative_polyhedra.add_issues_to_map(
block.id(), std::move( negative_elements ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace geode
{
return negative_polygons.string();
}
return "No negative elements issues in model component meshes \n";
return "No negative polygons issues in model \n";
}

std::string
Expand All @@ -70,8 +70,9 @@ namespace geode
surface.mesh()
};
auto negative_elements = inspector.negative_polygons();
negative_elements.set_description( absl::StrCat(
"Surface ", surface.id().string(), " negative polygons" ) );
negative_elements.set_description(
absl::StrCat( "Surface ", surface.name(),
" negative polygons - uuid ", surface.id().string() ) );
result.negative_polygons.add_issues_to_map(
surface.id(), std::move( negative_elements ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ namespace geode
{
wrong_polyhedra.add_issue( polyhedron_id,
absl::StrCat( "Polyhedron ", polyhedron_id,
" of Solid ", mesh_.id().string(),
" has a negative volume." ) );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ namespace geode
{
if( polygon_has_negative_area( polygon_id ) )
{
wrong_polygons.add_issue( polygon_id,
absl::StrCat( "Polygon ", polygon_id, " of Surface ",
mesh_.id().string(), " has a negative area." ) );
wrong_polygons.add_issue(
polygon_id, absl::StrCat( "Polygon ", polygon_id,
" has a negative area." ) );
}
}
return wrong_polygons;
Expand Down