PDA

View Full Version : Revit Trigonometry Problem



ThinkRevit
2012-07-07, 04:08 AM
I am trying to solve the following problem. The goal is to create Parameters for the dimensions shown below with the arc always being tangent to the vertical reference plane and the angled line.

dbaldacchino
2012-07-07, 07:13 PM
The key is to use the "Tangent End Arc" type and then constrain along [Edit:] both sides [End Edit] to set where the center of the arc is, not the radius. The radius will automatically adjust then. See the attached file below.

First, do a fillet arch so it gets positioned properly tangential to each sketch line. Then delete it and re-draw with the tangent end arc. I selected the bottom/angled line end and then the vertical line. Then I placed a dimension from the vertical end ref. plane to the center of the arc and parameterized it (radius). [Edit:] You need to add this same labeled dimension on the slanted line as well (radius) and now the arc stays tangential at all times [End Edit]. That does the trick and it should flex properly.

Mike Sealander
2012-07-08, 12:10 PM
There's probably a comment somewhere in the Revit code that explains this functionality, but the comment never made it to the help file.

ThinkRevit
2012-07-08, 04:19 PM
Unfortuntaly radiused support.rfa. does not solve the problem geometrically as the Radius is not Tangent to Angle. The links below may be reveal a solution to this problem. If so, the real issue here may be constraining the arc.

http://www.mathalino.com/reviewer/plane-geometry/length-one-side-maximum-area-trapezoid

http://www.mathalino.com/reviewer/differential-calculus/length-one-side-maximum-area-trapezoid-solution-calculus

dbaldacchino
2012-07-09, 01:55 PM
This is not a trigonometric problem (at least, it doesn't have to be). Any way I flex the family attached above, I always get tangent arcs at both the vertical and angled edges. Please attach an example of where that's not working as I don't see it.

ThinkRevit
2012-07-09, 05:19 PM
See attachment above. :)

patricks
2012-07-09, 09:13 PM
Yeah I see the problem, and don't really see an easy fix for it, other than doing a bunch of lengthy trig formulas in the family.

*edit* nevermind, doing it like Dave mentioned works. After using the fillet arc tool and setting a radius value, delete the arc and re-draw with the tangent arc tool, coming off of your angled sketch line. Then put your Radius parameter back on it, and it now appears to behave with any radius value.

dbaldacchino
2012-07-10, 03:54 AM
That's what I'm saying, the family I uploaded works. Flex it at any angle, radius, etc. and it behaves properly.

joopvandentillaart749713
2012-08-17, 08:15 AM
Hi all,

I was searching for this same problem. I downloaded your family (radiused_support) and only changed the angle to 1.0 degree (did nothing else). The arc then is not tangent anymore to the angled line. So this family doesn't flex as you say?

Just like the images ThinkRevit (post 4) shows in the attached images. When you play with the parameters it may look like its working but when you zoom in, you clearly see it's not.

I think it may just be impossible?

joopvandentillaart749713
2012-08-17, 09:31 AM
I think i got the solution. Thanks to this page -> http://bimandbeam.typepad.com/bim_beam/2010/02/how-to-control-the-fillet-in-revit-modeling.html

I now have a rebar detail component that has an angle and the bend diameter (depending on the rebar diameter) is adjusting nicely and tangent with the angled and vertical line. All the other flexing seems to work perfectly also.

USMCBody
2012-08-17, 02:54 PM
My disclaimer... Sorry, I can't seem to upload things, (I think it is a company IT thing I believe) and I'm not going to try to explain it with words, so I'll just try and give some general advice / helpful tips. I also think this could be solved a few different ways.

So it looks like what you have works fine, but one thing is not working correctly. So just fix that one thing and your golden, not impossible. Just break it down into the basic components you need to control and you have your answer... You will have to figure out how you make it work still, but at least you're on a path. Just keep trying different ways and I think it will work fine. Remember, it doesn't have to be elegant at first, it just has to work as easy as you can make it for the user.

I've handled something similar before, and hopefully something will help you out also. The trick for me was to use an angled reference line and use a full reference circle. Then you can control the location of the center of the circle and the radius easily as that seem to be the 2 things you need to control to fix your current problem. Once I got them to work correctly using formula's I drew detail lines and locked them to the reference lines & reference circle. Flex it to and extreme bigger and smaller to see if you need to lock the line ends, because sometimes there is an applied relationship that you don't have to actually place.

Flexing it will also help you play with it when you placing the reference lines to help you take one more step. Basically think like a mad scientist...
This should work like this... but wait, it worked like this why?

If nothing else remember this:
Just because You don't see a way, doesn't mean one is not there.

