DesignScript Coordinate Translation #7, Code to Node

Hi Everyone:

Here is the seventh translation of the DesignScript Editor (DSE) file “CoordinateSystem.ByOriginVectors.IsSheared.”

DesignScript Editor Lite

DesignScript Editor Lite

After loading it, running it in the editor, copy it to the clipboard and open DesignScript Studio (DSS) and paste it on the blank canvas as a large Code Block. (double click on the canvas to access a code block)

DesignScript Studio

DesignScript Studio

To the right on the canvas is the pasted code from the DSE file (it’s a *.ds file). To the left is a translation of the top part of the code. As previously mentioned, working with the graph nodes and with the original code is desirable for access in ones translation however it can lead to a crash, at least on a system running windows on a mac. When working out the whole file regardless of what method that is used. Save the file frequently.

DesignScript Studio Translation

DesignScript Studio Translation

After running this it was noticed that a few improvement could be made, slight as they may be.

Capture#1

What’s missing is a description of the value 1.  Another item that is still under debate,  is whether or not further definition of true and false is desirable.

Boolean condition

Boolean condition

The updated DesignScript Studio graph is updated below.

Screenshot 2014-01-27 11.38.37

DesignScript Studio Translation updated

The original Node to Code translation is below.

Screenshot 2014-01-20 13.51.29

Now lets do the Node to Code Translation and take a look at the changes to see whether they represent an improvement.

 Partial original Node to Code view

Partial original Node to Code view

New Node to Code view

New Node to Code view

One can simply substitute a Variable number, in this case it was 40 and changed to the number 1.

Here is the whole file updated.

Node to Code DSS translation

Node to Code DSS translation

Only one Variable that is named a number. Obviously excessive at this point.

Wonder how this issue will play out with some complex files. We will see.

And below we has the Coordinate Graphic that is generated.

DesignScript Graphic Window. Standalone version.

DesignScript Graphic Window.
Standalone version.

Here are the files available for download.

CoordinateSystem.ByOriginVectors.IsSheared#7

CoordinateSystem.ByOriginVectors.IsSheared#7a

CoordinateSystem.ByOriginVectors.IsSheared#7b

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 )

w

Connecting to %s