Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat meshes inspector #79

Merged
merged 24 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ddca3cb
inspect brep
francoisbonneau Nov 16, 2023
9ae51aa
set up high level result struct
francoisbonneau Nov 17, 2023
2a65505
adjacencies
francoisbonneau Dec 6, 2023
9e0d4ee
remove verbose constructors
francoisbonneau Dec 7, 2023
204e6d3
minor change
francoisbonneau Dec 7, 2023
f89cc09
point colocation
francoisbonneau Dec 7, 2023
15cdc8b
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeode-I…
francoisbonneau Dec 7, 2023
4a84a8c
fix compil
francoisbonneau Dec 7, 2023
9fb85fa
degenerated elements
francoisbonneau Dec 8, 2023
810397a
add include
francoisbonneau Dec 8, 2023
df89617
fix compil
francoisbonneau Dec 8, 2023
4d5496f
surface intersection
francoisbonneau Dec 8, 2023
cb4c849
manifold and binding
francoisbonneau Dec 11, 2023
3eaa937
Merge commit 'b3a6a07482106dff3a8eaf9ca919b4224a6c0306' into feat_mes…
francoisbonneau Dec 11, 2023
dedbf3d
fix(Manifoldness): avoid exception on bad input surfaces
panquez Dec 12, 2023
4c31f3b
Apply prepare changes
panquez Dec 12, 2023
0cc0116
Merge remote-tracking branch 'origin/fix/vertexnonmanifold' into feat…
francoisbonneau Dec 12, 2023
f607df3
review fixes
francoisbonneau Dec 13, 2023
1ec24eb
implement string function
francoisbonneau Dec 13, 2023
d7d194b
fix and binding for string function
francoisbonneau Dec 14, 2023
8ad4778
fix c++ tests
francoisbonneau Dec 15, 2023
ffdf60e
fix string display
francoisbonneau Dec 15, 2023
ef6f6aa
Merge branch 'refactor_all_inspector_api' into feat_meshes_inspector
francoisbonneau Dec 15, 2023
59c5c0c
Apply prepare changes
francoisbonneau Dec 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bindings/python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile bindings/python/requirements.in
# pip-compile --pre bindings/python/requirements.in
#
opengeode-core==14.*,>=14.10.3
# via -r bindings/python/requirements.in
1 change: 1 addition & 0 deletions bindings/python/src/inspector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ add_geode_python_binding(
"section_inspector.h"
"solid_inspector.h"
"surface_inspector.h"
"information.h"
DEPENDENCIES
${PROJECT_NAME}::inspector
)
28 changes: 13 additions & 15 deletions bindings/python/src/inspector/adjacency/brep_meshes_adjacency.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,22 @@ namespace geode
{
void define_brep_meshes_adjacency( pybind11::module& module )
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
{
pybind11::class_< BRepMeshesAdjacencyInspectionResult >(
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
module, "BRepMeshesAdjacencyInspectionResult" )
.def( pybind11::init<>() )
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
.def_readwrite( "surfaces_edges_with_wrong_adjacencies",
&BRepMeshesAdjacencyInspectionResult::
surfaces_edges_with_wrong_adjacencies )
.def_readwrite( "blocks_facets_with_wrong_adjacencies",
&BRepMeshesAdjacencyInspectionResult::
blocks_facets_with_wrong_adjacencies )
.def( "string", &BRepMeshesAdjacencyInspectionResult::string );

pybind11::class_< BRepComponentMeshesAdjacency >(
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
module, "BRepComponentMeshesAdjacency" )
.def( pybind11::init< const BRep& >() )
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
.def( pybind11::init< const BRep&, bool >() )
.def( "components_with_wrong_adjacencies",
&BRepComponentMeshesAdjacency::
components_with_wrong_adjacencies )
.def( "surfaces_nb_edges_with_wrong_adjacencies",
&BRepComponentMeshesAdjacency::
surfaces_nb_edges_with_wrong_adjacencies )
.def( "surfaces_edges_with_wrong_adjacencies",
&BRepComponentMeshesAdjacency::
surfaces_edges_with_wrong_adjacencies )
.def( "blocks_nb_facets_with_wrong_adjacencies",
&BRepComponentMeshesAdjacency::
blocks_nb_facets_with_wrong_adjacencies )
.def( "blocks_facets_with_wrong_adjacencies",
.def( "inspect_brep_meshes_adjacencies",
&BRepComponentMeshesAdjacency::
blocks_facets_with_wrong_adjacencies );
inspect_brep_meshes_adjacencies );
}
} // namespace geode
19 changes: 10 additions & 9 deletions bindings/python/src/inspector/adjacency/section_meshes_adjacency.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,19 @@ namespace geode
{
void define_section_meshes_adjacency( pybind11::module& module )
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
{
pybind11::class_< SectionMeshesAdjacencyInspectionResult >(
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
module, "SectionMeshesAdjacencyInspectionResult" )
.def( pybind11::init<>() )
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
.def_readwrite( "surfaces_edges_with_wrong_adjacencies",
&SectionMeshesAdjacencyInspectionResult::
surfaces_edges_with_wrong_adjacencies )
.def( "string", &SectionMeshesAdjacencyInspectionResult::string );

pybind11::class_< SectionComponentMeshesAdjacency >(
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
module, "SectionComponentMeshesAdjacency" )
.def( pybind11::init< const Section& >() )
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
.def( pybind11::init< const Section&, bool >() )
.def( "components_with_wrong_adjacencies",
&SectionComponentMeshesAdjacency::
components_with_wrong_adjacencies )
.def( "surfaces_nb_edges_with_wrong_adjacencies",
&SectionComponentMeshesAdjacency::
surfaces_nb_edges_with_wrong_adjacencies )
.def( "surfaces_edges_with_wrong_adjacencies",
.def( "inspect_section_meshes_adjacencies",
&SectionComponentMeshesAdjacency::
surfaces_edges_with_wrong_adjacencies );
inspect_section_meshes_adjacencies );
}
} // namespace geode
3 changes: 0 additions & 3 deletions bindings/python/src/inspector/adjacency/solid_adjacency.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ namespace geode
const auto name = absl::StrCat( "SolidMeshAdjacency", dimension, "D" );
pybind11::class_< SolidMeshAdjacency >( module, name.c_str() )
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
.def( pybind11::init< const SolidMesh& >() )
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved
.def( pybind11::init< const SolidMesh&, bool >() )
.def( "mesh_has_wrong_adjacencies",
&SolidMeshAdjacency::mesh_has_wrong_adjacencies )
.def( "nb_facets_with_wrong_adjacency",
&SolidMeshAdjacency::nb_facets_with_wrong_adjacency )
.def( "polyhedron_facets_with_wrong_adjacency",
&SolidMeshAdjacency::polyhedron_facets_with_wrong_adjacency );
}
Expand Down
3 changes: 0 additions & 3 deletions bindings/python/src/inspector/adjacency/surface_adjacency.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ namespace geode
absl::StrCat( "SurfaceMeshAdjacency", dimension, "D" );
pybind11::class_< SurfaceMeshAdjacency >( module, name.c_str() )
francoisbonneau marked this conversation as resolved.
Show resolved Hide resolved

