diff --git a/src/Mod/Fem/femmesh/meshtools.py b/src/Mod/Fem/femmesh/meshtools.py index 766836c9d66a..b8838855dcbe 100644 --- a/src/Mod/Fem/femmesh/meshtools.py +++ b/src/Mod/Fem/femmesh/meshtools.py @@ -1620,27 +1620,23 @@ def get_tie_obj_faces(femmesh, femelement_table, femnodes_ele_table, femobj): FreeCAD.Console.PrintLog(f"Slave: {slave_ref[0].Name}, {slave_ref}\n") FreeCAD.Console.PrintLog(f"Master: {master_ref[0].Name}, {master_ref}\n") - if is_solid_femmesh(femmesh): - # get the nodes, sorted and duplicates removed - slaveface_nds = sorted(list(set(get_femnodes_by_refshape(femmesh, slave_ref)))) - masterface_nds = sorted(list(set(get_femnodes_by_refshape(femmesh, master_ref)))) - # FreeCAD.Console.PrintLog("slaveface_nds: {}\n".format(slaveface_nds)) - # FreeCAD.Console.PrintLog("masterface_nds: {}\n".format(slaveface_nds)) - - # fill the bit_pattern_dict and search for the faces - slave_bit_pattern_dict = get_bit_pattern_dict( - femelement_table, femnodes_ele_table, slaveface_nds - ) - master_bit_pattern_dict = get_bit_pattern_dict( - femelement_table, femnodes_ele_table, masterface_nds - ) - - # get the faces ids - slave_faces = get_ccxelement_faces_from_binary_search(slave_bit_pattern_dict) - master_faces = get_ccxelement_faces_from_binary_search(master_bit_pattern_dict) + # get the nodes, sorted and duplicates removed + slaveface_nds = sorted(list(set(get_femnodes_by_refshape(femmesh, slave_ref)))) + masterface_nds = sorted(list(set(get_femnodes_by_refshape(femmesh, master_ref)))) + # FreeCAD.Console.PrintLog("slaveface_nds: {}\n".format(slaveface_nds)) + # FreeCAD.Console.PrintLog("masterface_nds: {}\n".format(slaveface_nds)) + + # fill the bit_pattern_dict and search for the faces + slave_bit_pattern_dict = get_bit_pattern_dict( + femelement_table, femnodes_ele_table, slaveface_nds + ) + master_bit_pattern_dict = get_bit_pattern_dict( + femelement_table, femnodes_ele_table, masterface_nds + ) - elif is_face_femmesh(femmesh): - FreeCAD.Console.PrintError("Shell mesh is not allowed for constraint tie.\n") + # get the faces ids + slave_faces = get_ccxelement_faces_from_binary_search(slave_bit_pattern_dict) + master_faces = get_ccxelement_faces_from_binary_search(master_bit_pattern_dict) FreeCAD.Console.PrintLog(f"slave_faces: {slave_faces}\n") FreeCAD.Console.PrintLog(f"master_faces: {master_faces}\n")