File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
flow360/component/simulation Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -909,3 +909,21 @@ def get_default_report_config() -> dict:
909909 return get_default_report_summary_template ().model_dump (
910910 exclude_none = True ,
911911 )
912+
913+
914+ def _parse_root_item_type_from_simulation_json (* , param_as_dict : dict ):
915+ """Deduct the root item entity type from simulation.json"""
916+ try :
917+ entity_info_type = param_as_dict ["private_attribute_asset_cache" ]["project_entity_info" ][
918+ "type_name"
919+ ]
920+ if entity_info_type == "GeometryEntityInfo" :
921+ return "Geometry"
922+ if entity_info_type == "SurfaceMeshEntityInfo" :
923+ return "SurfaceMesh"
924+ if entity_info_type == "VolumeMeshEntityInfo" :
925+ return "VolumeMesh"
926+ raise ValueError (f"[INTERNAL] Invalid type of the entity info found: { entity_info_type } " )
927+ except KeyError :
928+ # pylint:disable = raise-missing-from
929+ raise ValueError ("[INTERNAL] Failed to get the root item from the simulation.json!!!" )
You can’t perform that action at this time.
0 commit comments