I wish to use RegionDifference to take a cube shape out of a cylinder. First I make the cylinder and cube and combine them in RegionUnion.
reg1 = Cylinder[{{0, 0, 0}, {10, 0, 0}}, 0.5];
reg2 = Cuboid[{5, 0, 0}, {10, 1, 1}];
Region[RegionUnion[reg1, reg2], Axes -> True]

So this looks good so far. Now I wish to take the cuboid out of the cylinder leaving a notch in the cylinder. I try
reg = RegionDifference[reg1, reg2];
Region[reg, Axes -> True, PlotRange -> All]

My cylinder is chopped off short and given a bad end (away from the subtraction). Is there a workaround?
Version 11.3 for windows.


BooleanRegionfacilities. – Henrik Schumacher Mar 14 '19 at 18:37