File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed 
src/geode/inspector/criterion/negative_elements Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 2727#include  < geode/basic/pimpl_impl.hpp> 
2828#include  < geode/basic/uuid.hpp> 
2929
30+ #include  < geode/geometry/basic_objects/polygon.hpp> 
3031#include  < geode/geometry/basic_objects/triangle.hpp> 
3132#include  < geode/geometry/information.hpp> 
3233#include  < geode/geometry/sign.hpp> 
@@ -71,16 +72,8 @@ namespace geode
7172    private: 
7273        bool  polygon_has_negative_area ( index_t  polygon_id ) const 
7374        {
74-             if ( mesh_.nb_polygon_vertices ( polygon_id ) == 4  )
75-             {
76-                 Triangle< dimension > triangle{
77-                     mesh_.point ( mesh_.polygon_vertex ( { polygon_id, 0  } ) ),
78-                     mesh_.point ( mesh_.polygon_vertex ( { polygon_id, 1  } ) ),
79-                     mesh_.point ( mesh_.polygon_vertex ( { polygon_id, 2  } ) )
80-                 };
81-                 return  triangle_area_sign ( triangle ) == Sign::negative;
82-             }
83-             return  mesh_.polygon_area ( polygon_id ) < 0 ;
75+             return  polygon_area_sign ( mesh_.polygon ( polygon_id ) )
76+                    == Sign::negative;
8477        }
8578
8679    private: 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments