Tool Making: Way better Bezier-ish by Points

2012-09-03_0928
As previously discussed, Revit/Vasari has a couple kinds of splines  (regular spline and spline-by-points) that  you’d think  they were pretty similar (but you’d be wrong).  I made some tools to improve on this situation using Adaptive Components, but have refined this method.  This image shows 3, 4, and 5 point spline-by-point curves inside of an adaptive component rig, superimposed on a regular control polygon spline to illustrate the divergence (There’s not much difference, but double click to take a closer look). 
It uses the same methods as shown in this post but does further subdivisions of the control polygons for greater accuracy and flexibility.
2012-09-03_0930

A couple of things I noticed.  Most significant, the tangency conditions at the start and end are very close approximations. 99 times out of 100, this should be fine.  Here is an example of when it falls down:
On the left, two real b-splines drawn coming to tangency conditions.  On the right, the 4 point adaptive component spline by point family. 
2012-09-03_0940_001
Because the curves come together into a near tangent, but not quite, they slightly overlap.  It isn’t visible even zoomed WAY in.
2012-09-03_0942
But the result is that you can’t create a form element from the fake b-splines, because it will create a self intersecting form, but the real b-splines can.
2012-09-03_0939

[Clarification:  This failure is kind of hard to reproduce, it doesn’t happen for all situations even like the one shown,  there is a similar geometry in the sample files, and it works perfectly.  I think it has to be of a particular really huge scale.  In general, you can use this to make forms just fine, as shown in this post.  Here is an exaggerated view of what is happening the joint between the 2 curves at a bazillion times magnification:

2012-12-09_0849

Again, I have a hard time reproducing this problem, but it can be done.  If you’re worried about it, experiment a little. ]


The other issue that is a bit more obscure,  is the four point 4 spline doesn’t create a proper cusp when you do a crossed rectangle (shown here, a rectangle with points going 1, 3,2,4 in clockwise order) as a real bezier does.  Rather, it makes a bump. 
2012-12-08_1048
Details, details.

Download the families from here.

Comments

  1. So wait, I think you just said that the adaptive component rig method causes the dreaded "can't create form" message... If so, that MAY explain a lot of what I've been dealing with...

    ReplyDelete
  2. Yes, in SOME relatively rare situations. The one I am showing has the 2 curves coming together at at 180 degrees off of tangency, which causes a self intersecting form to be created. Try it out in other situations, see what you get.

    ReplyDelete
  3. Paul, the "can't create form" message only appears if your family consist one or more invalid model lines. The reason is that when you select the whole family and click on the create form button, then revit will search for all the model lines in that family and use all of these lines in the create from command. So for example in your family you have a self-intersecting model line you will see the error message appear. In zack's case, there is only one model line (the spline through points) and it is a valid one for create from command. So it should be all right. But imagine if jack had also used model lines to create the interpolation rigs, then he would have been in trouble when creating form.

    Zack: I can see that you go for a brute force approximation with more sampling points. I wonder how scalable this idea is. The best solution is still that Autodesk will add real beizer curves with reference points as control points (just like the spline through points). I cannot understand why Revit has not implemented such things. I have always wanted this since version 2011. Come on Autodesk :(

    ReplyDelete
  4. Adriel: Agreed
    Long: I added a bit of a clarification on when and why the issue happens. But yes, the problem I am talking about here with self intersecting forms is different from the issue of trying to make form from the whole AC family. And the scalability issue: do you mean there might be problems using hundreds or thousands of these families in a project?

    ReplyDelete
  5. You made some first rate factors there. I regarded
    on the web for the issue and found most people will

    go together with along with your website.
    Have a look at my webpage : shanked

    ReplyDelete

Post a Comment