Skip to content

Commit 7e8fcf8

Browse files
committed
update
1 parent 839cdc4 commit 7e8fcf8

File tree

6 files changed

+32
-20
lines changed

6 files changed

+32
-20
lines changed

src/bin/geode-inspector-solid.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
#include <geode/mesh/core/hybrid_solid.h>
3535
#include <geode/mesh/core/mesh_factory.h>
3636
#include <geode/mesh/core/polyhedral_solid.h>
37+
#include <geode/mesh/core/regular_grid_solid.h>
3738
#include <geode/mesh/core/tetrahedral_solid.h>
3839
#include <geode/mesh/io/hybrid_solid_input.h>
3940
#include <geode/mesh/io/polyhedral_solid_input.h>
41+
#include <geode/mesh/io/regular_grid_input.h>
4042
#include <geode/mesh/io/tetrahedral_solid_input.h>
4143

4244
#include <geode/io/mesh/detail/common.h>
@@ -127,6 +129,10 @@ int main( int argc, char* argv[] )
127129
{
128130
inspect_solid( *geode::load_hybrid_solid< 3 >( filename ) );
129131
}
132+
else if( geode::RegularGridInputFactory3D::has_creator( ext ) )
133+
{
134+
inspect_solid( *geode::load_regular_grid< 3 >( filename ) );
135+
}
130136
else
131137
{
132138
throw geode::OpenGeodeException( "Unable to load file ", filename );

src/bin/geode-inspector-surface.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333

3434
#include <geode/mesh/core/mesh_factory.h>
3535
#include <geode/mesh/core/polygonal_surface.h>
36+
#include <geode/mesh/core/regular_grid_surface.h>
3637
#include <geode/mesh/core/triangulated_surface.h>
3738
#include <geode/mesh/io/polygonal_surface_input.h>
39+
#include <geode/mesh/io/regular_grid_input.h>
3840
#include <geode/mesh/io/triangulated_surface_input.h>
3941

4042
#include <geode/io/mesh/detail/common.h>
@@ -134,6 +136,10 @@ int main( int argc, char* argv[] )
134136
inspect_surface(
135137
*geode::load_triangulated_surface< 2 >( filename ) );
136138
}
139+
else if( geode::RegularGridInputFactory2D::has_creator( ext ) )
140+
{
141+
inspect_surface( *geode::load_regular_grid< 2 >( filename ) );
142+
}
137143
else
138144
{
139145
throw geode::OpenGeodeException( "Unable to load file ", filename );

src/geode/inspector/criterion/colocation/unique_vertices_colocation.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace
4747
{
4848
template < geode::index_t dimension, typename Model >
4949
bool model_cmv_is_colocated_on_point_base( const Model& model,
50-
const geode::MeshComponentVertex& cmv,
50+
const geode::ComponentMeshVertex& cmv,
5151
const geode::Point< dimension >& point )
5252
{
5353
if( cmv.component_id.type()
@@ -71,14 +71,14 @@ namespace
7171
}
7272

7373
bool model_cmv_is_colocated_on_point( const geode::Section& model,
74-
const geode::MeshComponentVertex& cmv,
74+
const geode::ComponentMeshVertex& cmv,
7575
const geode::Point2D& point )
7676
{
7777
return model_cmv_is_colocated_on_point_base( model, cmv, point );
7878
}
7979

8080
bool model_cmv_is_colocated_on_point( const geode::BRep& model,
81-
const geode::MeshComponentVertex& cmv,
81+
const geode::ComponentMeshVertex& cmv,
8282
const geode::Point3D& point )
8383
{
8484
if( cmv.component_id.type() == geode::Block3D::component_type_static() )
@@ -92,7 +92,7 @@ namespace
9292

9393
template < geode::index_t dimension, typename Model >
9494
bool model_cmvs_are_colocated_on_point( const Model& model,
95-
const std::vector< geode::MeshComponentVertex >& cmvs,
95+
const std::vector< geode::ComponentMeshVertex >& cmvs,
9696
const geode::Point< dimension >& point )
9797
{
9898
for( const auto& cmv : cmvs )
@@ -107,7 +107,7 @@ namespace
107107

108108
template < geode::index_t dimension, typename Model >
109109
geode::Point< dimension > model_unique_vertex_point_base(
110-
const Model& model, const geode::MeshComponentVertex& cmv )
110+
const Model& model, const geode::ComponentMeshVertex& cmv )
111111
{
112112
if( cmv.component_id.type()
113113
== geode::Line< dimension >::component_type_static() )
@@ -126,14 +126,14 @@ namespace
126126
}
127127

128128
geode::Point2D model_unique_vertex_point(
129-
const geode::Section& model, const geode::MeshComponentVertex& cmv )
129+
const geode::Section& model, const geode::ComponentMeshVertex& cmv )
130130
{
131131
return model_unique_vertex_point_base< 2, geode::Section >(
132132
model, cmv );
133133
}
134134

135135
geode::Point3D model_unique_vertex_point(
136-
const geode::BRep& model, const geode::MeshComponentVertex& cmv )
136+
const geode::BRep& model, const geode::ComponentMeshVertex& cmv )
137137
{
138138
if( cmv.component_id.type() == geode::Block3D::component_type_static() )
139139
{
@@ -162,7 +162,7 @@ namespace geode
162162
Range{ model.nb_unique_vertices() } )
163163
{
164164
const auto& cmvs =
165-
model.mesh_component_vertices( unique_vertex_id );
165+
model.component_mesh_vertices( unique_vertex_id );
166166
if( cmvs.empty() )
167167
{
168168
continue;
@@ -178,7 +178,7 @@ namespace geode
178178
Range{ model_.nb_unique_vertices() } )
179179
{
180180
if( !model_cmvs_are_colocated_on_point( model_,
181-
model_.mesh_component_vertices( unique_vertex_id ),
181+
model_.component_mesh_vertices( unique_vertex_id ),
182182
unique_vertices_->point( unique_vertex_id ) ) )
183183
{
184184
if( verbose_ )
@@ -209,7 +209,7 @@ namespace geode
209209
Range{ model_.nb_unique_vertices() } )
210210
{
211211
if( !model_cmvs_are_colocated_on_point( model_,
212-
model_.mesh_component_vertices( unique_vertex_id ),
212+
model_.component_mesh_vertices( unique_vertex_id ),
213213
unique_vertices_->point( unique_vertex_id ) ) )
214214
{
215215
if( verbose_ )
@@ -241,7 +241,7 @@ namespace geode
241241
Range{ model_.nb_unique_vertices() } )
242242
{
243243
if( !model_cmvs_are_colocated_on_point( model_,
244-
model_.mesh_component_vertices( unique_vertex_id ),
244+
model_.component_mesh_vertices( unique_vertex_id ),
245245
unique_vertices_->point( unique_vertex_id ) ) )
246246
{
247247
if( verbose_ )

src/geode/inspector/topology/private/brep_surfaces_topology_impl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ namespace geode
159159
}
160160
if( brep_blocks_are_meshed( brep_ )
161161
&& !absl::c_any_of(
162-
brep_.mesh_component_vertices( unique_vertex_index,
162+
brep_.component_mesh_vertices( unique_vertex_index,
163163
Block3D::component_type_static() ),
164-
[&embedding]( const MeshComponentVertex& cmv ) {
164+
[&embedding]( const ComponentMeshVertex& cmv ) {
165165
return cmv.component_id.id() == embedding.id();
166166
} ) )
167167
{
@@ -358,13 +358,13 @@ namespace geode
358358
vertex_is_part_of_line_and_not_on_surface_border(
359359
index_t unique_vertex_index ) const
360360
{
361-
const auto lines = brep_.mesh_component_vertices(
361+
const auto lines = brep_.component_mesh_vertices(
362362
unique_vertex_index, Line3D::component_type_static() );
363363
if( lines.empty() )
364364
{
365365
return false;
366366
}
367-
for( const auto surface_vertex : brep_.mesh_component_vertices(
367+
for( const auto surface_vertex : brep_.component_mesh_vertices(
368368
unique_vertex_index, Surface3D::component_type_static() ) )
369369
{
370370
if( !brep_.surface( surface_vertex.component_id.id() )

src/geode/inspector/topology/private/section_lines_topology_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ namespace geode
134134
{
135135
if( section_surfaces_are_meshed( section_ )
136136
&& !absl::c_any_of(
137-
section_.mesh_component_vertices(
137+
section_.component_mesh_vertices(
138138
unique_vertex_index,
139139
Surface2D::component_type_static() ),
140-
[&embedding]( const MeshComponentVertex& cmv ) {
140+
[&embedding]( const ComponentMeshVertex& cmv ) {
141141
return cmv.component_id.id() == embedding.id();
142142
} ) )
143143
{

src/geode/inspector/topology/private/section_surfaces_topology_impl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace geode
5656
index_t unique_vertex_index ) const
5757
{
5858
if( section_
59-
.mesh_component_vertices( unique_vertex_index,
59+
.component_mesh_vertices( unique_vertex_index,
6060
Surface2D::component_type_static() )
6161
.empty() )
6262
{
@@ -114,13 +114,13 @@ namespace geode
114114
return false;
115115
}
116116
if( section_
117-
.mesh_component_vertices(
117+
.component_mesh_vertices(
118118
unique_vertex_index, Line2D::component_type_static() )
119119
.empty() )
120120
{
121121
return false;
122122
}
123-
for( const auto surface_vertex : section_.mesh_component_vertices(
123+
for( const auto surface_vertex : section_.component_mesh_vertices(
124124
unique_vertex_index, Surface2D::component_type_static() ) )
125125
{
126126
if( !section_.surface( surface_vertex.component_id.id() )

0 commit comments

Comments
 (0)