Hi All,
Wondering if any one can assist finding out weather it is possible to batch run “align vertices” for 1000’s of mesh models?
Many thanks in advance!
Cheers,
Michael
Hi All,
Wondering if any one can assist finding out weather it is possible to batch run “align vertices” for 1000’s of mesh models?
Many thanks in advance!
Cheers,
Michael
Hi Michael
It might be necessary to use rs.command('_AlignVertices(...)')
but I would say that’s possible.
James.
You can implement the Mesh.Vertices.Align
method in Python, this overload specficially:
Thanks @James_Parrott. And this sounds perfect @AndersDeleuran! But to be honest I have not very savvy, when it come to structuring code etc…How can I implement using python?
At best I can find what I need and copy,n,paste and run it, or make a custom button etc. haha!
Basically, I have 1000s of meshes that have been produced using Microstation, or some thing of the sorts. These models have worked fine in the past for texture mapping in various formats OBJ/FBX/3DS/3DM, but now there is a need to push them through RhinoInsideRevit… Even though the models were fit for purpose previously, now the slight incorrect geometries/vertices is causing it to fail in many cases.
I have found some basic ways to identify the bulk of the issues, but I am really trying to find a way to streamline the entire process. I have access to a thread ripper that I am planning on trying to run some sort of batch “fix-up”
Any further pointers on how I could achieve this would be greatly appreciated!
Cheers,
Michael
Hmm, I can’t actually seem to call that overload either! Anywho, here’s the other one implemented in a loop in GHPython. This seems to perform on par with the native compiled component, so it might be fast enough for your purposes if you implement it in a Rhino Python script/button:
230530_AlignVertices_00.gh (195.7 KB)
Thanks @AndersDeleuran, will leave it for tomorrow morning when I have some extra time and fresh eyes… Thanks for the pointers thus far mate, always great input!
Cheers,
Michael
No worries, I just had a fresh eyed look at the first overload I suggested. It’s quite a bit slower as it also aligns vertices in between meshes, but that might also be a requirement:
Note that the loop-based method likely could be threaded to speed things up. Edit: Here’s a quick example implementing .NET multithreading, quite a bit faster with this case: