From fb833d4a8a49e4c6d19316cc04b4d70c5855ccf7 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Wed, 1 Mar 2017 15:52:40 +0100 Subject: [PATCH] FEM: code formating, use better variable name in the regard of codespell tool --- src/Mod/Fem/FemGmshTools.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Mod/Fem/FemGmshTools.py b/src/Mod/Fem/FemGmshTools.py index e7cc8c2b7..66b3a0dc5 100644 --- a/src/Mod/Fem/FemGmshTools.py +++ b/src/Mod/Fem/FemGmshTools.py @@ -270,29 +270,29 @@ class FemGmshTools(): # print(" One element of the meshregion " + mr_obj.Name + " is not an element of the Part to mesh.") # print(" But we gone try to find it in the Shape to mesh :-)") search_ele_in_shape_to_mesh = True - for eles in sub[1]: - # print(eles) # element + for elems in sub[1]: + # print(elems) # elems --> element if search_ele_in_shape_to_mesh: - # we gone try to find the element it in the Shape to mesh and use the found element as eles - ele_shape = FemMeshTools.get_element(sub[0], eles) # the method getElement(element) does not return Solid elements + # we gone try to find the element it in the Shape to mesh and use the found element as elems + ele_shape = FemMeshTools.get_element(sub[0], elems) # the method getElement(element) does not return Solid elements found_element = FemMeshTools.find_element_in_shape(self.part_obj.Shape, ele_shape) if found_element: - eles = found_element + elems = found_element else: FreeCAD.Console.PrintError("One element of the meshregion " + mr_obj.Name + " could not be found in the Part to mesh. It will be ignored.\n") - # print(eles) # element - if eles not in self.ele_length_map: - self.ele_length_map[eles] = Units.Quantity(mr_obj.CharacteristicLength).Value + # print(elems) # element + if elems not in self.ele_length_map: + self.ele_length_map[elems] = Units.Quantity(mr_obj.CharacteristicLength).Value else: - FreeCAD.Console.PrintError("The element " + eles + " of the meshregion " + mr_obj.Name + " has been added to another mesh region.\n") + FreeCAD.Console.PrintError("The element " + elems + " of the meshregion " + mr_obj.Name + " has been added to another mesh region.\n") else: FreeCAD.Console.PrintError("The meshregion: " + mr_obj.Name + " is not used to create the mesh because the reference list is empty.\n") else: FreeCAD.Console.PrintError("The meshregion: " + mr_obj.Name + " is not used to create the mesh because the CharacteristicLength is 0.0 mm.\n") - for elel in self.ele_length_map: - ele_shape = FemMeshTools.get_element(self.part_obj, elel) # the method getElement(element) does not return Solid elements + for eleml in self.ele_length_map: + ele_shape = FemMeshTools.get_element(self.part_obj, eleml) # the method getElement(element) does not return Solid elements ele_vertexes = FemMeshTools.get_vertexes_by_element(self.part_obj.Shape, ele_shape) - self.ele_node_map[elel] = ele_vertexes + self.ele_node_map[eleml] = ele_vertexes print(' {}'.format(self.ele_length_map)) print(' {}'.format(self.ele_node_map))