| 1542 | } |
| 1543 | |
| 1544 | void test() |
| 1545 | { |
| 1546 | geode::OpenGeodeModelLibrary::initialize(); |
| 1547 | geode::Logger::set_level( geode::Logger::LEVEL::debug ); |
| 1548 | geode::BRep model; |
| 1549 | geode::BRepBuilder builder( model ); |
| 1550 | |
| 1551 | // This BRep represents a prism |
| 1552 | const auto corner_uuids = add_corners( model, builder ); |
| 1553 | const auto line_uuids = add_lines( model, builder ); |
| 1554 | const auto surface_uuids = add_surfaces( model, builder ); |
| 1555 | const auto block_uuid = add_block( model, builder ); |
| 1556 | const auto model_boundary_uuids = add_model_boundaries( model, builder ); |
| 1557 | const auto corner_collection_uuids = |
| 1558 | add_corner_collections( model, builder ); |
| 1559 | const auto line_collection_uuids = add_line_collections( model, builder ); |
| 1560 | const auto surface_collection_uuids = |
| 1561 | add_surface_collections( model, builder ); |
| 1562 | const auto block_collection_uuid = add_block_collection( model, builder ); |
| 1563 | |
| 1564 | test_registry( model, 4, 6, 9, 5, 1, 5, 2, 2, 2, 1, 3 ); |
| 1565 | |
| 1566 | set_geometry( builder, corner_uuids, line_uuids, surface_uuids ); |
| 1567 | |
| 1568 | add_corner_line_boundary_relation( |
| 1569 | model, builder, corner_uuids, line_uuids ); |
| 1570 | add_line_surface_boundary_relation( |
| 1571 | model, builder, line_uuids, surface_uuids ); |
| 1572 | add_surface_block_boundary_relation( |
| 1573 | model, builder, surface_uuids, block_uuid ); |
| 1574 | add_surfaces_in_model_boundaries( |
| 1575 | model, builder, surface_uuids, model_boundary_uuids ); |
| 1576 | add_corners_in_corner_collections( |
| 1577 | model, builder, corner_uuids, corner_collection_uuids ); |
| 1578 | add_lines_in_line_collections( |
| 1579 | model, builder, line_uuids, line_collection_uuids ); |
| 1580 | add_surfaces_in_surface_collections( |
| 1581 | model, builder, surface_uuids, surface_collection_uuids ); |
| 1582 | add_block_in_block_collection( |
| 1583 | model, builder, block_uuid, block_collection_uuid ); |
| 1584 | add_internal_corner_relations( |
| 1585 | model, builder, corner_uuids, line_uuids, surface_uuids, block_uuid ); |
| 1586 | add_internal_line_relations( |
| 1587 | model, builder, line_uuids, surface_uuids, block_uuid ); |
| 1588 | add_internal_surface_block_relations( |
| 1589 | model, builder, surface_uuids, block_uuid ); |
| 1590 | geode::OpenGeodeModelException::test( model.nb_internals( block_uuid ) |
| 1591 | == corner_uuids.size() |
| 1592 | + line_uuids.size() |
| 1593 | + surface_uuids.size() - 3, |
| 1594 | "The Block should embed all Corners & Lines & Surfaces " |
| 1595 | "(that are internal to the Block)" ); |
| 1596 | test_boundary_ranges( |
| 1597 | model, corner_uuids, line_uuids, surface_uuids, block_uuid ); |
| 1598 | test_incidence_ranges( |
| 1599 | model, corner_uuids, line_uuids, surface_uuids, block_uuid ); |
| 1600 | test_item_ranges( model, surface_uuids, model_boundary_uuids ); |
| 1601 | test_corner_collection_ranges( |
no test coverage detected