I have this intricate toposurface that I need to turn into a mesh, so I can later export this mesh as OBJ, or even turn into a mass form through DirectShape. But Dynamo keeps complaining:
Warning: Mesh.ByVerticesAndIndices expects argument type(s) (Point[], int[]), but was called with (Autodesk.DesignScript.Geometry.Point[], Autodesk.DesignScript.Geometry.IndexGroup[]).
Doesn’t mater if I Topography.Mesh or @Vikram_Subbaiah code. What is the trick to get a workable mesh or the correct information to create a workable one?
I’m sorry but I can’t upload the site. It’s a client information I’m not supposed to disclosure. My point isn’t the site actually: is the annoying multiple meshes thing with Dynamo. If I connect Topography.Mesh to any other node that works with meshes, the other node says the mesh is not the expected object.
I cannot extract the mesh with Topography.Mesh node and work this mesh later on. Is there any workaround?
Not sure if this will work, but you could try to recreate the topography by extracting the topography points and then try to get a mesh from the recreated topography (with slightly altered points).
I’m getting *"Warning: Topography.ByPoints operation failed. * One or more points shared the same XY location (even with different elevations). This is not permitted for topography surfaces. Parameter name: points"
Better this time! I could model the toposurface this time. However, when trying to export the mesh, I got Warning: Mesh.ExportMeshes expects argument type(s) (string, Mesh[]), but was called with (string, Autodesk.DesignScript.Geometry.Mesh).
for Dynamo it is not the same a Mesh than a toolkit Mesh, you have to convert mesh to toolkitmesh to be able to use the toolkit nodes.
You can convert the mesh with this code block by the way that I have been using before, same as @Vikram_Subbaiah last script shared. There is a node for that in Springs package as well, to convert the toolkit mesh to mesh, the opposite, as well, if you need.
Unfortunately that did not work for me, I understand the points are grouped and sorted by coordinates, you just flatten the results and create new topography, although @Vikram_Subbaiah moves to right side slightly the points, but in my case same result of polycurves may be branching
can this be a matter of decimals precision? I tried to use in the node group by key a key of the point but converted as string and I got less unique keys than points, that means some are very close to 3 decimals, what do you think about that?
I saw dynamo has precission until 0,0000.
May be the round to decimals be the solution?
I tried to see what happens with the points rounded to 4 digits, the result is that there are less unique points and also some points have same XY warning when trying to create topography from those new points.
I tried with 6 digits and I am allowed to create a new topography from new unique points but I get same warning of Polycurves may be BRANCHING. Should I simplify the topography somehow? is there any geometrical limit for a mesh with points that are very close to each other?