Monthly Archives: May 2014

DesignScript Curve Translation, Geometry.Curve.RevolveAsSolid.StartSweep#37– Code to Node to Code

Hi Everyone:

This is the thirty-seventh, in a series of forty-nine curve file translations. The file Geometry.Curve.RevolveAsSolid.StartSweep.ds is the fourth of eight Curve-Revolve file types and among those eight, the last of four Curve-Revolve-As-Solid files located in the DesignScript Editor (DSE) Sample files.

Geometry.Curve.RevolveAsSolid.StartSweep.ds#37

Geometry.Curve.RevolveAsSolid.StartSweep.ds#37

Open the DS Editor and copy the script generated from Geometry.Curve.RevolveAsSolid.ProfileAxis.ds. Open DS Studio, and paste the DSE script into a blank canvas.

Geometry.Curve.RevolveAsSolid.StartSweep#37

Geometry.Curve.RevolveAsSolid.StartSweep#37

The preliminary translation looks like the canvas shown above and the developed one is below.

Geometry.Curve.RevolveAsSolid.StartSweep#37-a

Geometry.Curve.RevolveAsSolid.StartSweep#37-a

The red and yellow highlighted areas indicate the groupings of nodes according to their properties. Once satisfied that the translation is complete the “Node to Code” operation can take place.

Geometry.Curve.RevolveAsSolid.StartSweep#37b

Geometry.Curve.RevolveAsSolid.StartSweep#37b

The script that results from the operation doesn’t require further editing. The geometry that results from the codes(s) is shown below.

Geometry.Curve.RevolveAsSolid.StartSweep#37-Graphic Window

Geometry.Curve.RevolveAsSolid.StartSweep#37-Graphic Window

The files are available to download from the Drop-Box links below.

Geometry.Curve.RevolveAsSolid.StartSweep#37

Geometry.Curve.RevolveAsSolid.StartSweep#37a

Geometry.Curve.RevolveAsSolid.StartSweep#37b

Thank for looking.

T!M

DSLM-Chapter Nine Translation-Numbers Types

Hi Everyone:

Here is a DesignScript update to the posting on Chapter 9 of the DSLM-Number Types, which was initially posted over on the Autodesk DesignScript Community Forum and entitled Code to Node, Translation on Numbers, Chapter 9.

The initial translation is duplicated below.

Chapter_9-Number Types

Chapter_9-Number Types

The DesignScript translation has been refined with more detail regarding naming of the nodes and adding a breakdown of the graph for clarity.

Chapter_9-Number Types_a

Chapter_9-Number Types_a

The above DS node graph in turn was translated back into code using the “Node to Code” operation as shown below.

Chapter_9-Number Types_b

Chapter_9-Number Types_b

As highlighted in the translation back to code, quite a bit of editing is desired to eliminate the Variable numbers, and or replacing them, as they prove to be unnecessary to the codes operation.

Chapter_9-Number Types_b-edited

Chapter_9-Number Types_b-edited

The editing was done, and the highlighted translations layout shown above, is similar to the DSS node-Graph layout and was done for instructional value.

While there isn’t a graphic for the DS graphic window, what has been done here is to take the original script from Chapter 9, Number Types, and get the text of the code to be printed in DSS Graph Window, echoing the DS Editor.

Chapter_9-Number Types-Graphic Window

Chapter_9-Number Types-Graphic Window

For those that are interested on how this was done, a “over the top” DSS canvas is shown below.

Chapter9-NumbersForStudio-3

Chapter9-NumbersForStudio-3

Attempts will be made to get this unwieldy DSS text operation a little more manageable. We shall see.

The DSS files, including the “text” one are available for downloading via DropBox links below.

Chapter_9-Number#Types

Chapter_9-Number#Types_a

Chapter_9-Number#Types_b-edited

Chapter9-NumbersForStudio

Thanks for looking.

T!M

 

 

DesignScript Curve Translation, Geometry.Curve.RevolveAsSolid.ProfileAxis#36– Code to Node to Code

