Videos
I've been working on a design project and I'm having trouble getting a seamless gradient overlay to work as intended. I've tried using the Gradient Tool, but no matter how I adjust the settings, the edges of the gradient always seem to get cut off. Has anyone else had success with creating seamless gradients in Illustrator? If so, what's your secret?
I've also tried using the "Linear Gradient" method, but it still doesn't seem to be working out for me. Is there a specific technique or setting that I'm missing? Any help would be greatly appreciated!
I need help trying to make the gradient in these figures, I'm new to the program and I'm having quite a hard time to figure out how to make the gradients, I already tried saving the gradient in my swatches but it's not letting me create one
I would simply create a thick stroke and apply the gradient to the stroke....

Then, if shapes are needed, it can be expanded to a Gradient Mesh object.

If you require the slight corner rounding, then merely stack 2 objects. A shape to include the corner rounding, then a stroke slightly thinner than the shape with with the gradient. When colors are the same, the stroke will visually blend to the shape and be indistinguishable.

You can even do this with a transparent-color-transparent gradient on the stroke. So that, to alter the object color, all you need to do is change the flat fill color of the underlying shape.

For me, the stacked gradient stroke method offers the easiest editing and optimal control.
See here: Complex gradient object with transparent center if you are unfamiliar with adding transparency to gradients within Illustrator.
Try with Blend.

- Delete the end paths

- Blend the two resultant paths (they must have the same amount of points and no fill)

- Expand the blend and blend again each path separately

- Use the Direct Selection Tool to select each path and change the stroke color

Simply use a thick stroke as opposed to a shape, and apply a gradient to the stroke.

You can expand the gradient stroke afterwards, resulting in a gradient mesh object.
You can also stack multiple strokes via the Appearance Panel to add additional gradients. Here I've added a second stroke with a gradient to indicate shadowing on the lower portion...

If you want to tinker you can try Illustrator's Blending:

The next cartoon shows how the arc is made:

Start with the edge curves
Make a three step blend to get 3 intermediate curves, expand the blend and ungroup the parts
Convert the strokes to outlines to be able to make width variations with the direct selection tool. You can as well use path width tool, but then you must expand the appearance of the strokes to get filled outlines. If you try to blend non-uniform strokes in step 5 the result will be non-predictable.
Change the fill colors of the areas to different greyshades. I used white in the 2nd and 4th shape.
Blend the shapes, use stepping option Smooth Color.
What do you get with this hassle? If you use a gradient, you will get the result much faster, but the shading would be the same in every place. Subtle variations need masking or layered extra shapes.
Not asked: A couple of elementary extrusions in a 3D program can create in few minutes something which needs 2000% more effort in 2D drawing programs. One example:

3D program generates the shading and the perspective with zero effort. I drew only 3 circles, the centerline of the arc and an ellipse. I pulled each of the extrusions (the body of the lock, the arc and 2 holes) with two clicks.
The shown item has no photorealistic materials, it has got only 2 solid colors: grey and yellow.
The next example has some attempt towards photorealism altough there's still much to improve when compared to renderings from Blender or premium priced commercial 3D modelling packages (=no surface textures, coarse resolution, bad false border in the arc due non-continuous surface curvature)




