Giter Site home page Giter Site logo

gh-svg's Introduction

#gh-svg


Note: This code is no longer under active development. See below for more details.

gh-svg is a plugin for exporting svg data from the Grasshopper and Rhino 3D modeling environments. The intent is work towards create greater interoperability between different geometry editing softwares using open-source data format standards, as well as making it easier to create dynamic interfaces for topics that rely heavily on illustration and geometry, such as architecture, urban design, industrial design, and data visualization.

Here's an example. And another example.

The Current State of this Software

March 26, 2016 --- I haven't worked on this code for years. This project has been abandoned. It was a neat experiment, but was a clunky implementation and is likely obselete today. Others have written better implementations. For example, the decodes library includes an svg io module.

March 7th, 2012 --- The export now supports arbitrary attributes, giving priority to ids and classes. I tested the attributes to see how well they could handle unicode text, just to be sure it wasn't creating another little ascii unicode death trap. I created a component for inputting css, javascript, and wrapping everything in html. I'm still not sure how NURBS curves should be handled, but for now it will default to approximating them with polylines to an input tolerance (which seems to work pretty well for illustration purposes). The whole thing runs pretty slow. It seemed to break down when writing only about 884 moderately complex polylines.

February 27th, 2012 --- I've now created some simple Dot and Polyline export examples. They are a little slow, but they work fine.

February 5th, 2012 --- I just made this repository for the project, and expect to develop the plugin over the next several months. If you are interested in this project, please 'watch' it here on Github.

Next Steps to Development

  • Point/Dot Export (Done!)
  • Polylines Export (Done!)
  • Viewport Projection (Done!)
  • Embedding arbitrary attributes (Done!)
  • Viewport Selection (ok, soon)
  • Curve Export (no beziers yet, but polyline approximation works)

But why?

Here’s why I think SVG is a good file format to export to:

  1. SVG can be read by any common browser, and therefore there is no need for special software to view it.
  2. SVG can be easily read and edited by most vector editing software, including Adobe Illustrator and many open source softwares. style information can be easily embedded in the geometry, or can be adjusted with a style sheet
  3. SVG is dynamic. This means I can create geometry with Rhino with embedded hypertext links, or I can use Javascript to display information when someone hovers their mouse over the geometry.

gh-svg's People

Contributors

bengolder avatar

Stargazers

 avatar 行动派 avatar Conlan Kreher avatar Boris Smirnov avatar  avatar Massimo Romanato avatar Patrick Kastner avatar  avatar Chen Ye avatar Dan Anthony avatar Maica avatar Philipp Kats avatar Michał Czeraszkiewicz avatar Lars van Vianen avatar Will Pearson avatar Kristoffer Josefsson avatar Philip Belesky avatar  avatar Ian Clark Smith avatar Kristoffer Negendahl avatar Dylan Powell avatar  avatar Alec Perkins avatar Glenn Y. Rolland avatar

Watchers

Philip Belesky avatar James Cloos avatar Saeran Vasanthakumar avatar Philipp Kats avatar Kristoffer Negendahl avatar Dan Anthony avatar  avatar Maica avatar

gh-svg's Issues

a test page that is more live

make an html template with javascript that auto-refreshes and then stream the svg data into the template from Grasshopper, to create a live html interface that can be adjusted with Grasshopper sliders.

create type mapping

Make a function with conditionals that maps incoming Rhino.Geometry classes to the appropriate svg tag rendering classes

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.