Hi all,
I am moving TS vertices of a TS body several times, to project the TS body onto a Nurbs surface. The user can control the amount of iterations. The Python code is super simple (and probably bad, apologies for that, I am a beginner ) .
This works fine in general, but after some iterations, the code produces an “array index out of range” error, where I got no clue where it is coming from.
This bug seems to occur randomly, if I am not moving all CVs, sometimes the issue occurs earlier, sometimes not at all. For me, this seems to indicate that the the problem is either in Python, or the TS funcion .MoveVertices it is calling, and not in my (poor) code. Could someone please have look?
I have created a zip directory, which I am not allowed to upload, and I am also not allowed to upload any files, because I am “new”. Would appreciate it, if someone would make the effort of sending me a PN, so I can send the data.
Frustrated regards,
GG
nurbs_surface.sat (4.9 KB) projection_test.dyn (18.2 KB) ts_surface.sat (1.7 KB)
The ts_surface.sat needs to be renamed to ts_surface.tsm. @c.poupin could you initiate that .tsm and .tss become legal files to upload here? There are TSpline file formats which Dynamo can read and write.
Thanks,
GG
I’m looking into this, but we have to be cautious. Winds up that extension blocking is sort of a must from a safety standpoint - you’d be surprised at how many spam/malicious links we block every day…
In the meantime you can change the extension to somefile.tsm.txt.
Added .tss and .tsm to the list of approved extensions. This may be rolled back if someone smarter than I comes up with a good reason not to allow them.
@Mike.Buttery first of all thanks for looking into this! I know this is a lot to ask, especially with me not writing good code (yet). ;-(
Your code did not do what mine does, but it helped me to find the error: once the TS surface ends up on the reference, the projection attempt becomes null or an empty list. I tried to check for that, but obviously did not do so correctly. Today I did, and now it works fine.
Thanks so much for your quick help here, truly appreciate it!