Hi Everyone:
Continuing on from the last post, using the custom node that we created, this translation will show the surface trimmed from the intersections, for this very efficient compact DSS translation.
Once again starting with the usual introduction for a frame of reference.
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 #2. (Note that it can be not longer be found on the Autodesk Labs Website, as linked)
Copy and paste the script from (page 72) the Design Script Language Manual into the DesignScript Editor. Below shows the script in the DS Editor with the results of the code being run, and 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.
As in the previous translation, the custom node is required.
Once again it’s script is as follows.
def PointTransporter : Point[][](points : Point[][])
{
points[1][1] = points[1][1].Translate(0, 0, 2);
points[8][1] = points[8][1].Translate(0, 0, 2);
points[2][6] = points[2][6].Translate(0, 0, 2);
return = points;
}
“Enter & Save the above code in the Design Script Editor, which was named “PointTransporter” and added to the DSS library.”
The initial DSS translation is shown below.
Continuing on with the more detailed and defined translation with the renaming of the variables, identifying and referencing them with their corresponding nodes.
As a reminder, selecting the graphic window one can get an enlarged view of each snapshot.
Next is the “Node to Code” operation.
A little editing is desired.
The Graphic Window(s) that result from the script is shown below.
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.
2015_03_27-Chp-24_intersection_trim_selectTrim#a2
2013_11_25-Chp-24_intersection_trim_selectTrim#2
2014_03_22-Chp-24_intersection_trim_selectTrim#2a
2015_03_28-Chp-24_intersection_trim_selectTrim#2b
2015_03_27-Chp-24_intersection_trim_selectTrim.ds#2
The final post on this chapter is next.
Thanks for looking.
T!M