Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store metadata for generating components in a JSON on Fusion360 #7

Open
kaitlynhova opened this issue May 31, 2017 · 0 comments
Open

Comments

@kaitlynhova
Copy link
Collaborator

We need to store the general configuration parameters for building a part in Fusion360. The overall idea is that each Fusion360 can have an assoicated JSON file that has stored metadata. When a user "registers" a Design with Shift, shift connects to Forge to looks JSON named "shift.json" linked to the selected part. If a componentID, the shift.json is upserted with _id: _componentID_ into the database (overwrite not merge).

The JSON has the following properties:

  • componentID - if left blank, shift will automatically create and add one when registering the component. Must be a valid uuid.
  • a list of parameters
    • each variable must have a type ('enum' or 'range')
    • each enum variable must specify the allowed values (Strings)
    • each range variable must specify the min/max/increment
  • environments a list of envs (eg. production, staging) that should expose this endpoint
  • main uuid of the script to run when the endpoint is called
  • version number (semvar)
  • a collection of tags (to be used for filtering for types of parts.
    • a tag is a valid javascript property name
    • the value of a tag must be a js primitive (e.g. string, number),
  • a license type
  • the responsible author
  • list of other authors
  • a config that is passed to the script when running this endpoint. Can be any valid JSON.
  • the engine to process this endpoint (which version of Shift to use)

Sample shift.json:

{
  "componentID": "37363985-5b94-4781-9433-a009a94c9b7c",
  "description" : "This is a really cool thing",
  "tags" : { "key1" : "value" , "key2" : "value" },
  "parameters": [  { "name": "handedness", "type": "enum", "values" : [ "l", "r"] } ,
                   { "name": "c1", "type": "range", "floor" : 12.0, "ceiling":  18.0, "step": 0.5 } ,
                ] ,
  "environments" : [ "production", "staging", "qa.1" ],
  "main" : "37363985-5b94-4781-9433-a009a94c9b7c",
  "version" : "0.0.1",
  "tags" : { "amputationLevel": "xra", "arbitraryTagX": "lame" },
  "license" : "GPL",
  "author" : { "name" : "Albert E.", "email", "[email protected]", "id" , "<shiftID>" }
  "contributors" : [ { "name" : "Wayne Newton", "email", "[email protected]", "id" , "<anotherShiftID>" },
  "config" : { },
  "engine" : "limbforge"
}

So I just looked through the description for a package.json to make this list.

@kaitlynhova What information should we add to support configuration of the front-end?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant