Skip to content
Draft

V18 #193

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
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
}
} // namespace

namespace geode

Check warning on line 66 in src/geode/inspector/inspection/criterion/internal/component_meshes_adjacency.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/inspection/criterion/internal/component_meshes_adjacency.cpp:66:1 [modernize-concat-nested-namespaces]

nested namespaces can be concatenated
{
namespace internal
{
Expand All @@ -76,7 +76,7 @@

template < typename Model >
void ComponentMeshesAdjacency< Model >::
add_surfaces_edges_with_wrong_adjacencies(

Check warning on line 79 in src/geode/inspector/inspection/criterion/internal/component_meshes_adjacency.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/inspection/criterion/internal/component_meshes_adjacency.cpp:79:13 [readability-function-cognitive-complexity]

function 'add_surfaces_edges_with_wrong_adjacencies' has cognitive complexity of 15 (threshold 10)
InspectionIssuesMap< PolygonEdge >&
components_wrong_adjacencies ) const
{
Expand Down Expand Up @@ -112,7 +112,7 @@
}
catch( const OpenGeodeException& e )
{
Logger::warn( e.what() );
Logger::warning( e.what() );
issues.add_issue( polygon_edge,
absl::StrCat( "edge ", edge_id, " of polygon ",
polygon_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
{
public:
BRepLineSurfacesIntersection( const geode::BRep& model,
const geode::uuid& surface_id,

Check warning on line 85 in src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:85:13 [bugprone-easily-swappable-parameters]

2 adjacent parameters of 'BRepLineSurfacesIntersection' of similar type ('const geode::uuid &') are easily swapped by mistake
const geode::uuid& line_id )
: surface_( model.surface( surface_id ) ),
line_( model.line( line_id ) ),
Expand Down Expand Up @@ -164,7 +164,7 @@
class ModelIntersectionBase
{
public:
ModelIntersectionBase( const Model& model ) : model_( model ) {}

Check warning on line 167 in src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:167:9 [google-explicit-constructor]

single-argument constructors must be marked explicit to avoid unintentional implicit conversions

[[nodiscard]] std::vector< std::pair< geode::index_t, geode::index_t > >
intersecting_elements()
Expand Down Expand Up @@ -207,7 +207,7 @@

protected:
[[nodiscard]] bool polygons_intersect(
geode::index_t p1_id, geode::index_t p2_id ) const

Check warning on line 210 in src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:210:13 [bugprone-easily-swappable-parameters]

2 adjacent parameters of 'polygons_intersect' of similar type ('geode::index_t') are easily swapped by mistake
{
const auto p1_vertices = this->mesh1().polygon_vertices( p1_id );
const auto p2_vertices = this->mesh2().polygon_vertices( p2_id );
Expand Down Expand Up @@ -249,7 +249,7 @@

[[nodiscard]] absl::InlinedVector< std::array< geode::index_t, 2 >, 3 >
triangles_common_vertices(
const geode::PolygonVertices& t1_vertices,

Check warning on line 252 in src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:252:17 [bugprone-easily-swappable-parameters]

2 adjacent parameters of 'triangles_common_vertices' of similar type ('const geode::PolygonVertices &') are easily swapped by mistake
const geode::PolygonVertices& t2_vertices ) const
{
absl::InlinedVector< std::array< geode::index_t, 2 >, 3 >
Expand Down Expand Up @@ -425,7 +425,7 @@

template <>
[[nodiscard]] bool
ModelSurfacesIntersectionBase< geode::Section >::triangles_intersect(

Check warning on line 428 in src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:428:58 [readability-function-cognitive-complexity]

function 'triangles_intersect' has cognitive complexity of 28 (threshold 10)
const geode::PolygonVertices& t1_vertices,
const geode::PolygonVertices& t2_vertices,
absl::Span< const std::array< geode::index_t, 2 > >
Expand Down Expand Up @@ -505,7 +505,7 @@
return false;
}

[[nodiscard]] bool triangle_intersects_other(

Check warning on line 508 in src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:508:24 [readability-function-size]

function 'triangle_intersects_other' exceeds recommended size/complexity thresholds

Check warning on line 508 in src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:508:24 [readability-function-cognitive-complexity]

function 'triangle_intersects_other' has cognitive complexity of 22 (threshold 10)
const geode::Triangle3D& triangle1,
const geode::Triangle3D& triangle2,
const geode::PolygonVertices& t1_vertices,
Expand Down Expand Up @@ -574,7 +574,7 @@
const auto triangle1 = mesh_triangle( mesh1_, t1_vertices );
return triangle_intersects_other( triangle1, triangle2, t1_vertices,
t2_vertices, common_vertices, 1 )
|| triangle_intersects_other( triangle2, triangle1, t2_vertices,

Check warning on line 577 in src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:577:19 [readability-suspicious-call-argument]

1st argument 'triangle2' (passed to 'triangle1') looks like it might be swapped with the 2nd, 'triangle1' (passed to 'triangle2')
t1_vertices, common_vertices, 0 );
}

Expand Down Expand Up @@ -772,7 +772,7 @@
{
if( surface.mesh().nb_polygons() == 0 )
{
geode::Logger::warn(
geode::Logger::warning(
"One of the surface meshes has an empty mesh, cannot "
"compute the AABBTree used for detecting the mesh "
"intersections, no intersections will be "
Expand Down Expand Up @@ -854,7 +854,7 @@
{
if( line.mesh().nb_edges() == 0 )
{
geode::Logger::warn(
geode::Logger::warning(
"One of the line meshes has an empty mesh, "
"skipping line-surface intersection detection." );
return component_intersections;
Expand Down Expand Up @@ -934,7 +934,7 @@
{
if( surface.mesh().nb_polygons() == 0 )
{
geode::Logger::warn(
geode::Logger::warning(
"One of the surface meshes has an empty mesh, "
"skipping line-surface intersection detection." );
return component_intersections;
Expand All @@ -944,7 +944,7 @@
{
if( line.mesh().nb_edges() == 0 )
{
geode::Logger::warn(
geode::Logger::warning(
"One of the line meshes has an empty mesh, "
"skipping line-surface intersection detection." );
return component_intersections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace geode
mesh_.polyhedron_vertex( { polyhedron_id, 2 } ) ),
mesh_.point(
mesh_.polyhedron_vertex( { polyhedron_id, 3 } ) ) };
return tetrahedron_volume_sign( tetrahedron ) == Sign::negative;
return tetrahedron_volume_sign( tetrahedron ) == SIGN::negative;
}
return mesh_.polyhedron_volume( polyhedron_id ) < 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace geode
for( const auto polygon_id : Range{ mesh_.nb_polygons() } )
{
if( polygon_area_sign( mesh_.polygon( polygon_id ) )
== Sign::negative )
== SIGN::negative )
{
return true;
}
Expand All @@ -68,7 +68,7 @@ namespace geode
for( const auto polygon_id : Range{ mesh_.nb_polygons() } )
{
if( polygon_area_sign( mesh_.polygon( polygon_id ) )
== Sign::negative )
== SIGN::negative )
{
wrong_polygons.add_issue( polygon_id,
absl::StrCat( "negative polygon ", polygon_id ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ namespace
/// On one side of a topological non-manifold => 2 cases possible,
/// depending on wether the topological non-manifold is on the
/// interior or exterior of the block
geode::Logger::warn( absl::StrCat(
geode::Logger::warning( absl::StrCat(
"[expected_block_cmvs_and_error] Unique vertex ",
unique_vertex_id, " at position [",
brep.block( unique_vertex_cmvs.block_cmvs[0].component_id.id() )
Expand Down
Loading