ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

Can excel do this with graphs?



Beauvais Motorsport

ClioSport Club Member
I made a mock graph ignoring actual requirements just for reference. I need to create data points of the 'rack gain' for every 1deg of pinion angle following the line graph, I know with this example since the graph is linear its an easy calculation but normally the graph will be a spline so the changes start gradually. I also need a way to total the amount of travel that the graph creates, so all the data points totalled. Unfortunately the software that does all this for you and creates the surfaces for the variable rack is 100k usd, yes 100,000. So I'm doing it my self for the price of a few research papers, £90. Although there is another software by a Japanese company I'm reluctant to ask them the price.

Screenshot 2024-12-12 173232.png


@Robbie Corbett
This is one of the methods of creating variable racks and spiral bevel gears, among others. The pinion creates the rack by boolean subtraction, rotate the pinion 1-2deg and move the rack blank a specified amount, boolean, repeat another 800 times lol. Which is why I need the data points and to plot them into a sw macro/script. I had to see this method work so did this manually, some 150 times...
I basically add 0.00025mm to every move of the rack from 0.16mm until I reached 0.19 then continued with 0.19. I need to have excel or some type of software automatically create all the 0.16025 - 0.1605 etc

Screenshot 2024-12-12 180115.png


You can see there examples. The profile points/splines create the final surfaces of the teeth which are then used to 'cut' the rack.

Screenshot 2024-12-12 180944.png


Screenshot 2024-12-12 180925.png


Screenshot 2024-12-07 070738.png


Screenshot 2024-12-12 182850.png


1-s2.0-S1755581721000602-gr15.jpg
 

The Psychedelic Socialist

ClioSport Club Member
Wouldn't know where to start and dont know how much I could trust it!
I don't really understand what you're asking, but I copied and pasted your post straight into ChatGPT and it gave this, which may well be nonsense:

Overview

What you’re trying to accomplish is to generate a set of incremental data points defining how much the rack translates relative to the pinion rotation, at small angle increments (e.g. every 1°). This data can then be used to drive a macro or script that emulates the cutting process of a variable rack or other complex gear surface. Since off-the-shelf software for this can be prohibitively expensive, the idea is to approximate the motion using Excel or a similar tool.

In simpler terms:

  1. You have a graph or known relationship between pinion angle and rack translation (rack gain).
  2. You need to discretize that relationship at fixed angle increments (for example, every 1°).
  3. For each 1° increment, you need to find the corresponding rack translation increment.
  4. You then sum these increments to find the total rack travel.
  5. In more complex cases, the relationship isn’t linear but follows a spline (smooth, gradually changing curve). In that case, you need to fit or interpolate the data to a spline first, then sample that spline at the desired increments.
