Solid Transforms from a box to a cone

Hi all,

I wonder if there is an easy way to transform a solid shape like a box to a cone.
I thought I have seen some topics about this.
Maybe a way turnning box into a mesh and also a cone to another mesh, and maybe kangaroo or some other plugins can turn the box mesh into cone mesh?
My final purpose is to genereate the animation of the transformation.
Does anyone know what plugins or button can do something like this?
Many thanks,

Yo!

Problem about different shapes is, imo, the different topology of creases.
On a cube you have 12 sharp edges, on the cone just 1!

So, projecting a cone on a cube you’ll likely end up with not enough vertexes to “fill” the cube’s edges, and you’ll end up with a smoothed cube, with rough and not sharp edges.

You can solve this by first obtaining a mesh that have vertexes/edges for both of the shapes, and you can do it by projecting a shape to the other (to a central point)


cubecone
cubecone.gh (23.7 KB)

With the cone you even have a more particular case: a sharp point not connected to any sharp edge, the cone vertex. So projection must be cube to cone and not vice-versa.

Working with kangaroo + inflating might totally work, indeed. I haven’t tried…

Dear Maje,
Thanks for the script, It is really cool!!
Just a bit further query: Have can I transform a shape when it starts from one place and end up in other location? As you said on the script the point must be inside both shapes.
Is that possible to show the meshes with only the profile edges? Recelty too many mesh wires show on the solid shape… I try to convert them back to brep and try to merge surfaces / simplify the surfaces but seems it still show some extra edges…
Thanks Maje,



Yes, simply multiply your movement/rotation amount by the 0-1 slider used in the morphing.

With c# you can extract unwelded edges only.

Added a Weaverbird smoothing step … maybe it is a bit cooler, maybe.
cubecone

cubecone.gh (20.2 KB)

Nice~~

Many thanks Maje

Hi,
you can check out axolotl for signed-distance-functions morphing:


sdf_blending.gh (236.2 KB)

3 Likes

You might also check the Pufferfish example files. I have an example there for blending 2 different meshes with different topologies.

Thanks Konrad!

Thanks Michael!

Depending on the needs this could also be a nice way to do it:



cube_cone_tweening.gh (235.9 KB)
Disclaimer: it’s not a real cone, the top-face is only very small

Thanks Konrad, but I think the previous way you suggested is more flexible, it can convert whatever shapes, not just box to cone. Thanks

1 Like