### Author Topic: Place exactly 1 segment at center of spline section  (Read 3803 times)

#### George

• Full Member
• Posts: 122
##### Place exactly 1 segment at center of spline section
« on: December 09, 2013, 01:41:50 AM »
I have the following (attached) segments. The RC object should be as follows:

CornerA - MidA (repeat as necessary) - MidB (middle) - MidC (repeat as necessary) - CornerB

I can do 90% of that, using a conditional for MidA and MidC (greater and less than 50% of the spline section) but I can't work out how to place MidB in the centre, and most importantly only once.

#### iToo

• Hero Member
• Posts: 3623
##### Re: Place exactly 1 segment at center of spline section
« Reply #1 on: December 09, 2013, 10:09:58 AM »
I'm afraid there is no way to place a "Default" segment exactly at spline's center, because these segments are used to fill the gaps between spline sections. And the only rules that may "break" the spline and create sections are Evenly and Corner.

You would use an "Evenly" segment and adjust the distance parameter to place an unique piece at center, but each spline will require a different distance. Other alternative is to add a vertex manually at the spline's center, and use the Corner rule. Unfortunately i cannot see any automatic method for this case.
Carlos Quintero
iToo Software

#### George

• Full Member
• Posts: 122
##### Re: Place exactly 1 segment at center of spline section
« Reply #2 on: December 09, 2013, 11:07:40 PM »
I think "evenly" is the way to go too. I was thinking you could have the option to express the distance as a percentage, but a more "node-friendly" way to do this might be to have a SplineInfo and SectionInfo node, where each one outputs, amongst other things, a length parameter. That way I could apply some arithmetic to it (length / 2) and feed it into the "evenly distance" parameter.

#### George

• Full Member
• Posts: 122
##### Re: Place exactly 1 segment at center of spline section
« Reply #3 on: December 10, 2013, 02:13:53 AM »
Apologies Carlos, I just found the expression variables in the arithmetic mode - this may solve my problem!