Hi Everyone: This is the thirty-sixth, in a series of forty-nine curve file translations. The file Geometry.Curve.RevolveAsSolid.ProfileAxis.ds is the third of eight Curve-Revolve file types and among those eight, the third of four Curve-Revolve-As-Solid files located in the DesignScript Editor (DSE) Sample files.

Geometry.Curve.RevolveAsSolid.ProfileAxis.ds

Geometry.Curve.RevolveAsSolid.ProfileAxis.ds

Open the DS Editor and copy the script generated from Geometry.Curve.RevolveAsSolid.ProfileAxis.ds. There is a slight discrepancy in this DS file from the Editor.

Geometry.Curve.RevolveAsSolid.ProfileAxis.ds#36-error

Geometry.Curve.RevolveAsSolid.ProfileAxis.ds#36-error

The highlighted start angle and sweep angle are not required in the RevolveAsSolid.ProfileAxis.ds node. This is a slight error which is more of a house keeping issue, but nonetheless an error. Onwards, run DS Studio, and paste the DSE script into the canvas.

Curve.RevolveAsSolid.ProfileAxis.ds

Curve.RevolveAsSolid.ProfileAxis.ds

The preliminary translation looks like the canvas shown above and the developed one below.

Geometry.Curve.RevolveAsSolid.ProfileAxis-36a

Geometry.Curve.RevolveAsSolid.ProfileAxis-36a

The red and yellow highlighted areas indicate the groupings of nodes according to their properties. Once satisfied that the translation is complete the “Node to Code” operation can take place.

Geometry.Curve.RevolveAsSolid.ProfileAxis-36b

Geometry.Curve.RevolveAsSolid.ProfileAxis-36b

The script that results from the operation doesn’t require further editing. The geometry that results from the codes(s) is shown below.

Geometry.Curve.RevolveAsSolid.ProfileAxis-Windows Graphic

Geometry.Curve.RevolveAsSolid.ProfileAxis-Windows Graphic

The files are available to download from the Drop-Box links below. Geometry.Curve.RevolveAsSolid.ProfileAxis#36 Geometry.Curve.RevolveAsSolid.ProfileAxis#36a Geometry.Curve.RevolveAsSolid.ProfileAxis#36b Thanks for looking. T!M

DesignScript Curve Translation, Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35– Code to Node to Code

Hi Everyone:

This is the thirty-fifth, in a series of forty-nine curve file translations. The file Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle.ds is the second of eight Curve-Revolve file types and among those eight, the second of four Curve-Revolve-As-Solid files located in the DesignScript Editor (DSE) Sample files.

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle.ds#35

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle.ds#35

Open the DS Editor and copy the script generated from Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle.ds. Then run DS Studio, and paste the script into the canvas.

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35

Make sure that the script is commented out as the code is translated into graph nodes, to avoid them running consecutively with each other. The preliminary translation looks like the canvas shown above and the developed one below,

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35a

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35a

The red and yellow highlighted areas indicate the groupings of nodes according to their properties. Once satisfied that the translation is complete enact the “Node to Code” operation.

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35b

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35b

The resulting script doesn’t require further editing. The geometry that results from the codes(s) is shown below.

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35-Graphic Window

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35-Graphic Window

A word of note, the commentary here is taken from a previous post and this was all done with the  Stand-Alone version of DesignScript. (DSS &DSE)

And with that, the files are available for downloading at the Drop-Box links below.

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35a

Geometry.Curve.RevolveAsSolid.AxisPointDirectionSweepAngle#35b

Thanks for looking.

T!M

 

DesignScript Curve Translation, Geometry.Curve.RevolveAsSolid.AxisPointDirection#34– Code to Node to Code

 

Hi Everyone:

This is the thirty-fourth, in a series of forty-nine curve file translations. The file Geometry.Curve.RevolveAsSolid.AxisPointDirection.ds is the first of eight Curve-Revolve file types and among those eight, the first of four Curve-Revolve-As-Solid files located in the DesignScript Editor (DSE) Sample files.

