Monthly Archives: April 2014

DesignScript Curve Translation,Geometry.Curve.NormalAtDistance#18– Code to Node to Code

Hi Everyone:

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

Geometry.Curve.IsNormalAtDistance.ds-#18

Geometry.Curve.IsNormalAtDistance.ds-#18

This file is quite similar to the previous fourteenth file Geometry.Curve.DistanceAtParameter.ds., and after opening, copying the script from the DSE and pasting it into DSS, we see that this is the same short translation.

Geometry.Curve.IsNormalAtDistance#18

Geometry.Curve.IsNormalAtDistance#18

The initial translation is shown above.  The nodes properties and definitions contain the elements in the graphic shown below.

Geometry.Curve.IsNormalAtDistance#18a

Geometry.Curve.IsNormalAtDistance#18a

When satisfied with the translation, institute the “Code to Node” operation.

Geometry.Curve.IsNormalAtDistance#18b

Geometry.Curve.IsNormalAtDistance#18b

As highlighted a little editing might be desired.

013_04_03-Geometry.Curve.IsNormalAtDistance#18b

013_04_03-Geometry.Curve.IsNormalAtDistance#18b

The Geometry in the Graphic Window that the code generates is shown below.

Geometry.Curve.IsNormalAtDistance-Graphic Window

Geometry.Curve.IsNormalAtDistance-Graphic Window

And with that, the files are available to download from the links below.

Geometry.Curve.IsNormalAtDistance#18

Geometry.Curve.IsNormalAtDistance#18a

Geometry.Curve.IsNormalAtDistance#18b

Thanks for looking.

T!M

 

 

DesignScript Curve Translation,Geometry.Curve.IsPointOnCurve#17– Code to Node to Code

Hi Everyone:

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

Geometry.Curve.IsPointOnCurve.ds#17

Geometry.Curve.IsPointOnCurve.ds#17

This is a short translation. First open, then copy the script from the DSE. Then paste it into a blank DSS canvas. Starting the translation we get something like below.

Geometry.Curve.IsPointOnCurve#17

Geometry.Curve.IsPointOnCurve#17

Defining the translation further we get.

Geometry.Curve.IsPointOnCurve#17a

Geometry.Curve.IsPointOnCurve#17a

Once satisfied, translate the nodes to code.

Geometry.Curve.IsPointOnCurve#17b

Geometry.Curve.IsPointOnCurve#17b

The Windows graphic that is generated from the code is shown below.

Geometry.Curve.IsPointOnCurve-Graphic Window

Geometry.Curve.IsPointOnCurve-Graphic Window

The files can be downloaded from the links below.

Geometry.Curve.IsPointOnCurve#17

Geometry.Curve.IsPointOnCurve#17a

Geometry.Curve.IsPointOnCurve#17b

Thanks for looking.

T!M

 

 

DesignScript Curve Translation,Geometry.Curve.ExtrudeAtSurface#16– Code to Node to Code

 

Hi Everyone:

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

Geometry.Curve.ExtrudeAtSurface.ds#16

Geometry.Curve.ExtrudeAtSurface.ds#16

This translation brings one back to an earlier post on the Autodesk DesignScript Community Forum entitled “ Translating sample to DesignScript Studio “, actually it was the second translation post made and it is the same curve file as this one.

Noting that, a few things have change in terms of understanding what is important in DesignScript, and indeed probably in all scripting languages. That is having adequate description and naming to each piece of script, or nodes in our case. Something that was not clear to be important then, as it is now. Of course Sharad of Autodesk came to the rescue a few times in this process. Can’t thank him enough.

Geometry.Curve.ExtrudeAtSurface

Geometry.Curve.ExtrudeAtSurface

That was then, below is the initial translation.

Geometry.Curve.ExtrudeAtSurface#16

Geometry.Curve.ExtrudeAtSurface#16

Note that the previous translation was much more compact due to the bundling of coordinates, something that has not been used here to often. In fact the development looks something like below in the expansive interpretation that is being pursued.

Geometry.Curve.ExtrudeAtSurface#16a

Geometry.Curve.ExtrudeAtSurface#16a

Lets take a look at what would happen looking at the more compact method that coders would typically opt for. (I’m guessing about that )

