Tag Archives: Graph Node

DesignScript Curve Translation,Geometry.Curve.PlanesAtParameter.WithSize#25– Code to Node to Code

Hi Everyone:

This is the twenty-fifth, in a series of forty-nine curve file translations. The fileGeometry.Curve.PlanesAtParameter.WithSize.ds is also the fourth of five Curve-Plane file types in the DesignScript Editor (DSE) Sample files.

Geometry.Curve.PlanesAtParameter.WithSize

Geometry.Curve.PlanesAtParameter.WithSize

Open the file,  Geometry.Curve.PlanesAtParameter.WithSize.ds  from the samples in the DS Editor. Copy the script and then open DSS and paste the code into the canvas. The initial translation is shown below.

Geometry.Curve.PlanesAtParameter.WithSize

Geometry.Curve.PlanesAtParameter.WithSize

Continue translating the properties from the DSE script, until complete.

Geometry.Curve.PlanesAtParameter.WithSize#25a

Geometry.Curve.PlanesAtParameter.WithSize#25a

Next,  initiate the Node to Code operation and get the translation shown below.

Geometry.Curve.PlanesAtParameter.WithSize#25b-edit

Geometry.Curve.PlanesAtParameter.WithSize#25b-edit

And the highlighted script is edited with the results shown below.

Geometry.Curve.PlanesAtParameter.WithSize#25b-edited

Geometry.Curve.PlanesAtParameter.WithSize#25b-edited

The geometry that results from the code is shown below.

Geometry.Curve.PlanesAtParameter.WithSize-Graphic Window

Geometry.Curve.PlanesAtParameter.WithSize-Graphic Window

And the files are available for downloading from the DropBox links below.

Geometry.Curve.PlanesAtParameter.WithSize#25

Geometry.Curve.PlanesAtParameter.WithSize#25a

Geometry.Curve.PlanesAtParameter.WithSize#25b

Thanks for looking.

T!M

 

 

DesignScript Curve Translation, Geometry.Curve.NormalAtPoint#20– Code to Node to Code

Hi Everyone:

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

Geometry.Curve.NormalAtPoint.ds#20

Geometry.Curve.NormalAtPoint.ds#20

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.NormalAtPoint#20

Geometry.Curve.NormalAtPoint#20

Make sure the pasted script is commented out so that it isn’t running as well as the translation. (otherwise a crash maybe)

Geometry.Curve.NormalAtPoint#20a

Geometry.Curve.NormalAtPoint#20a

Satisfied that node definitions are suitably defined, initial the Code to Node operation.

Geometry.Curve.NormalAtPoint#20b

Geometry.Curve.NormalAtPoint#20b

Doesn’t look like any further editing is needed. The Geometry graphic that is generated is shown below.

Geometry.Curve.NormalAtPoint#20-Graphic Window

Geometry.Curve.NormalAtPoint#20-Graphic Window

The files for this translation can be downloaded from the links below.

Geometry.Curve.NormalAtPoint#20

Geometry.Curve.NormalAtPoint#20a

Geometry.Curve.NormalAtPoint#20b

Thanks for looking.

T!M

DesignScript Curve Translation,Geometry.Curve.NormalAtParameters#19– Code to Node to Code

Hi Everyone:

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

Geometry.Curve.NormalAtParameter.ds#19

Geometry.Curve.NormalAtParameter.ds#19

This file is similar to the last post, # 18, Geometry.Curve.NormalAtDistance.ds ,however after opening, copying the script from the DSE and pasting it into DSS, we see that it is different.

Geometry.Curve.NormalAtParameter#19

Geometry.Curve.NormalAtParameter#19

The initial translation is shown above with the script from the DSE pasted into the canvas as a Large Code Bock that is commented.  The Node’s properties and definitions are developed into the Graph Nodes below.

Geometry.Curve.NormalAtParameter#19a

Geometry.Curve.NormalAtParameter#19a

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

Geometry.Curve.NormalAtParameter#19b

Geometry.Curve.NormalAtParameter#19b

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

Geometry.Curve.NormalAtParameter#19-Graphic Window

Geometry.Curve.NormalAtParameter#19-Graphic Window

The files are available for download at the links below.

Geometry.Curve.NormalAtParameter#19

Geometry.Curve.NormalAtParameter#19a

Geometry.Curve.NormalAtParameter#19b

Thanks for looking.

T!M

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.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

DesignScript Curve Translation,Geometry.Curve.CreatePatchSurface#13– Code to Node to Code

 

Hi Everyone:

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

Geometry.Curve.CreatePatchSurface.ds#13

Geometry.Curve.CreatePatchSurface.ds#13

Good time to mention that this translation was done with the Stand-Alone version of DesignScript, so it is NOT a plugin for AutoCAD.

Open the file CreatePatchSurface.ds in the DSE, copy and run DSS to paste it into the resulting blank canvas. Note the highlighted script in the initial translation below.

Geometry.Curve.CreatePatchSurface#13

Geometry.Curve.CreatePatchSurface#13

