feat(Model_: add API helpers to compute unique vertices of models#1241
feat(Model_: add API helpers to compute unique vertices of models#1241
Conversation
| if( model.nb_unique_vertices() > 0 ) | ||
| { | ||
| return; | ||
| } |
There was a problem hiding this comment.
What do we do if there are already uv but not everywhere?
| namespace geode | ||
| { | ||
| template < typename Model > | ||
| void compute_model_unique_vertices( |
There was a problem hiding this comment.
| void compute_model_unique_vertices( | |
| void compute_model_unique_vertices_using_colocalisation( |
Maybe add some info on how they will be computed?
| * | ||
| */ | ||
|
|
||
| #pragma once |
There was a problem hiding this comment.
warning: avoid 'pragma once' directive; use include guards instead [portability-avoid-pragma-once]
#pragma once
^| #pragma once | ||
|
|
||
| #include <geode/model/common.hpp> | ||
|
|
There was a problem hiding this comment.
warning: included header common.hpp is not used directly [misc-include-cleaner]
| namespace | ||
| { | ||
| template < typename Model > | ||
| std::vector< geode::Point< Model::dim > > get_all_points_base( |
There was a problem hiding this comment.
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() } ) |
There was a problem hiding this comment.
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 ) |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
warning: included header surface_mesh_builder.hpp is not used directly [misc-include-cleaner]
| #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> |
There was a problem hiding this comment.
warning: included header surface_mesh.hpp is not used directly [misc-include-cleaner]
| #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> | ||
|
|
There was a problem hiding this comment.
warning: included header logger.hpp is not used directly [misc-include-cleaner]
| #include <geode/model/representation/core/brep.hpp> | ||
| #include <geode/model/representation/io/brep_input.hpp> | ||
|
|
||
| void test_brep() |
There was a problem hiding this comment.
warning: function 'test_brep' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
| void test_brep() | |
| static void test_brep() |
|
|
||
| void test_brep() | ||
| { | ||
| auto brep = geode::load_brep( absl::StrCat( |
There was a problem hiding this comment.
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>|
🎉 This PR is included in version 16.2.0-rc.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 16.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.