This translation is from the twenty-fourth chapter of the DesignScript Language Manual and can be found at DSLM (pages 70-73) and is entitled; Intersection, Trim, and Select Trim. There is a companion video tutorial on Trim & Intersection(#17) which can be found on 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 24: Intersection, Trim, and Select Trim (Part 1A) . (Note that it can be not longer be found on the Autodesk Labs Website, as linked)
This chapter was broken down into multiple posts with the first translation a improvising attempt to first generate the surface, using points and lines for a scaffolding, (see chapter 22) then to intersect the result. Then there are three translations which use custom nodes which mirror the chapter with considerable ease compared to this initial interpretation.
First the script is copied and pasted from (page 71) the Design Script Language Manual into the DesignScript Editor. The illustration shown above is of the DS Editor and shows the results of the code being run, with the window graphics inserted alongside for reference.
Now open DesignScript Studio and paste this same script into the canvas. Note script is inactive as it has been commented out.
The script is then run, with the editing as shown above.
Continuing on with the translation, the script is broken off from it’s main code block and translated into singular code blocks.
The image below shows the failure in the translated points in the array, so the surface doesn’t fully form.
Generating a work-around to get a semblance of the bumped surface, it was decided to lay out a field of points, then create an outline which could be used as guidelines for lofting a similar surface.
The initial DS canvas is shown above.
Continuing on with the more detailed and defined translation with the naming of the variables, identifying and referencing them with their corresponding nodes. This is quite long and arduous, especially in light of the initial few lines of code that is the subject for translation into nodes.
As a reminder, selecting the graphic window one can get an enlarged view of each snapshot.
Continuing on to the “Node to Code” operation.
This very long resulting code block still requires editing so it was decided it would be more manageable to do so in the DS Editor.
One may readily identify the lines that require attention.
Finally the editing complete the code was again copied and pasted into a blank DS Studios canvas.
A selection of Graphics Windows that result from the script(s) are shown below.
Generating a scaffold.
Lofting the first section.
Lofting the 2nd section.
Completing the surface.
The final image with filled curves which are the translated intersections.
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 following posts on this chapter will show the custom node creation to successfully complete the translations.
Thanks for looking.