The Structured Data Transfer Format (sdTF) is an API-neutral exchange and storage format for trees of data items as used by parametric 3D modeling software like Grasshopper®. This open, efficient, and easily extensible data format enables the exchange of complex data structures, independent of software vendors. See the sdTF documentation for more details.
This project provides a TypeScript SDK to interact with sdTF data structures, as well as multiple integrations. These pluggable integrations can be added to the SDK and provide a simple but powerful way to manage the mapping, validation and optimization of content data, leading to an improved user experience. The following list gives a brief overview of the individual components:
-
SDK v1 - Provides an easy-to-use, lightweight, cross-platform library to interact with sdTF files.
-
Primitives Integration - Extends the sdTF SDK and adds support for various primitive types.
-
Geometry Integration - Extends the sdTF SDK and adds support for various geometry types.
-
Rhino3dm Integration - Extends the sdTF SDK and adds support for rhino3dm.js components.
All listed JavaScript modules can be used in Node.js and modern Browsers, and are available through the npm registry.
By itself, the SDK does not know about any data type hints.
It simply returns the data as is with type unknown
and the responsibility of explicitly typing the data content is passed on to the user.
However, in some cases it is necessary to process or validate the data content, before returning it to the user or before writing it to the sdTF.
That is where integrations come into play.
sdTF integrations allow to process data with specific type hints in a more sophisticated way. They can be added to the sdTF SDK on demand to enable advanced reading and writing capabilities. This allows to process, map and validate content data to improve user experience or to optimize sdTF components.
Each integration handles only content data of specific type hints. The following integrations for common type hints have already been implemented and can be used when needed:
However, it is easily possible to implement new integrations of custom type hints. This template gives a brief overview of the required components and explains what is needed to start building a custom integration.
If you have questions, please use the ShapeDiver Help Center.
You can find out more about ShapeDiver right here.
This project is released under the MIT License.