Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions bindings/python/src/inspection/topology/brep_topology.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
namespace geode
{

void define_brep_topology_inspector( pybind11::module& module )

Check failure on line 31 in bindings/python/src/inspection/topology/brep_topology.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

bindings/python/src/inspection/topology/brep_topology.hpp:31:42 [clang-diagnostic-error]

use of undeclared identifier 'pybind11'
{
pybind11::class_< BRepCornersTopologyInspectionResult >(

Check failure on line 33 in bindings/python/src/inspection/topology/brep_topology.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

bindings/python/src/inspection/topology/brep_topology.hpp:33:27 [clang-diagnostic-error]

'BRepCornersTopologyInspectionResult' does not refer to a value

Check failure on line 33 in bindings/python/src/inspection/topology/brep_topology.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

bindings/python/src/inspection/topology/brep_topology.hpp:33:9 [clang-diagnostic-error]

use of undeclared identifier 'pybind11'
module, "BRepCornersTopologyInspectionResult" )
.def( pybind11::init<>() )

Check failure on line 35 in bindings/python/src/inspection/topology/brep_topology.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

bindings/python/src/inspection/topology/brep_topology.hpp:35:36 [clang-diagnostic-error]

expected expression

Check failure on line 35 in bindings/python/src/inspection/topology/brep_topology.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

bindings/python/src/inspection/topology/brep_topology.hpp:35:34 [clang-diagnostic-error]

expected expression

Check failure on line 35 in bindings/python/src/inspection/topology/brep_topology.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

bindings/python/src/inspection/topology/brep_topology.hpp:35:19 [clang-diagnostic-error]

use of undeclared identifier 'pybind11'
.def_readwrite( "corners_not_meshed",
&BRepCornersTopologyInspectionResult::corners_not_meshed )
.def_readwrite( "corners_not_linked_to_a_unique_vertex",
Expand All @@ -41,20 +41,25 @@
.def_readwrite( "unique_vertices_linked_to_multiple_corners",
&BRepCornersTopologyInspectionResult::
unique_vertices_linked_to_multiple_corners )
.def_readwrite(
"unique_vertices_linked_to_multiply_embedded_corner",
&BRepCornersTopologyInspectionResult::
unique_vertices_linked_to_multiply_embedded_corner )
.def_readwrite(
"unique_vertices_linked_to_not_internal_nor_boundary_corner",
&BRepCornersTopologyInspectionResult::
unique_vertices_linked_to_not_internal_nor_boundary_corner )
.def_readwrite( "unique_vertices_liked_to_not_boundary_line_corner",
.def_readwrite(
"unique_vertices_linked_to_not_boundary_line_corner",
&BRepCornersTopologyInspectionResult::
unique_vertices_liked_to_not_boundary_line_corner )
unique_vertices_linked_to_not_boundary_line_corner )
.def( "string", &BRepCornersTopologyInspectionResult::string )
.def( "inspection_type",
&BRepCornersTopologyInspectionResult::inspection_type );

pybind11::class_< BRepLinesTopologyInspectionResult >(

Check failure on line 60 in bindings/python/src/inspection/topology/brep_topology.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

bindings/python/src/inspection/topology/brep_topology.hpp:60:27 [clang-diagnostic-error]

'BRepLinesTopologyInspectionResult' does not refer to a value

Check failure on line 60 in bindings/python/src/inspection/topology/brep_topology.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

bindings/python/src/inspection/topology/brep_topology.hpp:60:9 [clang-diagnostic-error]

use of undeclared identifier 'pybind11'
module, "BRepLinesTopologyInspectionResult" )
.def( pybind11::init<>() )

Check failure on line 62 in bindings/python/src/inspection/topology/brep_topology.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

bindings/python/src/inspection/topology/brep_topology.hpp:62:34 [clang-diagnostic-error]

expected expression

Check failure on line 62 in bindings/python/src/inspection/topology/brep_topology.hpp

View workflow job for this annotation

GitHub Actions / test / tidy

bindings/python/src/inspection/topology/brep_topology.hpp:62:19 [clang-diagnostic-error]

use of undeclared identifier 'pybind11'
.def_readwrite( "lines_not_meshed",
&BRepLinesTopologyInspectionResult::lines_not_meshed )
.def_readwrite( "lines_not_linked_to_a_unique_vertex",
Expand Down
8 changes: 7 additions & 1 deletion bindings/python/src/validity/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@
add_geode_python_binding(
NAME "py_validity"
SOURCES
"validity.cpp"
"brep_validity.hpp"
"edgedcurve_validity.hpp"
"object_validity.hpp"
"pointset_validity.hpp"
"section_validity.hpp"
"solid_validity.hpp"
"surface_validity.hpp"
"validity.cpp"
DEPENDENCIES
${PROJECT_NAME}::validity
)
36 changes: 36 additions & 0 deletions bindings/python/src/validity/brep_validity.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2019 - 2026 Geode-solutions
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#include <string>

#include <geode/model/representation/core/brep.hpp>

#include <geode/inspector/validity/brep_validity.hpp>
#include <geode/inspector/validity/object_validity.hpp>

namespace geode
{
void define_brep_validity( pybind11::module& module )
{
module.def( "is_brep_valid", &is_brep_valid );
}
} // namespace geode
37 changes: 37 additions & 0 deletions bindings/python/src/validity/edgedcurve_validity.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2019 - 2026 Geode-solutions
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#include <string>

#include <geode/mesh/core/edged_curve.hpp>

#include <geode/inspector/validity/edgedcurve_validity.hpp>
#include <geode/inspector/validity/object_validity.hpp>

namespace geode
{
void define_edged_curve_validity( pybind11::module& module )
{
module.def( "is_edged_curve_valid2D", &is_edged_curve_valid< 2 > );
module.def( "is_edged_curve_valid3D", &is_edged_curve_valid< 3 > );
}
} // namespace geode
39 changes: 39 additions & 0 deletions bindings/python/src/validity/object_validity.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2019 - 2026 Geode-solutions
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/

#pragma once

#include <string>

#include <geode/inspector/validity/object_validity.hpp>

namespace geode
{
inline void define_object_validity( pybind11::module& module )
{
pybind11::class_< ObjectValidity >( module, "ObjectValidity" )
.def( "nb_issues", &ObjectValidity::nb_issues )
.def( "string", &ObjectValidity::string )
.def_readwrite( "invalidities", &ObjectValidity::invalidities );
}
} // namespace geode
5 changes: 3 additions & 2 deletions bindings/python/src/validity/pointset_validity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@

#include <geode/mesh/core/point_set.hpp>

#include <geode/inspector/validity/object_validity.hpp>
#include <geode/inspector/validity/pointset_validity.hpp>

namespace geode
{
void define_point_set_validity( pybind11::module& module )
{
module.def( "pointset_invalidity2D", &pointset_invalidity< 2 > );
module.def( "pointset_invalidity3D", &pointset_invalidity< 3 > );
module.def( "is_pointset_valid2D", &is_pointset_valid< 2 > );
module.def( "is_pointset_valid3D", &is_pointset_valid< 3 > );
}
} // namespace geode
36 changes: 36 additions & 0 deletions bindings/python/src/validity/section_validity.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2019 - 2026 Geode-solutions
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#include <string>

#include <geode/model/representation/core/section.hpp>

#include <geode/inspector/validity/object_validity.hpp>
#include <geode/inspector/validity/section_validity.hpp>

namespace geode
{
void define_section_validity( pybind11::module& module )
{
module.def( "is_section_valid", &is_section_valid );
}
} // namespace geode
36 changes: 36 additions & 0 deletions bindings/python/src/validity/solid_validity.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2019 - 2026 Geode-solutions
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#include <string>

#include <geode/mesh/core/solid_mesh.hpp>

#include <geode/inspector/validity/object_validity.hpp>
#include <geode/inspector/validity/solid_validity.hpp>

namespace geode
{
void define_solid_mesh_validity( pybind11::module& module )
{
module.def( "is_solid_valid3D", &is_solid_valid< 3 > );
}
} // namespace geode
37 changes: 37 additions & 0 deletions bindings/python/src/validity/surface_validity.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2019 - 2026 Geode-solutions
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#include <string>

#include <geode/mesh/core/surface_mesh.hpp>

#include <geode/inspector/validity/object_validity.hpp>
#include <geode/inspector/validity/surface_validity.hpp>

namespace geode
{
void define_surface_mesh_validity( pybind11::module& module )
{
module.def( "is_surface_valid2D", &is_surface_valid< 2 > );
module.def( "is_surface_valid3D", &is_surface_valid< 3 > );
}
} // namespace geode
12 changes: 12 additions & 0 deletions bindings/python/src/validity/validity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
#include "pybind11/pybind11.h"
#include "pybind11/stl.h"

#include "brep_validity.hpp"
#include "edgedcurve_validity.hpp"
#include "object_validity.hpp"
#include "pointset_validity.hpp"
#include "section_validity.hpp"
#include "solid_validity.hpp"
#include "surface_validity.hpp"

PYBIND11_MODULE( opengeode_inspector_py_validity, module )
{
Expand All @@ -34,5 +40,11 @@ PYBIND11_MODULE( opengeode_inspector_py_validity, module )
module, "OpenGeodeInspectorValidityLibrary" )
.def( "initialize",
&geode::OpenGeodeInspectorValidityLibrary::initialize );
geode::define_object_validity( module );
geode::define_brep_validity( module );
geode::define_edged_curve_validity( module );
geode::define_point_set_validity( module );
geode::define_section_validity( module );
geode::define_solid_mesh_validity( module );
geode::define_surface_mesh_validity( module );
}
2 changes: 1 addition & 1 deletion bindings/python/tests/inspection/test-py-brep.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def corners_topological_validity(result, verbose):
for corner_issue in result.corners_not_linked_to_a_unique_vertex.issues_map():
nb_issues += corner_issue[1].nb_issues()
nb_issues += result.corners_not_meshed.nb_issues()
nb_issues += result.unique_vertices_liked_to_not_boundary_line_corner.nb_issues()
nb_issues += result.unique_vertices_linked_to_not_boundary_line_corner.nb_issues()
nb_issues += result.unique_vertices_linked_to_multiple_corners.nb_issues()
nb_issues += (
result.unique_vertices_linked_to_not_internal_nor_boundary_corner.nb_issues()
Expand Down
32 changes: 31 additions & 1 deletion bindings/python/tests/validity/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,37 @@
# SOFTWARE.

add_geode_python_test(
SOURCE "test-py-model-validity.py"
SOURCE "test-py-brep-validity.py"
DEPENDENCIES
${PROJECT_NAME}::py_validity
)

add_geode_python_test(
SOURCE "test-py-edgedcurve-validity.py"
DEPENDENCIES
${PROJECT_NAME}::py_validity
)

add_geode_python_test(
SOURCE "test-py-pointset-validity.py"
DEPENDENCIES
${PROJECT_NAME}::py_validity
)

add_geode_python_test(
SOURCE "test-py-section-validity.py"
DEPENDENCIES
${PROJECT_NAME}::py_validity
)

add_geode_python_test(
SOURCE "test-py-solid-validity.py"
DEPENDENCIES
${PROJECT_NAME}::py_validity
)

add_geode_python_test(
SOURCE "test-py-surface-validity.py"
DEPENDENCIES
${PROJECT_NAME}::py_validity
)
Loading
Loading