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

Function add_lines

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

Source from the content-addressed store, hash-verified

88}
89
90std::array< geode::uuid, 9 > add_lines(
91 const geode::BRep& model, geode::BRepBuilder& builder )
92{
93 std::array< geode::uuid, 9 > uuids;
94 for( const auto l : geode::Range{ 9 } )
95 {
96 uuids[l] = builder.add_line();
97 builder.set_line_name( uuids[l], absl::StrCat( "line", l + 1 ) );
98 }
99 const auto& temp_line = model.line(
100 builder.add_line( geode::OpenGeodeEdgedCurve3D::impl_name_static() ) );
101 builder.remove_line( temp_line );
102 const auto message = absl::StrCat( "BRep should have ", 9, " lines" );
103 geode::OpenGeodeModelException::test( model.nb_lines() == 9, message );
104 geode::OpenGeodeModelException::test(
105 geode::detail::count_range_elements( model.lines() ) == 9, message );
106 geode::OpenGeodeModelException::test(
107 model.line( uuids[3] ).name() == "line4", "Wrong Line name" );
108 geode::OpenGeodeModelException::test(
109 model.nb_active_lines() == 9, message );
110 builder.set_line_active( uuids[1], false );
111 builder.set_line_active( uuids[4], false );
112 geode::OpenGeodeModelException::test(
113 model.nb_active_lines() == 7, "BRep should have 7 active lines" );
114 geode::OpenGeodeModelException::test(
115 model.nb_lines() == 9, "BRep should still have 9 lines" );
116 return uuids;
117}
118
119std::array< geode::uuid, 5 > add_surfaces(
120 const geode::BRep& model, geode::BRepBuilder& builder )

Callers 1

testFunction · 0.70

Calls 11

count_range_elementsFunction · 0.85
nb_linesMethod · 0.80
linesMethod · 0.80
nameMethod · 0.80
nb_active_linesMethod · 0.80
testFunction · 0.70
impl_name_staticFunction · 0.50
add_lineMethod · 0.45
set_line_nameMethod · 0.45
remove_lineMethod · 0.45
set_line_activeMethod · 0.45

Tested by

no test coverage detected