Skip to content

Commit

Permalink
correct setup of SPlineSet for bound/unbound spline
Browse files Browse the repository at this point in the history
  • Loading branch information
ebertolazzi committed Dec 18, 2024
1 parent 266ed57 commit afa812d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/SplineSetGC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,20 @@ namespace Splines {
for ( integer ispl{0}; ispl < ne; ++ispl ) {
Spline * S{ m_splines[size_t(ispl)] };
GenericContainer const & item{ gc_boundary(ispl,"SplineSet boundary data") };

if ( item.exists("closed") && item("closed").get_bool() ) {
bool is_closed{false};
item.get_if_exists("closed",is_closed);
if ( is_closed ) {
S->make_closed();
} else {
S->make_opened();
if ( item.exists("extend") && item("extend").get_bool() ) {
bool can_extend{false};
if ( !item.get_if_exists("extend",can_extend) ) item.get_if_exists("can_extend",can_extend) ;
if ( can_extend ) {
S->make_unbounded();
if ( item("extend_constant").get_bool() )
S->make_extended_constant();
else
S->make_extended_not_constant();
bool extend_constant{false};
item.get_if_exists("extend_constant",extend_constant);
if ( extend_constant ) S->make_extended_constant();
else S->make_extended_not_constant();
} else {
S->make_bounded();
}
Expand Down

0 comments on commit afa812d

Please sign in to comment.