-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing fault faces in GetGridSurface() endpoint
- Loading branch information
1 parent
4520fe1
commit 50d3385
Showing
8 changed files
with
115 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...thon/rips/WebvizPythonExamples/grid_geometry_extraction_cut_along_polyline_STRESS_TEST.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import time | ||
|
||
from rips.instance import * | ||
from rips.generated.GridGeometryExtraction_pb2_grpc import * | ||
from rips.generated.GridGeometryExtraction_pb2 import * | ||
|
||
# from ..instance import * | ||
# from ..generated.GridGeometryExtraction_pb2_grpc import * | ||
# from ..generated.GridGeometryExtraction_pb2 import * | ||
|
||
rips_instance = Instance.find() | ||
grid_geometry_extraction_stub = GridGeometryExtractionStub(rips_instance.channel) | ||
|
||
# grid_file_name = "MOCKED_TEST_GRID" | ||
grid_file_name = ( | ||
"D:\\Git\\resinsight-tutorials\\model-data\\norne\\NORNE_ATW2013_RFTPLT_V2.EGRID" | ||
) | ||
|
||
# Test polylines | ||
mocked_model_fence_poly_line_utm_xy = [ | ||
11.2631, | ||
11.9276, | ||
14.1083, | ||
18.2929, | ||
18.3523, | ||
10.9173, | ||
] | ||
norne_case_fence_poly_line_utm_xy = [ | ||
456221, | ||
7.32113e06, | ||
457150, | ||
7.32106e06, | ||
456885, | ||
7.32176e06, | ||
457648, | ||
7.3226e06, | ||
458805, | ||
7.32278e06, | ||
] | ||
norne_case_single_segment_poly_line_utm_xy = [457150, 7.32106e06, 456885, 7.32176e06] | ||
norne_case_single_segment_poly_line_gap_utm_xy = [460877, 7.3236e06, 459279, 7.32477e06] | ||
|
||
|
||
fence_poly_line_utm_xy = norne_case_fence_poly_line_utm_xy | ||
|
||
num_calls = 20 | ||
sleep_time_s = 0.5 | ||
|
||
for i in range(num_calls): | ||
print(f"Call {i+1}/{num_calls}") | ||
cut_along_polyline_request = GridGeometryExtraction__pb2.CutAlongPolylineRequest( | ||
gridFilename=grid_file_name, | ||
fencePolylineUtmXY=fence_poly_line_utm_xy, | ||
) | ||
cut_along_polyline_response: ( | ||
GridGeometryExtraction__pb2.CutAlongPolylineResponse | ||
) = grid_geometry_extraction_stub.CutAlongPolyline(cut_along_polyline_request) | ||
|
||
time.sleep(sleep_time_s) | ||
|
||
print("Done!") |
37 changes: 37 additions & 0 deletions
37
...Python/rips/WebvizPythonExamples/grid_geometry_extraction_get_grid_surface_STRESS_TEST.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import time | ||
|
||
from rips.instance import * | ||
from rips.generated.GridGeometryExtraction_pb2_grpc import * | ||
from rips.generated.GridGeometryExtraction_pb2 import * | ||
|
||
rips_instance = Instance.find() | ||
grid_geometry_extraction_stub = GridGeometryExtractionStub(rips_instance.channel) | ||
|
||
# grid_file_name = "MOCKED_TEST_GRID" | ||
grid_file_name = ( | ||
"D:\\Git\\resinsight-tutorials\\model-data\\norne\\NORNE_ATW2013_RFTPLT_V2.EGRID" | ||
) | ||
|
||
# ijk_index_filter = GridGeometryExtraction__pb2.IJKIndexFilter( | ||
# iMin=0, iMax=1, jMin=1, jMax=3, kMin=3, kMax=3 | ||
# ) | ||
ijk_index_filter = None | ||
|
||
num_calls = 30 | ||
sleep_time_s = 0.5 | ||
|
||
for i in range(num_calls): | ||
print(f"Call {i+1}/{num_calls}") | ||
get_grid_surface_request = GridGeometryExtraction__pb2.GetGridSurfaceRequest( | ||
gridFilename=grid_file_name, | ||
ijkIndexFilter=ijk_index_filter, | ||
cellIndexFilter=None, | ||
propertyFilter=None, | ||
) | ||
get_grid_surface_response: GridGeometryExtraction__pb2.GetGridSurfaceResponse = ( | ||
grid_geometry_extraction_stub.GetGridSurface(get_grid_surface_request) | ||
) | ||
|
||
time.sleep(sleep_time_s) | ||
|
||
print("Done!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters