Skip to content

Commit 47373ba

Browse files
committed
Merge branch 'dev' of github.com:Geode-solutions/OpenGeode-Inspector into feat/colocalization_criterion
2 parents 725d0ae + 612d591 commit 47373ba

21 files changed

+629
-551
lines changed

.github/workflows/CD.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Upload
3737
uses: softprops/action-gh-release@v1
3838
with:
39-
files: "build/OpenGeode-inspector-${{ steps.package.outputs.version }}-${{ matrix.config.system }}.tar.gz"
39+
files: "build/OpenGeode-Inspector-${{ steps.package.outputs.version }}-${{ matrix.config.system }}.tar.gz"
4040
env:
4141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4242
- name: Doc
@@ -69,7 +69,7 @@ jobs:
6969
- name: Upload
7070
uses: softprops/action-gh-release@v1
7171
with:
72-
files: "build/OpenGeode-inspector-${{ steps.package.outputs.version }}-darwin.tar.gz"
72+
files: "build/OpenGeode-Inspector-${{ steps.package.outputs.version }}-darwin.tar.gz"
7373
env:
7474
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7575

@@ -98,6 +98,6 @@ jobs:
9898
- name: Upload
9999
uses: softprops/action-gh-release@v1
100100
with:
101-
files: "build/OpenGeode-inspector-${{ steps.package.outputs.version }}-win64.zip"
101+
files: "build/OpenGeode-Inspector-${{ steps.package.outputs.version }}-win64.zip"
102102
env:
103103
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

include/geode/inspector/criterion/colocalization.h

Lines changed: 0 additions & 64 deletions
This file was deleted.

include/geode/inspector/criterion/borders.h renamed to include/geode/inspector/criterion/colocalization/solid_colocalization.h

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,36 @@
2323

2424
#pragma once
2525

26+
#include <geode/basic/pimpl.h>
27+
2628
#include <geode/inspector/common.h>
2729

2830
namespace geode
2931
{
30-
bool opengeode_inspector_inspector_api hello_world();
32+
FORWARD_DECLARATION_DIMENSION_CLASS( SolidMesh );
3133
} // namespace geode
34+
35+
namespace geode
36+
{
37+
/*!
38+
* Class for inspecting the colocalization of points in a mesh
39+
*/
40+
template < index_t dimension >
41+
class opengeode_inspector_inspector_api SolidMeshColocalization
42+
{
43+
public:
44+
SolidMeshColocalization( const SolidMesh< dimension >& mesh );
45+
~SolidMeshColocalization();
46+
47+
bool mesh_has_colocalized_points() const;
48+
49+
index_t nb_colocalized_points() const;
50+
51+
const std::vector< std::vector< index_t > >
52+
colocalized_points_groups() const;
53+
54+
private:
55+
IMPLEMENTATION_MEMBER( impl_ );
56+
};
57+
ALIAS_2D_AND_3D( SolidMeshColocalization );
58+
} // namespace geode

include/geode/inspector/criterion/non_variety.h renamed to include/geode/inspector/criterion/colocalization/surface_colocalization.h

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,36 @@
2323

2424
#pragma once
2525

26+
#include <geode/basic/pimpl.h>
27+
2628
#include <geode/inspector/common.h>
2729

2830
namespace geode
2931
{
30-
bool opengeode_inspector_inspector_api hello_world();
32+
FORWARD_DECLARATION_DIMENSION_CLASS( SurfaceMesh );
3133
} // namespace geode
34+
35+
namespace geode
36+
{
37+
/*!
38+
* Class for inspecting the colocalization of points in a mesh
39+
*/
40+
template < index_t dimension >
41+
class opengeode_inspector_inspector_api SurfaceMeshColocalization
42+
{
43+
public:
44+
SurfaceMeshColocalization( const SurfaceMesh< dimension >& mesh );
45+
~SurfaceMeshColocalization();
46+
47+
bool mesh_has_colocalized_points() const;
48+
49+
index_t nb_colocalized_points() const;
50+
51+
const std::vector< std::vector< index_t > >
52+
colocalized_points_groups() const;
53+
54+
private:
55+
IMPLEMENTATION_MEMBER( impl_ );
56+
};
57+
ALIAS_2D_AND_3D( SurfaceMeshColocalization );
58+
} // namespace geode

include/geode/inspector/criterion/degeneration/solid_degeneration.h

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,24 @@ namespace geode
3535

3636
namespace geode
3737
{
38-
namespace inspector
38+
/*!
39+
* Class for inspecting the degeneration of a SolidMesh
40+
*/
41+
class opengeode_inspector_inspector_api SolidMeshDegeneration
3942
{
40-
/*!
41-
* Class for inspecting the degeneration of a SolidMesh
42-
*/
43-
class opengeode_inspector_inspector_api SolidMeshDegeneration
44-
{
45-
public:
46-
SolidMeshDegeneration();
47-
~SolidMeshDegeneration();
43+
OPENGEODE_DISABLE_COPY( SolidMeshDegeneration );
4844

49-
bool is_mesh_degenerated( const SolidMesh3D& mesh ) const;
45+
public:
46+
SolidMeshDegeneration( const SolidMesh3D& mesh );
47+
~SolidMeshDegeneration();
5048

51-
index_t nb_degenerated_edges( const SolidMesh3D& mesh ) const;
49+
bool is_mesh_degenerated() const;
5250

53-
const std::vector< index_t > degenerated_edges(
54-
const SolidMesh3D& mesh ) const;
51+
index_t nb_degenerated_edges() const;
5552

56-
private:
57-
// SolidMeshDegeneration( SolidMeshDegeneration&& other );
53+
std::vector< index_t > degenerated_edges() const;
5854

59-
IMPLEMENTATION_MEMBER( impl_ );
60-
};
61-
} // namespace inspector
55+
private:
56+
IMPLEMENTATION_MEMBER( impl_ );
57+
};
6258
} // namespace geode

include/geode/inspector/criterion/degeneration/surface_degeneration.h

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,26 @@ namespace geode
3434

3535
namespace geode
3636
{
37-
namespace inspector
37+
/*!
38+
* Class for inspecting the degeneration of a SurfaceMesh
39+
*/
40+
template < index_t dimension >
41+
class opengeode_inspector_inspector_api SurfaceMeshDegeneration
3842
{
39-
/*!
40-
* Class for inspecting the degeneration of a SurfaceMesh
41-
*/
42-
template < index_t dimension >
43-
class opengeode_inspector_inspector_api SurfaceMeshDegeneration
44-
{
45-
public:
46-
SurfaceMeshDegeneration();
47-
~SurfaceMeshDegeneration();
43+
OPENGEODE_DISABLE_COPY( SurfaceMeshDegeneration );
4844

49-
bool is_mesh_degenerated(
50-
const SurfaceMesh< dimension >& mesh ) const;
45+
public:
46+
SurfaceMeshDegeneration( const SurfaceMesh< dimension >& mesh );
47+
~SurfaceMeshDegeneration();
5148

52-
index_t nb_degenerated_edges(
53-
const SurfaceMesh< dimension >& mesh ) const;
49+
bool is_mesh_degenerated() const;
5450

55-
const std::vector< index_t > degenerated_edges(
56-
const SurfaceMesh< dimension >& mesh ) const;
51+
index_t nb_degenerated_edges() const;
5752

58-
private:
59-
// SurfaceMeshDegeneration( SurfaceMeshDegeneration&& other );
53+
std::vector< index_t > degenerated_edges() const;
6054

61-
IMPLEMENTATION_MEMBER( impl_ );
62-
};
63-
ALIAS_2D_AND_3D( SurfaceMeshDegeneration );
64-
} // namespace inspector
55+
private:
56+
IMPLEMENTATION_MEMBER( impl_ );
57+
};
58+
ALIAS_2D_AND_3D( SurfaceMeshDegeneration );
6559
} // namespace geode

include/geode/inspector/criterion/connex_components.h renamed to include/geode/inspector/criterion/detail/colocalization_impl.h

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,32 @@
2727

2828
namespace geode
2929
{
30-
bool opengeode_inspector_inspector_api hello_world();
30+
namespace detail
31+
{
32+
/*!
33+
* Implementation of the inspection of the colocalization of a Mesh
34+
*/
35+
template < class MeshType >
36+
class opengeode_inspector_inspector_api ColocalizationImpl
37+
{
38+
OPENGEODE_DISABLE_COPY( ColocalizationImpl );
39+
40+
public:
41+
ColocalizationImpl( const MeshType& mesh );
42+
~ColocalizationImpl();
43+
44+
bool mesh_has_colocalized_points() const;
45+
46+
index_t nb_colocalized_points() const;
47+
48+
std::vector< std::vector< index_t > >
49+
colocalized_points_groups() const;
50+
51+
private:
52+
bool points_are_colocalized(
53+
index_t pt_index_1, index_t pt_index_2 ) const;
54+
55+
const MeshType& mesh_;
56+
};
57+
} // namespace detail
3158
} // namespace geode

include/geode/inspector/criterion/adjacency.h renamed to include/geode/inspector/criterion/detail/degeneration_impl.h

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,30 @@
2727

2828
namespace geode
2929
{
30-
bool opengeode_inspector_inspector_api hello_world();
30+
namespace detail
31+
{
32+
/*!
33+
* Implementation of the inspection of the degeneration of a Mesh
34+
*/
35+
template < class MeshType >
36+
class opengeode_inspector_inspector_api DegenerationImpl
37+
{
38+
OPENGEODE_DISABLE_COPY( DegenerationImpl );
39+
40+
public:
41+
DegenerationImpl( const MeshType& mesh );
42+
~DegenerationImpl();
43+
44+
bool is_mesh_degenerated() const;
45+
46+
index_t nb_degenerated_edges() const;
47+
48+
std::vector< index_t > degenerated_edges() const;
49+
50+
private:
51+
bool edge_is_degenerated( index_t edge_index ) const;
52+
53+
const MeshType& mesh_;
54+
};
55+
} // namespace detail
3156
} // namespace geode

include/geode/inspector/inspector.h

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/geode/inspector/CMakeLists.txt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,17 @@ add_geode_library(
2525
"common.cpp"
2626
"criterion/degeneration/surface_degeneration.cpp"
2727
"criterion/degeneration/solid_degeneration.cpp"
28+
"criterion/detail/degeneration_impl.cpp"
2829
PUBLIC_HEADERS
2930
"common.h"
3031
"criterion/degeneration/surface_degeneration.h"
3132
"criterion/degeneration/solid_degeneration.h"
32-
ADVANCED_HEADERS
33-
# "mixin/core/detail/components_storage.h"
3433
PRIVATE_HEADERS
35-
# "helpers/private/simplicial_model_creator.h"
34+
"criterion/detail/degeneration_impl.h"
3635
PUBLIC_DEPENDENCIES
3736
OpenGeode::basic
37+
PRIVATE_DEPENDENCIES
3838
OpenGeode::geometry
3939
OpenGeode::mesh
40-
# absl::flat_hash_map
41-
# Bitsery::bitsery
42-
# ghcFilesystem::ghc_filesystem
43-
# ${PROJECT_NAME}::geometry
44-
# ${PROJECT_NAME}::mesh
45-
PRIVATE_DEPENDENCIES
46-
# Async++
4740
)
4841

0 commit comments

Comments
 (0)