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.
Open and run Geometry.Curve.TangentAtDistance.ds in the DS Editor.
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.
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.
The preliminary translation is drawing the error warning. Ignoring this, and continuing with developing the canvas we get the definition below.
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.
The files are available to download from the DropBox links below.
Thanks for looking.