TSpline node ToBrep crashes when feeding it with a "bad" T-Spline

Hi folks,
It can easily happen that you build curve networks that result in an “invalid” T-Spline body when using the BuildFromLines node. If you try to get the Nurbs surfaces from such an invalid body, Dynamo crashes:

crash-3.dyn (887.7 KB)
Please makes this node a little bit more robust. :slight_smile:
Thanks,
GG

PS: If you should need the original nodes which created the geometry inside of the Remember node, please let me know.

@solamour seems that this didn’t get the attention from the T-Spline team yet (or must this be solved in some other part of Dynamo?), can you please ping one of them here, to get their attention?

1 Like

We’re taking a look now @G-G :slight_smile:

@G-G so we took a look. There is indeed a bug :bug: here that we’ll need to address internally, but from your graph perspective you have effectively a T-Spline with zero faces, so you cannot convert them to a BREP.

If you look at the output from your TSplineSurface.BuildFromPipes node you’ll see it has zero edges and zero faces. Can you try play with that node first to ensure you get a valid surface? That should in theory not crash when plugging into the TSplineSurface.ToBrep node.

TSplines allow empty geometry as “legal”, which qualifies as an Empty output. However, it shouldn’t crash. That’s on us to fix.

Hi Sol,
Yes, I totally get that the body is invalid. :slight_smile: as mentioned, that can easily happen when handling complex list structures of curves. I got a working script which creates a valid TS body, and there I also get my wanted Nurbs representation. So my post here was all about the crash, as this means potential data loss (I sometimes forget to save my graphs before feeding input into such dangerous nodes :wink: ). Thanks!

1 Like