Git Product home page Git Product logo

thepipe's Introduction

Geometry Exchange with "ThePipe"

The Pipe is a series of plugins and extensions for various design and modeling applications intended to provide a channel for real time communication of geometry between these applications. It can also be used for real-time communication over a network between two machines. ThePipe is written to be flexible and easily extensible. As of now, only 4 applications are supported - Rhinoceros, Revit, Grasshopper and Dynamo.

This is a project under development and any contributions / ideas are always welcome. If you want to try the Pipe for yourself, then watch this video: https://www.youtube.com/watch?v=FNVJxAToKEA

If you are interested in developing your own application extensions or implementations of the pipe, please read this document, or watch this video:

https://www.youtube.com/watch?v=98e01zEeupE

The Data Model

The Pipe has its own data model used to transfer data. The data is converted from the application's native format into the PipeDataModel, communicated with the Pipe's counter part extension in the target application, which then converts the data into the native types of the target application.

All types communicated over the pipe implement the IPipeMemberType interface. ThePipe communicates the data in a tree data structure. You can also have your own data types that implement this interface sent over ThePipe.

Implementing new Pipes

All implementations of Pipe should have 3 methods (maybe different in the future, but the basic idea remains the same):

// This method should send the given data tree over the pipe.
void PushData(DataNode node);
// This should pull the data tree being sent over the pipe.
DataNode PullData();
// This is should close the pipe connection and free up any
// that were being used by the pipe.
void ClosePipe();

The implementations of these methods determine the exact mechanism of communication. The simplest implementations of the pipe in this repo use the NamedPipeServerStream to achieve interprocess communication. A demo implementation of the WebPipe sends the data to a url and can communicate it to other machines. But you are free to write your own pipe implementations.

Writing Pipe Extensions for other applications

The ends of the pipe, i.e. the parts that send and receive the data from / to applications are classed that implement the IPipeCollector (the sending application side) and IPipeEmitter (the receiving application side) interfaces. The IPipeCollector interface enforces methods to collect data from the application in its native format, converting it into the PipeDataModel and returning it. Similarly, The IPipeEmitter interface enforces methods that receive the data tree consisting of PipeDataModel objects, converting them into the native formats of the target application and delivering it to the user.

As long as these basic requirements are met, how the data is collected, converted and delivered is up to the specific implementations. But for convenience, the data model of ThePipe also comes with PipeConverter class, which can simplify the daunting task of data conversion by being able to automatically traverse inheritance trees of the source and target types of the conversion. You can look at the code to understand more clearly how it works.

Everything works together

When all the components described above are implemented and working properly, they can work together as shown by the schematic below.

The Schematic diagram showing the Architecture of ThePipe

thepipe's People

Contributors

ranjeethmahankali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.