📝 docs(README.md): capitalize the first letter of the title
The first letter of the title "Analyse morphologique" was not capitalized, which is inconsistent with the usual capitalization rules for titles. 🖼️ chore(README.md): update image and fix typo in rotation instructions The image in the README.md file was updated to reflect the correct rotation instructions. A typo in the rotation instructions was also fixed. 👥 chore(README.md): fix typo in contributor's role A typo in the role of one of the contributors was fixed. 🐛 fix(data_processing.py): add missing half discretisation values to L calculation The calculation of L in the get_advanced_data function of data_processing.py was missing half the discretisation values at the beginning and end of the object. 🐛 fix(input.py): remove print statement A print statement was accidentally left in the from_xyz_file method of the ScannedObject class in input
This commit is contained in:
parent
d64c8dd333
commit
914d6bb7cb
@ -1,6 +1,6 @@
|
||||
# Analyse Morphologique
|
||||
|
||||
L'analyse morphologique est un outil développé par le laboratoire de géomécanique du centre PACA d'INRAE. Son objectif est d'extraire des informations sur la morphologie de scans 3D provenant de tests HET (Hydraulic Erosion Test).
|
||||
"Analyse morphologique" est un outil développé par le laboratoire de géomécanique du centre PACA d'INRAE. Son objectif est d'extraire des informations sur la morphologie de scans 3D provenant de tests HET (Hydraulic Erosion Test).
|
||||
|
||||
## Fonctionnalités
|
||||
|
||||
@ -86,7 +86,7 @@ Graphiques 3D :
|
||||
- Pour effectuer une rotation, maintenez le clic gauche et déplacez la souris :
|
||||
- pour une rotation autour de l'axe x, déplacez la souris vers le haut ou le bas dans la zone indiquée en bleu.
|
||||
- pour une rotation autour de l'axe y, déplacez la souris dans une trajectoire de cercle suivant la zone indiquée en vert.
|
||||
- pour une rotation autour de l'axe z, déplacez la souris dans une trajectoire de cercle suivant la zone indiquée en rouge.
|
||||
- pour une rotation autour de l'axe z, déplacez la souris vers la gauche ou la droite dans la zone indiquée en rouge.
|
||||
|
||||

|
||||
|
||||
@ -130,12 +130,12 @@ flowchart TD
|
||||
- Implementation de la specification du projet.
|
||||
|
||||
- Alexis DOGHMANE : [mail](mailto:alexis.doghmane@inrae.fr)
|
||||
- Redacteurs des specifications du projet.
|
||||
- Redacteur des specifications du projet.
|
||||
|
||||
Avec du code de :
|
||||
|
||||
- Jerome Duriez : [mail](mailto:jerome.duriez@inrae.fr)
|
||||
- Redressement de l'objet 3D en passant par un alignemennt des axes de l'espace avec les axes d'inertie de l'objet 3D.
|
||||
- Redressement de l'objet 3D en passant par un alignement des axes de l'espace avec les axes d'inertie de l'objet 3D.
|
||||
|
||||
- Rick van Hattem : [mail](mailto:Wolph@Wol.ph)
|
||||
- Code permettant de calculer le centre de gravité d'un objet, la matrice d'inertie et le volume d'un objet 3D. [source](https://pypi.org/project/numpy-stl/)
|
||||
@ -78,7 +78,7 @@ def get_discrete_data(obj:ScannedObject, ndigits:int, delta_z:float=1, update_pr
|
||||
- Rayon moyen (en mm) : list of mean radius values
|
||||
- Rayon ecart type (en mm) : list of radius standard deviation values
|
||||
"""
|
||||
|
||||
|
||||
# Create the data dict
|
||||
colones = ["X moy (en mm)",
|
||||
"Y moy (en mm)",
|
||||
@ -138,7 +138,7 @@ def get_advanced_data(discrete_data:dict, V_scan = 0, update_progress_bar= progr
|
||||
discrete_data["Z moy (en mm)"]))
|
||||
for index in range(len(vertices)-1):
|
||||
l += de.get_distance_between_two_vertices(vertices[index], vertices[index+1])
|
||||
L = de.get_distance_between_two_vertices(vertices[0], vertices[-1])
|
||||
L = de.get_distance_between_two_vertices(vertices[0], vertices[-1]) + discrete_data["Discretisation(en mm)"][-1] /2 + discrete_data["Discretisation(en mm)"][0] /2
|
||||
T = l/L
|
||||
update_progress_bar(10)
|
||||
|
||||
@ -174,6 +174,9 @@ def get_advanced_data(discrete_data:dict, V_scan = 0, update_progress_bar= progr
|
||||
"Moyenne des rayons moyens 〈R〉":R_mean,
|
||||
"Ecart-type des rayons moyens σ_〈R〉":R_mean_std,
|
||||
"σ_〈R〉^tot":sigma_r_tot,
|
||||
"H": H,
|
||||
"L": L,
|
||||
"l":l,
|
||||
"MI_l":MI_l,
|
||||
"MI_p":MI_p,
|
||||
"MI_mR":MI_mR,
|
||||
|
||||
@ -130,7 +130,7 @@ class ScannedObject:
|
||||
z[count] -= zmin
|
||||
|
||||
return ScannedObject(list(zip(x,y,z)), triangles, )
|
||||
|
||||
|
||||
@staticmethod
|
||||
def from_xyz_file(file_path:str, delimiter:str = ' ', ratio:float=1, normalised:str = '')->'ScannedObject':
|
||||
"""
|
||||
@ -145,7 +145,6 @@ class ScannedObject:
|
||||
with open(file_path, 'r',encoding='utf-8') as f:
|
||||
data = f.readlines()
|
||||
for line in data:
|
||||
print(line)
|
||||
x.append(float(line.split(delimiter)[0])* ratio)
|
||||
y.append(float(line.split(delimiter)[1])* ratio)
|
||||
z.append(float(line.split(delimiter)[2])* ratio)
|
||||
@ -234,7 +233,7 @@ class ScannedObject:
|
||||
splitted_data[-1].append(line)
|
||||
self.old_discrete = splitted_data
|
||||
return splitted_data
|
||||
|
||||
|
||||
def get_discrete_vertices_2(self, step:float = 1)->list:
|
||||
"""
|
||||
Discretize the vertices of the object using a length method.
|
||||
@ -262,7 +261,7 @@ class ScannedObject:
|
||||
splitted_data.append([])
|
||||
self.old_discrete = splitted_data
|
||||
return splitted_data
|
||||
|
||||
|
||||
def has_faces(self)->bool:
|
||||
"""
|
||||
Check if the object has faces.
|
||||
@ -315,7 +314,7 @@ class ScannedObject:
|
||||
self.y = self.vertices[:,1]
|
||||
self.z = self.vertices[:,2]
|
||||
self.normalise()
|
||||
|
||||
|
||||
def normalise(self, axis:str = 'z'):
|
||||
"""
|
||||
Normalise the object.
|
||||
|
||||
@ -175,7 +175,6 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
button_callback=self.select_file).show_popup()
|
||||
return False
|
||||
if os.path.splitext(self.input_file_path.toPlainText())[1].lower() == ".xyz":
|
||||
print("test")
|
||||
ErrorPopup("Attention!, Ce programme ne peut pas redresser les fichiers .xyz, assurez vous que l'objet est deja droit. Il sera aussi impossible d'utiliser le graphe 'Mesh3D'").show_popup()
|
||||
return True
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ def get_theta_from_x_y(xi:float, yi:float, x_mean:float, y_mean:float):
|
||||
>>> get_theta_from_x_y(1,2,3,4)
|
||||
0.7853981633974483
|
||||
"""
|
||||
return math.atan((yi - y_mean)/(xi-x_mean))
|
||||
return math.atan((xi-x_mean)/(yi-y_mean))
|
||||
|
||||
def get_true_theta_from_x_y(xi:float, yi:float, x_mean:float, y_mean:float):
|
||||
"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user