DesignScript Coordinate Translation #3, Code To Node

Once again, here is the next DesignScript Translation which can be found from the DS Editor program opening window when the program is run. DesignScript, a Autodesk standalone free program (or can be run as plugin for AutoCAD), can be downloaded from DesignScripts new home.

After posting these past two example translations and further climbing into the nuances of the example files, one begins to see the intent which wasn’t quite previously understood.

To the left on the image of the Graph Node window one can see inserted code notation (commented out) from the DesignScript Editor (DSE). It’s commented out because if it executes it will execute and the Graph Node version will run as well…this inevitably will cause a unstable environment and consequential crashes.

Notice the variable names; startPoint, pointOnCurve, endpoint, if one doesn’t have some sort of identifiable name then one will get names like Var10 or Var21 etc. It then will become difficult to identify what one is doing code wise. Looking at the original DS Editor file one notices this naming convention (see below)

This is what it looks like after copying and pasting it into the DS Studio Graph Window. (below)

So this is what the “myCSOrigin”…”myCSx”…”myCS”…y etc. is about, without it one tends to get lost in identifying and associating the bits of code (and node).

So consequently, this is what the DSS file “CoordinateSystem.AtParameter.UpVector.bin looks like when played out in a faithful translation (see below).

Here is the file in yet another form…the infamous (just joking) “Node to Code” form (see below).

Finally here is the image from the Graphic Window. (Note please that this is generated from the standalone version) (see below)