Skip to content

Commit 3f59771

Browse files
committed
clean
1 parent 19297f1 commit 3f59771

24 files changed

Lines changed: 77 additions & 231 deletions

include/geode/basic/algorithm.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ namespace geode
5656
index_t delete_vector_elements(
5757
const DeleteContainer& to_delete, ValueContainer& values )
5858
{
59-
if( values.empty() )
60-
{
61-
exit( 1 );
62-
}
6359
OpenGeodeBasicException::check_assertion(
6460
to_delete.size() == values.size(),
6561
"[delete_vector_elements] Number of elements in the two vectors "

include/geode/basic/bitsery_archive.hpp

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -85,42 +85,6 @@ namespace geode
8585
};
8686
} // namespace geode
8787

88-
namespace geode
89-
{
90-
namespace detail
91-
{
92-
template < template < typename > class Attribute, typename T >
93-
void import_old_attribute( AttributeManager &manager,
94-
std::string_view old_attribute_name,
95-
geode::uuid new_attribute_id,
96-
index_t attribute_size )
97-
{
98-
const auto ids =
99-
manager.attribute_ids_with_name( old_attribute_name ).value();
100-
geode::uuid old_attribute_id;
101-
for( const auto &id : ids )
102-
{
103-
if( id == new_attribute_id )
104-
{
105-
continue;
106-
}
107-
old_attribute_id = id;
108-
}
109-
auto old_attribute =
110-
manager.read_attribute< T >( old_attribute_id );
111-
auto new_attribute =
112-
manager.find_attribute< Attribute, T >( new_attribute_id );
113-
manager.resize( attribute_size );
114-
for( const auto index : geode::Range{ attribute_size } )
115-
{
116-
new_attribute->set_value(
117-
index, old_attribute->value( index ) );
118-
}
119-
manager.delete_attribute( old_attribute_id );
120-
}
121-
} // namespace detail
122-
} // namespace geode
123-
12488
namespace bitsery
12589
{
12690
namespace traits

include/geode/mesh/core/internal/points_impl.hpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,6 @@ namespace geode
9898
return points_->id();
9999
}
100100

101-
template < typename Mesh >
102-
void initialize_crs( Mesh& mesh )
103-
{
104-
CoordinateReferenceSystemManagersBuilder< dimension >{ mesh }
105-
.main_coordinate_reference_system_manager_builder()
106-
.delete_coordinate_reference_system( POINTS_NAME );
107-
register_as_active_crs( mesh );
108-
points_.reset();
109-
}
110-
111101
private:
112102
friend class bitsery::Access;
113103
template < typename Archive >
@@ -135,24 +125,6 @@ namespace geode
135125
} } } );
136126
}
137127

138-
template < typename Mesh >
139-
void register_as_active_crs( Mesh& mesh )
140-
{
141-
auto crs_manager_builder =
142-
CoordinateReferenceSystemManagersBuilder< dimension >{
143-
mesh
144-
}
145-
.main_coordinate_reference_system_manager_builder();
146-
crs_manager_builder.register_coordinate_reference_system(
147-
POINTS_NAME,
148-
std::shared_ptr< CoordinateReferenceSystem< dimension > >{
149-
std::make_shared<
150-
AttributeCoordinateReferenceSystem< dimension > >(
151-
mesh.vertex_attribute_manager(), "points" ) } );
152-
crs_manager_builder.set_active_coordinate_reference_system(
153-
POINTS_NAME );
154-
}
155-
156128
private:
157129
std::shared_ptr< VariableAttribute< Point< dimension > > > points_;
158130
};

include/geode/mesh/helpers/detail/bitsery_mesh_helper.hpp renamed to include/geode/mesh/helpers/detail/initialize_crs.hpp

File renamed without changes.

