What's new

using ai to calculate the geometry of gears

bolsover

Senior Member
I have been tinkering with chat.openai.com. After asking the usual questions about how to dispose of hated members of society, my interest turned back to the geometry of gears.
I'm completely blown away.
Following a couple of warm up questions, I asked the ai to provide an algorithm for the generation of 2D gear tooth profiles.
Here is the response:

Certainly! Here is an modified algorithm for generating a helical gear tooth in 2D using an involute curve for the tooth profile:
  1. Define the gear parameters: number of teeth (N), pitch diameter (D), pressure angle (α), profile shift coefficient (x), and helix angle (φ).
  2. Calculate the base pitch (Pb) using the following formula: Pb = π * D / N
  3. Calculate the working depth (hf) using the following formula: hf = (Pb * cos(α)) / (2 * cos(β))
  4. Calculate the tooth thickness at the pitch line (ht) using the following formula: ht = hf * cos(β)
  5. Calculate the addendum (ha) using the following formula: ha = hf + ht
  6. Calculate the dedendum (hf) using the following formula: hf = ha - 2 * ht
  7. Calculate the profile shift (xs) using the following formula: xs = x * hf
  8. Calculate the involute curve using the following steps:
  9. Choose a point on the base circle as the starting point of the involute curve. This point is usually at the intersection of the base circle and the straight line drawn from the center of the base circle to the point of tangency of the involute curve with the base circle.
  10. Draw a straight line from the starting point to the point of tangency.
  11. Calculate the radius of curvature (R) at the point of tangency using the following formula: R = (D / 2) * (1 / cos(α))
  12. Calculate the distance (s) along the involute curve from the starting point to the point of tangency using the following formula: s = R * (α - sin(α))
  13. Calculate the coordinates (x, y) of the point of tangency using the following formulas: x = R * cos(α) + s, y = R * sin(α)
  14. Draw a circular arc from the point of tangency to the next point on the involute curve. The radius of the arc is equal to the radius of curvature at the point of tangency.
  15. Repeat steps 5 and 6 for each point along the involute curve until you reach the desired length.
  16. Rotate the involute curve by the helix angle (φ) for each subsequent tooth.
  17. Repeat steps 8 and 9 for each tooth.
What surprises me is that not only does the ai give a clear reply but is also understands my poory phrased question.

I reccomend everyone to get an account.

db
 

NateLiquidGravity

Alibre Super User
I saw a video of people getting ChatGPT to produce them direct code. Also saw nvidia's new text to 3d models for direct use in game.
The future is amazing/scary.
 

bolsover

Senior Member
I saw a video of people getting ChatGPT to produce them direct code. Also saw nvidia's new text to 3d models for direct use in game.
The future is amazing/scary.
I did try generating some quite trivial code... Worked splendidly in C# and Java. I would expect it to be just as good in other popular languages. Python should be easy enough. The real trick is asking good concise questions and having enough knowledge of the subject to get a well refined response.
For gears, the initial response approximated the tooth curve to the radius of a circle. I had to ask for the response to use an involute curve. I also asked for the base relief to be a trochoidal curve. I got a quite plausible response but have not yet checked the validity.
db
 

Max

Administrator
Staff member
I've been playing a lot with Stable Diffusion for image generation, and ChatGPT for text-based. I think an important qualifier for ChatGPT is that it is excellent at producing answers that look correct. Those answers often are correct as well, but not always.

For example, we asked it how to hide a layer in Alibre Design, and it gave me a very nice step-by-step guide on how to use non-existent menus (which were logically named) to access tools we don't have (also properly named). Just be sure to sanity check :D

What is really interesting is text-to-3D: https://techcrunch.com/2022/12/20/openai-releases-point-e-an-ai-that-generates-3d-models/

As an excellent youtuber I follow would say, "imagine where we will be 2-3 papers down the line".

It's going to be an interesting 2020-2030 season of Humans, for sure :D
 

Max

Administrator
Staff member
I did try generating some quite trivial code... Worked splendidly in C# and Java. I would expect it to be just as good in other popular languages. Python should be easy enough. The real trick is asking good concise questions and having enough knowledge of the subject to get a well refined response.

I saw an interesting take on this topic. As this technology gets better, say over 20 years - long term, the job power will begin to shift from people who can do things (write code, draw things, make 3D models) to people who excel at communicating what they need to be done. This implies they have a good knowledge set and also can be complete, concise, and explicit about what they need from the system. Kind of like some people are waaaay better at using Google than other people. I think for complex software it's farther off than for other things. We're a ways off in general, but I bet we'll start to see this happening within 5-7 years.
 

