Skip to content

Import from TexGen weave does not work on PumaPy (Windows) #18

Description

@Alrnas

Hello There,
I have exported a 3D Weave form TexGen on Windows and tried to import it to PumaPy using the command below. I get the error message:
invalid literal for int() with base 10 as below. What is wrong here? Thank you. This is a simple test geometry based on your tutorial online.

command: file_path = os.path.join(r"C:\Users\Documents\PTL","test")
ws_NFR60 = puma.import_weave_vtu(file_path,from_texgen_gui=True)

ValueError Traceback (most recent call last)
Cell In[31], line 2
1 file_path = os.path.join(r"C:\Users\Documents\PTL","test")
----> 2 ws_NFR60 = puma.import_weave_vtu(file_path,from_texgen_gui=True)

File ~\AppData\Local\miniforge3\envs\puma\Lib\site-packages\pumapy\io\input.py:229, in import_weave_vtu(filename, from_texgen_gui)
227 dims = path.split(filename[:-4])[1].split('_')[-3:]
228 yarn_index = vtk_to_numpy(vtkobject.GetCellData().GetArray(0)) + 1
--> 229 ws = Workspace.from_array(yarn_index.reshape(int(dims[0]), int(dims[1]), int(dims[2]), order="F"))
231 if vtkobject.GetCellData().GetNumberOfArrays() >= 2:
232 if from_texgen_gui:
233 # ORIGINAL TEXGEN (GUI in Windows)
234 # Number Of Arrays: 6
(...) 239 # Array 4 name = SurfaceDistance (unnecessary)
240 # Array 5 name = Orientation <-- transferring to ws

ValueError: invalid literal for int() with base 10: 'test'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions