mirror of
https://github.com/Alex38Lyon/Synthese-PSM_LARRA.git
synced 2026-06-01 13:59:13 +00:00
Debug pyCreateTh
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -199,10 +199,10 @@ def load_config(args, configIni="config.ini"):
|
||||
|
||||
survey_keys = {
|
||||
'Author': 'Author',
|
||||
'Copyright1': None,
|
||||
'Copyright2': None,
|
||||
'Copyright3': None,
|
||||
'Copyright_Short': 'CopyrightShort',
|
||||
'Copyright1': 'Copyright',
|
||||
'Copyright2': 'Copyright',
|
||||
'Copyright3': 'Copyright',
|
||||
'Copyright_Short': None,
|
||||
'map_comment': 'mapComment',
|
||||
'club': 'club',
|
||||
'thanksto': 'thanksto',
|
||||
@@ -221,6 +221,7 @@ def load_config(args, configIni="config.ini"):
|
||||
config['Survey_Data']['Copyright2'],
|
||||
config['Survey_Data']['Copyright3']
|
||||
])
|
||||
global_data.CopyrightShort = config['Survey_Data']['Copyright_Short']
|
||||
elif attr:
|
||||
setattr(global_data, attr, config['Survey_Data'][key])
|
||||
|
||||
@@ -232,7 +233,8 @@ def load_config(args, configIni="config.ini"):
|
||||
'survey_prefix_name': 'SurveyPrefixName',
|
||||
'shot_lines_in_th2_files': ('linesInTh2', lambda x: x.lower() == 'true'),
|
||||
'station_name_in_th2_files': ('stationNamesInTh2', lambda x: x.lower() == 'true'),
|
||||
'kSmooth': ('kSmooth', float),
|
||||
'wall_lines_in_th2_files': ('wallLinesInTh2', lambda x: x.lower() == 'true'),
|
||||
'kSmooth': ('kSmooth', float)
|
||||
}
|
||||
|
||||
for key, value in app_keys.items():
|
||||
|
||||
@@ -11,8 +11,8 @@ error_count = 0 # Compteur d'erreurs
|
||||
|
||||
## [Survey_Data] default values
|
||||
Author = "Created by pyCreateTh.py"
|
||||
Copyright = "# Copyright (C) pyCreateTh.py"
|
||||
CopyrightShort = "Licence (C) pyCreateTh.py"
|
||||
Copyright = "# Copyright(C) pyCreateTh.py"
|
||||
CopyrightShort = "Licence(C) pyCreateTh.py"
|
||||
mapComment = "Created by pyCreateTh.py"
|
||||
cs = "UTM30"
|
||||
club = "Therion"
|
||||
@@ -28,7 +28,7 @@ therionPath = "C:/Therion/therion.exe"
|
||||
SurveyPrefixName = f"Survey_"
|
||||
linesInTh2 = True
|
||||
stationNamesInTh2 = True
|
||||
wallLineInTh2 = True
|
||||
wallLinesInTh2 = True
|
||||
kSmooth = 0.5
|
||||
XVIScale = 100
|
||||
|
||||
@@ -100,6 +100,7 @@ th2File = """
|
||||
##XTHERION## xth_me_image_insert {insert_XVI}
|
||||
|
||||
{Copyright}
|
||||
|
||||
# File generated by pyCreateTh.py version {version} date: {date}
|
||||
|
||||
# x_min: {X_Min}, x_max: {X_Max} ecart : {X_Max_X_Min}
|
||||
|
||||
@@ -27,7 +27,7 @@ therion_path = C:\Program Files\Therion\therion.exe
|
||||
# Survey prefix name use tu create Survey folders
|
||||
survey_prefix_name = Explo_
|
||||
|
||||
# Options for Th2 files
|
||||
# Options for th2 files
|
||||
shot_lines_in_th2_files = False
|
||||
station_name_in_th2_files = False
|
||||
wall_lines_in_th2_files = False
|
||||
|
||||
@@ -986,8 +986,8 @@ def create_th_folders(ENTRY_FILE,
|
||||
df_splays = df_splays.drop(columns="is_zero_length")
|
||||
|
||||
th2_walls = []
|
||||
|
||||
if globalData.wallLineInTh2 :
|
||||
|
||||
if globalData.wallLinesInTh2 :
|
||||
th2_walls, x_min, x_max, y_min, y_max = wall_construction_smoothed(df_lines, df_splays, x_min, x_max, y_min, y_max)
|
||||
|
||||
|
||||
@@ -1044,7 +1044,7 @@ def create_th_folders(ENTRY_FILE,
|
||||
Copyright_Short = globalData.CopyrightShort,
|
||||
points="\n".join(th2_points),
|
||||
lines="\n".join(th2_lines) if globalData.linesInTh2 else "",
|
||||
walls="\n".join(th2_walls) if globalData.wallLineInTh2 else "",
|
||||
walls="\n".join(th2_walls) if globalData.wallLinesInTh2 else "",
|
||||
names="\n".join(th2_names) if globalData.stationNamesInTh2 else "",
|
||||
projection="plan",
|
||||
projection_short="P",
|
||||
@@ -1115,7 +1115,7 @@ def create_th_folders(ENTRY_FILE,
|
||||
|
||||
th2_walls = []
|
||||
|
||||
if globalData.wallLineInTh2 :
|
||||
if globalData.wallLinesInTh2 :
|
||||
th2_walls, x_min, x_max, y_min, y_max, = wall_construction_smoothed(df_lines, df_splays, x_min, x_max, y_min, y_max)
|
||||
|
||||
|
||||
@@ -1171,7 +1171,7 @@ def create_th_folders(ENTRY_FILE,
|
||||
Copyright_Short = globalData.CopyrightShort,
|
||||
points="\n".join(th2_points),
|
||||
lines="\n".join(th2_lines) if globalData.linesInTh2 else "",
|
||||
walls="\n".join(th2_walls) if globalData.wallLineInTh2 else "",
|
||||
walls="\n".join(th2_walls) if globalData.wallLinesInTh2 else "",
|
||||
names="\n".join(th2_names) if globalData.stationNamesInTh2 else "",
|
||||
projection="extended",
|
||||
projection_short="C",
|
||||
@@ -2917,7 +2917,7 @@ if __name__ == u'__main__':
|
||||
# Reading config.ini #
|
||||
#################################################################################################
|
||||
config_file = load_config(args)
|
||||
|
||||
|
||||
#################################################################################################
|
||||
# titre #
|
||||
#################################################################################################
|
||||
|
||||
Reference in New Issue
Block a user