OTE_TheMissile

Alibre Super User
There's a big argument in the anime fanart community right now over people passing off AI-generated art as their own (which, OK, you need to know what words to feed the AI to get a result, but c'mon, that doesn't compare to actually sketching, lining, and coloring by hand). It probably would've been fine if it was limited to people using it to better convey to artists what they want their final actual art to look like, (i.e. use the AI to get a visual ballpark and hire an artist to take that concept to completion) but lately the AI stuff is getting frighteningly passable as real hand-drawn works and naturally some folks are trying to make an income off of it.

Now, that's art, which just has to look good. Here we're talking manufacturing industry, where things have to be made to set standards to work properly. I'd like to say the same thing can't happen here for that reason, but then the fanart community was probably saying the same thing 2-3 years ago and look where they are now, so I dunno.

Kind of like some people are waaaay better at using Google than other people.
Few years ago when Management blessed me with a really nice '18 Ford F-550 box truck for parts running, I wanted to get it a cell phone holder for Google Maps. I had a really nice one in my personal truck that I bought at Wal-Mart probably 10 years prior, only I didn't know who made it and the branding on it was just a stylized letter T with a red diamond in a box shape. I scoured through Wal-Mart, Amazon, eBay, you name it, looking through the gazillion car phone mounts out there with zero luck. Finally took a photo of mine and shared it on Facebook asking if anyone recognized it, totally expecting it to be some overseas brand that long since folded probably the week I bought mine.

Exactly three minutes later a buddy sent me an Amazon link to it. Told me he just searched something like "red diamond t phone holder" and it was the first thing that came up.

h o w t h e f u ...
 

Max

Administrator
Staff member
There's a big argument in the anime fanart community right now over people passing off AI-generated art as their own (which, OK, you need to know what words to feed the AI to get a result, but c'mon, that doesn't compare to actually sketching, lining, and coloring by hand). It probably would've been fine if it was limited to people using it to better convey to artists what they want their final actual art to look like, (i.e. use the AI to get a visual ballpark and hire an artist to take that concept to completion) but lately the AI stuff is getting frighteningly passable as real hand-drawn works and naturally some folks are trying to make an income off of it.

Interestingly, a monkey named Naruto of all things may have contributed to the lack of copyrightability for AI generated comics, and other works in general:

 

Ex Machina

Senior Member
For example, we asked it how to hide a layer in Alibre Design, and it gave me a very nice step-by-step guide on how to use non-existent menus (which were logically named) to access tools we don't have (also properly named). Just be sure to sanity check :D
Could this be used to validate whether something is intuitive and/or user-friendly? I mean, these algorithms are trained on existing data so maybe human users might be exposed to the same data?
 

Max

Administrator
Staff member
Could this be used to validate whether something is intuitive and/or user-friendly? I mean, these algorithms are trained on existing data so maybe human users might be exposed to the same data?
I think what is more likely to result is it might, might, be a high level test to determine how a tool's name and location compare to the sum total of its software knowledge from all the help documents it's ingested.

In other words maybe it could be used as a proxy for how standard or non standard something is. Maybe.

Intuitive and user friendly, I don't think so. It is not trained on what is user friendly or not, rather it is trained on what exists. Consider a program like Microsoft Word. User friendly? Meh. You don't use 90% of the buttons or ui but you sure have to muck through it to find spell check. Most software isn't very user friendly imo. So something trained on most software's help documentation isn't a good guide for that.

What it might be good for is formatting of help documentation though.
 

bolsover

Senior Member
I saw an interesting take on this topic. As this technology gets better, say over 20 years - long term, the job power will begin to shift from people who can do things (write code, draw things, make 3D models) to people who excel at communicating what they need to be done. This implies they have a good knowledge set and also can be complete, concise, and explicit about what they need from the system. Kind of like some people are waaaay better at using Google than other people. I think for complex software it's farther off than for other things. We're a ways off in general, but I bet we'll start to see this happening within 5-7 years.
I'm sure you are right. The technology is not really mature - yet. As I said, I did try using ChatGPT to generate some 'real' code. The code was all syntactically correct and at first glace appeared to make sense. But - the devil is in the detail.. One part of the gear generation algorithm was to calculate the point of intersection between the involute curve of the tooth flank and the trochoidal curve at the tooth root. The method provided for the calculation simply took the end points of the two curves connected these with straight lines and found the intersection of the two straight lines. The 'real' solution would be MUCH more complex!

That said, other parts of the code generated were actually surprisingly good and accurate. I think the takeaway is that is probably OK for generating a starting point for an expert human with good knowledge of the subject to debug.

David
 
Top