MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / add_surfaces

Function add_surfaces

tests/model/test-section.cpp:91–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91std::array< geode::uuid, 2 > add_surfaces(
92 const geode::Section& model, geode::SectionBuilder& builder )
93{
94 std::array< geode::uuid, 2 > uuids;
95 for( const auto s : geode::Range{ 2 } )
96 {
97 uuids[s] = builder.add_surface();
98 }
99 const auto& temp_surface = model.surface( builder.add_surface(
100 geode::OpenGeodePolygonalSurface2D::impl_name_static() ) );
101 builder.remove_surface( temp_surface );
102 const auto message = absl::StrCat( "Section should have ", 2, " surfaces" );
103 geode::OpenGeodeModelException::test( model.nb_surfaces() == 2, message );
104 geode::OpenGeodeModelException::test(
105 geode::detail::count_range_elements( model.surfaces() ) == 2, message );
106 return uuids;
107}
108
109std::array< geode::uuid, 2 > add_model_boundaries(
110 const geode::Section& section, geode::SectionBuilder& builder )

Callers 1

testFunction · 0.70

Calls 7

count_range_elementsFunction · 0.85
nb_surfacesMethod · 0.80
surfacesMethod · 0.80
testFunction · 0.70
impl_name_staticFunction · 0.50
add_surfaceMethod · 0.45
remove_surfaceMethod · 0.45

Tested by

no test coverage detected