This is the sixteenth, in a series of forty-nine curve file translations. The file, Geometry.Curve.ExtrudeAtSurface.ds, is from the DesignScript Editor (DSE) Sample files.
This translation brings one back to an earlier post on the Autodesk DesignScript Community Forum entitled “ Translating sample to DesignScript Studio “, actually it was the second translation post made and it is the same curve file as this one.
Noting that, a few things have change in terms of understanding what is important in DesignScript, and indeed probably in all scripting languages. That is having adequate description and naming to each piece of script, or nodes in our case. Something that was not clear to be important then, as it is now. Of course Sharad of Autodesk came to the rescue a few times in this process. Can’t thank him enough.
That was then, below is the initial translation.
Note that the previous translation was much more compact due to the bundling of coordinates, something that has not been used here to often. In fact the development looks something like below in the expansive interpretation that is being pursued.
Lets take a look at what would happen looking at the more compact method that coders would typically opt for. (I’m guessing about that )
What follows is the conversion back to code and taking a look at the two developed translations.
Then a little editing is in order as highlighted above.
Now compare the more compact version as shown above to the long translation shown in the “code to node” below.
Which is preferable?
And the resulting graphic is shown below.
For information purposes only, the more compact version shows a yellow extrusion, but it’s not being shown. (lol)
The files are available for downloading below.
The more compact version is linked below.
Thanks for looking.