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

Function add_internal_surface_block_relations

tests/model/test-brep.cpp:766–799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764}
765
766void add_internal_surface_block_relations( const geode::BRep& model,
767 geode::BRepBuilder& builder,
768 absl::Span< const geode::uuid > surface_uuids,
769 const geode::uuid& block_uuid )
770{
771 for( const auto surface_id : geode::Range{ 3, surface_uuids.size() } )
772 {
773 builder.add_surface_block_internal_relationship(
774 model.surface( surface_uuids[surface_id] ),
775 model.block( block_uuid ) );
776 }
777
778 for( const auto surface_id : geode::Range{ 3, surface_uuids.size() } )
779 {
780 for( const auto& embedding : model.embedding_blocks(
781 model.surface( surface_uuids[surface_id] ) ) )
782 {
783 geode::OpenGeodeModelException::test(
784 model.nb_internal_surfaces( embedding )
785 == surface_uuids.size() - 3,
786 "Block should embed ", surface_uuids.size() - 3, " Surfaces" );
787 geode::OpenGeodeModelException::test( block_uuid == embedding.id(),
788 "Surfaces embeddings should be Blocks" );
789 }
790 geode::OpenGeodeModelException::test(
791 model.nb_embeddings( surface_uuids[surface_id] ) == 1,
792 "Surfaces should be embedded to 1 Block" );
793 geode::OpenGeodeModelException::test(
794 model.nb_embedding_blocks(
795 model.surface( surface_uuids[surface_id] ) )
796 == 1,
797 "Surfaces should be embedded to 1 Block" );
798 }
799}
800
801void set_geometry( geode::BRepBuilder& builder,
802 absl::Span< const geode::uuid > corner_uuids,

Callers 1

testFunction · 0.85

Calls 7

embedding_blocksMethod · 0.80
nb_internal_surfacesMethod · 0.80
nb_embeddingsMethod · 0.80
nb_embedding_blocksMethod · 0.80
testFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected