T-Splines in 3dm files

hello! first of all thank you for sharing the opennurbs library!
i’m considering using the opennurbs library for geometry respresentation in our software and the last couple of days i’ve been busy exploring the given examples. A few questions remain concerning the i/o of opennurbs:

  1. is it possible directly to read igs and step files and parse them to the b_rep?
  2. what about t-spline support? I’ve read in a 3dm tspline file i created in rhino and it seems to work - but are tslpines supported by opennurbs? If they are supported, how can i access the tspline geometric data like local node vectors etc…

Kind Regards
Jasper B.

1 Like

If memory serves me T-Splines data is stored as custom plugin data, being opennurbs able to deal with the NURBS proxy used for display.

Hi Jasper,

The openNURBS toolkit is for reading and writing Rhino’s 3DM file format. The toolkit will neither read nor write IGES or STEP files.

As for T-Splines data embedded in 3DM files (or any other plug-in’s data), that data is private and the structure of the data is only known by the plug-in that wrote the data. Rhino looks at this type of data (user data) as just binary “goo”.

Hope this helps.

– Dale

Thanks a lot for the answers!
So that means i have to contact T-splines for the data storage information, so i can read the geometry - if they are willing to share these information…
Uff - these different file formats and conventions is a mess :frowning:

– Jasper

Maybe @tomfinnigan can help with this. If I’m not mistaken he works on T-Splines. I for one would be interested whether T-Splines data could be accessed from 3dm file data or from an SDK which is available through a license or otherwise.

Hi Jasper.

So, it is possible to extract the t-spline data out of a 3dm. It is kind of a pain though. Specifically, we went through lots of different variations for how to store t-spline data in a 3dm, and 2.x was backwards compatible with 1.x files, and 3.x is backwards compatible to 2.x files. Oh, and 1.5 could read 2.x files. Anyhow, it’s nice for end users, but the storage mechanism is quite complex at this point.

However, you may or may not need to deal with all that stuff. What are you trying to do with the T-spline data? Are you able to read .tsm files? Have you seen the .iga export?

In a 3dm file, the T-spline data is stored as UserData attached to either an ON_Brep or an ON_Mesh, depending on whether you’re in box mode or smooth mode when you save. The ON_Brep is a conversion of the T-spline, so if you’re just looking for display, then that would be sufficient. The ON_Mesh is the same as the control cage - there is n-gon information if necessary, but that is standard in ON_Meshes now.

If you’re trying to do much more than that with T-splines then you will probably want to talk with Matt Sederberg about licensing the tslib library. Honestly I’m not sure how open to licensing it is, but if you do license it I have code which will read T-splines out of 3dms.

Hi Tom,

thank you for the information.
Actually we want to use the tsplines not for creating geometries or in a CAD context - but for simulations (elastodynamic, fluid dynamic a.s.o) wiith the possibility of user interaction. The procedure is somehow similar to the IGAFEM and IGABEM, but we need the geomtric information to be pushed to our drawing OpenGl/Tesselation interface at interactive framerates. We are currently trying to generalize our geomtric representation to allow for Nurbs, Tsplines and Subdivision surfaces and that is where the problems start… If i’m correct, there is no standard Tspline format and Tsplines are not natively supported by any CAD Software, but only via pluigins?
The only approach that seems to be possible is to use the IGA format of rhino to export the bezier extraction of the tspline grid and reconstruct the geometric information needed to make it usefull for our software. This approach is somehow not very convenient .-)
i’m not sure if there are any file formats, that support all these geometric representations?

–Jasper

Hi Jasper,

Okay, that makes sense. The .iga format can be used to create display meshes as well as for isogeometric analysis. The .iga format can also be used to represent NURBS surfaces I believe. Catmull-Clark subdivision surfaces can also be represented by T-splines, although there is some approximation near star points / singularities.

However .iga is a strongly opinionated format, in that it assumes that everything can be expressed as a finite number of Bezier surface elements, where the Bezier surface control points are linear combinations of other control points. Subdivision surfaces near a star point are actually an infinite series of smaller and smaller Bezier patches, which is not representable by the .iga format. That’s also why we do approximation when we use a T-spline as a subdivision surface.

In terms of file format, there are two file formats in use by T-splines - .tsm and .tss. .tsm is a single object, and .tss contains other objects, like curves and simple nurbs surfaces. The Rhino plugin can export either of these. Neither of the formats contain enough information about T-splines to directly use for IGA, you’d need something to extract Beziers from the T-spline control mesh. That operation is not trivial, unfortunately.

As for what CAD software natively supports T-splines, Autodesk owns the T-splines library, and is including it in various of their products. It’s currently available as a native surface type in Fusion 360. Other products are going to be released that integrate it as well, but I don’t think the details are public yet.

You might also want to get in touch with Mike Scott at BYU, if you aren’t already. He’s the one that created the .iga file format.

Hi Tom,

the generalization of faces for T-splines and Subdivision surfaces near the star points is the single problem remaining. What i wanted to do is a is to use the same technique for both of them, to keep things simple. That means a hierachical bezier patch structure based on adaptive/local subdivision near the star points and the use of gregory patches adjacent to star points, with the desired accuracy controlling the level of subdivisions. Therefore i think it would be great if it would be possilbe to extract the tspline data from 3dm files - or to write another bezier extraction format with a little more information on the mesh given.

– Jasper

If that’s what you want to do, I’d suggest setting the star smoothness setting as high as you want (it’s in the t-splines display options) and export a .iga. (If for some reason the subdivisions don’t show, you could always do the subdivisions near star points manually with tsSubdivideFaceExact).

This should be the same representation for subdivision surfaces converted to t-splines and more general t-splines.

hello tom ,
where can i get the information about the .iga format?Could you please give me a link?thank you
–Jeff

How about this:

Dear Tom, for my isogeometric analysis code, I need to extract Bezier surfaces from (trimmed) iges files. For this purpose, the proper way would be to convert the trimmed nurbs surfaces to TSplines then extract Bezier surfaces. The outcome can then be saved in iges format using entity 128. Is there a way to do this in Rhino or is there any other software or CAD converter that you know can do that?
Hadi

Converting from trimmed surfaces to untrimmed surfaces is, as far as I’m aware, still an unsolved research problem. Some approximation is going to be necessary. There was a paper on this at Siggraph (pdf) several years ago, but I’m sure the IGA community has made more progress since then. That paper might be helpful as a starting point, to look for citations, but only as a starting point.

Dear Tom, thanks for your answer. I know the paper. In fact, I found out in the meantime that Matt Sederberg, the son of Tom Sederberg, together with a renowned group of scientists founded coreform, aiming at bridging the gap between CAD and IGA. They are going to release USplines which can be directly used as input for IGA up to three-dimension. see https://coreform.com/technology/u-splines

Would anyone know why any geometry created in T splines is not saving? Everything works fine but when I reopen my Rhino 5 file everything that was a t spline geometry disappears? Help!
Any suggestions appreciated, lost a lot of modeling work today :frowning:

Hi - Please contact support at Autodesk for issues with T-Splines.
Thanks,
-wim

IIRC T-Splines was x64 only? Make sure the default app for 3DM-Files is Rhinoceros 3D (x64) or the Rhino version which has the T-Splines Plug-In installed.

Thank you yes I’m on 64. I seem to have solved it for now, works fine u less I have another file linked in a a reference.