Key Steps

  1. Defining the Input Data:
    Typically, you start with either:
    • A set of known data points (pinion angle vs. rack position) derived from measurements, another software’s output, or by reading off a graph.
    • Or a known mathematical relationship (like a polynomial or piecewise function) that represents the rack gain as a function of pinion angle.
  2. Interpolation Using a Spline (if the relationship isn’t linear):
    If you have discrete data points (e.g., at 0°, 5°, 10°, etc.) and need values at every 1°, you can use spline interpolation. Tools that can do this:
    • Excel with Add-Ons: By default, Excel doesn't have a native spline function, but you can:
      • Use Excel’s built-in FORECAST() or polynomial trendlines for a rough approximation.
      • Use third-party Excel add-ins (e.g., XLSTAT) that can perform spline interpolation.
    • Python (Recommended if Possible): Python’s scipy.interpolate module can easily fit a cubic spline to your known data and then sample at any resolution you desire.
    • Mathematica or MATLAB: If you have access, these have built-in spline functions.
  3. Generating the Data Points in Excel: Let’s assume you have a starting angle of 0° and go up to some final angle (e.g., 800° total rotation in increments of 1°). You have two main approaches:
    A. If the data is approximately linear or piecewise linear:
    Suppose you know that from 0° to 100°, the rack translation increases linearly from 0.16 mm at 0° to 0.19 mm at 100°, and then stays constant at 0.19 mm beyond that. You can do:
    • In one column, list angles: 0, 1, 2, …, 100, 101, etc.
    • In the next column, for each angle, compute the translation:
      • For angle ≤ 100°, use a formula that linearly interpolates between 0.16 and 0.19 mm.
      • For angle > 100°, just set the value to 0.19 mm.
    For example:
    • A2: angle = 0
    • B2: translation = 0.16 mm
    • A3: angle = 1
    • B3: translation = 0.16 + (0.00025 * angle) until it hits 0.19 mm
    You can write a formula like:
    =MIN(0.16 + 0.00025 * A2, 0.19)
    This increments by 0.00025 mm per degree until it reaches 0.19 mm. Copy down for all rows.
    Once you have all these increments, you can sum them (using =SUM(B2:B802) if you have 800 rows) to find the total rack travel.
    B. If the relationship is more complex (Spline Interpolation):
    If you have a set of key points, say (Angle, Rack_Translation):
    (0°, 0.16 mm)
    (10°, 0.1605 mm)
    (20°, 0.162 mm)
    (30°, 0.165 mm)
    ...
    (N°, ...)

    You need to fit a spline. Without an expensive CAD/CAM add-in, do the following:
    • In Python (if possible):
      import numpy as np
      from scipy.interpolate import CubicSpline

      # Known data arrays
      angles = np.array([0, 10, 20, 30, ...]) # degrees
      translations = np.array([0.16, 0.1605, 0.162, 0.165, ...])

      # Fit a cubic spline to these points
      cs = CubicSpline(angles, translations)

      # Now sample every 1 degree
      new_angles = np.arange(0, max(angles), 1) # from 0 to final angle by 1°
      new_translations = cs(new_angles) # spline evaluated at each integer degree

      # Save to a CSV for Excel
      data_out = np.column_stack((new_angles, new_translations))
      np.savetxt('output.csv', data_out, delimiter=',', header='Angle,Translation', comments='')

      Once you have output.csv, open it in Excel, and you have a translation at every 1°. You can then:
      • Sum the translations for total travel: =SUM(B2:B802) if you have 800 increments.
    If using only Excel and without Python, consider:
    • Creating a polynomial trendline from your known data points in a chart.
    • Extracting that polynomial equation and applying it to each angle.
    • This is less accurate than a proper spline but still better than manual steps.
    Note: The spline or polynomial gives you the position of the rack at each angle. If what you really need is the incremental movement at each step, you can calculate the difference between successive points. For example, if at 0° your rack is at 0.16 mm, and at 1° it’s at 0.16025 mm, the incremental move from 0° to 1° is 0.16025 - 0.16 = 0.00025 mm. By doing this for each step (taking the difference between consecutive translation values), you can see how much it moves per 1° increment and integrate that into your macro.
  4. Summation of Rack Travel:
    Once you have a column of translations corresponding to each angle, you can sum them if you’re looking at absolute increments. Typically, you might want the final rack position at each angle, not just increments. The total travel at any angle step is just the difference from the initial position to that current position. If you do need cumulative increments, just ensure you’re adding the differences, not the absolute positions.
Practical Tips:

  • Read Data from a Graph: If your data is currently only in a graphical form (like a PDF or an image), you can:
    • Digitize it using a tool such as WebPlotDigitizer (free online tool) to get a set of (Angle, Rack) numeric pairs.
    • Once you have the numeric data, apply the spline/polynomial fitting.
  • Fine-Tuning Steps: If you need smaller increments (like 0.5° or 0.1°), just adjust your array and formulas accordingly.
  • Verification: Start with a smaller range and manually check a few points to ensure the interpolation and increments match your expectations from the reference graph.
Conclusion:

You don’t need a $100k software package to generate these increments. With some basic interpolation techniques, Excel or Python, and a bit of time setting up formulas or scripts, you can produce a full table of angle vs. rack translation data points. Then, summing up these increments or positions will give you the total travel needed to replicate the complex shaping of a variable rack or spiral bevel gear tooth surface.
 

Beauvais Motorsport

ClioSport Club Member
It's pretty good for jobs like this. Basically break it down into bullet points of exactly what you want it to do.

