Skip to content

Commit

Permalink
fix(Topology): do not check empty corners
Browse files Browse the repository at this point in the history
  • Loading branch information
BotellaA committed Aug 21, 2023
1 parent e3d903e commit 29ab414
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/geode/inspector/topology/brep_topology.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <geode/basic/pimpl_impl.h>

#include <geode/mesh/core/edged_curve.h>
#include <geode/mesh/core/point_set.h>
#include <geode/mesh/core/solid_mesh.h>
#include <geode/mesh/core/surface_mesh.h>

Expand All @@ -43,6 +44,12 @@

namespace
{
bool brep_corner_is_meshed(
const geode::BRep& brep, const geode::uuid& corner_id )
{
return brep.corner( corner_id ).mesh().nb_vertices() != 0;
}

bool brep_line_is_meshed(
const geode::BRep& brep, const geode::uuid& line_id )
{
Expand Down Expand Up @@ -182,7 +189,8 @@ namespace geode
index_t counter{ 0 };
for( const auto& corner : brep_.corners() )
{
if( !brep_has_unique_vertex_associated_to_component(
if( brep_corner_is_meshed( brep_, corner.id() )
&& !brep_has_unique_vertex_associated_to_component(
brep_, corner.id() ) )
{
if( verbose_ )
Expand Down
9 changes: 8 additions & 1 deletion src/geode/inspector/topology/section_topology.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@

namespace
{
bool section_corner_is_meshed(
const geode::Section& section, const geode::uuid& corner_id )
{
return section.corner( corner_id ).mesh().nb_vertices() != 0;
}

bool section_line_is_meshed(
const geode::Section& section, const geode::uuid& line_id )
{
Expand Down Expand Up @@ -118,7 +124,8 @@ namespace geode
{
for( const auto& corner : section_.corners() )
{
if( !section_has_unique_vertex_associated_to_component(
if( section_corner_is_meshed( section_, corner.id() )
&& !section_has_unique_vertex_associated_to_component(
section_, corner.id() ) )
{
return false;
Expand Down

0 comments on commit 29ab414

Please sign in to comment.