| 315 | } |
| 316 | |
| 317 | geode::uuid add_block_collection( |
| 318 | const geode::BRep& model, geode::BRepBuilder& builder ) |
| 319 | { |
| 320 | geode::uuid block_uuid; |
| 321 | block_uuid = builder.add_block_collection(); |
| 322 | builder.set_block_collection_name( block_uuid, "block_collection1" ); |
| 323 | const auto& temp_collection = |
| 324 | model.block_collection( builder.add_block_collection() ); |
| 325 | builder.remove_block_collection( temp_collection ); |
| 326 | const auto message = absl::StrCat( "BRep should have 1 block collections" ); |
| 327 | geode::OpenGeodeModelException::test( |
| 328 | model.nb_block_collections() == 1, message ); |
| 329 | geode::OpenGeodeModelException::test( |
| 330 | geode::detail::count_range_elements( model.block_collections() ) == 1, |
| 331 | message ); |
| 332 | geode::OpenGeodeModelException::test( |
| 333 | model.block_collection( block_uuid ).name() == "block_collection1", |
| 334 | "Wrong BlockCollection name" ); |
| 335 | geode::OpenGeodeModelException::test( |
| 336 | model.nb_active_block_collections() == 1, message ); |
| 337 | builder.set_block_collection_active( block_uuid, false ); |
| 338 | geode::OpenGeodeModelException::test( |
| 339 | model.nb_active_block_collections() == 0, |
| 340 | "BRep should have 0 active block collection" ); |
| 341 | geode::OpenGeodeModelException::test( model.nb_block_collections() == 1, |
| 342 | "BRep should still have 1 block collection" ); |
| 343 | return block_uuid; |
| 344 | } |
| 345 | |
| 346 | void add_corner_line_boundary_relation( const geode::BRep& model, |
| 347 | geode::BRepBuilder& builder, |
no test coverage detected