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

Function add_internal_line_relations

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

Source from the content-addressed store, hash-verified

489}
490
491void add_internal_line_relations( const geode::Section& model,
492 geode::SectionBuilder& builder,
493 absl::Span< const geode::uuid > line_uuids,
494 absl::Span< const geode::uuid > surface_uuids )
495{
496 builder.add_line_surface_internal_relationship(
497 model.line( line_uuids[3] ), model.surface( surface_uuids[0] ) );
498 builder.add_line_surface_internal_relationship(
499 model.line( line_uuids[4] ), model.surface( surface_uuids[0] ) );
500 builder.add_line_surface_internal_relationship(
501 model.line( line_uuids[5] ), model.surface( surface_uuids[0] ) );
502 builder.add_line_surface_internal_relationship(
503 model.line( line_uuids[0] ), model.surface( surface_uuids[1] ) );
504 builder.add_line_surface_internal_relationship(
505 model.line( line_uuids[1] ), model.surface( surface_uuids[1] ) );
506
507 for( const auto& line_id : geode::LRange{ 0, 1 } )
508 {
509 for( const auto& embedding :
510 model.embedding_surfaces( model.line( line_uuids[line_id] ) ) )
511 {
512 geode::OpenGeodeModelException::test(
513 embedding.id() == surface_uuids[1],
514 "Lines embeddings are wrong" );
515 }
516 geode::OpenGeodeModelException::test(
517 model.nb_embeddings( line_uuids[line_id] ) == 1,
518 "All Lines should be embedded to 1 Surface" );
519 geode::OpenGeodeModelException::test(
520 model.nb_embedding_surfaces( model.line( line_uuids[line_id] ) )
521 == 1,
522 "All Lines should be embedded to 1 Surface" );
523 }
524 geode::OpenGeodeModelException::test(
525 model.nb_internal_lines( model.surface( surface_uuids[0] ) ) == 3,
526 "Surface should embed 3 Lines" );
527 geode::OpenGeodeModelException::test(
528 model.nb_internal_lines( model.surface( surface_uuids[1] ) ) == 2,
529 "Surface should embed 2 Lines" );
530}
531
532void test_boundary_ranges( const geode::Section& model,
533 absl::Span< const geode::uuid > corner_uuids,

Callers 1

testFunction · 0.70

Calls 6

nb_embeddingsMethod · 0.80
testFunction · 0.70
embedding_surfacesMethod · 0.45
nb_embedding_surfacesMethod · 0.45
nb_internal_linesMethod · 0.45

Tested by

no test coverage detected