DesignScript Curve Translation, Geometry.Curve.Trim.UsingParameter#48– Code to Node to Code

Hi Everyone:

This is the forty-eighth, in a series of forty-nine curve file translations. The file Geometry.Curve.Trim.UsingParameter.ds is really the last of the Curve file types, but since this file doesn’t function and since a mistake was made here in basic counting,  number 49 is going to made up following this post. This Curve-Trim file is located in the DesignScript Editor (DSE) Samples, and is shown below.

Geometry.Curve.Trim.UsingParameter.ds

Geometry.Curve.Trim.UsingParameter.ds

Open and run Geometry.Curve.TangentAtDistance.ds in the DS Editor.

Geometry.Curve.Trim.UsingParameter.

Geometry.Curve.Trim.UsingParameter.

This isn’t anything new. We came across this “Index was outside the bounds of the array” error previously Geometry.Curve.Trim.UsingArrayOfParameters.ds and/or Geometry.Curve.Trim.UsingPoints.ds in the Trim file type.

Geometry.Curve.Trim.UsingPoints.ds-error

Geometry.Curve.Trim.UsingPoints.ds-error

To be fair, this may be happening (exception) due to the fact that we are using the standalone version of DesignScript for both the Editor and the Studio version. Also, due to using a mac to boot in virtual mode for windows 7. (no pun intended) Perhaps someone would like to verify this on a windows system and maybe even running AutoCAD?

Again lets pretend the file is functioning. Open DS Studio, and paste the DSE script into a blank canvas.

Geometry.Curve.Trim.UsingParameter#48

Geometry.Curve.Trim.UsingParameter#48

The preliminary translation is drawing the error warning. Ignoring this, and continuing with developing the canvas we get the definition below.

Geometry.Curve.Trim.UsingParameter#48a

Geometry.Curve.Trim.UsingParameter#48a

Again, the red and yellow highlighted areas indicate the groupings of nodes according to their properties. We are not going to translate this back into code due to the Trim error. Should there be any update and or fixes for this Trim file, it will be posted with a follow-up.

The geometry, with a little improvisation, that results from the code is shown below.

Geometry.Curve.Trim.UsingParameter-Graphic Window

Geometry.Curve.Trim.UsingParameter-Graphic Window

The files are available to download from the DropBox links below.

Geometry.Curve.Trim.UsingParameter#48

Geometry.Curve.Trim.UsingParameter#48a

Thanks for looking.

T!M

Advertisements

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