I am trying to draw this picture
I tried
CSGRegion["Union", {Cylinder[{{-50, 0, 0}, {50, 0, 0}}, 20], Cylinder[{{0, -50, 0}, {0, 50, 0}}, 20]}] I am trying to draw this picture
I tried
CSGRegion["Union", {Cylinder[{{-50, 0, 0}, {50, 0, 0}}, 20], Cylinder[{{0, -50, 0}, {0, 50, 0}}, 20]}] reg1 = CSGRegion[ "Difference", {Cylinder[{{-50, 0, 0}, {50, 0, 0}}, 20], Cylinder[{{-50, 0, 0}, {50, 0, 0}}, 15]}]; reg2 = CSGRegion[ "Difference", {Cylinder[{{0, -50, 0}, {0, 50, 0}}, 20], Cylinder[{{0, -50, 0}, {0, 50, 0}}, 15]}]; reg=CSGRegion["Intersection", {Style[reg1, Red], Style[reg2, Red]}] CSGRegion doesn't support opacity, we have to discretize the region.Graphics3D[{FaceForm[Directive@{Yellow, Opacity[.2]}], EdgeForm[], BoundaryDiscretizeGraphics[reg1, AccuracyGoal -> 2], BoundaryDiscretizeGraphics[reg2, AccuracyGoal -> 2], reg}, Boxed -> False] OpenCascadeLinkClear["Global`*"]; Needs["OpenCascadeLink`"]; shape1 = OpenCascadeShape[Cylinder[{{-50, 0, 0}, {50, 0, 0}}, 20]]; shape2 = OpenCascadeShape[Cylinder[{{-50, 0, 0}, {50, 0, 0}}, 15]]; shape3 = OpenCascadeShape[Cylinder[{{0, -50, 0}, {0, 50, 0}}, 20]]; shape4 = OpenCascadeShape[Cylinder[{{0, -50, 0}, {0, 50, 0}}, 15]]; shell12 = OpenCascadeShapeSurfaceMeshToBoundaryMesh[ OpenCascadeShapeDifference[shape1, shape2], "ShapeSurfaceMeshOptions" -> {"AngularDeflection" -> 0.1}]; shell34 = OpenCascadeShapeSurfaceMeshToBoundaryMesh[ OpenCascadeShapeDifference[shape3, shape4], "ShapeSurfaceMeshOptions" -> {"AngularDeflection" -> 0.1}]; bmesh = OpenCascadeShapeSurfaceMeshToBoundaryMesh[ OpenCascadeShapeIntersection[ OpenCascadeShapeDifference[shape1, shape2], OpenCascadeShapeDifference[shape3, shape4]], "ShapeSurfaceMeshOptions" -> {"AngularDeflection" -> 0.02}]; Graphics3D[{FaceForm[Directive@{Red, Opacity[.8]}], EdgeForm[], BoundaryMeshRegion@bmesh, FaceForm[Directive@{Yellow, Opacity[.1]}], EdgeForm[], BoundaryMeshRegion@shell12, BoundaryMeshRegion@shell34, EdgeForm[]}, Boxed -> False]