It'll either tell you how to do it, or generate code for a macro/vba. I use it for matlab all the time.
One of the papers used Optimization Toolbox in matlab to workout a better a gear tooth profile for this method but I'm still need to a create a reliable macro to create the model first!

I'm using chatgpt now, its basically created the data points in excel instantly which is great. But I dont know the exact lingo to tell it to smooth the transitions so its coming up with some wild graphs. Will keep at it. Definitely feels like cheating lol.
 

Beauvais Motorsport

ClioSport Club Member
@Louis So it did it all for me lol. Could it help with the code to create a solidworks add in/stand alone program that would automatically create the data points from a graph that was created using minimal input? Basically how the Japanese software works. Create the data points and put them into the solidworks macro/script.

Screenshot 2024-12-12 200756.png
 

Beauvais Motorsport

ClioSport Club Member
I don't really understand what you're asking, but I copied and pasted your post straight into ChatGPT and it gave this, which may well be nonsense:

Overview

What you’re trying to accomplish is to generate a set of incremental data points defining how much the rack translates relative to the pinion rotation, at small angle increments (e.g. every 1°). This data can then be used to drive a macro or script that emulates the cutting process of a variable rack or other complex gear surface. Since off-the-shelf software for this can be prohibitively expensive, the idea is to approximate the motion using Excel or a similar tool.

In simpler terms:

  1. You have a graph or known relationship between pinion angle and rack translation (rack gain).
  2. You need to discretize that relationship at fixed angle increments (for example, every 1°).
  3. For each 1° increment, you need to find the corresponding rack translation increment.
  4. You then sum these increments to find the total rack travel.
  5. In more complex cases, the relationship isn’t linear but follows a spline (smooth, gradually changing curve). In that case, you need to fit or interpolate the data to a spline first, then sample that spline at the desired increments.
