Git Product home page Git Product logo

speckleuserdatautils's Introduction

ARCHIVED - merged into speckleworks/SpeckleRhino

Speckle Data Utils

Create, Get and Set UserDictionary properties for various CommonObject types.

Why?

Speckle Server handles all these props. Woot!

Check the tutorial over on speckle.works to get started with using the Speckle Data Utils.

Component list and functionality:

Set User Data (SUD)

ZUI based, sets keys (either double, string or a another ArchivableDictionary) in a user dictionary if the object provided supports it. It's slightly aggressive, as it makes the following conversions in order to set the dictionaries:

  • Polyline, Circle, Rectangle => NurbsCurve
  • Box => Brep

Takes as inputs an object and a variable list of other keys.

Create User Data (CUD)

Creates a custom ArchivableDictionary based on the given inputs (either double, string or a another ArchivableDictionary). Can be used to create nested properties.

Get User Data (GUD)

Spits out an object's user dictionary (if any).

Expand User Data (EUD)

Expands a dictionary into its component keys (non-recursive).

Export to CSV (CSVUD)

Does what it says on the label, but recursively. Nested properties are handled: rootProp.childProp1.childProp2. If a dictionary does not have the respective key, null is placed. Right click and Save to file to save the output to a text file.

Export to JSON (JUD)

Spits out a json string of the dictionary array provided. Easy peasy. Right click and Save to file to save the output to a text file.

Filter by User Data (FUD) [DEPRECATED/NOT IN USE]

Given an object and a property key, it will search for that key in the user dictionary of the object. If it finds it, it outputs both the object as well as the property value. Subsequent filtering can be done via standard gh components. Previous keys are retained & filter operations can be chained.

speckleuserdatautils's People

Contributors

didimitrie avatar pearswj avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

pearswj

speckleuserdatautils's Issues

Enable setting of user data for all supported types

Will need to prevent gh autocasting to base types that loose their user dictionaries.
Essentially enable it for:

  • Point3d => Rhino.Geometry.Point
  • Arc => ArcCurve
  • Circle => ArcCurve
  • Polyline => Rhino.Geometry.Curve
  • ...

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.