# Find similar surfaces

Hey Guys,

for production of glass molds, I need to know how many different molds I have to shape. In other words, I want to find out, which of my double curved surfaces are identical. Does anyone know how to do it? My idea was somehow to compare the minimal principle curvature and its direction, the maximum principle curvature and its direction and the area of each surface in my list, to all the other surfaces in the list. But I dont know how to perform this with grasshopper. Is there a mathematically an easier way to see if two surfaces are identically, with less then 5 parameters to compare? And how to do this in grasshopper?
I will attach my surfaces

Best regards

Paul

surfaces.gh (24.8 KB)

It would be quite helpful if you were able to tell us how many shapes (if any) in your file ARE similar. I took their areas and divided by the square of the boundary lengths to come up with a dimensionless number for each surface. Theyâ€™re all in the same ballpark, but a few are the same. If any two shapes were similar, this value should be equal because one surface is just a scaled version of the other and the scaling factor cancels out in the division. (it still doesnâ€™t absolutely guarantee they are similar though!).

surfaces -2.gh (35.2 KB)

Iâ€™ll just add, that if you round the division to 4 places, the number of distinct surfaces decreases drastically and to 3, even less. I donâ€™t know how precise your structure or molding process need be, but probably this is more what you were hoping.

Hello Ethan,

thank you for your quick response. So I dont know how many shapes are similar. I created a double curved surface in grasshopper and put the diamond panels component from lunchbox onto it. So I dont know how many shaped are in fact similar. Your results, especially when you round them on 4, look very interesting. But are you sure, that the way you proove the similarity works? What about the curvature? Are there surely no panels with the same boundary length and the same area, with different curvatures?

Best regards
Paul

This wonâ€™t work with triangles with equal area and Perimeter but different angles.

As I said, IF two surfaces ARE similar, that ratio will be the same, but just because the ratio is the same does not imply similarity. Itâ€™s just one filter you can use. I donâ€™t know how you generated your surfaces so I canâ€™t say how reliable a method this is. If the curvatures all were within a certain range, Iâ€™d have more confidence than if they were all over the place. Why would you believe there are any similar surfaces to begin with?

My project is kind of a cost analysis. So I know, what a double curved glass panel costs and I know what a mold costs, which you need to produce the glass panel. I simply want to multiply the costs with the number of different molds I have.

This is how I construct my surface. I only took a third of the circles and splitted it with the lunchbox diamond panel. So your results look very reasonable, because my curvature in the XY-direction is the same for every Z-coordinate, because its always a circle.

Do you know any other filters? Something I can add to your components so I can be sure that there is not one surface that has the ratio 1,005 from the other. Like you mentioned the would be the same in your set up. Are there some surfaces that have the same â€śarea/circumference^2â€ť and are different not only by ratio? It blows my mind to imagine

Thanks Ethan

1 Like

Paul, could you upload the file you used to create the surfaces? And please internalize the geometry. Thanks.

If your vertical curve was a circular arc I think youâ€™d minimize the number of different panels. Or, is it important to you that it is not?

Are you interested in the panels that Lunchbox gives you or in their projection onto the surface (Youâ€™re using Surface Split now)? The results could be different.

Because of circular symmetry youâ€™re going to get similar curvatures for each layer that Lunchbox gives you. Here are diamond panels that separate into 14 classes in the z direction according to curvature at their centers.

surfaces -gaussian.gh (43.0 KB)

thank you Ethan, that was exactly what I want to have. I know that the results are different, but thatâ€™s how it should be. You can choose if you want the smooth panels or the more edgy one

Hello Ethan,

sorry to bother you again. My aim is it now, to sort the surfaces for their area/circumference ratio and then sort the already sorted one for their gaussian curvature. My definition looks theoretically okay, but in the second step of the sorting process, some weird things are happening. Some surfaces are double and some others dissapear.

Here it should show all surfaces. But somehow I lost some of them

sort surfaces.gh (545.2 KB)

Paul, could you please include the code you used to create and subdivide the surface? If you are still using arcs for the rails, then I think this is becoming unnecessarily complicated.

Hello Ethan,

I found another way to sort my surfaces the way I want it to have, by combing them in one number. My absolute last question is how sure you are with the area/circumference ratio. Is this something mathematically? Do you have any sources for that? You divide the area/sqrt(circumference), but this is not dimensionless. Its mÂ˛/m^(1/2).

Itâ€™s the area divided by the square of the circumference (sqr not sqrt). Imagine a square of side 1. The area is 1 and the circumference is 4. 1/(4^2) = 1/16. Now scale the square by a factor of alpha. The area is now alpha^2 and the circumference is 4alpha. The new area over the new circumference squared is alpha^2 /(16*alpha^2). The scale cancels out top and bottom.The same applies to any figure no matter how complex, just imagine that youâ€™ve first divided it into tiny squares.

BTW, the profile curve you are using for the sweep has an hourglass shape. It looks pretty symmetrical to me. If it was perfectly symmetrical about the â€śwaistâ€ť and the rail curves for the sweep are circular arcs, you shouldnâ€™t need more than five different molds. When I reflect the top half of the surface in the xy plane defined by the â€śwaistâ€ť, the two almost coincide. Aesthetically, theyâ€™re almost the same, so itâ€™s up to you.

Hello Ethan,

your geometrical explanation sounds reasonable, thank you. In fact the surface was not 100% symmetrical. Now it is, and I only got 5 different types of surfaces. I wanna do the same with my curves. I dont know why, but there are some curves not identical to the others. But it has to be an fault of grasshopper not of me.

surfaces -gaussian.gh (52.7 KB)

Paul, every time I look, things have changed dramatically and now thereâ€™s so much going on that Iâ€™m not sure where I should be paying attention. Would it be possible for you to start with something like what Iâ€™ve attached below. It is a surface, like the one you initially created but â€śguaranteedâ€ť symmetrical about the middle. The method I used is a little simpler than yours, so maybe there is something in your requirements that Iâ€™m overlooking. Maybe we can start from there.

symmetrical profile.gh (11.8 KB)

Because of all the symmetries involved now, I really donâ€™t think it should be any more complicated than this. In fact, you really donâ€™t need to compare curvatures at all, but itâ€™s still here just to put you at ease. You have a choice of Lunchbox quads or isotrimmed surfaces.

symmetrical profile 2.gh (16.1 KB)

Hello Ethan,

sorry for me being messy . But thank you for your patience. I appreciate it. So I build me definition up onto yours. I made some comments, so I hope its easier for you to understand. The surfaces are no more the problem. Now I want to sort the lines. But somehow I doesnt work like it should.

To my work. I sorted the surfaces by dividing the curvature by 1000 and by multiplying 1000 to the area/circumference ratio and then added the numbers. Now I got kind of two informations in one number and I was able to sort it like this. For the surfaces it works perfectly. But as you can see in the file. For the curves and lines it doesnt work. I dont know why.

symmetrical profile 2.gh (51.5 KB)

Could you explain what you need the individual curves for?

Does this help? I think part of the problem is that there are small floating point differences in lengths that should be the same, so they also appear as different in the sort and add those extra branches. I rounded the lengths to 5 places. Based on the symmetry, there should be 11 possibly different curves, which is the number of branches we get here.

symmetrical profile 2b.gh (53.2 KB)

Hello Ethan,

my project is a facade. So its interesting to know how many types of facade profiles you have to order
Oh sorry. That was my mistake. So I am fine.
Thank you

what is the cost because i am working on similar problem. And can i have a chat with you over whatsapp or telegram ?