This is the forty-ninth, in a series of forty-nine curve file translations. As mentioned in the last post, the previous file, Geometry.Curve.Trim.UsingParameter, was really the last of the Curve file types, but due to a basic mistake in counting, there wasn’t forty-nine files. But now there is, and this is an attempt to illustrate the functioning portion of the trim mode using Parameter and Curve in the form of a line.
Since this Curve-Trim file is not in the DesignScript Editor (DSE) Samples, and were making it up, lets name the file Geometry.Curve.Trim.UsingParameter.Line.ds.
This file Geometry.Curve.Trim.UsingParameter.Line.ds.as shown, above has been added to the Sample Library.
What’s been done here is to imagine a line as a surface and to use the trim command. The canvas is taken from the previous post and augmented with additional nodes. The preliminary canvas is shown below.
Developing the nodes with a naming scheme fills out the canvas.
Somewhat of an elaborate canvas layout is then transformed back into code with the “Node to Code” operation.
The Variables that could use further identification are highlighted above.
The edited portions of the script are highlighted above. Now, doing something a little different is copying and pasting this code into the DS Editor and running it.
While rather long, and probably the antithesis of coding’s elegance, the script ran and delivered the geometry with no errors.
That brings us full circle with the Curve-Trim file, fulfills the 49th Curve file statement (not that that means anything) as well as moves us into the next category of Planes.
Once again the files are available via Drop-Box for downloading at the links below. Also note that the *.ds version file is also available for putting into ones sample file library.
Thanks for looking.