I'm trying to rigorously describe an object that I'm calling a "portal". The situation is easiest to describe in two dimension.
I start with a line segment $pq$ in $\mathbb{R}^2$. I want to remove the relative interior of $pq$ from $\mathbb{R}^2$, pull apart the opening and consider the new "boundary" which I will denote by an oriented path $\overrightarrow{pq}$ and $\overrightarrow{qp}$. Along each of $\overrightarrow{pq}$ and $\overrightarrow{qp}$ I want to glue a copy of $\mathbb{R}^2$. The result will be the original $\mathbb{R}^2$ with two additional $\mathbb{R}^2$ glued along $\overrightarrow{pq}$ and $\overrightarrow{qp}$. However, here's the catch, I want $pq$ to act as a "portal" meaning that if I consider a path entering from $\overrightarrow{pq}$ I enter the copy of $\mathbb{R}^2$ that I glued along $\overrightarrow{pq}$ and I can only get back to the original $\mathbb{R}^2$ via that same entrance. Likewise, if I consider a path that enters along $\overrightarrow{qp}$ I should enter the copy of $\mathbb{R}^2$ that I glued along that boundary.
It should be noted that if I can do this construction without removing $pq$ that would be fine as well. I just don't know another way to separate the segment into two distinct parts.
In $\mathbb{R}^2$ I have a smooth orientable patch of surface $\sigma$. (homeomorphic to a closed disc) that I want to behave as a portal. Each side of $\sigma$ should be glued to a different copy of $\mathbb{R}^3$ that is only accessible by a path that intersects $\sigma$ from that side.
I've thought about how to construct such a space with quotient spaces, but the intuition of a quotient space doesn't seem quite right. I've also considered gluing along the limit points of Cauchy sequences that come at $pq$ from a particular side, but that seems difficult to formalize. How would one go about formalizing this type of construction?