From 2576f242411e4e4cd9d9e34cac7b750478d0d52d Mon Sep 17 00:00:00 2001 From: nmannall Date: Thu, 18 Apr 2024 17:20:13 +0100 Subject: [PATCH] Pass model to create_internal_objects not grid --- gprMax/contexts.py | 2 +- gprMax/scene.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gprMax/contexts.py b/gprMax/contexts.py index 396dbad0..4736becd 100644 --- a/gprMax/contexts.py +++ b/gprMax/contexts.py @@ -106,7 +106,7 @@ class Context: if not model_config.reuse_geometry(): scene = self._get_scene(model_num) model = self._create_model() - scene.create_internal_objects(model.G) + scene.create_internal_objects(model) model.build() diff --git a/gprMax/scene.py b/gprMax/scene.py index 28b93cde..4a5a04e3 100644 --- a/gprMax/scene.py +++ b/gprMax/scene.py @@ -138,12 +138,14 @@ class Scene: self.process_cmds(cmds_unique, G) - def create_internal_objects(self, G): + def create_internal_objects(self, model: Model): """Calls the UserObject.build() function in the correct way - API presents the user with UserObjects in order to build the internal Rx(), Cylinder() etc... objects. """ + G = model.G + # Create pre-defined (built-in) materials create_built_in_materials(G)