I am trying to develop a geometry that is able to “tween” smoothly between a square and a circle, using a variable filleted radius for the square. However whenever I make the outer shape more square like the geometries become distorted making it impossible to achieve the results I am looking for.
Align your curve seams to get rid of the rotation in the tweening.
Use the fit curve component set to degree 3 on the circle as well as the rectangle to get a better tween. Circles are degree 2 curves which don’t really tween well. Your rectangle has a fillet radius, fillets are also degree 2 curve segments which don’t tween well.
Degree two curves have few control points but rely on variable weights on the control points to make the shapes like a circle. However, tweening is directly related to control point positions and does not account for weight, this is why degree 2 curves don’t tween well, if you were curious.
If you would like more advanced tweens check my plug-in Pufferfish which is all about tween interpolation and blending.
Hmnn, that is strange. Maybe something changed in rhinocommon for curve closest point methods? The Align seams uses this method But clearly in your screenshot it isn’t going to the closest. I don’t have R6 at the moment to test but to be honest I haven’t paid much attention to R6 yet until things stop changing so much.
You can do the seam alignment like this with native components for this simple case of two curves.
Certainly not a judgement, just an FYI, it looks like it may be in the tween through curves component. The same thing happens with that file as well. I am just starting to test out Pufferfish, nice job! I have a few ideas for how our shop might be able to use it in some of our terrain/contour/surface generation/refinement processes!
Thanks for pointing it out, it is hard to keep track of the little behind the scenes things Rhino 6 changes. Still trying to figure out a good time when to fully transfer to R6
It seems to me based on your screenshot that some method I am using was changed in R6 to readjust the seam back at the discontinuity (where fillet meets straight segment) which seems weird to me since in the tween component I don’t do anything with seam editing. Some pesky method is taking its own liberty and doing so, now to find which one.
Glad that it might help your workflows, would like to see what you come up with.
Ok, I figured it out. I have a routine in my component that checks if the curve has any fillets, if the curve has fillets it explodes the curve, fits the fillets, and joins the curve back together.
In R5 Rhinocommon join curves doesn’t change the input curves seam location if no new segments are added to the curve. For some reason R6 Rhinocommon join curves resets the seam to be that point where fillet meets line segment.