dbaldacchino
2012-08-18, 07:04 PM
I re-uploaded the attachment (this wasn't the latest version I had for some reason and was missing a constraint). It works exactly like you want it, no trigonometry and calculations necessary :) Trust me, go ahead and try it out again.

Steve_Stafford
2012-08-18, 08:10 PM
Dave, are you using 2013? It breaks immediately in 2013...no flexy :( I had to go through what I wrote about (http://revitoped.blogspot.com/2012/08/constraining-tangents.html) on my blog to get it to work.

dbaldacchino
2012-08-18, 08:57 PM
Nope, 2012...now it breaks for me as well! This is so weird. I flexed it and all and now it's breaking for me as well. It just feel like since the Factory has added those lock/unlock options for parameters, the Family Editor has gotten extremely fragile. I have used this technique before successfully...I'll see if any combination/order of creation makes any difference and will re-post.

Alfredo Medina
2012-08-19, 03:04 PM
This is my solution (attached). This brief video shows how the family flexes in a project, and how the joints between the arc and the lines remain tangent all the time:

http://screencast.com/t/951NPD9knuC5

dbaldacchino
2012-08-20, 06:34 PM
Thanks Alfredo. I have seriously lost sleep about this last night because I always test out my families before posting or blogging about them. However when I re-opened the updated family above, it started failing for me as well. After looking once more at the automatic sketch dimensions, I found the culprit so I re-built it with a slightly different approach (I'll post the details once everyone has had a chance to try break this version and can confirm it works!). See the attached family, which has no formulas and is all purely geometric and driven with angles and dimension parameters. The previous version is breaking because of a pesky ASD which can't be put to sleep. This new example manages to do that. Let me know if it works for you (fingers crossed).

Steve_Stafford
2012-08-20, 06:47 PM
Yeah boo on the pure math solution :) I guess Alf paid attention in class while I clearly did not! His solution is the cleanest neatest work. I used a formula in a couple examples to calculate the complimentary angle so I could control the angle of the arc. I found it helped eliminate some of the ASD's. This version, David, does work consistently for me even after upgrading to 2013 ;)

Alfredo Medina
2012-08-20, 09:41 PM
... Let me know if it works for you (fingers crossed).

Yes, this version of tangential arcs.rfa works correctly. You may release your fingers. :)


Yeah boo on the pure math solution

Yes, it was an interesting solution, without angular dimensions nor radius dimensions. This solution is actually based on triangles.

dbaldacchino
2012-08-21, 12:25 AM
Awesome, thanks and sorry for the confusion caused by the previous family. I'll post the assembly details when I have "spare time" :roll:

The reason I really wanted to get this to work without formulas is simple: Imagine someone built their profiles with all those formulas as in the "BIM and Beam" example and created their framing members with them. Now insert a bazillion of those into a project and watch it come to a screeching halt; which is why I try to avoid math and formulas if at all possible as I KNOW how much all that computation slows things down (and I love formulas and math!). It really shouldn't be as difficult and finicky to build this, but unfortunately this particular case is. Luckily there is a way. Now I have even less hair left! :beer:

Alfredo Medina
2012-08-21, 12:56 AM
Very interesting thread. Nice to see how the same challenge can be solved in different ways.

About prefering geometry instead of formulas, it would be interesting to measure how much of a difference it is in terms of performance; is it faster for Revit to check and mantain a set of geometric relationships than it is to obtain the result of a formula? I think both things require some "thinking" for Revit anyway.. :)

dbaldacchino
2012-08-21, 04:27 AM
Let's populate a file with a thousand instances of your family and then another with my version (I'll have to change the parameters to instance) and see if we can run some benchmarks. I think this could be extremely educational as sometimes "hunches" and assumptions turn out to be completely flawed!

Alfredo Medina
2012-08-21, 02:03 PM
Yes, it would be very interesting to see the results of that comparison.

captjim239126
2012-09-24, 01:51 PM
This is my solution (attached) . . . the joints between the arc and the lines remain tangent all the time



Alfredo, could you expand a little on how you constructed the arc. Did you use the Tangent End Arc or the Center-ends Arc tool? Did it matter if you started with the vertical leg first or the angled leg first? How did you constrain the center of the arc to the 2 reference planes, or does that happen automatically with the arc tool you chose? Do the ends of the arc automatically stay glued to the ends of the lines, or did you have to move them away, move them back, and then lock them?
Thanks

Alfredo Medina
2012-09-24, 11:29 PM
Alfredo, could you expand a little on how you constructed the arc. Did you use the Tangent End Arc or the Center-ends Arc tool? Did it matter if you started with the vertical leg first or the angled leg first? How did you constrain the center of the arc to the 2 reference planes, or does that happen automatically with the arc tool you chose? Do the ends of the arc automatically stay glued to the ends of the lines, or did you have to move them away, move them back, and then lock them?
Thanks

