Control radius on adaptative family

Control radius on adaptative family

Anonymous
Not applicable
3,718 Views
15 Replies
Message 1 of 16

Control radius on adaptative family

Anonymous
Not applicable

Hello, guys

 

I'm trying to make a road intersection on Revit, with adaptative family. It can be very simple: the user defines the 6 input points of the road, and all I need to control is the radius of the curve's arc. Using the arc radius as instance parameter doesn't let me change the arc radius without changing the input points.

 

So I need the 6 reference points with only arc radius instance parameter working. Is there any way to do it?

kevincarvalhoQB86Z_0-1623941850863.png

 


The family is attached.

 

Thank you,

 

Kevin


0 Likes
Accepted solutions (1)
3,719 Views
15 Replies
Replies (15)
Message 2 of 16

RDAOU
Mentor
Mentor

@Anonymous 

 

The center of the circle as you have it is floating and knows not how to behave when you change the radius...

 

You need to control those curves using the length of the chords between placement points  (1 and 2) and (3 and 4)

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


0 Likes
Message 3 of 16

Anonymous
Not applicable

Hello,

 

Thanks for your reply. I'm trying since, but I can't make the arch control point move accordingly to the X parameter. If I could place the arch control point in some know distance (x), I can make the Radius a function of x. But if I change x, the point does not move, as you can see in the print screen below. The X parameter cannot be changed without the message that "Constrains are not satisfied" :

 

kevincarvalhoQB86Z_1-1623950921651.png

 

 

0 Likes
Message 4 of 16

ToanDN
Consultant
Consultant
You need a formula to locate of the midpoint of the arch (raise) based on the know radius and chord length.
https://de.zxc.wiki/wiki/Kreissegment
0 Likes
Message 5 of 16

RDAOU
Mentor
Mentor

@Anonymous 

  • Here is what you need where C&B are your placement points...
  • Alternatively, you can compute the Length of DE based on the chord length (using Pythagoras triangle CDE). D is a point hosted on the chord and fixed using the normalized curve parameter (Value: 0.5) this will allow you to draw the arch through 3 points instead of center and Radius

The above should do it for the arch...next you will need to control the angle that keeps your arch tangent to the roads ... but we can leave that for another topic 🙂

sorry I cannot model it for you, I am using tablet and no access to Revit

DRRD_0-1623953631587.png

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 6 of 16

Anonymous
Not applicable

Don't worry, you are already helping a lot. So I tried as you said. Since I need R to be the input, I solved the equation for h, so:

 

kevincarvalhoQB86Z_1-1623959135734.png

 

The formula works. The problem is that, even so, the restriction can not position correctly the midpoint of the arc. 

kevincarvalhoQB86Z_2-1623959201164.png

Even without formulas, I can't define the control point of the arc (point E in your drawing) as a parameter. The point does not move according to any distance of a parameter. Maybe I would have to position it by the x and y distance from points B and also for point C, but is so much work that probably it's best to guess the Radius when using the family.

I wish there was an easier way to do it. All I need is to control the Radius parameter of this arc, given the start and endpoints of the arc as inputs.

kevincarvalhoQB86Z_0-1623959795204.png

 

Also, from your answer, you say something about using the normalized curve parameter (Value: 0.5). I can't see how to do that in Revit adaptative family creator. It would be a great way, but there is no such thing as position a point in a line/arch according to its normalized parameter, without using the dimensions and constrains. 

0 Likes
Message 7 of 16

Anonymous
Not applicable

Looking at some videos at Youtube, I see that if they place a point on a line, it has the "Normalized Curve Parameter" parameter, and the point even becomes smaller than the normal model/reference point.

 

I can't reproduce that. If I place a point on a line, it keeps as a big regular point, and I can't use the Normalized Curve Parameter. Do you know why? Using Revit 2020.2 here.

 

kevincarvalhoQB86Z_0-1623964510499.png


Video of him just placing the point and getting the "normalized curved parameter": https://youtu.be/kxtoE_ML2t0?t=229

0 Likes
Message 8 of 16

ToanDN
Consultant
Consultant

Try this one.

 

