| 764 | } |
| 765 | |
| 766 | void 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 | |
| 801 | void set_geometry( geode::BRepBuilder& builder, |
| 802 | absl::Span< const geode::uuid > corner_uuids, |
no test coverage detected