Thursday, February 26, 2009

First GC Snapshots!

For the first step, I simplified my spongy facade to some deformable cylinder-like shapes – which are supposed to act like pores of my sponge. However the aim of the design is to have a chaotic BSpline curves as pores. As general idea they are holes reacting to different levels of RH and the aim of their reaction is absorbing the condensate water.

List of transactions figure:
Various reactions views:
step#1

step#2

step#3

2 comments:

  1. Sara, thanks for posting the screenshots as well as for sending me your file. I have seen you have been able to rightly modify the script – which is great. Further explanations/corrections are here below.

    When you create a feature by function, you are going to specify a procedure to create that feature.
    First line, you need to declare what the function’s variables are. In this case, we have a Point (that to be quick we are conventionally going to call pt01 for the rest of the script), a double (that we will call rh), a CoordinateSystem (that we will call cs). (Sara: what you previously did was calling directly RH your variable. Having a conventional name you can choose for calling variables within the function and declaring later on (Function Arguments) what they are in your model is usually required/advisable).

    After that, you need to say what you are going to create. In this case a circle.

    Then, you describe the procedure to create this feature. In this case is a for loop. (it might be an if statement or many other ways – some of them are fundable in the Statement Builder (one icon before the last one on the top part within your script editor/window)). Explanations about these statements can be found on every script manual since they are very common procedures also out of GC. In this case you are asking to GC to iterate the creation of you feature for every i between 0 and 11 and also a second loop, for every j between 0 and 11 (because in this case you want to create a circle for every point of the grid you have, which is a two dimensional grid of points).

    Next step, you select the method to create. In this case is .ByCenterRadius

    As Function Arguments you specify the entities (geometry or doubles or integers and so on depending from what you had in your function) that in your GC model correspond to the variables you have been calling with your chosen conventional names. In this case, your pt01 corresponds to point01; rh to the Graph Variable RH; cs to the baseCS.



    feature circle01 Bentley.GC.Circle
    {
    Function = function (Point pt01, double rh, CoordinateSystem cs)

    {
    Circle cr01 = {};
    for (int i = 0; i < 11; i++)
    {
    cr01[i] = {};
    for (int j = 0; j < 11; j++)
    {
    cr01[i][j] = new Circle();
    cr01[i][j].ByCenterRadius(pt01[i][j], 3/rh, cs.XYPlane);
    }
    }
    return cr01;

    };
    FunctionArguments = {point01,RH,baseCS};
    }


    For the meaning of 3/rh (why did you set 3/rh?) see my previous blog comment.

    Michela

    ReplyDelete
  2. > For the meaning of 3/rh (why did you set 3/rh?) see my previous blog comment.

    = I do not think your Bspline behaviour should be chaotic. I belive it should be meaningful with respect to the sponge-skin function in architecture.

    ReplyDelete