include/geode/mesh/io/geode/geode_edged_curve_input.hpp

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -30,60 +30,4 @@
3030
namespace geode
3131
{
3232
BITSERY_INPUT_MESH_DIMENSION( EdgedCurve );
33-
34-
// template < index_t dimension >
35-
// class OpenGeodeEdgedCurveInput : public EdgedCurveInput< dimension >
36-
// {
37-
// public:
38-
// explicit OpenGeodeEdgedCurveInput( std::string_view filename )
39-
// : EdgedCurveInput< dimension >( filename )
40-
// {
41-
// }
42-
43-
// [[nodiscard]] AdditionalFiles additional_files() const final
44-
// {
45-
// return {};
46-
// }
47-
48-
// [[nodiscard]] std::unique_ptr< EdgedCurve< dimension > > read(
49-
// const MeshImpl& /*impl*/ ) final
50-
// {
51-
// std::ifstream file{ to_string( this->filename() ),
52-
// std::ifstream::binary };
53-
// geode::OpenGeodeMeshException::check_exception( !file.fail(),
54-
// nullptr, geode::OpenGeodeException::TYPE::data,
55-
// "[Bitsery::read] Failed to open file: ",
56-
// to_string( this->filename() ) );
57-
// TContext context{};
58-
// BitseryExtensions::register_deserialize_pcontext(
59-
// std::get< 0 >( context ) );
60-
// Deserializer archive{ context, file };
61-
// // auto mesh = Mesh::create( impl );
62-
// std::unique_ptr< EdgedCurve< dimension > > mesh{
63-
// new OpenGeodeEdgedCurve< dimension >{ BITSERY::constructor }
64-
// };
65-
// archive.object(
66-
// dynamic_cast< OpenGeodeEdgedCurve< dimension >& >( *mesh ) );
67-
// const auto& adapter = archive.adapter();
68-
// geode::OpenGeodeMeshException::check_exception(
69-
// adapter.error() == bitsery::ReaderError::NoError
70-
// && adapter.isCompletedSuccessfully()
71-
// && std::get< 1 >( context ).isValid(),
72-
// nullptr, geode::OpenGeodeException::TYPE::internal,
73-
// "[Bitsery::read] Error while reading file: ",
74-
// this->filename() );
75-
// return mesh;
76-
// }
77-
78-
// index_t object_priority() const final
79-
// {
80-
// return 0;
81-
// }
82-
83-
// Percentage is_loadable() const final
84-
// {
85-
// return Percentage{ 1 };
86-
// }
87-
// };
88-
// ALIAS_2D_AND_3D( OpenGeodeEdgedCurveInput );
8933
} // namespace geode

include/geode/model/mixin/core/detail/relationships_impl.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ namespace geode
115115
archive.object( impl.uuid2index_ );
116116
archive.ext(
117117
impl.ids_, bitsery::ext::StdSmartPtr{} );
118-
impl.attribute_id_ = impl.ids_->id();
119118
impl.delete_isolated_vertices();
120119
},
121120
[]( Archive& archive, RelationshipsImpl& impl ) {
@@ -124,7 +123,6 @@ namespace geode
124123
archive.object( impl.uuid2index_ );
125124
archive.ext(
126125
impl.ids_, bitsery::ext::StdSmartPtr{} );
127-
archive.object( impl.attribute_id_ );
128126
impl.delete_isolated_vertices();
129127
} } } );
130128
}
@@ -143,7 +141,6 @@ namespace geode
143141
std::unique_ptr< Graph > graph_;
144142
detail::UuidToIndex uuid2index_;
145143
std::shared_ptr< VariableAttribute< ComponentID > > ids_;
146-
geode::uuid attribute_id_;
147144
};
148145
} // namespace detail
149146
} // namespace geode

src/geode/mesh/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ add_geode_library(
326326
"helpers/detail/surface_merger.hpp"
327327
"helpers/detail/surface_mesh_validity_fix.hpp"
328328
"helpers/detail/vertex_merger.hpp"
329-
"helpers/detail/bitsery_mesh_helper.hpp"
329+
"helpers/detail/initialize_crs.hpp"
330330
INTERNAL_HEADERS
331331
"core/internal/edges_impl.hpp"
332332
"core/internal/facet_edges_impl.hpp"

src/geode/mesh/builder/edged_curve_builder.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ namespace geode
6767
"[EdgedCurveBuilder::copy] Cannot copy a mesh into an already "
6868
"initialized mesh." );
6969
GraphBuilder::copy( edged_curve );
70-
// if( edged_curve_.impl_name() == edged_curve.impl_name() )
71-
// {
72-
// do_copy_points( edged_curve );
73-
// }
7470
for( const auto p : Range{ edged_curve.nb_vertices() } )
7571
{
7672
this->set_point( p, edged_curve.point( p ) );

src/geode/mesh/builder/point_set_builder.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ namespace geode
6565
"[PointSetBuilder::copy] Cannot copy a mesh into an already "
6666
"initialized mesh." );
6767
VertexSetBuilder::copy( point_set );
68-
// if( point_set_.impl_name() == point_set.impl_name() )
69-
// {
70-
// do_copy_points( point_set );
71-
// }
7268
for( const auto p : Range{ point_set.nb_vertices() } )
7369
{
7470
this->set_point( p, point_set.point( p ) );

src/geode/mesh/builder/surface_mesh_builder.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -832,11 +832,6 @@ namespace geode
832832
surface_mesh_.disable_edges();
833833
}
834834
VertexSetBuilder::copy( surface_mesh );
835-
// if( surface_mesh.impl_name() == surface_mesh_.impl_name() )
836-
// {
837-
// do_copy_points( surface_mesh );
838-
// do_copy_polygons( surface_mesh );
839-
// }
840835
copy_polygons( surface_mesh, *this );
841836
if( surface_mesh.are_edges_enabled() )
842837
{

0 commit comments

Comments
 (0)