#DesignScript LM – Chapter 24 – Intersection, Trim, and Select Trim (Part 1A)

 

Hi Everyone:

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.

Chp_24 Intersection, Trim, and Select Trim_ds#1

Chp_24 Intersection, Trim, and Select Trim_ds#1

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.

Chp_24 Intersection, Trim, and Select Trim#1.a1

Chp_24 Intersection, Trim, and Select Trim#1.a1

Now open DesignScript Studio and paste this same script into the canvas. Note script is inactive as it has been commented out.

Chp_24 Intersection, Trim, and Select Trim#1.a1-edited

Chp_24 Intersection, Trim, and Select Trim#1.a1-edited

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.

Chp_24 Intersection, Trim, and Select Trim#1.1a1

Chp_24 Intersection, Trim, and Select Trim#1.1a1

The image below shows the failure in the translated points in the array, so the surface doesn’t fully form.

Chp_24 Intersection, Trim, and Select Trim#1.1a2

Chp_24 Intersection, Trim, and Select Trim#1.1a2

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.

Chp-24_intersection_trim_selectTrim-add_perimeter#1.1

Chp-24_intersection_trim_selectTrim-add_perimeter#1.1

The initial DS canvas is shown above.

Chp-24_intersection_trim_selectTrim-add_perimeter#1.1a

Chp-24_intersection_trim_selectTrim-add_perimeter#1.1a

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.

chp-24_intersection_trim_selectTrim-add_perimeter_1.1b-alt

chp-24_intersection_trim_selectTrim-add_perimeter_1.1b-alt

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.

Chp-24_intersection_trim_selectTrim-add_perimeter_ds#1.1

Chp-24_intersection_trim_selectTrim-add_perimeter_ds#1.1

One may readily identify the lines that require attention.

Chp-24_intersection_trim_selectTrim-add_perimeter_ds#1.1-edited

Chp-24_intersection_trim_selectTrim-add_perimeter_ds#1.1-edited

Finally the editing complete the code was again copied and pasted into a blank DS Studios canvas.

Chp-24_intersection_trim_selectTrim-add_perimeter#1.1b_via_ds-edited

Chp-24_intersection_trim_selectTrim-add_perimeter#1.1b_via_ds-edited

A selection of Graphics Windows that result from the script(s) are shown below.

Chp-24_intersection_trim_selectTrim-add_perimeter_1

Chp-24_intersection_trim_selectTrim-add_perimeter_1

Generating a scaffold.

Chp-24_intersection_trim_selectTrim-add_perimeter_2

Chp-24_intersection_trim_selectTrim-add_perimeter_2

Lofting the first section.

Chp-24_intersection_trim_selectTrim-add_perimeter_3

Chp-24_intersection_trim_selectTrim-add_perimeter_3

Lofting the 2nd section.

Chp-24_intersection_trim_selectTrim-add_perimeter_3

Chp-24_intersection_trim_selectTrim-add_perimeter_3

Completing the surface.

Chp-24_intersection_trim_selectTrim-add_perimeter_1.1-feature image

Chp-24_intersection_trim_selectTrim-add_perimeter_1.1-feature image

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.

2015_03_26-Chp_24 Intersection_Trim_SelectTrim#1.a1a-develop

2015_03_26-Chp_24 Intersection_Trim_SelectTrim#1.a1a-develop_1

2013_12_10-chp-24_intersection_trim_selectTrim-add_perimeter#1.1

2013_12_10-chp-24_intersection_trim_selectTrim-add_perimeter#1.1alt

2013_12_10-chp-24_intersection_trim_selectTrim-add_perimeter_1.1b-alt

2013_12_10-chp-24_intersection_trim_selectTrim-add_perimeter_1.1alt_b_via_ds

The following posts on this chapter will show the custom node creation to successfully complete the translations.

Thanks for looking.

T!M

 

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s