mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-31 17:17:50 -05:00
Rim3dView_exportContourMapToText exports the contour map of an Eclipse or GeoMech contour map view. The implementation is extracted from the RICF_SOURCE_INIT feature RicExportContourMapToTextFeature into a static helper returning std::expected, used by both the object method and the legacy command. The Python EclipseContourMap/GeoMechContourMap.export_to_text() wrappers are kept as aliases of the generated method.
37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
"""
|
|
ResInsight 3d contour map module
|
|
"""
|
|
|
|
from .pdmobject import add_method
|
|
from .view import View as View
|
|
from .resinsight_classes import EclipseContourMap, GeoMechContourMap
|
|
|
|
|
|
def export_to_text(
|
|
self,
|
|
export_file_name: str = "",
|
|
export_local_coordinates: bool = False,
|
|
undefined_value_label: str = "NaN",
|
|
exclude_undefined_values: bool = False,
|
|
):
|
|
"""Export the contour map to a text file
|
|
|
|
Alias of View.export_contour_map_to_text().
|
|
|
|
Arguments:
|
|
export_file_name(str): The file location to store results in.
|
|
export_local_coordinates(bool): Should we export local coordinates, or UTM.
|
|
undefined_value_label(str): Replace undefined values with this label.
|
|
exclude_undefined_values(bool): Skip undefined values.
|
|
"""
|
|
self.export_contour_map_to_text(
|
|
export_file_name=export_file_name,
|
|
export_local_coordinates=export_local_coordinates,
|
|
undefined_value_label=undefined_value_label,
|
|
exclude_undefined_values=exclude_undefined_values,
|
|
)
|
|
|
|
|
|
add_method(EclipseContourMap)(export_to_text)
|
|
add_method(GeoMechContourMap)(export_to_text)
|