Lacing a codeblock?

Hi,

I created a “between” node in a code block where it evaluates if the value (in this case the point Z value) is between a certain range. Output should be true and false which i got now.

It works correctly see image below

But my problem is that it should evaluate all the values of the input list (in this example 52) and not just only one. If i right click on code block there is not a possibility to put in on longest (lacing). Am I doing this wrong?

Thanks in advance

Hi @DavidV - to do this, you’ll want to lean into both List@Level and Replication Guides, which you can read more about here: DesignScript: A Robust Dive into the Language Underlying Dynamo

For your specific case, it’s got to do with List Levels - if you simply flatten the output of your + and - nodes it will work well. However, if you need to keep the List Structure, you can do the following:

inp >= lowerCheck@L1<1> && inp <= upperCheck@L1<1> ? true : false;

Where the @L1 portion is defining the List Level and the <1> portion defining the Replication Guides.

3 Likes

It works, thank you for your quick response!

I’m still a beginner regarding code block design scripts. I was already happy that I managed it so far but I will read more about the page you mentioned :slight_smile:

1 Like

There is some incredible power in them, especially if you look at things @Vikram_Subbaiah does :star_struck:

The link above is my presentation at BILT EUR in 2017 about the language, covering a bunch of basic concepts and how to use them.

1 Like

You could also use lowercheck[0] and uppercheck[0] to get the first item from your lists, because your upper and lower check values are not just values, but a list with a single value in it.

I’ve never seen @Vikram_Subbaiah doing TSpline and Mesh things in DS (if possible).
Love to see it though :slight_smile:

Have explored T-Splines a bit, not always with DS.
3D Printed T-Spline Chair in Dynamo Challenge 04, the Snow Flake Challenge and at other old posts like this
Will look into it some more though. Thanks for the suggestion :slight_smile:

Mesh, not so much :neutral_face:

Apologies for this off-topic response

4 Likes

What’s coming in a not-too-distant release (After 3.0) will be Extended Node Help for every single TSplines node and also a graduation out of Experimental (Finally!).

4 Likes