你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 04:56:51 +08:00
Added check for when material list is less than fractal bins/materials
这个提交包含在:
@@ -21,6 +21,7 @@ import logging
|
||||
import numpy as np
|
||||
|
||||
from ..fractals import FractalVolume
|
||||
from ..materials import ListMaterial
|
||||
from .cmds_geometry import UserObjectGeometry, rotate_2point_object
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -139,6 +140,12 @@ class FractalBox(UserObjectGeometry):
|
||||
logger.exception(f'{self.__str__()} must be used with more than ' +
|
||||
'one material from the mixing model.')
|
||||
raise ValueError
|
||||
if isinstance(mixingmodel, ListMaterial):
|
||||
if nbins > len(mixingmodel.mat):
|
||||
logger.exception(f'{self.__str__()} too many materials/bins ' +
|
||||
'requested compared to materials in ' +
|
||||
'mixing model.')
|
||||
raise ValueError
|
||||
# Create materials from mixing model as number of bins now known
|
||||
# from fractal_box command.
|
||||
mixingmodel.calculate_properties(nbins, grid)
|
||||
|
在新工单中引用
屏蔽一个用户