Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions cherab/jet/machine/cad_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,10 +672,22 @@
VACUUM_VESSEL + DIAGNOSTICS + IL_SC + IL_SC_STRUCTURE + DIVERTOR_TILES + DIVERTOR_STRUCTURE


def import_jet_mesh(world, override_material=None, tungsten_material=None, beryllium_material=None,
def import_jet_mesh(world, mesh_description=JET_MESH, override_material=None, tungsten_material=None, beryllium_material=None,
Copy link
Copy Markdown
Member

@jacklovell jacklovell Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this new argument to the end of the list. Otherwise existing codes which call this function with positional rather than keyword arguments will break.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I shifted it to the end.

lambert_material=None, verbose=True):

for mesh_item in JET_MESH:
""" Imports JET machine meshes.

Args:
:param world: The parent node.
:param mesh_description: Optional, list of tupples of the shape (mesh file path, material). On default equals to the
JET_MESH list.
:param override_material: Optional, overrides materials specified in the mesh_description.
:param tungsten_material: Optional, overrides tungsten materials specified in mesh_description.
:param beryllium_material: Optional, overrides beryllium materials specified in mesh_description.
:param lambert_material: Optional, overrides Lambertian materials specified in mesh_description.
:param verbose: Sets the verbosity, defaults True.
"""

for mesh_item in mesh_description:

mesh_path, default_material = mesh_item

Expand Down