Message 9 of 16

Alfredo_Medina
Mentor
Mentor

Please maximize the Screencast window for better viewing:

 


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 10 of 16

RDAOU
Mentor
Mentor

@Anonymous 

 

When you place the point, on the ribbon (next to the draw tools) you should have the option to select between Draw on Face and Draw on Work Plane...to be able to host points on lines, you need to Draw on Face...

 

 

You can try @Alfredo_Medina's  simplified method using ratios... It might not work for all curves considering that the distance from midpoint of the chord to the arch is not always 1/3 of the radius...but it might just do the job and save you time if your roads are orthogonal to each other and you don't have odd angles

 

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 11 of 16

RDAOU
Mentor
Mentor

@Anonymous 

 

Considering that this is an interesting topic and now that I have access to Revit...here is how the arch would adapt based on the formula you derived. This is not an ideal solution and you should watch out for that formula because it has a tenancy to break... the Radius input cannot be less than Half/Chord otherwise the formula will break (reason: square root of a negative value) hence you need to control it

  1. either by using an absolute value: h = abs(Radius - sqrt(abs(Radius ^ 2 - a ^ 2))) however this can generate misleading values
  2. Or by limiting input value by using an intermediate parameter R= if(Radius < a, a, Radius)

DRRD_0-1624019996127.png      DRRD_1-1624020165351.png

 

 

Having the chord length driven/determined by the adaptive placement points, the radius should not be an input. It should instead be calculated based on the chord length and arc tangents of the curve with the roads (ie: the angle between the roads at point 1 and at point 2. 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 12 of 16

Anonymous
Not applicable

Thank you @RDAOU and @ToanDN . 

I see now, once more, that the families are good if you have less parameters. Making it all work in function of the chord (s in @ToanDN family - very good and simple, by the way, but I couldn't figure out where did you get the formula from) made it.


I really appreciate your time spent trying to help me.

Thank you all,

0 Likes
Message 13 of 16

Anonymous
Not applicable

Oh, I almost forgot:

The family working is attached.

0 Likes
Message 14 of 16

RDAOU
Mentor
Mentor

@Anonymous wrote:

Thank you @RDAOU and @ToanDN . 

I see now, once more, that the families are good if you have less parameters. Making it all work in function of the chord (s in @ToanDN family - very good and simple, by the way, but I couldn't figure out where did you get the formula from) made it.


I really appreciate your time spent trying to help me.

Thank you all,


@Anonymous 

 

His equation is derived from the formula I gave you in my first reply h^2 - 2hr + a^2 =0 ...however, I will leave the detailed explanation to @ToanDN ...If he pass I will then explain it 

 

DRRD_0-1624034447125.png

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


0 Likes
Message 15 of 16

ToanDN
Consultant
Consultant

@Anonymous wrote:

Thank you @RDAOU and @ToanDN . 

I see now, once more, that the families are good if you have less parameters. Making it all work in function of the chord (s in @ToanDN family - very good and simple, by the way, but I couldn't figure out where did you get the formula from) made it.


I really appreciate your time spent trying to help me.

Thank you all,


The formula is in the link I posted in my 1st reply.  It is probably the same as what others have offered here since it is geometry and math.

0 Likes
Message 16 of 16

RDAOU
Mentor
Mentor
Accepted solution

@Anonymous 

 

After @ToanDN permission to correct the a slight error in his previously posted family. 

 

The value of h (altitude from chord to mid point of the curve) has been calculated based on the formula posted in reply 5 above...which is a quadratic equation AX^2 + BX +  (See image below on how to derive the value of h)

 

Wrong form of the EquationWrong form of the Equation

 

Correct form of the equationCorrect form of the equation

In this version

  1. The mid point of the chord is hosted on the reference line connecting the 2 adaptive points
  2. The chord length is hosted on the horizontal plane of the the chord in order not to break when the the adaptive points are placed at different elevations
  3. The Radius input has been limited to Max Half Chord => the curve generated will be a half circle =>  a U Turn (which is not the aim of the original family)

 

Family as well as a Youtube video are attached

DRRD_0-1624045471696.png

 

 

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION