def get_material_elements(self): # it only works if either Volumes or Shellthicknesses or Beamsections are in the material objects # it means it does not work for mixed meshes and multiple materials, this is checked in check_prerequisites # the femelement_table is only calculated for the highest dimension in get_femelement_table FreeCAD.Console.PrintMessage('Materials\n') if self.femmesh.Volumes: # we only could do this for volumes, if a mesh contains volumes we're going to use them in the analysis # but a mesh could contain the element faces of the volumes as faces and the edges of the faces as edges, # there we have to check of some geometric objects all_found = False if self.femmesh.GroupCount: all_found = FemMeshTools.get_femelement_sets_from_group_data(self.femmesh, self.material_objects) FreeCAD.Console.PrintMessage(all_found) FreeCAD.Console.PrintMessage('\n') if all_found is False: if not self.femelement_table: self.femelement_table = FemMeshTools.get_femelement_table(self.femmesh) # we're going to use the binary search for get_femelements_by_femnodes() # thus we need the parameter values self.femnodes_ele_table if not self.femnodes_mesh: self.femnodes_mesh = self.femmesh.Nodes if not self.femnodes_ele_table: self.femnodes_ele_table = FemMeshTools.get_femnodes_ele_table(self.femnodes_mesh, self.femelement_table) control = FemMeshTools.get_femelement_sets(self.femmesh, self.femelement_table, self.material_objects, self.femnodes_ele_table) if (self.femelement_count_test is True) and (control is False): # we only need to set it, if it is still True self.femelement_count_test = False if self.shellthickness_objects: if not self.femelement_faces_table: self.femelement_faces_table = FemMeshTools.get_femelement_faces_table(self.femmesh) FemMeshTools.get_femelement_sets(self.femmesh, self.femelement_faces_table, self.material_objects) if self.beamsection_objects or self.fluidsection_objects: if not self.femelement_edges_table: self.femelement_edges_table = FemMeshTools.get_femelement_edges_table(self.femmesh) FemMeshTools.get_femelement_sets(self.femmesh, self.femelement_edges_table, self.material_objects)
def get_material_elements(self): # it only works if either Volumes or Shellthicknesses or Beamsections # are in the material objects, it means it does not work # for mixed meshes and multiple materials, this is checked in check_prerequisites # the femelement_table is only calculated for # the highest dimension in get_femelement_table FreeCAD.Console.PrintMessage("Materials\n") if self.femmesh.Volumes: # we only could do this for volumes # if a mesh contains volumes we're going to use them in the analysis # but a mesh could contain # the element faces of the volumes as faces # and the edges of the faces as edges # there we have to check of some geometric objects # get element ids and write them into the femobj self.get_solid_element_sets(self.member.mats_linear) if self.member.geos_shellthickness: if not self.femelement_faces_table: self.femelement_faces_table = meshtools.get_femelement_faces_table( self.femmesh) meshtools.get_femelement_sets(self.femmesh, self.femelement_faces_table, self.member.mats_linear) if self.member.geos_beamsection or self.member.geos_fluidsection: if not self.femelement_edges_table: self.femelement_edges_table = meshtools.get_femelement_edges_table( self.femmesh) meshtools.get_femelement_sets(self.femmesh, self.femelement_edges_table, self.member.mats_linear)
def get_element_geometry2D_elements(self): # get element ids and write them into the objects FreeCAD.Console.PrintMessage("Shell thicknesses\n") if not self.femelement_faces_table: self.femelement_faces_table = meshtools.get_femelement_faces_table( self.femmesh) meshtools.get_femelement_sets(self.femmesh, self.femelement_faces_table, self.shellthickness_objects)
def get_element_geometry2D_elements(self): # get element ids and write them into the objects FreeCAD.Console.PrintMessage('Shell thicknesses\n') if not self.femelement_faces_table: self.femelement_faces_table = FemMeshTools.get_femelement_faces_table(self.femmesh) FemMeshTools.get_femelement_sets(self.femmesh, self.femelement_faces_table, self.shellthickness_objects)