Skip to content

Commit 76d19ca

Browse files
committed
Fixed apsg-related and line-normal plane bugs
1 parent 5b10f2a commit 76d19ca

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

StereoplotWidget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from .apsg import StereoNet, Lin as aLin, Fol as aFol, Fault as aFault
3232

3333
from .auxiliary_windows import *
34-
from .pygsf.orientations.orientations import Plane as GPlane, Axis as GAxis
34+
from .pygsf.orientations.orientations import Plane as GPlane, Axis as GAxis, Azim, Plunge
3535
from .qgis_utils.qgs import pt_geoms_attrs
3636
from .mpl_utils.save_figure import FigureExportDlg
3737
from .fault_utils.utils import rake_to_apsg_movsense, movsense_to_apsg_movsense
@@ -610,7 +610,7 @@ def get_fault_slikenline_data(struct_vals):
610610
color=marker_color,
611611
alpha=marker_transp)
612612
elif plot_setts["tPlotAxesFormat"] == "perpendicular planes":
613-
plane = GAxis(*line_rec).normal_gplane.dda
613+
plane = GAxis(Azim(line_rec[0]), Plunge(line_rec[1])).asDirect().normPlane().dda
614614
p = aFol(*plane)
615615
self.stereonet.plane(p,
616616
linestyle=line_style,

about_dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def setup_gui(self):
1717
dialog_layout = QVBoxLayout()
1818

1919
htmlText = """
20-
<h3>geocouche - release 2.0.1</h3>
20+
<h3>geocouche - release 2.0.2</h3>
2121
Created by M. Alberti (alberti.m65@gmail.com).
2222
<br /><br /><a href="https://github.com/mauroalberti/geocouche">https://github.com/mauroalberti/geocouche</a>
2323
<br /><br />Stereonet plotting and processing of geological structures.

metadata.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name=geocouche
33
description=Processes geological meso-structures
44
about=geocouche is a GGIS plugin for processing the orientations of geological structures, based on the module apsg by Ondrej Lexa. Currently, it can: a) calculate the angles between planes stored in a layer and a reference plane, and b) create stereonets from plane/pole data stored in a point layer or directly as texts.
55
category=Geology
6-
version=2.0.1
6+
version=2.0.2
77
experimental=False
88
qgisMinimumVersion=3.0
99
author=Martin Laloux, Mauro Alberti
@@ -14,6 +14,7 @@ icon=./icons/stereoplot.png
1414

1515
; start of optional metadata
1616
changelog=
17+
2.0.2 : - apsg-related and line-normal plane plot bugfixes
1718
2.0.1 : - help and about sections modified
1819
2.0.0 : - porting to QGIS 3 and integration of pygsf and other minor modules
1920
1.1.0 : - integration of module "gsf" (vers. 0.1.0) and related restructuration of "geosurf" in independent modules

pygsf/orientations/orientations.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ class Azim(object):
1212
Azim class
1313
"""
1414

15-
def __init__(self, val: [int, float], unit: str='d'):
15+
def __init__(self,
16+
val: [int, float],
17+
unit: str = 'd'
18+
):
1619
"""
1720
Creates an azimuth instance.
1821
@@ -38,7 +41,7 @@ def __init__(self, val: [int, float], unit: str='d'):
3841

3942
# unit check
4043
if unit not in ("d", "r"):
41-
raise OrienInputException("Unit input must be 'd' or 'r'")
44+
raise OrienInputException(f"Unit input must be 'd' or 'r', got {type(unit)} with value {unit}")
4245

4346
if not (isinstance(val, (int, float))):
4447
raise OrienInputException("Input azimuth value must be int/float")

0 commit comments

Comments
 (0)