Lots of questions. Well, since both my friends Steve Stafford and David Baldacchino wrote blog articles about this interesting thread in their blogs, I think I should write an article in my blog about my solution, too, considering that there are more questions now about this. My next article is due on September 30th. I will post a note here when the article is published.

Alfredo Medina
2012-10-01, 05:57 PM
As promised, there is a new article in my blog expanding on my solution to the tangential arc challenge of this thread. Actually, it is the second part of the article, because in the first part I wrote about a similar question (Qatar Arc, by Scott Brown) posted in May at RFO. I thought it would be good to group both topics in the same article. A Youtube video will be added later to the article, as usual. :)

This is the link to the article in my blog:
http://planta1.com/forum/entry.php?23-A-variety-of-solutions-for-keeping-arcs-tangent-to-adjacent-lines

bulletproofdesign
2012-10-11, 10:28 PM
Hey Guys,

I saw this thread and thought I had some value to add.

I encountered this issue a few years back and spent some late nights frustrating myself at keeping tangents for sweeps (I was making a humble downpipe)

I tend to use trig as it stops things from breaking, however it also increases the computational overhead, and can slow larger projects down.

Attached is my geometric solution for retaining the tangential relationship. I apologise in advance if this is known info being repeated.

This solution hasn't broken on me for the last few years.

Be warned, sequence of construction is vital. Deconstructing and reconstructing may break the family so try it first.

P.S. having a circle swept, is a quick visual check for tangential as a line appears when lost.

Alfredo Medina
2012-10-11, 11:49 PM
Hey Guys,

I saw this thread and thought I had some value to add.....

Thanks! It works very well, and without formulas. This thread is becoming a library of solutions for keeping things tangent in different ways. 8)

bulletproofdesign
2012-10-12, 09:17 PM
Thanks! It works very well, and without formulas. This thread is becoming a library of solutions for keeping things tangent in different ways. 8)
No Problem ;-)

to make this kind of tangent relationship is fairly easy (omitting the numerous iterations that didn't work) if you follow the correct sequence.
1. draw your incident lines (the ones you are joining)
2. Fillet arc beteen the to at desired radius.
3. 'Show Centre' of arc.
4. Select the arc and disjoin from the incident lines by pulling pack the ends.
5. Add Radial lines from circle centre to ends of incident lines (these will be perpendicular)
6. Add and lock 90deg angluar dims between radial and incident lines.
7. Add dimension lines from incident lines to radial line ends (at arc centre) and assign as 'Radius'
8. Reconnect the arc to the incident lines.

:-)

ThinkRevit
2012-10-27, 08:23 PM
All I can say is “wow”. Thanks David, Alfredo & Steve for keeping this thread alive and documenting the results on your blogs. You guys are all invaluable assets to the Revit community. Thanks again.

dbaldacchino
2013-03-01, 12:20 AM
Thanks to Alfredo's nagging, I did the test and made a video that can be watched here (http://youtu.be/V6vOoi8i5Jg). How awesome is that?!

Alfredo Medina
2013-03-01, 12:29 AM
Wow ! Excellent test! So, ... results? I saw the window on the right (the formulas solution) regenerating faster, in the progress bar, and at the end, in the view. Conclusions?

EDIT: But, by a nose! Not really a significant difference at the end. Very interesting test. I thought you were going to place 1,000 instances, but you put 10,000 instances of each family !
Now, how did you make this video? How could you click on two sessions at the same time?

Alfredo Medina
2013-03-01, 12:38 AM
Oh, No, wait, the video says 100,000 instances on the left, vs 10,000 instances on the right ?! Is that correct?

Alfredo Medina
2013-03-01, 12:46 AM
I see... it's a typo in the text in the view on the right side. It should say "100,000" but it says "10,000". But the description in the video explains that there are 100,000 on each side. I also read in the description about how you made the video, wow, interesting.

Steve_Stafford
2013-03-01, 01:01 AM
A tie, interesting result, Thanks!

dbaldacchino
2013-03-01, 12:56 PM
Yeah sorry about that typo, no idea how I didn't catch that. I did 100k because 1k just wasn't going to be enough. If you notice when the screens first flicker, they flicker the same at the end so I think if I sync'd based on that rather than the Windows rotating circle, they would be identical. I'm going to look at the same examples but with instance parameters now. The geometric took about 14 minutes but the trig locked up so I'll do both again and turn on the click graphics in Camtasia for better sync editing.