Tag Archives: DSE

#DesignScript -Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14 – Code to Node to Code

Hi Everyone:

This is the fourteenth of twenty-eight DesignScript Surface translations, from the Surface category of the DS Editor (DSE) Samples.

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle-ds#14

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle-ds#14

Open the file Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle.ds, in the DS Editor and run it. The script is shown below.

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle.ds#14

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle.ds#14

Now open DS Studio, copy & paste the DSE script,  Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle.ds, into a blank canvas.

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#a14

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#a14

Note the highlighted commenting out which must be deleted in order to activate the code.

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#a14-edited

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#a14-edited

Now comment out the “(import(ProGeometry.dll)” script as highlighted above.  It can now be run as a Code Block of script, before the translation to Nodes takes place.

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14

The preliminary translation is shown above, while the developed translation is shown below.

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14a

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14a

The red and yellow highlighted areas match the description and properties layout that is given to the script in the initial DS Editor *.ds file.

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14b

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14b

The “Node to Code” operation as shown above. The geometry that results from the various code translations is shown below.

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14a-Graphic Window

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14a-Graphic Window

Liberty was taken with making the color have some transparency as shown above in the graphic window.

DSS was run as a stand-alone application and the translation files are available to download from the DropBox links below.

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#a14

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14a

Geometry.Surface.Revolve.UsingProfileAxisOriginDirectionAngle#14b

Thanks for looking.

T!M

#DesignScript – Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#2- Code to Node to Code

 Hi Everyone:

This is the second of four DesignScript RevolvedSurface translations, from the Surface category of the DS Editor (DSE) Samples.

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle-ds#2

Open the file Geometry.Surface.RevolvedSurface.ByProfileAxisAngle.ds, in the DS Editor and run it. The script is shown below.

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle.ds#2

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle.ds#2

Now open DS Studio, copy & paste the DSE script, Geometry.Surface.RevolvedSurface.ByProfileAxisAngle.ds, into a blank canvas.

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#a2

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#a2

Note the highlighted commenting out which must be deleted in order to activate the code.

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#a2-edited

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#a2-edited

Now comment out the “(import(ProGeometry.dll)” script as highlighted above.  It can now be run as a Code Block of script, before the translation to Nodes takes place.

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#2

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#2

The preliminary translation is shown above, while the developed translation is shown below.

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#a2-left-top

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#a2-left-top

The red and yellow highlighted areas match the description and properties layout that is given to the script in the initial DS Editor *.ds file.

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#2b

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#2b

The “Node to Code” operation as shown above. The geometry that results from the various code translations is shown below.

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#a2-Graphic Window

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#a2-Graphic Window

Liberty was taken with making the color have some transparency as shown above in the graphic window.

DSS was run as a stand-alone application and the translation files are available to download from the DropBox links below.

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#a2

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#2

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#2a

Geometry.Surface.RevolvedSurface.ByProfileAxisAngle#2b

Thanks 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.CurveProject.OnPlane.WithDirectionVector#31– Code to Node to Code

Hi Everyone:

This is the thirty-first, in a series of forty-nine curve file translations. The file, Geometry.CurveProject.OnPlane.WithDirectionVector.ds, is the second in a series of three Curve-Project files from the DesignScript Editor (DSE) Sample files.

Geometry.CurveProject.OnPlane.WithDirectionVector.ds#31

Geometry.CurveProject.OnPlane.WithDirectionVector.ds#31

Open the file, Geometry.CurveProject.OnPlane.WithDirectionVector.ds in the DS  Editor and run it to check for errors.

Geometry.CurveProject.OnPlane.WithDirectionVector.ds-a#31

Geometry.CurveProject.OnPlane.WithDirectionVector.ds-a#31

Errors are generated due to “CurveProject.OnPlane.WithDirectionVector” not having the properties that are associated with them. Before looking viewing this in DSS, first the nodes must be translated.

Geometry.CurveProject.OnPlane.WithDirectionVector#31

Geometry.CurveProject.OnPlane.WithDirectionVector#31

After the initial translation, the errors appear when further defining the properties of Project-Curve.

Geometry.CurveProject.OnPlane.WithDirectionVector.ds-a#31-graph Node Errors

Geometry.CurveProject.OnPlane.WithDirectionVector.ds-a#31-graph Node Errors

We do note however, that these particular properties were able to be defined on the previous Curve-Project file, Geometry.CurveProject.OnPlane. The WithDirection Vector seems to be the problem. In order to complete the file, we can use the Project Curve Node as a stand-in for these subject nodes.

Geometry.CurveProject.OnPlane.WithDirectionVector#31a

Geometry.CurveProject.OnPlane.WithDirectionVector#31a

Again this is being brought to the attention of the DesignScript Team so these errors are appropriately addressed. Next is the translation of the Nodes back to code.

Geometry.CurveProject.OnPlane.WithDirectionVector#31b

Geometry.CurveProject.OnPlane.WithDirectionVector#31b

Other than the anomalies mentioned in this translation, further editing of the code isn’t required.

Geometry.CurveProject.OnPlane.WithDirectionVector#31-Graphic Window

Geometry.CurveProject.OnPlane.WithDirectionVector#31-Graphic Window

The results of the code(s) are shown in the Graphic Window above, and the files are available for downloading below.

Geometry.CurveProject.OnPlane.WithDirectionVector#31

Geometry.CurveProject.OnPlane.WithDirectionVector#31a

Geometry.CurveProject.OnPlane.WithDirectionVector#31b

Thanks for looking.

T!M

 

 

 

DesignScript Curve Translation,Geometry.CurvePointAtEqualArcLength#29– Code to Node to Code

Hi Everyone:

This is the twenty-ninth, in a series of forty-nine curve file translations. The file, Geometry.CurvePointAtEqualArcLength.ds is the last of three Curve-Point file types located in the DesignScript Editor (DSE) Sample files.

Geometry.CurvePointAtEqualArcLength.ds

Geometry.CurvePointAtEqualArcLength.ds

Open the DS Editor and run CurvePointAtEqualArcLength.ds, copy the resulting code, then paste it into a DS Studio blank canvas.

Geometry.CurvePointAtEqualArcLength#29

Geometry.CurvePointAtEqualArcLength#29

Comment out any script, to avoid them running consecutively with each other.

Geometry.CurvePointAtEqualArcLength#29a

Geometry.CurvePointAtEqualArcLength#29a

The highlighted portions indicate the grouping of node properties. Run the Code to Node operation.

Geometry.CurvePointAtEqualArcLength#29b

Geometry.CurvePointAtEqualArcLength#29b

Edit the Variable to be a single line of script.

Geometry.CurvePointAtEqualArcLength#29b-edited

Geometry.CurvePointAtEqualArcLength#29b-edited

And the geometry that results from the codes(s) is shown below.

Geometry.CurvePointAtEqualArcLength#29-Graphic Window

Geometry.CurvePointAtEqualArcLength#29-Graphic Window

The files can be downloaded from the links below.

Geometry.CurvePointAtEqualArcLength#29

Geometry.CurvePointAtEqualArcLength#29a

Geometry.CurvePointAtEqualArcLength#29b

Thanks for looking.

T!M

 

DesignScript Curve Translation, Geometry.Curve.PlaneAtDistanceWithPlaneSize #23– Code to Node to Code

Hi Everyone:

This is the twenty-third, in a series of forty-nine curve file translations. The file, Geometry.Curve.PlaneAtDistanceWithPlaneSize.ds is also the second of five Curve-Plane file types in the DesignScript Editor (DSE) Sample files.

Geometry.Curve.PlaneAtDistanceWithPlaneSize.ds#23

Geometry.Curve.PlaneAtDistanceWithPlaneSize.ds#23

Copy the code from the editor (DSE), open DS Studio’s ( DSS) canvas and paste the script into it. Below is the initial translation.

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23

And translating the sample file’s properties into graph nodes, the result is something similar to the view below.

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23a

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23a

Satisfied that the translation is complete, the nodes are converted back into code.

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23b

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23b

A little editing is called for as highlighted.

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23b-Edited

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23b-Edited

And with that, the Windows graphic that is generated is shown below.

Geometry.Curve.PlaneAtDistanceWithPlaneSize_Windows Graphic

Geometry.Curve.PlaneAtDistanceWithPlaneSize_Windows Graphic

The files can be downloaded from the Drop-Box links below.

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23a

Geometry.Curve.PlaneAtDistanceWithPlaneSize#23b

Thanks for looking.

T!M

DesignScript Curve Translation, Geometry.Curve.ParameterAt Distance#21– Code to Node to Code

Hi Everyone:

This is the twenty-first, in a series of forty-nine curve file translations. The file, Geometry.Curve.ParameterAt Distance.ds is from the DesignScript Editor (DSE) Sample files.

Geometry.Curve.ParameterAt Distance.ds#21b

Geometry.Curve.ParameterAt Distance.ds#21b

Copy the script from the DSE, open DSS and paste it into the canvas. Once again, the initial translation contains the essential elements.

Geometry.Curve.ParameterAt Distance#21

Geometry.Curve.ParameterAt Distance#21

One can let the script remain in the canvas, but be sure to comment it out so that it doesn’t run in tandem with the node Graph.

Geometry.Curve.ParameterAt Distance#21

Geometry.Curve.ParameterAt Distance#21

Note the grouping structure of the graph nodes reflect the commented out script from the DSE. Also be mindful that highlighted names had the code (” /*” and “// “) erased for graphical purposes.

When satisfied with the layout and definitions of the node, the translation to code can be administered.

Geometry.Curve.ParameterAt Distance#21b

Geometry.Curve.ParameterAt Distance#21b

The script that could use a little editing is highlighted.

Geometry.Curve.ParameterAt Distance#21b-edited

Geometry.Curve.ParameterAt Distance#21b-edited

The geometry that results from executing the file is shown in the graphical window below.

Geometry.Curve.ParameterAt Distance.ds#21b-Graphic Window

Geometry.Curve.ParameterAt Distance.ds#21b-Graphic Window

The files can be downloaded from the links below.

Geometry.Curve.ParameterAt%20Distance#21

Geometry.Curve.ParameterAt%20Distance#21a

Geometry.Curve.ParameterAt%20Distance#21b

Thanks for looking

T!M