Geometry.Curve.RevolveAsSolid.AxisPointDirection.ds#34

Geometry.Curve.RevolveAsSolid.AxisPointDirection.ds#34

Open the DS Editor and copy the script generated from Geometry.Curve.RevolveAsSolid.AxisPointDirection.ds. Then run DS Studio, and paste the script into the canvas.

Geometry.Curve.RevolveAsSolid.AxisPointDirection

Geometry.Curve.RevolveAsSolid.AxisPointDirection

Make sure that the script is commented out as the code is translated into graph nodes, to avoid them running consecutively with each other. The preliminary translation looks like the canvas shown above and the developed one below,

Geometry.Curve.RevolveAsSolid.AxisPointDirection#34a

Geometry.Curve.RevolveAsSolid.AxisPointDirection#34a

The red and yellow highlighted areas indicate the groupings of nodes according to their properties. Once satisfied that the translation is complete enact the “Node to Code” operation.

Geometry.Curve.RevolveAsSolid.AxisPointDirection#34b

Geometry.Curve.RevolveAsSolid.AxisPointDirection#34b

The resulting script doesn’t require further editing. The geometry that results from the codes(s) is shown below.

-Geometry.Curve.RevolveAsSolid.AxisPointDirection-Graphic Window

-Geometry.Curve.RevolveAsSolid.AxisPointDirection-Graphic Window

A word of note, the commentary here is taken from a previous post, and this was all done with the Stand-Alone Version of DesignScript.

And with that, the files are available for downloading at the Drop-Box links below.

Geometry.Curve.RevolveAsSolid.AxisPointDirection#34

Geometry.Curve.RevolveAsSolid.AxisPointDirection#34a

Geometry.Curve.RevolveAsSolid.AxisPointDirection#34b

Thanks for looking.

T!M

 

 

DesignScript Curve Translation, Geometry.Curve.Reverse#33– Code to Node to Code

Hi Everyone:

This is the thirty-third, in a series of forty-nine curve file translations. The file, Geometry.Curve.Reverse.ds is from the DesignScript Editor (DSE) Sample files.

Geometry.Curve.Reverse.ds#33

Geometry.Curve.Reverse.ds#33

After copying the script from the DSE, open DSS and paste it into the canvas. The initial translation contains the essential elements as shown below.

Geometry.Curve.Reverse#33

Geometry.Curve.Reverse#33

After satisfied with the initial translation, progress to the naming of variables and adding definition to the nodes properties.

Geometry.Curve.Reverse#33a

Geometry.Curve.Reverse#33a

The highlighted areas above shows the grouping of the properties of nodes that are returned based upon the method for Reverse-Curve. Note however that due to the fact that the Translate node is being used and it is called for just prior for the generation of the properties  that a work around was required, other wise an error would result as shown below.

Geometry.Curve.Reverse#33-Graphic error

Geometry.Curve.Reverse#33-Graphic error

Now if one wanted to rename the Translate node to say ReverseCurve and generate the various properties off of it one could avoid the error and get similar results. See below.

Geometry.Curve.Reverse#33-Graphic alternative

Geometry.Curve.Reverse#33-Graphic alternative

While this code works well unaltered running as a script in the DS Editor, the initial interpretation was to use the Set Union Node as a method to generate the ReverseCurve properties. (see Geometry.Curve.Reverse#33a image above)

Based on that alternative and proceeding on with the transformation back to Code we get the translation below.

Geometry.Curve.Reverse#33b

Geometry.Curve.Reverse#33b

No further editing is needed to the script, The Geometry that results from code(s) is shown below.

2013_12_23-Geometry.Curve.Reverse#33-Graphic Window

2013_12_23-Geometry.Curve.Reverse#33-Graphic Window

The files are available to download from the Drop-Box links below.

Geometry.Curve.Reverse#33

Geometry.Curve.Reverse#33a

Geometry.Curve.Reverse#33.b

Thanks for looking.

T!M