Skip to content

How to use ScriptRunner output exactly? #3

Open
@ceremcem

Description

@ceremcem

I'm trying to port the node-occ-sample into my ScadaJS. Currently I could succesfully send the script from webapp (https://aktos.io/aecad/#/webcad), process in the server, then send back to the client (check console output after "Update model" in https://aktos.io/aecad/#/webcad):

[{"shapeType":"SOLID","orientation":"FORWARD","area":3528.0085499813376,"volume":1733.1119472303683,"numFaces":7,"numSolids":1,"numShells":1,"hasMesh":false,"faces":{"1:1:1:lateral":{"shapeType":"FACE","orientation":"FORWARD","area":1256.6370614359173,"numWires":1,"isPlanar":false,"hasMesh":false},"m1:m1:1:top:0:0":{"shapeType":"FACE","orientation":"FORWARD","area":59.690260418206094,"numWires":2,"isPlanar":true,"hasMesh":false},"1:m1:m2:lateral:0:0":{"shapeType":"FACE","orientation":"FORWARD","area":439.822971502571,"numWires":1,"isPlanar":false,"hasMesh":false},"1:m2:bottom:0":{"shapeType":"FACE","orientation":"REVERSED","area":160.22122533307947,"numWires":1,"isPlanar":true,"hasMesh":false},"2:1:1:lateral":{"shapeType":"FACE","orientation":"FORWARD","area":1130.9733552923253,"numWires":1,"isPlanar":false,"hasMesh":false},"2:m1:m2:lateral:0:0":{"shapeType":"FACE","orientation":"FORWARD","area":339.29200658769776,"numWires":1,"isPlanar":false,"hasMesh":false},"2:m2:bottom:0":{"shapeType":"FACE","orientation":"REVERSED","area":141.37166941154072,"numWires":1,"isPlanar":true,"hasMesh":false}},"cmd":"cut(\"e5e1a75a28e4d99a988b5a5935f0f092f812a358\",\"ac8a766f688c35bbdd1692a55f02110106619e3b\")","uuid":"5ecfee88fa8dc72c5aaf36a7469bd9e3069a2b1d"},{"shapeType":"SOLID","orientation":"FORWARD","area":3528.0085499813376,"volume":1733.1119472303678,"numFaces":7,"numSolids":1,"numShells":1,"hasMesh":false,"faces":{},"cmd":"translate#5ecfee88fa8dc72c5aaf36a7469bd9e3069a2b1d([21,0,0])","uuid":"41fddc8ae3ce286d0a614d6f02b76e89e75f9ad4"},{"shapeType":"SOLID","orientation":"FORWARD","area":3528.0085499813376,"volume":1733.1119472303683,"numFaces":7,"numSolids":1,"numShells":1,"hasMesh":false,"faces":{},"cmd":"translate#5ecfee88fa8dc72c5aaf36a7469bd9e3069a2b1d([-21,0,0])","uuid":"801814e7e1f159fd97ea2a24a7163514f7bdfa97"},{"shapeType":"SOLID","orientation":"FORWARD","area":3528.0085499813376,"volume":1733.1119472303674,"numFaces":7,"numSolids":1,"numShells":1,"hasMesh":false,"faces":{},"cmd":"translate#5ecfee88fa8dc72c5aaf36a7469bd9e3069a2b1d([0,-21,0])","uuid":"c143da69d0e58749b82d1195b99c1cdd25ac0c70"},{"shapeType":"SOLID","orientation":"FORWARD","area":3528.0085499813376,"volume":1733.1119472303683,"numFaces":7,"numSolids":1,"numShells":1,"hasMesh":false,"faces":{},"cmd":"translate#5ecfee88fa8dc72c5aaf36a7469bd9e3069a2b1d([0,21,0])","uuid":"7fa05590d0b9f6d05532d3b81c1587b10badfde8"}]

First I prepared a basic scene and then I tried to display those JSON objects when I received, but I can't manage to display the JSON (see https://stackoverflow.com/a/33615426).

After failing to upload the JSON output of ScriptRunner to https://threejs.org/editor/, I wanted to ask for your help.

What is the basic client setup for displaying the JSON output?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions