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

Hi Everyone:

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.

Geometry.Curve.Trim.UsingParameter.Line.ds#49

Geometry.Curve.Trim.UsingParameter.Line.ds#49

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.

Geometry.Curve.Trim.UsingParameter.Line#49

Geometry.Curve.Trim.UsingParameter.Line#49

Developing the nodes with a  naming scheme fills out the canvas.

Geometry.Curve.Trim.UsingParameter.Line#49a

Geometry.Curve.Trim.UsingParameter.Line#49a

Somewhat of an elaborate canvas layout is then transformed back into code with the “Node to Code” operation.

Geometry.Curve.Trim.UsingParameter.Line#49b

Geometry.Curve.Trim.UsingParameter.Line#49b

The Variables that could use further identification are highlighted above.

Geometry.Curve.Trim.UsingParameter.Line#49b-edited

Geometry.Curve.Trim.UsingParameter.Line#49b-edited

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.

Geometry.Curve.Trim.UsingParameter.Line.ds

Geometry.Curve.Trim.UsingParameter.Line.ds

While rather long, and probably the antithesis of coding’s elegance, the script ran and delivered the geometry with no errors.

Geometry.Curve.Trim.UsingParameter.Line-Graphic Window

Geometry.Curve.Trim.UsingParameter.Line-Graphic Window

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.

Geometry.Curve.Trim.UsingParameter.Line#49.bin

Geometry.Curve.Trim.UsingParameter.Line#49a.bin

Geometry.Curve.Trim.UsingParameter.Line#49b.bin

Geometry.Curve.Trim.UsingParameter.Line

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s