Hi There!
I ran the remesh example in RhinoVault_2 gitbook documentation and I get a ‘TypeError’. Unsure how to solve this as I do not understand what it’s complaining about.
code here:
https://app.gitbook.com/@blockresearchgroup/s/rv2/examples-1/advanced-accessing-data/triangulate-+-remesh
Error
TypeError: int() argument must be a string, a bytes-like object or a number, not ‘list’
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\ukeer\GitHub\CSD2\modules\week_9\discretization_voussoirs\02_remesh.py", line 20, in <module>
V, F = remesh (mesh.to_vertices_and_faces(), length)
File "C:\Users\ukeer\Anaconda3\envs\csdii\lib\site-packages\compas_cgal\meshing.py", line 41, in remesh
F = np.asarray(F, dtype=np.int32)
File "C:\Users\ukeer\Anaconda3\envs\csdii\lib\site-packages\numpy\core\_asarray.py", line 83, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.
Set up details
RV_2 version: RhinoVault2_v1.1.4
Window PC
Further, I now updated my RV2 to the latest version, I cloned and ran the example on the ITA20 workshop- leacture08 the remesh.py script. It works with the given British museum rv2 session file.
however, when I changed the the input file to another file (I used the armadillo.rv2 file) it fails again with the same error on running the remesh.py script.
I tried the alternate mathod using Proxy and running it from rhino. and I get the same error
File “C:\Users\ukeer\Anaconda3\envs\ITA20\lib\site-packages\compas\rpc\dispatcher.py”, line 149, in _call
data = function(*args, **kwargs)
File “C:\Users\ukeer\Anaconda3\envs\ITA20\lib\site-packages\compas_cgal\meshing.py”, line 41, in remesh
F = np.asarray(F, dtype=np.int32)
File “C:\Users\ukeer\Anaconda3\envs\ITA20\lib\site-packages\numpy\core_asarray.py”, line 83, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.
Could it be that the C++ build doesn’t match certain windows system’s binary file ?
I asked a colleague to run this on his mac and he gets the same error.
I have no understanding of why this works for the given input rv2 session file and not for anyother
Thanks for going through this long post.
what do you mean with "i tried it on armadillo.rv2
"? did you just replace form.json
with armadillo.rv2
or did you prerpocess the armadillo file to get the form out first and save to json like with the BM example?
Thanks for writing back
Yes I processed the armadillo.rv2 file like in the examples 1) 00_materialisation_data.py to get form.json (2) 01_materialisation_triangulate.py (3) and then input the from_trimesh.json to run the remesh script
Hi Keer. Can you upload the .json file?
Hi Chaoyu
you can find the .json file here
this is the input json file you will need to run
02a_materialisation_remeshed.py from leture08 ITA20 workshop
thanks for having a look
Hi, Keer. Is this mesh correct? The openings all have an additional face.
yes, those are the unloaded faces. they are necessary for the construction of form and force diagrams…
This issue is solved.
Solution:
After deleting the unloaded faces, I used unify_cycles and meshes_join_and_weld.
so no, just meshes_join_and_weld is enough. the unify_cycles is not necessary.
Hey!
I am struggling with a similar error, could you please help me resolve this error.
hi,
would you mind posting this in a new thread, because i don’t think the errors are related…
thanks!
Hey!
Thank for replying. Could you tell me who could be the right person/ team to help me out?