This is the second part of the translation from the fifteenth chapter of the DesignScript Language Manual. It can be found at DSLM (pages 47-49) and is entitled; Translation, Rotation, and Other Transformations. There also is a companion video tutorial entitled, Transform method (#11), which can be found in the DS website’s tutorials.
The initial manual translation was made on the Autodesk DesignScript Community Forum and DesignScript.org. Now it can be found at can be found at Chapter 15: Part 2; Translation, Rotation, and Other Transformations (Note that it can be not longer be found on the Autodesk Labs Website, as linked.)
Open the DS Editor and create a new file, lets copy and paste the second page of code from Chapter 15 (page 48) into the Editor. Separate the code by commenting out the “import” statements to avoid a editor malfunction. By activating the code in separate parts we can see the first page with the graphic window results as shown below.
This page shows at first the translation of the subject cube thru it’s coordinate identity to create a new scale. The bottom of the page shows how Sheared Coordinate systems created and it’s effect on the subject. One can note the error that is being drawn by the unsupported subdivision Mesh command.
Nonetheless copy and paste the script into a blank canvas in the DesignScript Studio program. Edited out the commenting out so the script will be activated, but first make sure that the “import” statements are commented out.
After commenting out the last bit of code then, the code-block is activated, and a result is obtained for the first portion of code. Developing and breaking out the script into code blocks is shown in the DS Studio canvas in it’s initial translation.
Here we are reminded that the SubDivisionMesh command failed, therefore a workaround is used thru specifying the faceIndices.
The more detailed and defined translation naming the variables illustrates this and also shows the development of the nodes identification.
Then with the naming and identifying complete, the “Node to Code” operation can take place.
A little editing is desired.
The Windows Graphic that is generated from the files.
The method that was used to derive the indices of the cube operations in this chapter is shown below.
This is what was posted on the original translation that can still be viewed over at the original designscript.ning.com website. We are going to go over this in the next posting, to clarify it further.
Note that colors were added in this translation, to highlight the geometry in the Graphic view window.
Reiterating, this was done on the stand-alone version of DesignScript, rather than as a plugin for AutoCAD. The files are available for downloading from the Drop-Box links below.
The third part of Chapter 15 will follow.
Thanks for looking.