# Edges for the union (overlaped) of multiple 3d objects. Using EdgeForm and RegionUnion

I'm trying to generate outer edges of two overlapping objects. I've thought that one can overlap objects with RegionUnion. However I don't want to get the inner edges to be drawn.

I tried the EdgeForm[] function, but couldn't manage to just generate the outer edges of the overlapping objects.

This is my attempt:

Graphics3D[
{
{Blue // Lighter // Lighter, Opacity[0.8]
, RegionUnion[
Parallelepiped[{-.25, -.5, 0}, {{.5, 0, 0}, {0, 1, 0}, {0, 0, -0.04}}]
, Parallelepiped[{-.5, -.25, 0}, {{1, 0, 0}, {0, .5, 0}, {0, 0, -0.04} }]
]
}
, {Gray, Opacity[0.2], EdgeForm[],
RegionUnion[
Parallelepiped[{-.25, -.5, -0.04}, {{.5, 0, 0}, {0, 1, 0}, {0,  0, -0.08}}]
, Parallelepiped[{-.5, -.25, -0.04}, {{1, 0, 0}, {0, .5, 0}, {0, 0, -0.08}}]
]}}]


 RegionMeshMergeCells

solids = {Parallelepiped[{-.25, -.5,
0}, {{.5, 0, 0}, {0, 1, 0}, {0, 0, -0.04}}],
Parallelepiped[{-.5, -.25,
0}, {{1, 0, 0}, {0, .5, 0}, {0, 0, -0.04}}],
Parallelepiped[{-.25, -.5, -0.04}, {{.5, 0, 0}, {0, 1, 0}, {0,
0, -0.08}}],
Parallelepiped[{-.5, -.25, -0.04}, {{1, 0, 0}, {0, .5, 0}, {0,
0, -0.08}}]};
mesh = BoundaryDiscretizeRegion[RegionUnion[solids]] //
RegionMeshMergeCells;
Graphics3D[{Blue // Lighter // Lighter, Opacity[0.8], mesh}]


One way by using the RegionPlot3D after converting the polyhedron(RegionUnion[..]) to Region.

solids = {Parallelepiped[{-.25, -.5, 0}, {{.5, 0, 0}, {0, 1, 0}, {0, 0, -0.04}}],
Parallelepiped[{-.5, -.25, 0}, {{1, 0, 0}, {0, .5, 0}, {0, 0, -0.04}}],
Parallelepiped[{-.25, -.5, -0.04}, {{.5, 0, 0}, {0, 1, 0}, {0, 0, -0.08}}],
Parallelepiped[{-.5, -.25, -0.04}, {{1, 0, 0}, {0, .5, 0}, {0, 0, -0.08}}]};

RegionPlot3D[{Region@RegionUnion[solids]},PlotStyle -> Directive[Blue // Lighter // Lighter, Opacity[0.8]]]


• I really like the rendering of this one, than the Graphics3D function. However as I'm working with more Graphic3D objects (text callouts, arrows, etc), the RegionPlot3D is uncompatible with my objects. (maybe i'm not constructing them properly) Thanks! How can I get this rendering for the Graphic3D function? Commented Jan 10, 2023 at 10:46
• The RegionPlot3D returns Graphics3D as a head, therefore you can combine it with other Graphics3D objects by using the Show function or you can use it together with other objects inside a single Graphics3D call by removing the Graphics3D head e.g. Graphics3D[{Sphere[{0, .05, 0}, .1], List @@ RegionPlot3D[{Region@RegionUnion[solids]}, PlotStyle -> Directive[Blue // Lighter // Lighter, Opacity[0.8]]]}] Commented Jan 11, 2023 at 20:07