### Author Topic: Looking for tips  (Read 927 times)

#### LH2287

• Newbie
• Posts: 13
##### Looking for tips
« on: April 25, 2017, 12:58:48 PM »
Hello,

I am currently working on a project where I have to make a railing for the balconies and I am struggling with the logic behind it so I can make it parametric.

I am looking for advice on how to make it work out and still be parametric. My evenly distributed posts can be adjustable, but it's not necessary. My main problems are with tying up the geometry together and have no broken geometry on the corners/start/end segments where there should be a single post and no intersecting or sticking out circles. Since this railing is very dependent on its measurements problems occur if the object spline is not the perfect size.

Is there a way to make it work with each elements separate e.g. big circle, small circle, big posts and in-between posts. The big posts can and cannot be evenly distributable, but I am looking for the logic to make it.

I have attached a jpg of the railing I am looking for.

Any help is very appreciated

Best regards.

#### Rokas

• iToo Software
• Hero Member
• Posts: 3180
##### Re: Looking for tips
« Reply #1 on: April 25, 2017, 04:10:02 PM »
Please explain, what railing do You have in mind, if segments cant be scaled to fit and can't be clipped either ?
Rokas
iToo Software

#### LH2287

• Newbie
• Posts: 13
##### Re: Looking for tips
« Reply #2 on: April 25, 2017, 04:59:48 PM »
The railing I have in mind is exactly like the one in the attached image. The thing is if I break it into segments like large circles, small circles, large posts and small posts (as per image attached) it is hard for me to compile them in RailClone. It is obvious what the module of the railing is (4 intersected circles at the middle of each other - like Audi's emblem - with 2 smaller circles at the end of that module and 3 vertical lines at each intersection of the large circles). Lets say this module is 100cm in lenght and there are evenly distributed large posts between each module. Of course I can make the module as single element and make a sequence out of it and the large post, but what happens if my balcony is 150cm in length makes a corner and goes another 90cm in perpendicular direction (L-shape looked from above). It will cut the circle somewhere depending on the size of the spline and continue after that with another cut shape or start a new one. What I want is the end circle to be full and not be cut. Is there a way Railclone to adapt in such kind of situations and end the railing where it is necessary for example -/+ 5 cm of the end vertex and reduce large circles to 3, 2 or even 1 depending of the spline's length?

I am attaching 1 more image of the hand made railing. This is how it is supposed to look like but I have around 50 balconies and hand making each one of them is going to take a while.

Please let me know if there is something confusing as explaining how it is supposed to work is hard, but the image itself provides enough information as how the railing is supposed to look like.

Best regards

#### Paul Roberts

• iToo Software
• Hero Member
• Posts: 1822
##### Re: Looking for tips
« Reply #3 on: April 26, 2017, 01:00:29 PM »
Hi,

Please find attached a potential solutions. It isn't the easiest graph to understand because it involves some conditional statements to determine the first and last segment is a spline section, as well as adjusting padding values automatically. It may need some editing for your particular style. Here's a brief explanation..

I've split the geometry into these segments -

Here's how they look in the final style -

The graph itself uses 3 generators as follows.

Generator 1 is the most complex and creates the panels. There are 2 conditional operators, one to identify the segment at the start of a spline section, and another to detect the segment at the end. Both use Position on Section and a percentage to determine whether the condition is true or false. For the end section the percentage is calculated automatically using an equation that returns the segment size as a percentage of the spline section length:

return 100-(((1.5*Input1)/XSectionLength)*100);

This file was created in RailClone 3 For RailClone 2 this would be:

100-(((1.5*Input1)/XSectionLength)*100)

Apart from the the rest of the nodes are just adjusting the padding to ensure the pattern fits together correctly. This could be done by hard coding values but here I've tried where possible to use the geometries attributes, which accounts for all the extra nodes

Generator 2 adds the mid rail. It's pretty straightforward,the only thing to note here is the use of a Null segment in the Evenly, Start and End inputs that create a gap for the posts which are actually added by Generator 1

Generator 3
add the handrail on top. This one is also pretty straightforward, just a handrail in the top input. All segments have had their Z Alignment set to Pivot so that they sit correctly in relation to the base spline.

Here's a little video of it working: http://d.pr/v/Ztslo

I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul
« Last Edit: April 26, 2017, 01:03:51 PM by Paul Roberts »
Paul Roberts
iToo Software

#### LH2287

• Newbie
• Posts: 13
##### Re: Looking for tips
« Reply #4 on: April 26, 2017, 01:58:31 PM »
Hello Paul,

This file is very helpful. It actually is exactly the same style I was trying to achieve.Your support is amazing and I wish I will be able to create similar styles in the near future without any problems, but I am really far away from programming and I experience difficulties each time there has to be expression in the Railclone style.

I will try to understand each part of this file as much as I can so it can help me in the future. Obviously the hardest part were the circles do exactly the same thing they do now, but this explains a lot. I only had to change the expression for the RC2 version and it worked great. I will use it the project now and let's hope next time I will be more prepared.

Is there a way I can educate myself in understanding how to deal with expressions, any course or some of your tutorials might be helpful?

Best regards