Skip to content

feat(Model_: add API helpers to compute unique vertices of models#1241

Merged
BotellaA merged 4 commits intonextfrom
fix/compute-uv-helper
Mar 6, 2026
Merged

feat(Model_: add API helpers to compute unique vertices of models#1241
BotellaA merged 4 commits intonextfrom
fix/compute-uv-helper

Conversation

@panquez
Copy link
Member

@panquez panquez commented Mar 5, 2026

No description provided.

Comment on lines +156 to +159
if( model.nb_unique_vertices() > 0 )
{
return;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

What do we do if there are already uv but not everywhere?

namespace geode
{
template < typename Model >
void compute_model_unique_vertices(
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
void compute_model_unique_vertices(
void compute_model_unique_vertices_using_colocalisation(

Maybe add some info on how they will be computed?

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 25 out of 27. Check the log or trigger a new build to see more.

*
*/

#pragma once
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: avoid 'pragma once' directive; use include guards instead [portability-avoid-pragma-once]

#pragma once
^

#pragma once

#include <geode/model/common.hpp>

Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header common.hpp is not used directly [misc-include-cleaner]

Suggested change

namespace
{
template < typename Model >
std::vector< geode::Point< Model::dim > > get_all_points_base(
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: no header providing "std::vector" is directly included [misc-include-cleaner]

src/geode/model/helpers/compute_unique_vertices.cpp:40:

+ #include <vector>

std::vector< geode::Point< Model::dim > > points;
for( const auto& corner : model.corners() )
{
for( const auto v : geode::Range{ corner.mesh().nb_vertices() } )
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: no header providing "geode::Range" is directly included [misc-include-cleaner]

src/geode/model/helpers/compute_unique_vertices.cpp:23:

- #include <geode/model/helpers/compute_unique_vertices.hpp>
+ #include "geode/basic/range.hpp"
+ #include <geode/model/helpers/compute_unique_vertices.hpp>

return points;
}

std::vector< geode::Point2D > get_all_points( const geode::Section& model )
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: no header providing "std::vector" is directly included [misc-include-cleaner]

    std::vector< geode::Point2D > get_all_points( const geode::Section& model )
         ^

#include <geode/geometry/point.hpp>

#include <geode/mesh/builder/surface_mesh_builder.hpp>
#include <geode/mesh/core/surface_mesh.hpp>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header surface_mesh_builder.hpp is not used directly [misc-include-cleaner]

Suggested change
#include <geode/mesh/core/surface_mesh.hpp>
#include <geode/mesh/core/surface_mesh.hpp>


#include <geode/mesh/builder/surface_mesh_builder.hpp>
#include <geode/mesh/core/surface_mesh.hpp>
#include <geode/mesh/helpers/detail/surface_mesh_validity_fix.hpp>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header surface_mesh.hpp is not used directly [misc-include-cleaner]

Suggested change
#include <geode/mesh/helpers/detail/surface_mesh_validity_fix.hpp>
#include <geode/mesh/helpers/detail/surface_mesh_validity_fix.hpp>


#include <geode/basic/assert.hpp>
#include <geode/basic/logger.hpp>

Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header logger.hpp is not used directly [misc-include-cleaner]

Suggested change

#include <geode/model/representation/core/brep.hpp>
#include <geode/model/representation/io/brep_input.hpp>

void test_brep()
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'test_brep' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]

Suggested change
void test_brep()
static void test_brep()


void test_brep()
{
auto brep = geode::load_brep( absl::StrCat(
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: no header providing "absl::StrCat" is directly included [misc-include-cleaner]

tests/model/test-compute-unique-vertices.cpp:23:

- #include <geode/tests/common.hpp>
+ #include <absl/strings/str_cat.h>
+ #include <geode/tests/common.hpp>

@BotellaA BotellaA merged commit 00ee1d9 into next Mar 6, 2026
20 checks passed
@BotellaA BotellaA deleted the fix/compute-uv-helper branch March 6, 2026 15:33
@BotellaA
Copy link
Member

BotellaA commented Mar 6, 2026

🎉 This PR is included in version 16.2.0-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@BotellaA
Copy link
Member

BotellaA commented Mar 8, 2026

🎉 This PR is included in version 16.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants