Skip to content

Commit ea4e639

Browse files
committed
fix(Topology): Added case where closed lines have a corner removing adjacencies at a point of the line, but closing it still.
BREAKING CHANGE: removed the tests on corner vertices being internal but having multiple incidences, which was wrong.
1 parent 837ab6b commit ea4e639

27 files changed

+202
-334
lines changed

bindings/python/src/inspector/topology/brep_topology.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656
.def( "not_internal_nor_boundary_corner_vertices", \
5757
&BRepTopologyInspector:: \
5858
not_internal_nor_boundary_corner_vertices ) \
59-
.def( "internal_with_multiple_incidences_corner_vertices", \
60-
&BRepTopologyInspector:: \
61-
internal_with_multiple_incidences_corner_vertices ) \
6259
.def( "line_corners_without_boundary_status", \
6360
&BRepTopologyInspector::line_corners_without_boundary_status ) \
6461
.def( "part_of_not_boundary_nor_internal_line_unique_vertices", \

bindings/python/src/inspector/topology/section_topology.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@
5454
.def( "not_internal_nor_boundary_corner_vertices", \
5555
&SectionTopologyInspector:: \
5656
not_internal_nor_boundary_corner_vertices ) \
57-
.def( "internal_with_multiple_incidences_corner_vertices", \
58-
&SectionTopologyInspector:: \
59-
internal_with_multiple_incidences_corner_vertices ) \
6057
.def( "line_corners_without_boundary_status", \
6158
&SectionTopologyInspector::line_corners_without_boundary_status ) \
6259
.def( "part_of_not_boundary_nor_internal_line_unique_vertices", \

bindings/python/tests/test-py-brep-topology.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ def check_not_internal_nor_boundary_corner_vertices( brep_inspector ):
6161
for vertex_index in not_internal_nor_boundary_corner_vertices:
6262
print( "[Test] Model unique vertex with index ", vertex_index, " is neither internal nor a boundary." )
6363

64-
def check_internal_with_multiple_incidences_corner_vertices( brep_inspector ):
65-
internal_with_multiple_incidences_corner_vertices = brep_inspector.internal_with_multiple_incidences_corner_vertices()
66-
print( "There are ", len( internal_with_multiple_incidences_corner_vertices ), " embedded corner vertices with multiple incidences." )
67-
for vertex_index in internal_with_multiple_incidences_corner_vertices:
68-
print( "[Test] Model unique vertex with index ", vertex_index, " is internal but has multiple incidences." )
69-
7064
def check_line_corners_without_boundary_status( brep_inspector ):
7165
line_corners_without_boundary_status = brep_inspector.line_corners_without_boundary_status()
7266
print( "There are ", len( line_corners_without_boundary_status ), " corner vertices part of a line but not its boundary." )
@@ -133,7 +127,6 @@ def launch_topological_validity_checks( brep_inspector ):
133127
check_multiple_corners_unique_vertices( brep_inspector )
134128
check_multiple_internals_corner_vertices( brep_inspector )
135129
check_not_internal_nor_boundary_corner_vertices( brep_inspector )
136-
check_internal_with_multiple_incidences_corner_vertices( brep_inspector )
137130
check_line_corners_without_boundary_status( brep_inspector )
138131
check_part_of_not_boundary_nor_internal_line_unique_vertices( brep_inspector )
139132
check_part_of_invalid_unique_line_unique_vertices( brep_inspector )

bindings/python/tests/test-py-section-topology.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ def check_not_internal_nor_boundary_corner_vertices( section_inspector ):
5959
for vertex_index in not_internal_nor_boundary_corner_vertices:
6060
print( "[Test] Model unique vertex with index ", vertex_index, " is neither internal nor a boundary." )
6161

62-
def check_internal_with_multiple_incidences_corner_vertices( section_inspector ):
63-
internal_with_multiple_incidences_corner_vertices = section_inspector.internal_with_multiple_incidences_corner_vertices()
64-
print( "There are ", len( internal_with_multiple_incidences_corner_vertices ), " embedded corner vertices with multiple incidences." )
65-
for vertex_index in internal_with_multiple_incidences_corner_vertices:
66-
print( "[Test] Model unique vertex with index ", vertex_index, " is internal but has multiple incidences." )
67-
6862
def check_line_corners_without_boundary_status( section_inspector ):
6963
line_corners_without_boundary_status = section_inspector.line_corners_without_boundary_status()
7064
print( "There are ", len( line_corners_without_boundary_status ), " corner vertices part of a line but not its boundary." )
@@ -107,7 +101,6 @@ def launch_topological_validity_checks( section_inspector ):
107101
check_multiple_corners_unique_vertices( section_inspector )
108102
check_multiple_internals_corner_vertices( section_inspector )
109103
check_not_internal_nor_boundary_corner_vertices( section_inspector )
110-
check_internal_with_multiple_incidences_corner_vertices( section_inspector )
111104
check_line_corners_without_boundary_status( section_inspector )
112105
check_part_of_not_boundary_nor_internal_line_unique_vertices( section_inspector )
113106
check_part_of_invalid_unique_line_unique_vertices( section_inspector )

include/geode/inspector/topology/brep_topology.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ namespace geode
7474
std::vector< index_t >
7575
not_internal_nor_boundary_corner_vertices() const;
7676

77-
std::vector< index_t >
78-
internal_with_multiple_incidences_corner_vertices() const;
79-
8077
std::vector< index_t > line_corners_without_boundary_status() const;
8178

8279
std::vector< index_t >

include/geode/inspector/topology/private/brep_corners_topology_impl.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ namespace geode
6161
bool corner_is_not_internal_nor_boundary(
6262
index_t unique_vertex_index ) const;
6363

64-
bool corner_is_internal_with_multiple_incidences(
65-
index_t unique_vertex_index ) const;
66-
6764
bool corner_is_part_of_line_but_not_boundary(
6865
index_t unique_vertex_index ) const;
6966

include/geode/inspector/topology/private/section_corners_topology_impl.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ namespace geode
6161
bool corner_is_not_internal_nor_boundary(
6262
index_t unique_vertex_index ) const;
6363

64-
bool corner_is_internal_with_multiple_incidences(
65-
index_t unique_vertex_index ) const;
66-
6764
bool corner_is_part_of_line_but_not_boundary(
6865
index_t unique_vertex_index ) const;
6966

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright (c) 2019 - 2022 Geode-solutions
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
* SOFTWARE.
21+
*
22+
*/
23+
24+
#pragma once
25+
26+
#include <absl/types/span.h>
27+
28+
#include <geode/inspector/common.h>
29+
30+
namespace geode
31+
{
32+
class BRep;
33+
struct uuid;
34+
struct MeshComponentVertex;
35+
} // namespace geode
36+
37+
namespace geode
38+
{
39+
namespace detail
40+
{
41+
bool brep_blocks_are_meshed( const geode::BRep& brep );
42+
43+
std::vector< uuid > components_uuids(
44+
absl::Span< const MeshComponentVertex > components );
45+
} // namespace detail
46+
} // namespace geode

include/geode/inspector/topology/section_topology.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ namespace geode
7272
std::vector< index_t >
7373
not_internal_nor_boundary_corner_vertices() const;
7474

75-
std::vector< index_t >
76-
internal_with_multiple_incidences_corner_vertices() const;
77-
7875
std::vector< index_t > line_corners_without_boundary_status() const;
7976

8077
std::vector< index_t >

src/bin/geode-inspector-brep.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void inspect_brep( const geode::BRep& brep )
5050
{
5151
const auto verbose = absl::GetFlag( FLAGS_verbose );
5252
const geode::BRepInspector brep_inspector{ brep, verbose };
53-
absl::InlinedVector< async::task< void >, 18 > tasks;
53+
absl::InlinedVector< async::task< void >, 17 > tasks;
5454
if( absl::GetFlag( FLAGS_component_linking ) )
5555
{
5656
tasks.emplace_back( async::spawn( [&brep_inspector] {
@@ -103,15 +103,6 @@ void inspect_brep( const geode::BRep& brep )
103103
" unique vertices associated to a corner which is neither "
104104
"internal nor boundary." );
105105
} ) );
106-
tasks.emplace_back( async::spawn( [&brep_inspector] {
107-
const auto nb =
108-
brep_inspector
109-
.internal_with_multiple_incidences_corner_vertices()
110-
.size();
111-
geode::Logger::info( nb,
112-
" unique vertices associated to a corner which is internal "
113-
"but has multiple incidences." );
114-
} ) );
115106
tasks.emplace_back( async::spawn( [&brep_inspector] {
116107
const auto nb =
117108
brep_inspector.line_corners_without_boundary_status().size();

0 commit comments

Comments
 (0)