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

Function add_internal_corner_relations

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

Source from the content-addressed store, hash-verified

457}
458
459void add_internal_corner_relations( const geode::Section& model,
460 geode::SectionBuilder& builder,
461 absl::Span< const geode::uuid > corner_uuids,
462 absl::Span< const geode::uuid > surface_uuids )
463{
464 for( const auto& corner_id : corner_uuids )
465 {
466 builder.add_corner_surface_internal_relationship(
467 model.corner( corner_id ), model.surface( surface_uuids.front() ) );
468 }
469
470 for( const auto& corner_id : corner_uuids )
471 {
472 for( const auto& embedding :
473 model.embedding_surfaces( model.corner( corner_id ) ) )
474 {
475 geode::OpenGeodeModelException::test(
476 surface_uuids.front() == embedding.id(),
477 "All Corners embeddings should be Surfaces" );
478 geode::OpenGeodeModelException::test(
479 model.nb_internal_corners( embedding ) == corner_uuids.size(),
480 "Surface should embed all Corners" );
481 }
482 geode::OpenGeodeModelException::test(
483 model.nb_embeddings( corner_id ) == 1,
484 "All Corners should be embedded to 1 Surface" );
485 geode::OpenGeodeModelException::test(
486 model.nb_embedding_surfaces( model.corner( corner_id ) ) == 1,
487 "All Corners should be embedded to 1 Surface" );
488 }
489}
490
491void add_internal_line_relations( const geode::Section& model,
492 geode::SectionBuilder& builder,

Callers 1

testFunction · 0.70

Calls 7

nb_embeddingsMethod · 0.80
testFunction · 0.70
embedding_surfacesMethod · 0.45
nb_internal_cornersMethod · 0.45
sizeMethod · 0.45
nb_embedding_surfacesMethod · 0.45

Tested by

no test coverage detected