本文整理匯總了Python中surface.Surface.sets方法的典型用法代碼示例。如果您正苦於以下問題:Python Surface.sets方法的具體用法?Python Surface.sets怎麽用?Python Surface.sets使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類surface.Surface
的用法示例。
在下文中一共展示了Surface.sets方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: ReadInpFileError
# 需要導入模塊: from surface import Surface [as 別名]
# 或者: from surface.Surface import sets [as 別名]
re_surface = re.compile("\*Surface, type=ELEMENT, name=(.*)")
match = re_surface.match(line)
if not match:
raise ReadInpFileError("Error parsing file. Expected '*surface, "
"type=ELEMENT', got '" + line + "'.")
surface_name = re_surface.match(line).group(1)
full_str = ""
if verbose == 1 or verbose == 2:
print ("\r \n Reading surface {0:s}.".format(surface_name)),
surface = Surface(surface_name)
while True:
start_of_line = f.tell()
line = f.readline()
if line[0] == '*':
surface.sets = full_str.split(',+')
print ("\n %s" %(surface.sets))
mesh_I.surface[surface_name] = Surface(surface_name,surface.sets)
f.seek(start_of_line)
break
# Read element ids until empty line
full_str += line.strip() + ",+"
elif keyword == "*End Assembly":
print("\n"+str(keyword))
break
else:
f.readline()
continue
break
else: