2
$\begingroup$

I want to a create cylinder with 2 ends rounded.

I've tried modifiers, slicing the cylinder, join, convert to mesh.. I just can't seem to get rid of a host of problems:

  • internally the finished shape contains the cylinder wall and the cube wall
  • there is a weird visual artifact over the top because of duplicate faces (I think)
  • I've also tried Merge by Distance to fix it, but it doesn't work

The object is for 3D printing, so the weird internal geometry messes things up.

What's the best, easiest way to get this done?

enter image description here

$\endgroup$

6 Answers 6

7
$\begingroup$
  1. Make a cuboid in the dimensions you want the object to have, if you scaled it in Object Mode make sure afterwards you apply the scale with Ctrl+A > Apply > Scale.

cube dimensions

  1. Tab into Edit Mode and select the four edges at the ends where you want the half cylinders.

select edges

  1. Start beveling the edges with the Bevel tool by pressing Ctrl+B.

beveling

  1. By scrolling with the mouse wheel you can increase the number of segments. Press C to enable Clamp Overlap. With this you can extend the bevel size until it meets in the middle and it will not overlap (if it does, toggle Clamp Overlap off/on by pressing C again). When you've beveled to maximum extent, left-click to confirm the bevel.

bevel max

  1. In the center where the bevel segments meet you now have doubled vertices. To get rid of them, hit M > Merge > By Distance.

merge vertices

$\endgroup$
4
  • $\begingroup$ Thank you for this! $\endgroup$ Dec 30, 2022 at 18:40
  • 1
    $\begingroup$ ... if the ends are not semicircular, check 'Shape' is set to 0.5.. I suppose.. :) $\endgroup$
    – Robin Betts
    Dec 30, 2022 at 19:54
  • $\begingroup$ @RobinBetts Good addition. I was just assuming a newbie would have the Bevel still at default settings, so the shape will be at 0.5 $\endgroup$ Dec 30, 2022 at 20:51
  • $\begingroup$ Hence hesitancy... Will just leave the comment. $\endgroup$
    – Robin Betts
    Dec 30, 2022 at 21:06
3
$\begingroup$
  1. Add or use the default cube and scale on either $X$ or $Y$ axis as desired.
  2. Bevel the vertical edges with ⌃ Ctrl + B and C also to use clamp overlap option.
  3. Use the Merge by distance operator to remove double vertices created by the bevel operation by pressing M>By distance
  4. Edge Crease the top and bottom edges with ⌃ Ctrl + E
  5. Add a Subdivision surface modifier

enter image description here

$\endgroup$
3
  • $\begingroup$ Oh, you were writing the same answer as me. But you should merge the doubled vertices after beveling, otherwise you might get problems with the Subdivision Surface modifier or other things in general. $\endgroup$ Dec 30, 2022 at 18:17
  • $\begingroup$ Thanks for the answer! $\endgroup$ Dec 30, 2022 at 18:39
  • 1
    $\begingroup$ @GordonBrinkmann you are right! :) I did forget about it! $\endgroup$
    – Timaroberts
    Dec 30, 2022 at 19:23
1
$\begingroup$

I would try getting two halves of a cylinder (as if split down the middle and separated by a distance), and then running Bridge Edge Loops on it. Hey, you could even let it fill in for the cylinder end caps. To get two half cylinders, just create a whole one, select and delete one half (X-ray and boundary select vertices from an orthographic view should do it), and then duplicate it. You can switch to edge select and use Select Boundary Loop to get the relevant edges.

$\endgroup$
1
$\begingroup$

Fully procedural you can use geometry nodes:

enter image description here

result:

enter image description here

$\endgroup$
0
$\begingroup$

I am not going to explain each step in-depth. I suggest reading up on the Box Select tool, X-Ray mode, loop cuts and the Mirror modifier in order to understand the mechanics behind these steps.

PART 1

  1. Add one cube to your scene.
  2. Add one cylinder to your scene.
  3. Hide the cube for now (we will edit the cylinder first).
  4. With the cylinder selected, switch to Edit Mode and press NumPad 1 to enter Front View.
  5. Toggle X-Ray vision with AltZ.
  6. Press B to toggle Box Select
  7. Select and delete the vertices on the right half of the cylinder. This should leave an open, half-moon shape if viewed from the top. This is IMPORTANT as it will prevent the odd look from excess geometry that you posted about!
  8. Toggle Object mode
  9. Hide the cut-in-half cylinder

PART 2

  1. Un-hide the cube
  2. Select the cube
  3. Toggle Edit Mode and press NumPad 1 to enter Front View
  4. Press CtrlR to begin a loop cut. With the yellow line oriented vertically, press the Esc key, or right click to make the cut exactly in the center of the cube.
  5. Box select the vertices on the left side and delete. When viewed from the front, you should have half a cube with five (5) faces, and one (1) open face.
  6. Press NumPad 3 to go into side view. Delete this face of the half-cube. This should leave you looking through the geometry. You should have four (4) faces now.

PART 3

  1. Unhide the cylinder so that you can see both objects.
  2. With both objects selected, press CtrlJ to make both objects a single object that can be edited.
  3. Enter edit mode in Top View (NumPad 7)
  4. Box select the top vertex where the cube and cylinder intersect. M > By Distance.
  5. Do this again for the bottom vertex
  6. Select edge loop for the top open face of the cylinder (looks like a backwards D). F to fill face. CtrlNumPad 7 and repeat for bottom of cylinder.
  7. Add mirror modifier with merge and clipping enabled.
  8. Select all geometry and press G, then X to constrain to x axis, then -1 to move geometry -1 units.
  9. Apply modifier.
  10. Select edge loop in the middle of the geometry where the mirror was applied. Delete > Dissolve Edges.

All done! Good Luck. Ask me if you need more help.

enter image description here

enter image description here

$\endgroup$
0
$\begingroup$

Two words. Boolean union. No artifacts since after the operation, you have only one object, not two sharing the same space. This will create a solid object.

If you want it hollow with walls of thickness t, duplicate it, scale down x,y,z so new dimensions are all 2t smaller than original, center new object into old and do a boolean difference operation. This leaves no internal structure.

Other solutions may look good on a computer screen, but they provide no options for wall thickness. (a must for 3D printing)

This page explains proper operation of boolean modifiers. https://artisticrender.com/how-to-use-boolean-modifier-in-blender/

$\endgroup$
3
  • $\begingroup$ I was doing boolean unions and still getting artifacts and internal structures. Not sure why. Also wall thickness is something I handle in the slicing software to prepare for print, not on the model itself. $\endgroup$ Jan 1, 2023 at 10:19
  • $\begingroup$ "Other solutions may look good on a computer screen, but they provide no options for wall thickness. " None of all the people I know are setting the wall thickness in the model itself. They are all doing it in the printer software - there you also set if you want the model filled with a structure, how dense the structure should or if you want it completely solid for whatever reason. You only have to model wall thickness in Blender if you want a specific shape of the hollow inside. $\endgroup$ Jan 1, 2023 at 12:46
  • $\begingroup$ And your scaling solution will certainly become problematic with more complex geometry, especially non-convex shapes. Since you just wrote "scale down" I guess you meant the regular scaling with S, however if someone would use your method it would be better to work with the Shrink/Fatten tool Alt+S in Edit Mode. But this will also become messy very quick with more complex shapes with the danger of overlapping geometry if you simply use 2t as scaling factor. $\endgroup$ Jan 1, 2023 at 12:48

You must log in to answer this question.

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