Key Steps

  1. Defining the Input Data:
    Typically, you start with either:
    • A set of known data points (pinion angle vs. rack position) derived from measurements, another software’s output, or by reading off a graph.
    • Or a known mathematical relationship (like a polynomial or piecewise function) that represents the rack gain as a function of pinion angle.
  2. Interpolation Using a Spline (if the relationship isn’t linear):
    If you have discrete data points (e.g., at 0°, 5°, 10°, etc.) and need values at every 1°, you can use spline interpolation. Tools that can do this:
    • Excel with Add-Ons: By default, Excel doesn't have a native spline function, but you can:
      • Use Excel’s built-in FORECAST() or polynomial trendlines for a rough approximation.
      • Use third-party Excel add-ins (e.g., XLSTAT) that can perform spline interpolation.
    • Python (Recommended if Possible): Python’s scipy.interpolate module can easily fit a cubic spline to your known data and then sample at any resolution you desire.
    • Mathematica or MATLAB: If you have access, these have built-in spline functions.
  3. Generating the Data Points in Excel: Let’s assume you have a starting angle of 0° and go up to some final angle (e.g., 800° total rotation in increments of 1°). You have two main approaches:
    A. If the data is approximately linear or piecewise linear:
    Suppose you know that from 0° to 100°, the rack translation increases linearly from 0.16 mm at 0° to 0.19 mm at 100°, and then stays constant at 0.19 mm beyond that. You can do:
    • In one column, list angles: 0, 1, 2, …, 100, 101, etc.
    • In the next column, for each angle, compute the translation:
      • For angle ≤ 100°, use a formula that linearly interpolates between 0.16 and 0.19 mm.
      • For angle > 100°, just set the value to 0.19 mm.
    For example:
    • A2: angle = 0
    • B2: translation = 0.16 mm
    • A3: angle = 1
    • B3: translation = 0.16 + (0.00025 * angle) until it hits 0.19 mm
    You can write a formula like:
    =MIN(0.16 + 0.00025 * A2, 0.19)
    This increments by 0.00025 mm per degree until it reaches 0.19 mm. Copy down for all rows.
    Once you have all these increments, you can sum them (using =SUM(B2:B802) if you have 800 rows) to find the total rack travel.
    B. If the relationship is more complex (Spline Interpolation):
    If you have a set of key points, say (Angle, Rack_Translation):
    (0°, 0.16 mm)
    (10°, 0.1605 mm)
    (20°, 0.162 mm)
    (30°, 0.165 mm)
    ...
    (N°, ...)

    You need to fit a spline. Without an expensive CAD/CAM add-in, do the following:
    • In Python (if possible):
      import numpy as np
      from scipy.interpolate import CubicSpline

      # Known data arrays
      angles = np.array([0, 10, 20, 30, ...]) # degrees
      translations = np.array([0.16, 0.1605, 0.162, 0.165, ...])

      # Fit a cubic spline to these points
      cs = CubicSpline(angles, translations)

      # Now sample every 1 degree
      new_angles = np.arange(0, max(angles), 1) # from 0 to final angle by 1°
      new_translations = cs(new_angles) # spline evaluated at each integer degree

      # Save to a CSV for Excel
      data_out = np.column_stack((new_angles, new_translations))
      np.savetxt('output.csv', data_out, delimiter=',', header='Angle,Translation', comments='')

      Once you have output.csv, open it in Excel, and you have a translation at every 1°. You can then:
      • Sum the translations for total travel: =SUM(B2:B802) if you have 800 increments.
    If using only Excel and without Python, consider:
    • Creating a polynomial trendline from your known data points in a chart.
    • Extracting that polynomial equation and applying it to each angle.
    • This is less accurate than a proper spline but still better than manual steps.
    • Note:
    The spline or polynomial gives you the position of the rack at each angle. If what you really need is the incremental movement at each step, you can calculate the difference between successive points. For example, if at 0° your rack is at 0.16 mm, and at 1° it’s at 0.16025 mm, the incremental move from 0° to 1° is 0.16025 - 0.16 = 0.00025 mm. By doing this for each step (taking the difference between consecutive translation values), you can see how much it moves per 1° increment and integrate that into your macro.
  4. Summation of Rack Travel:
    Once you have a column of translations corresponding to each angle, you can sum them if you’re looking at absolute increments. Typically, you might want the final rack position at each angle, not just increments. The total travel at any angle step is just the difference from the initial position to that current position. If you do need cumulative increments, just ensure you’re adding the differences, not the absolute positions.
Practical Tips:

  • Read Data from a Graph: If your data is currently only in a graphical form (like a PDF or an image), you can:
    • Digitize it using a tool such as WebPlotDigitizer (free online tool) to get a set of (Angle, Rack) numeric pairs.
    • Once you have the numeric data, apply the spline/polynomial fitting.
  • Fine-Tuning Steps: If you need smaller increments (like 0.5° or 0.1°), just adjust your array and formulas accordingly.
  • Verification: Start with a smaller range and manually check a few points to ensure the interpolation and increments match your expectations from the reference graph.
Conclusion:

You don’t need a $100k software package to generate these increments. With some basic interpolation techniques, Excel or Python, and a bit of time setting up formulas or scripts, you can produce a full table of angle vs. rack translation data points. Then, summing up these increments or positions will give you the total travel needed to replicate the complex shaping of a variable rack or spiral bevel gear tooth surface.

Thats pretty much it :LOL: I've been hesitant to use ai due to pride but now I really couldn't care lol.



This is the software. You input the desired rack ratio and it creates the surfaces of the rack teeth that you then put into cad to 'cut' a rack blank to make the model. Unlike typical gears where they are normally made via hobbing or shaping, the variable rack is done by forging (mass production) or cnc milling for small quantities, so an exact cad model is required.


Although the Japanese software actually makes the complete model of the teeth and not just the surfaces of the teeth faces...
 

Beauvais Motorsport

ClioSport Club Member
So its practically making it for me. I just tell it what I want one by one or just a couple things at a time as to make sure each step works. I started off by telling it what I wanted to do regarding taking data points from a graph that you create to then use them as axis translations/rotations to perform a task in solidworks which it understand exactly. Will keep adding the functions then look at the gui!

Screenshot 2024-12-13 180434.png
 
  • Like
Reactions: Gus


Top