Summary by Kiril

We can control the IS through the Browser Console with a public API that could Get Current Step, Set Rotation, Get Rotation, Reorder Steps. We have delivered instructions generated from SolidWorks in the latest implementation of IS and IC. It is possible for every author to create a custom animation for their instructions using Blender.

Table of contents

[IC-1.2] Project general

We have new architecture, workflow to create and deliver Animations, generate Preview, migrated to Blender 2.81a, updated the structure of the map, some bug fixes and some other minor improvements. In total 20 cards were finished

Highlights


[IS-6.0] Show a loading progress

When a file is being loaded the user is being showed a progress bar.

Progres bar showing 24%


[IS-6.0-Fredi] Show the number of the step in the Steps Tree Viewer

The step number is now currently displayed in the is-stepstreeeditor

You can open an instruction like https://www.fllcasts.com/materials/846-bag-3-from-first-lego-league-2019-2020-city-shaper-challenge and in the Bill of Materials section you will see the tree with the step number

Screenshot from 2020-02-02 22-34-11.png


[IS-6.0-Fredi] Extract the listeners from global dev to is-global_iterator-dev and is-core-dev

There is a new GlobalIterator-Dev extension available at:
https://sf.robopartans.com/jenkins/view/IS/job/is-global_iterator-dev%20Build%20and%20Release/

This is its documentation
https://sf.robopartans.com/jenkins/view/IS/job/is-release_pack%20Build%20and%20Release/ws/docs/IS.GlobalIterator.Dev.GlobalIteratorListener.html


[IS-6.0-Fredi] Prepare an API for setting rotation of the steps directly in the browser while looking at the instructions

I have prepared an API call with which eng. Mitaka could rotate the steps. You can also see the rotation of the step.

UI is to follow. The call is

Set rotation

To execute the script
1. Open an instructions in SDK mode -> https://www.fllcasts.com/materials/846-bag-3-from-first-lego-league-2019-2020-city-shaper-challenge?mode=sdk
2. Open browser dev console
3. Type in


function r(rotation, stepNumber=undefined) {
const globalIterator = window["IS.GlobalIterator.Dev.GlobalIteratorListener"]["globalIterator"]
const scene = window["IS.BabylonScene.Dev.SceneListener"]["scene"]
const container = window["IS.GlobalIterator.Dev.GlobalIteratorListener"]["stepsContainer"]
if(stepNumber == undefined) {
stepNumber = globalIterator.getCurrentIndex()+1;
}
const stepName = container.get(stepNumber-1).getId()
const metadata = scene.getNodeByID(stepName).metadata
metadata.gltf.extras = (metadata.gltf.extras === undefined) ? {} : metadata.gltf.extras;
metadata.gltf.extras.ai3d = (metadata.gltf.extras.ai3d === undefined) ? {} : metadata.gltf.extras.ai3d;
metadata.gltf.extras.ai3d.rotation=rotation
const core = IS.AxlesIS.GetInstance().getCore();
core.scheduleNotify({"triedMoveIterator": new IS.GlobalIterator.TriedMoveEvent(1)})
core.scheduleNotify({"triedMoveIterator": new IS.GlobalIterator.TriedMoveEvent(-1)})
}

  1. Now you can rotate the step by calling


r("0 0 0")

To rotate specific


r("0 0 0",20)

where rotation is the rotation is "X Y Z"

Get rotation

To execute the script
1. Open an instructions in SDK mode -> https://www.fllcasts.com/materials/846-bag-3-from-first-lego-league-2019-2020-city-shaper-challenge?mode=sdk
2. Open browser dev console
3. Type in


function gr(stepNumber) {
const globalIterator = window["IS.GlobalIterator.Dev.GlobalIteratorListener"]["globalIterator"]
const container = window["IS.GlobalIterator.Dev.GlobalIteratorListener"]["stepsContainer"]
if(stepNumber == undefined) {
stepNumber = globalIterator.getCurrentIndex()+1;
}
const scene = window["IS.BabylonScene.Dev.SceneListener"]["scene"]
const stepName = container.get(stepNumber-1).getId()
const metadata = scene.getNodeByID(stepName).metadata
if(metadata.gltf && metadata.gltf.extras && metadata.gltf.extras.ai3d) {
return metadata.gltf.extras.ai3d.rotation
}
}

  1. Now you can get the rotation by calling


gr(1)

or if called without arguments it will have get the rotation of the current step


gr()


[IS-6.0-Fredi] Prepare an edit functionality for Instructions Authors

There is a public api implemented. In SDK mode A step could be moved by


const stepsLoadedEvents = window["IS.StepsTree.Dev.StListener"]["stepsTreeLoaded"]
const rootStep = stepsLoadedEvents[stepsLoadedEvents.length-1]["rootStep"]
const container = IS.TreeUtil.ContainerFromTree(rootStep, new IS.PostOrderTraverser(), function(step) {
return step.getId();
});
const history = IS.AxlesIS.GetInstance().getCore().getExtensionDefsForService("com.axlessoft.ai3d.is.commands.history")[0].getExtension();
const command = new IS.Commands.StepReorderCommand(container.get(stepPosition-1), container.get(parentPosition-1), newPosition-1)
history.execute([command])

To use the functionality.
1. Open instruction in SDK mode - https://www.fllcasts.com/materials/846-bag-3-from-first-lego-league-2019-2020-city-shaper-challenge?mode=sdk
2. Open browser console - "Ctrl+Shift+I".
3. Type in the following fragment


function m(stepPosition, parentPosition, newPosition) {
const stepsLoadedEvents = window["IS.StepsTree.Dev.StListener"]["stepsTreeLoaded"]
const rootStep = stepsLoadedEvents[stepsLoadedEvents.length-1]["rootStep"]
const container = IS.TreeUtil.ContainerFromTree(rootStep, new IS.PostOrderTraverser(), function(step) {
return step.getId();
});
const history = IS.AxlesIS.GetInstance().getCore().getExtensionDefsForService("com.axlessoft.ai3d.is.commands.history")[0].getExtension();
const command = new IS.Commands.StepReorderCommand(container.get(stepPosition-1), container.get(parentPosition-1), newPosition-1)
history.execute([command])
}
m(1,9,2)

  1. See how the instruction has changed - this will change the first and the second step Screenshot from 2020-02-03 09-54-30.png

[IS-6.0-Fredi] Create thumbnail for Fredi material

The fredi material has a thumbnail:
www.fllcasts.com/materials/950

Fredi-Rack-Material-Thumbnail


[IS-6.0] Fix event documentation

Improved documentation available with is-core 6.0.0.pre.95

Available at IS.CoreInitEvent

https://sf.robopartans.com/jenkins/view/IS/job/is-release_pack%20Build%20and%20Release/ws/docs/IS.CoreInitEvent.html