Choose a reason for hiding this comment

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

warning: unexpected type name 'SurfaceMeshAdjacency': expected expression [clang-diagnostic-error]

        pybind11::class_< SurfaceMeshAdjacency >( module, name.c_str() )
                          ^

.def( pybind11::init< const SurfaceMesh& >() )

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'pybind11' [clang-diagnostic-error]

            .def( pybind11::init< const SurfaceMesh& >() )
                  ^

Choose a reason for hiding this comment

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

warning: expected expression [clang-diagnostic-error]

            .def( pybind11::init< const SurfaceMesh& >() )
                                  ^

.def( pybind11::init< const SurfaceMesh&, bool >() )
.def( "mesh_has_wrong_adjacencies",
&SurfaceMeshAdjacency::mesh_has_wrong_adjacencies )
.def( "nb_edges_with_wrong_adjacency",
&SurfaceMeshAdjacency::nb_edges_with_wrong_adjacency )
.def( "polygon_edges_with_wrong_adjacency",
&SurfaceMeshAdjacency::polygon_edges_with_wrong_adjacency );
}
Expand Down
28 changes: 27 additions & 1 deletion bindings/python/src/inspector/brep_inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,42 @@

#include <geode/inspector/brep_inspector.h>

#include <geode/inspector/criterion/brep_meshes_inspector.h>

Comment on lines +28 to +29

Choose a reason for hiding this comment

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

warning: included header brep_meshes_inspector.h is not used directly [misc-include-cleaner]

Suggested change
#include <geode/inspector/criterion/brep_meshes_inspector.h>

namespace geode
{
void define_brep_inspector( pybind11::module& module )

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'pybind11' [clang-diagnostic-error]

    void define_brep_inspector( pybind11::module& module )
                                ^

{
pybind11::class_< BRepMeshesInspectionResult >(

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'pybind11' [clang-diagnostic-error]

        pybind11::class_< BRepMeshesInspectionResult >(
        ^

Choose a reason for hiding this comment

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

warning: 'BRepMeshesInspectionResult' does not refer to a value [clang-diagnostic-error]

        pybind11::class_< BRepMeshesInspectionResult >(
                          ^
Additional context

include/geode/inspector/criterion/brep_meshes_inspector.h:35: declared here

    struct BRepMeshesInspectionResult
           ^

module, "BRepMeshesInspectionResult" )
.def( pybind11::init<>() )

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'pybind11' [clang-diagnostic-error]

            .def( pybind11::init<>() )
                  ^

Choose a reason for hiding this comment

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

warning: expected expression [clang-diagnostic-error]

            .def( pybind11::init<>() )
                                 ^

Choose a reason for hiding this comment

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

warning: expected expression [clang-diagnostic-error]

            .def( pybind11::init<>() )
                                   ^

.def_readwrite( "unique_vertices_colocation",
&BRepMeshesInspectionResult::unique_vertices_colocation )
.def_readwrite( "meshes_colocation",
&BRepMeshesInspectionResult::meshes_colocation )
.def_readwrite(
"adjacencies", &BRepMeshesInspectionResult::adjacencies )
.def_readwrite(
"degenerations", &BRepMeshesInspectionResult::degenerations )
.def_readwrite(
"intersections", &BRepMeshesInspectionResult::intersections )
.def_readwrite(
"manifolds", &BRepMeshesInspectionResult::manifolds )
.def( "string", &BRepMeshesInspectionResult::string );

pybind11::class_< BRepInspectionResult >(

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'pybind11' [clang-diagnostic-error]

        pybind11::class_< BRepInspectionResult >(
        ^

Choose a reason for hiding this comment

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

warning: 'BRepInspectionResult' does not refer to a value [clang-diagnostic-error]

        pybind11::class_< BRepInspectionResult >(
                          ^
Additional context

include/geode/inspector/brep_inspector.h:37: declared here

    struct BRepInspectionResult
           ^

module, "BRepInspectionResult" )
.def( pybind11::init<>() )

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'pybind11' [clang-diagnostic-error]

            .def( pybind11::init<>() )
                  ^

Choose a reason for hiding this comment

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

warning: expected expression [clang-diagnostic-error]

            .def( pybind11::init<>() )
                                 ^

Choose a reason for hiding this comment

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

warning: expected expression [clang-diagnostic-error]

            .def( pybind11::init<>() )
                                   ^

.def_readwrite( "meshes", &BRepInspectionResult::meshes )
.def_readwrite( "topology", &BRepInspectionResult::topology )
.def( "string", &BRepInspectionResult::string );

pybind11::class_< BRepInspector, BRepTopologyInspector,

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'pybind11' [clang-diagnostic-error]

        pybind11::class_< BRepInspector, BRepTopologyInspector,
        ^

Choose a reason for hiding this comment

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

warning: 'BRepInspector' does not refer to a value [clang-diagnostic-error]

        pybind11::class_< BRepInspector, BRepTopologyInspector,
                          ^
Additional context

include/geode/inspector/brep_inspector.h:54: declared here

    class opengeode_inspector_inspector_api BRepInspector
                                            ^

BRepUniqueVerticesColocation, BRepComponentMeshesAdjacency,
BRepComponentMeshesColocation, BRepComponentMeshesDegeneration,
BRepComponentMeshesManifold, BRepMeshesIntersections >(
module, "BRepInspector" )
.def( pybind11::init< const BRep& >() )
.def( pybind11::init< const BRep&, bool >() );
.def( "inspect_brep", &BRepInspector::inspect_brep );
}
} // namespace geode
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@
pybind11::class_< suffix##ComponentMeshesColocation >( \
module, name##type.c_str() ) \
.def( pybind11::init< const type& >() ) \
.def( pybind11::init< const type&, bool >() ) \
.def( "components_with_colocated_points", \
.def( "inspect_meshes_point_colocations", \
&suffix##ComponentMeshesColocation:: \
components_with_colocated_points ) \
.def( "components_nb_colocated_points", \
&suffix##ComponentMeshesColocation:: \
components_nb_colocated_points ) \
.def( "components_colocated_points_groups", \
&suffix##ComponentMeshesColocation:: \
components_colocated_points_groups )
inspect_meshes_point_colocations )

namespace geode
{
void define_models_meshes_colocation( pybind11::module& module )

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'pybind11' [clang-diagnostic-error]

    void define_models_meshes_colocation( pybind11::module& module )
                                          ^

{
pybind11::class_< MeshesColocationInspectionResult >(

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'pybind11' [clang-diagnostic-error]

        pybind11::class_< MeshesColocationInspectionResult >(
        ^

Choose a reason for hiding this comment

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

warning: 'MeshesColocationInspectionResult' does not refer to a value [clang-diagnostic-error]

        pybind11::class_< MeshesColocationInspectionResult >(
                          ^
Additional context

include/geode/inspector/criterion/colocation/component_meshes_colocation.h:40: declared here

    struct MeshesColocationInspectionResult
           ^

module, "MeshesColocationInspectionResult" )
.def( pybind11::init<>() )

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'pybind11' [clang-diagnostic-error]

            .def( pybind11::init<>() )
                  ^

Choose a reason for hiding this comment

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

warning: expected expression [clang-diagnostic-error]

            .def( pybind11::init<>() )
                                 ^

Choose a reason for hiding this comment

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

warning: expected expression [clang-diagnostic-error]

            .def( pybind11::init<>() )
                                   ^

.def_readwrite( "colocated_points_groups",
&MeshesColocationInspectionResult::colocated_points_groups )
.def( "string", &MeshesColocationInspectionResult::string );

PYTHON_COMPONENTS_COLOCATION( Section, Section );

Choose a reason for hiding this comment

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

warning: expected expression [clang-diagnostic-error]

        PYTHON_COMPONENTS_COLOCATION( Section, Section );
        ^
Additional context

bindings/python/src/inspector/colocation/component_meshes_colocation.h:33: expanded from macro 'PYTHON_COMPONENTS_COLOCATION'

        .def( pybind11::init< const type& >() )                                \
                              ^

Choose a reason for hiding this comment

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

warning: unexpected type name 'SectionComponentMeshesColocation': expected expression [clang-diagnostic-error]

        PYTHON_COMPONENTS_COLOCATION( Section, Section );
        ^

expanded from here

PYTHON_COMPONENTS_COLOCATION( BRep, BRep );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,8 @@ namespace geode
absl::StrCat( "EdgedCurveColocation", dimension, "D" );
pybind11::class_< EdgedCurveColocation >( module, name.c_str() )
.def( pybind11::init< const EdgedCurve& >() )
.def( pybind11::init< const EdgedCurve&, bool >() )
.def( "mesh_has_colocated_points",
&EdgedCurveColocation::mesh_has_colocated_points )
.def( "nb_colocated_points",
&EdgedCurveColocation::nb_colocated_points )
.def( "colocated_points_groups",
&EdgedCurveColocation::colocated_points_groups );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ namespace geode
const auto name = absl::StrCat( "PointSetColocation", dimension, "D" );
pybind11::class_< PointSetColocation >( module, name.c_str() )
.def( pybind11::init< const PointSet& >() )
.def( pybind11::init< const PointSet&, bool >() )
.def( "mesh_has_colocated_points",
&PointSetColocation::mesh_has_colocated_points )
.def( "nb_colocated_points",
&PointSetColocation::nb_colocated_points )
.def( "colocated_points_groups",
&PointSetColocation::colocated_points_groups );
}
Expand Down
3 changes: 0 additions & 3 deletions bindings/python/src/inspector/colocation/solid_colocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ namespace geode
const auto name = absl::StrCat( "SolidMeshColocation", dimension, "D" );
pybind11::class_< SolidMeshColocation >( module, name.c_str() )
.def( pybind11::init< const SolidMesh& >() )
.def( pybind11::init< const SolidMesh&, bool >() )
.def( "mesh_has_colocated_points",
&SolidMeshColocation::mesh_has_colocated_points )
.def( "nb_colocated_points",
&SolidMeshColocation::nb_colocated_points )
.def( "colocated_points_groups",
&SolidMeshColocation::colocated_points_groups );
}
Expand Down
3 changes: 0 additions & 3 deletions bindings/python/src/inspector/colocation/surface_colocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ namespace geode
absl::StrCat( "SurfaceMeshColocation", dimension, "D" );
pybind11::class_< SurfaceMeshColocation >( module, name.c_str() )
.def( pybind11::init< const SurfaceMesh& >() )
.def( pybind11::init< const SurfaceMesh&, bool >() )
.def( "mesh_has_colocated_points",
&SurfaceMeshColocation::mesh_has_colocated_points )
.def( "nb_colocated_points",
&SurfaceMeshColocation::nb_colocated_points )
.def( "colocated_points_groups",
&SurfaceMeshColocation::colocated_points_groups );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,48 +30,39 @@ namespace geode
{
void define_models_uv_colocation( pybind11::module& module )
{
pybind11::class_< UniqueVerticesInspectionResult >(
module, "UniqueVerticesInspectionResult" )
.def( pybind11::init<>() )
.def_readwrite( "colocated_unique_vertices_groups",
&UniqueVerticesInspectionResult::
colocated_unique_vertices_groups )
.def_readwrite( "unique_vertices_linked_to_different_points",
&UniqueVerticesInspectionResult::
unique_vertices_linked_to_different_points )
.def( "string", &UniqueVerticesInspectionResult::string );

pybind11::class_< SectionUniqueVerticesColocation >(
module, "SectionUniqueVerticesColocation" )
.def( pybind11::init< const Section& >() )
.def( pybind11::init< const Section&, bool >() )
.def( "model_has_unique_vertices_linked_to_different_points",
&SectionUniqueVerticesColocation::
model_has_unique_vertices_linked_to_different_points )
.def( "model_has_colocated_unique_vertices",
&SectionUniqueVerticesColocation::
model_has_colocated_unique_vertices )
.def( "nb_colocated_unique_vertices",
&SectionUniqueVerticesColocation::nb_colocated_unique_vertices )
.def( "nb_unique_vertices_linked_to_different_points",
&SectionUniqueVerticesColocation::
nb_unique_vertices_linked_to_different_points )
.def( "colocated_unique_vertices_groups",
&SectionUniqueVerticesColocation::
colocated_unique_vertices_groups )
.def( "unique_vertices_linked_to_different_points",
&SectionUniqueVerticesColocation::
unique_vertices_linked_to_different_points );
.def( "inspect_unique_vertices",
&SectionUniqueVerticesColocation::inspect_unique_vertices );

pybind11::class_< BRepUniqueVerticesColocation >(
module, "BRepUniqueVerticesColocation" )
.def( pybind11::init< const BRep& >() )
.def( pybind11::init< const BRep&, bool >() )
.def( "model_has_unique_vertices_linked_to_different_points",
&BRepUniqueVerticesColocation::
model_has_unique_vertices_linked_to_different_points )
.def( "model_has_colocated_unique_vertices",
&BRepUniqueVerticesColocation::
model_has_colocated_unique_vertices )
.def( "nb_colocated_unique_vertices",
&BRepUniqueVerticesColocation::nb_colocated_unique_vertices )
.def( "nb_unique_vertices_linked_to_different_points",
&BRepUniqueVerticesColocation::
nb_unique_vertices_linked_to_different_points )
.def( "colocated_unique_vertices_groups",
&BRepUniqueVerticesColocation::
colocated_unique_vertices_groups )
.def( "unique_vertices_linked_to_different_points",
&BRepUniqueVerticesColocation::
unique_vertices_linked_to_different_points );
.def( "inspect_unique_vertices",
&BRepUniqueVerticesColocation::inspect_unique_vertices );
}
} // namespace geode
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,29 @@
pybind11::class_< suffix##ComponentMeshesDegeneration >( \
module, name##type.c_str() ) \
.def( pybind11::init< const type& >() ) \
.def( pybind11::init< const type&, bool >() ) \
.def( "degenerated_component_meshes", \
&suffix##ComponentMeshesDegeneration:: \
degenerated_component_meshes ) \
.def( "components_nb_degenerated_elements", \
&suffix##ComponentMeshesDegeneration:: \
components_nb_degenerated_elements ) \
.def( "components_degenerated_elements", \
&suffix##ComponentMeshesDegeneration:: \
components_degenerated_elements )
.def( "inspect_elements", \
&suffix##ComponentMeshesDegeneration::inspect_elements )

namespace geode
{
void define_models_meshes_degeneration( pybind11::module& module )
{
pybind11::class_< DegeneratedElements >( module, "DegeneratedElements" )
.def( pybind11::init<>() )
.def_readwrite(
"degenerated_edges", &DegeneratedElements::degenerated_edges )
.def_readwrite(
"degenerated_edges", &DegeneratedElements::degenerated_edges )
.def_readwrite( "degenerated_polyhedra",
&DegeneratedElements::degenerated_polyhedra );

pybind11::class_< DegeneratedElementsInspectionResult >(
module, "DegeneratedElementsInspectionResult" )
.def( pybind11::init<>() )
.def_readwrite(
"elements", &DegeneratedElementsInspectionResult::elements )
.def( "string", &DegeneratedElementsInspectionResult::string );

PYTHON_COMPONENTS_DEGENERATION( Section, Section );
PYTHON_COMPONENTS_DEGENERATION( BRep, BRep );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ namespace geode
absl::StrCat( "EdgedCurveDegeneration", dimension, "D" );
pybind11::class_< EdgedCurveDegeneration >( module, name.c_str() )
.def( pybind11::init< const EdgedCurve& >() )
.def( pybind11::init< const EdgedCurve&, bool >() )
.def( "is_mesh_degenerated",
&EdgedCurveDegeneration::is_mesh_degenerated )
.def( "nb_degenerated_edges",
&EdgedCurveDegeneration::nb_degenerated_edges )
.def( "degenerated_edges",
&EdgedCurveDegeneration::degenerated_edges );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ namespace geode
absl::StrCat( "SolidMeshDegeneration", dimension, "D" );
pybind11::class_< SolidMeshDegeneration >( module, name.c_str() )
.def( pybind11::init< const SolidMesh& >() )
.def( pybind11::init< const SolidMesh&, bool >() )
.def( "is_mesh_degenerated",
&SolidMeshDegeneration::is_mesh_degenerated )
.def( "nb_degenerated_edges",
&SolidMeshDegeneration::nb_degenerated_edges )
.def( "degenerated_edges",
&SolidMeshDegeneration::degenerated_edges );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ namespace geode
absl::StrCat( "SurfaceMeshDegeneration", dimension, +"D" );
pybind11::class_< SurfaceMeshDegeneration >( module, name.c_str() )
.def( pybind11::init< const SurfaceMesh& >() )
.def( pybind11::init< const SurfaceMesh&, bool >() )
.def( "is_mesh_degenerated",
&SurfaceMeshDegeneration::is_mesh_degenerated )
.def( "nb_degenerated_edges",
&SurfaceMeshDegeneration::nb_degenerated_edges )
.def( "degenerated_edges",
&SurfaceMeshDegeneration::degenerated_edges );
}
Expand Down
12 changes: 10 additions & 2 deletions bindings/python/src/inspector/edgedcurve_inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,19 @@ namespace geode
pybind11::class_< EdgedCurveInspector,
EdgedCurveColocation< dimension >,
EdgedCurveDegeneration< dimension > >( module, name.c_str() )
.def( pybind11::init< const EdgedCurve& >() )
.def( pybind11::init< const EdgedCurve&, bool >() );
.def( pybind11::init< const EdgedCurve& >() );
}
void define_edgedcurve_inspector( pybind11::module& module )
{
pybind11::class_< EdgedCurveInspectionResult >(
module, "EdgedCurveInspectionResult" )
.def( pybind11::init<>() )
.def_readwrite( "colocated_points_groups",
&EdgedCurveInspectionResult::colocated_points_groups )
.def_readwrite( "degenerated_edges",
&EdgedCurveInspectionResult::degenerated_edges )
.def( "string", &EdgedCurveInspectionResult::string );

do_define_edgedcurve_inspector< 2 >( module );
do_define_edgedcurve_inspector< 3 >( module );
}
Expand Down
Loading