Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making get geometry available #203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions geolib/models/dstability/dstability_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def get_slipplane_result(
result = self._get_result_substructure(scenario_index, calculation_index)
return result.get_slipplane_output()

def _get_geometry(self, scenario_index: int, stage_index: int):
def get_geometry(self, scenario_index: int, stage_index: int):
geometry_id = (
self.datastructure.scenarios[scenario_index].Stages[stage_index].GeometryId
)
Expand Down Expand Up @@ -502,7 +502,7 @@ def add_layer(
scenario_index = self.get_scenario_index(scenario_index)
stage_index = self.get_stage_index(stage_index)

geometry = self._get_geometry(scenario_index, stage_index)
geometry = self.get_geometry(scenario_index, stage_index)
soil_layers = self._get_soil_layers(scenario_index, stage_index)

# Check if we have the soil code
Expand Down Expand Up @@ -736,7 +736,7 @@ def add_state_point(
states = self._get_state(scenario_index, stage_index)

try:
_ = self._get_geometry(scenario_index, stage_index).get_layer(
_ = self.get_geometry(scenario_index, stage_index).get_layer(
state_point.layer_id
)
except ValueError:
Expand Down Expand Up @@ -1110,7 +1110,7 @@ def _get_color_of_layer(
def plot(
self, scenario_index: Optional[int] = None, stage_index: Optional[int] = None
):
geometry = self._get_geometry(scenario_index, stage_index)
geometry = self.get_geometry(scenario_index, stage_index)
layers_collection = self._get_soil_layers(scenario_index, stage_index)
fig, ax = plt.subplots()
# loop over the layers
Expand Down
Loading