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

Function test_convert_brep_section

tests/model/test-convert-brep.cpp:35–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33#include <geode/model/representation/io/section_input.hpp>
34
35void test_convert_brep_section()
36{
37 auto brep = geode::load_brep(
38 absl::StrCat( geode::DATA_PATH, "random_dfn.og_brep" ) );
39 const auto section =
40 std::get< 0 >( geode::convert_brep_into_section( brep, 2 ) );
41
42 geode::OpenGeodeModelException::test(
43 section.nb_corners() == 172, "Section should have 172 corners" );
44 geode::OpenGeodeModelException::test(
45 section.nb_lines() == 288, "Section should have 288 lines" );
46 geode::OpenGeodeModelException::test(
47 section.nb_surfaces() == 117, "Section should have 117 surfaces" );
48
49 const auto brep2 =
50 std::get< 0 >( geode::convert_section_into_brep( section, 2, 10. ) );
51
52 geode::OpenGeodeModelException::test(
53 brep2.nb_corners() == 172, "BRep should have 172 corners" );
54 geode::OpenGeodeModelException::test(
55 brep2.nb_lines() == 288, "BRep should have 288 lines" );
56 geode::OpenGeodeModelException::test(
57 brep2.nb_surfaces() == 117, "BRep should have 117 surfaces" );
58}
59
60void test_extrusion_section_to_brep()
61{

Callers 1

testFunction · 0.70

Calls 7

load_brepFunction · 0.85
nb_cornersMethod · 0.80
nb_linesMethod · 0.80
nb_surfacesMethod · 0.80
testFunction · 0.70

Tested by

no test coverage detected