Tag Archives: TRIM

DesignScript Curve Translation,Geometry.Curve.Trim.UsingPoints#6– Code to Node to Code

Hi Everyone:

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

Geometry.Curve.Trim.UsingPoints.ds

Geometry.Curve.Trim.UsingPoints.ds

Like the previous DesignScript file,  the operator Trim for curves,  draws an exception. It should be pointed out that the vast majority of the Sample files work perfectly, so as not to get the wrong idea. DesignScript is a very elegant program, it simply needs (Alpha) development attention. Also, one need to know that these translations are done with the Stand-Alone version of DesignScript, so the functionality of it being a plugin for AutoCAD is not being reviewed.

With that said, lets take a look at the DesignScript Editor.

Geometry.Curve.Trim.UsingPoints.ds

Geometry.Curve.Trim.UsingPoints.ds

With the exception drawn, we get the error.

exception

exception

Continuing on with the initial translation.

Geometry.Curve.Trim.UsingPoints#6-Exception

Geometry.Curve.Trim.UsingPoints#6-Exception

Looking closer we see the Trim node and defined it as myTrimmedCurve.  At this point it’s best to disconnect one of the inputs in order to prevent the program from crashing.

Geometry.Curve.Trim.UsingPoints#6-Index, Out of Bounds

Geometry.Curve.Trim.UsingPoints#6-Index, Out of Bounds

So the “discardBetweenPoints” input of False is disconnected and one imagines the Trim command functions so as to develop the translation.

2013_12_21-Geometry.Curve.Trim.UsingPoints#6a

2013_12_21-Geometry.Curve.Trim.UsingPoints#6a

Above we see the properties extracted from the Trim node to complete the definition. Then the Node to Code operation takes place.

Geometry.Curve.Trim.UsingPoints#6b-edit

Geometry.Curve.Trim.UsingPoints#6b-edit

A few house keeping edits are done.

Geometry.Curve.Trim.UsingPoints#6b

Geometry.Curve.Trim.UsingPoints#6b

The graphic windows that accompanies the running of the file is shown below.

Geometry.Curve.Trim.UsingPoints-Graphic Window.

Geometry.Curve.Trim.UsingPoints-Graphic Window.

The operation ends with the Graphic window below.

Geometry.Curve.Trim.UsingPoints-Graphic Window-error drawn

Geometry.Curve.Trim.UsingPoints-Graphic Window-error drawn

This file is now ready to be corrected. (Thanks in advance lol.)

The files are available for downloading with the links below.

Geometry.Curve.Trim.UsingPoints#6

Geometry.Curve.Trim.UsingPoints#6a

Geometry.Curve.Trim.UsingPoints#6b

Thanks for looking.

T!M

Advertisements

DesignScript Curve Translation,Geometry.Curve.Trim.UsingArrayOfParameters#5– Code to Node to Code

 

Hi Everyone:

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

Geometry.Curve.Trim.UsingArrayOfParameters.ds#5

Geometry.Curve.Trim.UsingArrayOfParameters.ds#5

This is another file that is not functioning. The operator “Trim” for curves draws an Exception. First lets take a look at the DSE.

Geometry.Curve.Trim.UsingArrayOfParameters.DSE-error

Geometry.Curve.Trim.UsingArrayOfParameters.DSE-error

The “Index was outside the bounds of the array” is the error.

Geometry.Curve.Trim.UsingArrayOfParameters.ds-Exception_Window

Geometry.Curve.Trim.UsingArrayOfParameters.ds-Exception_Window

With that lets do some pretending till the powers that be fix this in DesignScript.

Geometry.Curve.Trim.UsingArrayOfParameters.

Geometry.Curve.Trim.UsingArrayOfParameters.

Above the essential graph nodes are laid out.

Geometry.Curve.Trim.UsingArrayOfParameters#5a

Geometry.Curve.Trim.UsingArrayOfParameters#5a

Above we see the properties extracted from the Trim node and actualized so that the error is drawn, but the definition is complete.

Geometry.Curve.Trim.UsingArrayOfParameters#5b

Geometry.Curve.Trim.UsingArrayOfParameters#5b

And above the “Node to Code” operation was enacted.

Geometry.Curve.Trim.UsingArrayOfParameters#5_graphic-a

Geometry.Curve.Trim.UsingArrayOfParameters#5_graphic-a

As the file loads initially one gets the Windows Graphic as shown above.  Then one gets the

view as shown below as the file completes its operation.

2013_12_21-Geometry.Curve.Trim.UsingArrayOfParameters#5_graphic-b

2013_12_21-Geometry.Curve.Trim.UsingArrayOfParameters#5_graphic-b

Of course one might think that the operation was successful, given the extent of the trim command, but unfortunately not.

Regardless, the files are available to download below. Anyone want to fix it?

Geometry.Curve.Trim.UsingArrayOfParameters#5

Geometry.Curve.Trim.UsingArrayOfParameters#5a

Geometry.Curve.Trim.UsingArrayOfParameters#5b

Thanks for looking.

T!M