你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 15:27:57 +08:00
Update reading of materials file to allow comments without double hashes.
这个提交包含在:
@@ -52,7 +52,8 @@ class GeometryObjectsRead(UserObjectGeometry):
|
||||
# the main grid or the subgrid.
|
||||
xs, ys, zs = uip.discretise_point(p1)
|
||||
|
||||
# See if material file exists at specified path and if not try input file directory
|
||||
# See if material file exists at specified path and if not try input
|
||||
# file directory
|
||||
matfile = Path(matfile)
|
||||
|
||||
if not matfile.exists():
|
||||
@@ -63,8 +64,9 @@ class GeometryObjectsRead(UserObjectGeometry):
|
||||
|
||||
# Read materials from file
|
||||
with open(matfile, 'r') as f:
|
||||
# Strip out any newline characters and comments that must begin with double hashes
|
||||
materials = [line.rstrip() + '{' + matstr + '}\n' for line in f if(not line.startswith('##') and line.rstrip('\n'))]
|
||||
# Read any lines that begin with a hash. Strip out any newline
|
||||
# characters and comments that must begin with double hashes.
|
||||
materials = [line.rstrip() + '{' + matstr + '}\n' for line in f if(line.startswith('#') and not line.startswith('##') and line.rstrip('\n'))]
|
||||
|
||||
# build scene
|
||||
# API for multiple scenes / model runs
|
||||
|
在新工单中引用
屏蔽一个用户