unstructured_grids icon indicating copy to clipboard operation
unstructured_grids copied to clipboard

Importing a polyMesh with baffle type face zones fail

Open tkeskita opened this issue 2 years ago • 0 comments

Importing a polyMesh with baffles (patches with overlapping boundary faces) fail. Buest guess for failure is overlapping faces with shared vertices, which Blender does not allow. The error seen in debug printouts is as follows, and the boundary faces show incorrect materials --> indexing is messed up.

Python: Traceback (most recent call last):
  File "/home/x/.config/blender/2.93/scripts/addons/unstructured_grids/io_polymesh.py", line 80, in execute
    read_polymesh_files(self)
  File "/home/x/.config/blender/2.93/scripts/addons/unstructured_grids/io_polymesh.py", line 103, in read_polymesh_files
    polymesh_to_ugdata(self)
  File "/home/x/.config/blender/2.93/scripts/addons/unstructured_grids/io_polymesh.py", line 215, in polymesh_to_ugdata
    apply_materials_to_boundaries(ob)
  File "/home/x/.config/blender/2.93/scripts/addons/unstructured_grids/io_polymesh.py", line 591, in apply_materials_to_boundaries
    ob.data.polygons[facecount].material_index = mati
IndexError: bpy_prop_collection[index]: index 12061 out of range, size 12061

tkeskita avatar Oct 23 '22 06:10 tkeskita