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

Function add_surface_collections

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

Source from the content-addressed store, hash-verified

186}
187
188std::array< geode::uuid, 2 > add_surface_collections(
189 const geode::Section& section, geode::SectionBuilder& builder )
190{
191 std::array< geode::uuid, 2 > uuids;
192 for( auto mb : geode::Range{ 2 } )
193 {
194 uuids[mb] = builder.add_surface_collection();
195 builder.set_surface_collection_name(
196 uuids[mb], absl::StrCat( "collection", mb + 1 ) );
197 }
198 const auto& temp_collection =
199 section.surface_collection( builder.add_surface_collection() );
200 builder.remove_surface_collection( temp_collection );
201 const auto message =
202 absl::StrCat( "Section should have ", 2, " surface collections" );
203 geode::OpenGeodeModelException::test(
204 section.nb_surface_collections() == 2, message );
205 geode::OpenGeodeModelException::test(
206 geode::detail::count_range_elements( section.surface_collections() )
207 == 2,
208 message );
209 geode::OpenGeodeModelException::test(
210 section.surface_collection( uuids[0] ).name() == "collection1",
211 "Wrong SurfaceCollection name" );
212 return uuids;
213}
214
215void add_corner_line_boundary_relation( const geode::Section& model,
216 geode::SectionBuilder& builder,

Callers 1

testFunction · 0.70

Calls 8

count_range_elementsFunction · 0.85
surface_collectionsMethod · 0.80
nameMethod · 0.80
testFunction · 0.70

Tested by

no test coverage detected