Skip to content

Commit

Permalink
Fix incorrect double reversal of topological line sub-segment normals.
Browse files Browse the repository at this point in the history
The topo line's sub-segment geometries are already getting reversed
(when necessary) which already reverses its great circle arc normals.
  • Loading branch information
jcannon-gplates committed Oct 21, 2024
1 parent 70dc977 commit d347b15
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions gplately/ptt/subduction_convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,24 +422,21 @@ def subduction_convergence(
)

sub_sub_segment_geometry = sub_sub_segment.get_resolved_geometry()
sub_sub_segment_trench_normal_reversal = trench_normal_reversal
# If sub-sub-segment was reversed when it contributed to the topological line shared sub-segment then
# we need to use that reversed geometry so that it has the same order of points as the topological line.
if sub_sub_segment.was_geometry_reversed_in_topology():
# Create a new sub-sub-segment polyline with points in reverse order.
sub_sub_segment_geometry = pygplates.PolylineOnSphere(
sub_sub_segment_geometry[::-1]
)
# The trench normal direction is also reversed.
sub_sub_segment_trench_normal_reversal = -trench_normal_reversal

_sub_segment_subduction_convergence(
output_data,
time,
sub_sub_segment_geometry,
trench_plate_id,
subducting_plate_id,
sub_sub_segment_trench_normal_reversal,
trench_normal_reversal,
trench_length_radians,
distance_along_trench_radians,
threshold_sampling_distance_radians,
Expand Down

0 comments on commit d347b15

Please sign in to comment.