The “ import “ProtoGeometry. dll” “, will prevent the script from running, while “ /* ” and “// ” are measures that will ignore the script.” //will ignore the specific line its in front of and “ /*—-” */ “ will ignore the block of script it’s encompassing. This is being mentioned because having two versions of DesignScript running, both DSE and DSS can cause problems. (i.e. crashing)

After being satisfied with the translation, we progress to naming conventions and adding definition to the nodes properties.

Geometry.Curve.CreatePatchSurface#13a

Geometry.Curve.CreatePatchSurface#13a

Note that shown above the highlighted text has been edited to eliminate the commenting out symbols “/*—*/”. Next is the translation back to code as shown below.

Geometry.Curve.CreatePatchSurface#13b

Geometry.Curve.CreatePatchSurface#13b

A little editing is done.

Geometry.Curve.CreatePatchSurface#13b

Geometry.Curve.CreatePatchSurface#13b

The resulting Graphic from the files is shown below.

Geometry.Curve.CreatePatchSurface#13-Graphic Window

Geometry.Curve.CreatePatchSurface#13-Graphic Window

The translations are available for download from the links below

Geometry.Curve.CreatePatchSurface#13

Geometry.Curve.CreatePatchSurface#13a

Geometry.Curve.CreatePatchSurface#13b

Thanks for looking.

T!M

DesignScript Curve Translation,Geometry.Curve.CoordinateSystemAtEqualArcLength#12– Code to Node to Code

Hi Everyone:

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

Geometry.Curve.CoordinateSystemAtEqualArcLength.ds#12

Geometry.Curve.CoordinateSystemAtEqualArcLength.ds#12

This is similar to the last few previous files. Open it in the DSE, copy it to ones clipboard, then open DSS and paste the script into the blank canvas.

Geometry.Curve.CoordinateSystemAtEqualArcLength

Geometry.Curve.CoordinateSystemAtEqualArcLength

After the initial translation shown above, it’s developed into something like shown below.

Geometry.Curve.CoordinateSystemAtEqualArcLength#12a

Geometry.Curve.CoordinateSystemAtEqualArcLength#12a

Satisfied with the translation the “Node to Code” translation takes place as shown below.

Geometry.Curve.CoordinateSystemAtEqualArcLength#12b

Geometry.Curve.CoordinateSystemAtEqualArcLength#12b

The geometry that results from these translations can be viewed in the image below.

Geometry.Curve.CoordinateSystemAtEqualArcLength-Graphic Window

Geometry.Curve.CoordinateSystemAtEqualArcLength-Graphic Window

The files can be downloaded from the links below.

Geometry.Curve.CoordinateSystemAtEqualArcLength#12

Geometry.Curve.CoordinateSystemAtEqualArcLength#12a

Geometry.Curve.CoordinateSystemAtEqualArcLength#12b

Thanks for looking.

T!M

 

DesignScript Curve Translation, Geometry.Curve.CoordinateSystemAtParameter#11– Code to Node to Code

Hi Everyone:

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

Geometry.Curve.CoordinateSystemAtParameter.ds#11

Geometry.Curve.CoordinateSystemAtParameter.ds#11

After opening the file in the DSE, copy the script and paste it into a blank canvas in DSS. The initial translation looks something like shown below.

Geometry.Curve.CoordinateSystemAtParameter#11

Geometry.Curve.CoordinateSystemAtParameter#11

After it has been roughed out. it might be good to use some of the special nodes to further define and clarify the variables and personalize the nodes to aid in reading and translating them.

CodeBlock node

CodeBlock node

First off there is the CodeBlock Node which can be accessed in the Special Nodes category of the library, or more commonly activated by just double clicking in a blank space in the DesignScript canvas.

Driver Node

Driver Node

The Driver Node can be used in lieu of the CodeBlock node to add naming a definition to a variable, in this case 0.1234 is being shown.

Identifier Node

Identifier Node

Then there is the Identifier Node, which adds naming to a node that can serve as a link between a CodeBlock Node and another graph node. As one continues the translation, its usage will provide adequate identification to all the script that was in the DSE sample file.

Geometry.Curve.CoordinateSystemAtParameter#11a

Geometry.Curve.CoordinateSystemAtParameter#11a

Satisfied with the translation, then the “Node to Code” operation follows.

Geometry.Curve.CoordinateSystemAtParameter#11b

Geometry.Curve.CoordinateSystemAtParameter#11b

And the Graphic Window that results from these translations is shown below.

Geometry.Curve.CoordinateSystemAtParameter-Graphic Window

Geometry.Curve.CoordinateSystemAtParameter-Graphic Window

As a reminder to all, again, this translation was done with the Stand-Alone version of DesignScript, yet it still will work as a AutoCAD plugin.

The files can be downloaded from the links below.

Geometry.Curve.CoordinateSystemAtParameter#11

Geometry.Curve.CoordinateSystemAtParameter#11a

Geometry.Curve.CoordinateSystemAtParameter#11b

Thanks for looking.

T!M