Geometry.Curve.ExtrudeAtSurface#16a_alt

Geometry.Curve.ExtrudeAtSurface#16a_alt

What follows is the conversion back to code and taking a look at the two developed translations.

Geometry.Curve.ExtrudeAtSurface#16b-alt

Geometry.Curve.ExtrudeAtSurface#16b-alt

Then a little editing is in order as highlighted above.

Geometry.Curve.ExtrudeAtSurface#16b-alt-edited

Geometry.Curve.ExtrudeAtSurface#16b-alt-edited

Now compare the more compact version as shown above to the long translation shown in the “code to node” below.

Geometry.Curve.ExtrudeAtSurface#16b

Geometry.Curve.ExtrudeAtSurface#16b

Which is preferable?

And the resulting graphic is shown below.

Geometry.Curve.ExtrudeAtSurfac3-Graphic Window

Geometry.Curve.ExtrudeAtSurfac3-Graphic Window

For information purposes only, the more compact version shows a yellow extrusion, but it’s not being shown. (lol)

The files are available for downloading below.

Geometry.Curve.ExtrudeAtSurface#16

Geometry.Curve.ExtrudeAtSurface#16a

Geometry.Curve.ExtrudeAtSurface#16b

The more compact version is linked below.

Geo_curve_extrude_as_surface#16a

Geo_curve_extrude_as_surface#16b

Thanks for looking.

T!M

 

 

DesignScript Curve Translation,Geometry.Curve.DistanceAtPoint#15– Code to Node to Code

Hi Everyone:

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

Geometry.Curve.DistanceAtPoint.ds#15

Geometry.Curve.DistanceAtPoint.ds#15

After opening, copying the script from the DSE and pasting it into DSS, we see that this will again be a short translation.

Geometry.Curve.DistanceAtPoint#15

Geometry.Curve.DistanceAtPoint#15

Quickly, the translation looks like the graph node canvas that is shown above. After developing the nodes properties and definitions further, it will look similar to the layout below.

Geometry.Curve.DistanceAtPoint#15a

Geometry.Curve.DistanceAtPoint#15a

After the translation,  the “Code to Node” operation is performed.

Geometry.Curve.DistanceAtPoint#15b

Geometry.Curve.DistanceAtPoint#15b

The graphic that is generated from the file is shown below.

Geometry.Curve.DistanceAtPoint_Graphic Window

Geometry.Curve.DistanceAtPoint_Graphic Window

The files can be downloaded from the links below.

Geometry.Curve.DistanceAtPoint#15

Geometry.Curve.DistanceAtPoint#15a

Geometry.Curve.DistanceAtPoint#15b

Thanks for looking.

T!M

 

DesignScript Curve Translation,Geometry.Curve.DistanceAtParameter#14– Code to Node to Code

 

Hi Everyone:

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

Geometry.Curve.DistanceAtParameter.ds

Geometry.Curve.DistanceAtParameter.ds

After opening, copying the script from the DSE and pasting it into DSS, we see that this will be a short translation.

Geometry.Curve.DistanceAtParameter#14

Geometry.Curve.DistanceAtParameter#14

The initial translation looks something like shown above. After developing the nodes properties and definitions the canvas should contain the elements in the graphic shown below.

Geometry.Curve.DistanceAtParameter#14a

Geometry.Curve.DistanceAtParameter#14a

When sufficiently satisfied with the translation, institute the “Code to Node” operation.

Geometry.Curve.DistanceAtParameter#14b

Geometry.Curve.DistanceAtParameter#14b

One editing Variable is in order to get better clarity.

Geometry.Curve.DistanceAtParameter#14b-edited

Geometry.Curve.DistanceAtParameter#14b-edited

Now the Geometry in the Graphic Window that the code generates.

Geometry.Curve.DistanceAtParameter-Graphic Window

Geometry.Curve.DistanceAtParameter-Graphic Window

Ok then, that’s it, the files can be downloaded from the links below.

Geometry.Curve.DistanceAtParameter#14

Geometry.Curve.DistanceAtParameter#14a

Geometry.Curve.DistanceAtParameter#14b

Thanks for looking.

T!M