Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Geometry input

Parses JSON encoded geometry into geometry primitives.


Inputs

  • json geometry

    • The JSON encoded string that defines the geometry to parse. This can be a single polyline or PolyMesh, or an array of them.
      • Defaults to a flat, 1000 unit square polyline ({"id":"emptyPolyLine","points":[[0,0,0],[1000,0,0],[1000,1000,0],[0,1000,0],[0,0,0]]}) — despite the emptyPolyLine id, this is real geometry, not an absence of it.
  • geometry schema

    • An optional JSON schema to validate the incoming json geometry against. Leave this empty to parse the geometry without validating it.

Outputs

  • geometry

    • Output geometry primitives.
  • points

    • The list of points of the output primitives.
  • points.x

    • The list of x values of the points of the output primitives.
  • points.y

    • The list of y values of the points of the output primitives.
  • points.z

    • The list of z values of the points of the output primitives.

Note(s)

  • This node is how geometry authored outside of the graph gets into it — most graphs build every primitive they output, but a graph using this node instead reacts to whatever geometry it is given at compute time.

  • When a Live Component is applied to a face in SketchUp, that face is converted to JSON and enters the graph through this node.

  • The expected JSON format follows the polyline and PolyMesh definitions in the eidos-json-schema repository. Only those two primitive types are supported — a NURBS curve or NURBS surface cannot be parsed by this node.

  • Only point and face data comes through. Materials and attributes are not carried in, so anything like that has to be applied inside the graph.

  • Because json geometry is a plain string, geometry can be tested by pasting JSON directly into the input, without a host application supplying it.

  • Unlike the geometry asset node, which references geometry uploaded to the graph ahead of time as an asset, this node receives its geometry each time the graph computes.

  • A graph using this node should resolve sensibly when no geometry has been supplied to it — the default 1000 unit square polyline is what a graph sees before anything has been connected or applied.

  • Other names for this node include: GeometryInput.