GC Tween Node?

Rhino has this cool tool called TweenCurve and TweenSurface

Is there a quick way to replicate this tweening functionality for parameters?

1. Mstn Parametric Solid Extrusion A. Length parameter= 1.0m, located at say 0,0,0.

2. Mstn Parametric Solid Extrusion B. Length parameter= 5.0m, , located at say 15,15,0.

3. Drop GC Tween Node in Symbolic View. Select Mstn Solid A and B.

4. Select Parametric Solid parameter to tween. Enter Number of tweens. Default: Tween node calculates x,y,z distance between the two selected elements.

5. User confirms. Tween node does the tweening. Edit: the tween'd solids' extrusion lengths would interpolate between 1.0m and 5.0m, and the new solids be located between A & B with equal spacings as a default.

6. User uses Move command to move Solid A. Tween node updates the tweened elements.

7. User uses Move command to move Solid B. Tween node updates the tweened elements.

Parents
  • Here's something I have tried by simple interpolation between the curves.


    It works well with the bspline curves.However, some modifications need to be done for Polyline and Polygons. 

    I have attached the Packer file and sample file. Please let me know if it helps.

    Curve interpolation sample file.dgn https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/360/CurveInterpolation.gcp

  • Hi Anik,

    That looks good, I downloaded and had a tinker. At first I thought it would just produce a similar result to a standard surface but the tween curves give it a nice flow, and you could always write in some more options if you wanted to change it up a bit.
    Great.

    Thanks

    Wayne

  • Thanks Wayne!
    Yea, it requires some modifications. Feel free to use the code and add your ideas. It would be nice we all can collaborate with our scripts. 

  • I had a bit of an experiment last night when I started thinking about closed curves and combining that with maybe a shift horizontally. 

    Should probably look at Dominic's suggestion about a different type of path.

    This one just used a single line. To go from

    and Tween.

    Bit of fun.

    One thing I noticed that you might be able to answer is I think the resulting Bsplines are not going through the control points, but I did continue with your script and it is defined ByPoints which should be through the points.

    Anyway it is an interesting approach.

    Thanks

    Wayne

    Anik, how did you upload the GCP?  The system doesn't allow my file upload, it errors if I try to upload the GCP. Had to zip it up to upload.

    Tween2.dgnClosedCurveInterpolation.zip

Reply
  • I had a bit of an experiment last night when I started thinking about closed curves and combining that with maybe a shift horizontally. 

    Should probably look at Dominic's suggestion about a different type of path.

    This one just used a single line. To go from

    and Tween.

    Bit of fun.

    One thing I noticed that you might be able to answer is I think the resulting Bsplines are not going through the control points, but I did continue with your script and it is defined ByPoints which should be through the points.

    Anyway it is an interesting approach.

    Thanks

    Wayne

    Anik, how did you upload the GCP?  The system doesn't allow my file upload, it errors if I try to upload the GCP. Had to zip it up to upload.

    Tween2.dgnClosedCurveInterpolation.zip

Children
  • Hi Wayne,

    Cool!

    I had a look at your script, the bspline curves by points are generated properly, we just need to uncomment line 19. Since, the count of InBetweenSegments is less than TweenPoints by 2 it was causing curves to be skewed. You can have a relook. 
    I think your method will be more suitable if need to follow a path for tweening. 

    https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/360/CloseCurveInterpolation.gcp

    I am just able to upload the .gcp file from Insert> Insert Video/Image/ File. Can you try one more time?