3
$\begingroup$

Controlling the angle / sharpness at which edges are joined using geometry nodes

How can I reduce the amount of saw-tooth teeth but control the sharpness of the teeth at the end?

Sharpness of teeth at end (see red arrows)

img1

If I reduce the number of teeth it flattens out (see red arrows)

img2

Animation of teeth going from sharp to flat (see below). Is there a way to adjust the sharpness of the top of the teeth

ani1

I would like to be able to adjust the amount of teeth along with it's sharpness / angle / flatness using geometry nodes. See image below. Any ideas? I'm willing to try another geometry nodes option. I was trying with instances but that never lined up correctly.

What I'm trying to get in the bounty using geometry nodes (would like it to be parametric so the parameters can be easily changed).

Adjustable circular teeth (similar to the shape of a hole saw)

  1. Adjust inner and outer diameter of hole where teeth are located

  2. Be able to adjust the amount of teeth (the teeth and radius are not correct since the radius is not circular for some teeth, this animation is just to show how I would like it to work) ani1

  3. Be able to adjust height and depth location of teeth using geometry nodes (the teeth are correct this shows how I would like it to work the depth isn't shown in this animation) ani2

img teeth

See attached Blender file below

I will be 3D printing this so it does require thickness.

$\endgroup$
2
  • $\begingroup$ what do you mean by sharpness? in radial direction? or just the height of the teeth? $\endgroup$
    – Chris
    Sep 16, 2023 at 12:07
  • $\begingroup$ @Chris By sharpness I mean the height of the teeth coming to a point at the top. $\endgroup$
    – Rick T
    Sep 16, 2023 at 13:53

2 Answers 2

4
+50
$\begingroup$

I hope this meets your needs-- I started from scratch, rather than using your nodes as a base. I'll explain as I go along.

We'll start with the file and the overview:

enter image description here

So, first, I figured you're not concerned with topology here (other than no zero area faces, etc) since you're 3D printing. And, for the same reason, more vertices are probably preferable to fewer vertices. Because I wasn't entirely sure which angles you wanted to adjust, I just made controls for every possible parameter.

We're starting by making a solidifed cylinder via the use of curves:

enter image description here

Notice that what I'm doing here, by using a profile with a resolution of 4, is creating a square cross section for a circle. (I need to rotate it 45 degrees just because of the default orientation of a GN circle.)

I'm also capturing quite a few attributes. I'm capturing the index of my cross-section, an integer between 0 and 3 inclusive, so I can refer to particular parts of the geometry later. And I'm capturing the spline factor, which is a number ranging from 0-1 that is, here, just the remapped angle-- I can use this as a sort of polar coordinate for later manipulations.

Here's the first thing that I'm doing with them:

enter image description here

I'm using the captured spline factor to create a triangle wave along the curve via modulo math; the value of the modulo depends on how many teeth I want. Then, I'm just moving the top vertices, identified by the indices of the cross-section, up.

Note that the sharpness of this angle is fully determined by the count and the height of the sawtooth wave. (Really, all of those parameters are fully determined by any two of them.) I'm using Count and height ("Sharpness") to define that here. If we'd like, we could instead reverse-engineer the height we need for a particular angle (within bounds), using a bit of trigonometry, but it makes it more complicated, and you don't seem to need particular angles, just to be able to tune to eye, so height seems fine.

Because I wasn't entirely certain whether the "sharpness" of the teeth that want controlling refers to the angle of the sawtooth or whether you want flat sections as you have on some of your pictures, I've also created "plateau" controls, by clamping the height of sawtooth to a particular value with a mix node and a math/minimum node.

The indices of the cross-section are useful for other controls as well. We've already moved the cutting section on the basis of these indices; I can also control the height of the bottom, which is just the inverted selection. Finally, I can control what I call the "shear" of the blades, by moving a different cross-section selection:

enter image description here

Index 2 is the top inside of our cylinder. By moving this up or down, we can change a different angle (which might have been an angle you were interested in-- like I said, I wasn't quite sure from the question.)

You might wonder how I knew which cross-section indices were which. I didn't! But there's only four of them, so I just tried each one to see which it was.

I've also provided controls for radius, thickness, and resolution, which should be fairly self-explanatory. Note that the radius here refers to the circle running through the center; the outer radius is radius + (0.5 * thickness); the outer diameter is thickness + 2 * radius.

$\endgroup$
1
  • $\begingroup$ Absolutely fantastic! $\endgroup$
    – Rick T
    Sep 20, 2023 at 20:10
1
$\begingroup$

I don't want to be a know-it-all, and Nathan's answer is wonderful, however I have another suggestion here....

enter image description here enter image description here

To create a perfect geometry, you would need to add another point in the circle at the locations where the plateau intersects the tooth.

The trick here is that I use individual circle segments for this.

A tooth that may have a plateau will take up to three circle segments. Therefore, I first duplicate a circle with three times the number of teeth.

Then I trim these circles according to the number of teeth by capturing the value for the plateau in the segments representing the plateau, and the remainder in all other segments.

By accumulating these values afterwards, I get the required values that can be used for trimming the circles.

This then looks something like this:

enter image description here
(Here I have shifted each segment slightly on the Z-axis for better visibility)

To be able to form the teeth later, I then capture the value $1$ in the plateau circle segments and the curve factor in all other circle segments (once normal, and once inverted).

enter image description here

Here as a test only with shifted points, it looks like this:

enter image description here

Now, of course, I could convert the curves to a mesh and extrude the edges, but that creates an ugly mesh because extruding with Extrude Mesh creates weird interpolations:

enter image description here

For this reason I first convert the curves into a mesh, merge their endpoints and move all points with a certain offset to the inside.

Only then I extrude the outer mesh line and move the extruded positions to those of the mesh line previously offset to the center, whose positions I get with Sample Index.

In this step also the additional shifts for Shear and Sharpness are done, and finally I get a perfect mesh this way:

enter image description here

Finally, the faces of this mesh are simply extruded downwards and the mesh points are merged.

The result is then a perfect mesh without unwanted interpolations and correct intersection points on the circle:

enter image description here enter image description here
(Note: Because of the file size limitation of the GIF, I set the resolution of the circle very low here)


(Blender 3.6+)

$\endgroup$
2
  • $\begingroup$ I'm willing to try anything. $\endgroup$
    – Rick T
    Sep 22, 2023 at 17:59
  • $\begingroup$ This is also fantastic! $\endgroup$
    – Rick T
    Sep 22, 2023 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .