@@ -493,7 +493,7 @@ def _fill_bodies(self, body_guids: List[str], feat_host: Union[part.Part, part.P
493493 def _add_unique_ids (self ):
494494 scene_data = self .scene_link .get ()
495495
496- root_part_link = self .client . get_item ( key = scene_data .part_guid )
496+ root_part_link = self .client [ scene_data .part_guid ]
497497 root_part = root_part_link .get ()
498498 update_rp = False
499499 for sub_part in root_part .parts :
@@ -527,7 +527,7 @@ def _fill_features(self):
527527
528528 scene_data = self .scene_link .get ()
529529
530- root_part_link = self .client . get_item ( key = scene_data .part_guid )
530+ root_part_link = self .client [ scene_data .part_guid ]
531531 root_part_data = root_part_link .get ()
532532 root_part_feats = self .find (name = "" , feature_type = part .Part )
533533 root_part_feat = None
@@ -547,7 +547,7 @@ def _fill_features(self):
547547 if sp .description .startswith ("UniqueId_" ):
548548 idx = sp .description .find ("_" )
549549 sp_feat ._unique_id = sp .description [idx + 1 :]
550- sp_feat .part_link = self .client . get_item ( key = sp .part_guid )
550+ sp_feat .part_link = self .client [ sp .part_guid ]
551551 part_data = sp_feat .part_link .get ()
552552 sp_feat ._part_instance = sp
553553 sp_feat ._part = part_data # instead of sp_feat.reset() - this avoid a useless read in server
@@ -577,7 +577,7 @@ def _fill_features(self):
577577 self ._features .append (ssr_feat )
578578
579579 for sim_inst in scene_data .simulations :
580- simulation_template_link = self .client . get_item ( key = sim_inst .simulation_guid ) .get ()
580+ simulation_template_link = self .client [ sim_inst .simulation_guid ] .get ()
581581 if simulation_template_link .HasField ("direct_mc_simulation_template" ):
582582 sim_feat = simulation .Direct (project = self , name = sim_inst .name , simulation_instance = sim_inst , default_values = False )
583583 elif simulation_template_link .HasField ("inverse_mc_simulation_template" ):
@@ -631,9 +631,9 @@ def local2absolute(local_vertice: np.ndarray, coordinates) -> np.ndarray:
631631 part_coordinate = part_coordinate_info
632632 part_mesh_info = None
633633 for body_idx , body_guid in enumerate (part_data .body_guids ):
634- body_item_data = self .client . get_item ( body_guid ) .get ()
634+ body_item_data = self .client [ body_guid ] .get ()
635635 for face_idx , face_guid in enumerate (body_item_data .face_guids ):
636- face_item_data = self .client . get_item ( face_guid ) .get ()
636+ face_item_data = self .client [ face_guid ] .get ()
637637 vertices = np .array (face_item_data .vertices )
638638 facets = np .array (face_item_data .facets )
639639 vertices = vertices .reshape (- 1 , 3 )
@@ -668,12 +668,12 @@ def _create_preview(self, viz_args=None) -> pv.Plotter:
668668 viz_args = {}
669669 _preview_mesh = pv .PolyData ()
670670 # Retrieve root part
671- root_part_data = self .client . get_item ( self .scene_link .get ().part_guid ) .get ()
671+ root_part_data = self .client [ self .scene_link .get ().part_guid ] .get ()
672672
673673 # Loop on all sub parts to retrieve their mesh
674674 if len (root_part_data .parts ) != 0 :
675675 for part_idx , part_item in enumerate (root_part_data .parts ):
676- part_item_data = self .client . get_item ( part_item .part_guid ) .get ()
676+ part_item_data = self .client [ part_item .part_guid ] .get ()
677677 poly_data = self .__extract_part_mesh_info (part_data = part_item_data , part_coordinate_info = part_item .axis_system )
678678 if poly_data is not None :
679679 _preview_mesh = _preview_mesh .append_polydata (poly_data )
0 commit comments