Skip to content

Commit

Permalink
Merge pull request #110 from Geode-solutions/fix/changing-block-strat…
Browse files Browse the repository at this point in the history
…igraphic-unit-association-method

fix(horizons_stack_from_name_list): fix bug on windows.
  • Loading branch information
panquez authored Mar 25, 2024
2 parents 64c22eb + c6e5a52 commit 7704d70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bindings/python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile bindings/python/requirements.in
# pip-compile --pre bindings/python/requirements.in
#
opengeode-core==14.*,>=14.17.0
# via -r bindings/python/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ namespace
void check_number_of_horizons_and_stratigraphic_units(
geode::index_t nb_horizons, geode::index_t nb_units )
{
OPENGEODE_EXCEPTION( nb_horizons < nb_units + 2,
OPENGEODE_EXCEPTION( nb_horizons <= nb_units + 1,
"[repair_horizon_stack_if_possible] Too many horizons compared "
"to stratigraphic units (",
nb_horizons, ", should be less than ", nb_units, ")" );
OPENGEODE_EXCEPTION( nb_units < nb_horizons + 2,
OPENGEODE_EXCEPTION( nb_units <= nb_horizons + 1,
"[repair_horizon_stack_if_possible] Too many stratigraphic "
"units compared to horizons (",
nb_units, ", should be less than ", nb_horizons, ")" );
Expand Down Expand Up @@ -304,8 +304,9 @@ namespace geode
for( const auto counter : Range{ 1, horizons_names.size() } )
{
const auto& su_above = builder.add_stratigraphic_unit();
builder.set_stratigraphic_unit_name( su_above,
units_names[counter + lowest_unit_to_create ? -1 : 0] );
builder.set_stratigraphic_unit_name(
su_above, units_names[lowest_unit_to_create ? counter - 1
: counter] );
builder.add_horizon_under( stack.horizon( current_horizon ),
stack.stratigraphic_unit( su_above ) );
current_horizon = builder.add_horizon();
Expand Down

0 comments on commit 7704d70

Please sign in to comment.